Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/atlassian/forge-skills/content-security-policygit clone --depth 1 https://github.com/atlassian/forge-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/atlassian/forge-skills/content-security-policy)<a href="https://agentmods.dev/rules/atlassian/forge-skills/content-security-policy"><img src="https://agentmods.dev/badge/rules/atlassian/forge-skills/content-security-policy.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00010 | $0.01070 |
| Opus 5 | $0.00005 | $0.00535 |
| Sonnet 5 | $0.00002 | $0.00214 |
| Haiku 4.5 | $0.00001 | $0.00107 |
Grade A, and why
content-security-policy scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 157 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context
- Forge Custom UI apps can configure CSP via
permissions.contentin manifest.yml. Unsafe directives likeunsafe-inlineandunsafe-evalenable XSS attacks. - Related CWE: CWE-16 (Configuration), CWE-79 (XSS via CSP bypass).
- Only ~23% of Forge apps enable
unsafe-inline; these require extra scrutiny.
Scope & Signals
- Manifest location:
permissions.content.scripts,permissions.content.styles. - Dangerous directives:
unsafe-inline- Allows inline<script>tags (XSS vector)unsafe-eval- Allowseval(),Function(), etc.- Overly broad sources:
*,https:
- Note: Forge provides default CSP restrictions; apps opt out by adding these.
Vulnerable Patterns
# HIGH RISK - Both unsafe directives
permissions:
content:
scripts:
- 'unsafe-inline'
- 'unsafe-eval'
# HIGH RISK - unsafe-inline enables XSS
permissions:
content:
scripts:
- 'unsafe-inline'
# HIGH RISK - unsafe-eval enables code injection
permissions:
content:
scripts:
- 'unsafe-eval'
# HIGH RISK - Wildcard script sources
permissions:
content:
scripts:
- '*'
- 'https:'
# MEDIUM RISK - Broad CDN sources
permissions:
content:
scripts:
- 'https://cdn.jsdelivr.net' # Hosts arbitrary user content
- 'https://unpkg.com'
Secure Patterns
# SECURE - Specific trusted sources only
permissions:
content:
scripts:
- 'https://specific-cdn.example.com/lib.js'
styles:
- 'https://fonts.googleapis.com'
# SECURE - No unsafe directives (default)
permissions:
content:
styles:
- 'https://fonts.googleapis.com'
# scripts section omitted = no additional script sources
# BEST - No content permissions needed
# Rely on bundled code, no external resources
Detection Checklist
- Parse manifest.yml
permissions.contentsection. - Flag
unsafe-inlinein scripts (enables XSS). - Flag
unsafe-evalin scripts (enables code injection). - Check for wildcard or overly broad sources.
- Verify external script sources are trustworthy and necessary.
- Cross-reference with XSS findings (unsafe-inline + dangerouslySetInnerHTML).
Risk Assessment Matrix
| Directive | Risk | Enables |
|---|---|---|
unsafe-inline |
High | XSS via inline scripts |
unsafe-eval |
High | Code injection via eval |
* |
Critical | Any external scripts |
https: |
High | Any HTTPS source |
data: |
Medium | Data URI scripts |
| Specific CDN | Medium | Depends on CDN content |
Common Justifications (Assess Validity)
# "We need inline scripts for React"
# INVALID - React works fine without unsafe-inline
# Solution: Use bundled code, avoid inline event handlers
# "We use a charting library that requires eval"
# QUESTIONABLE - Modern libraries shouldn't require eval
# Solution: Find alternative library or update version
# "We dynamically load scripts"
# VALID USE CASE but needs scrutiny
# Solution: Use specific URLs, not wildcards
CDN Risk Assessment
# HIGH RISK CDNs (host user-uploaded content)
- 'https://cdn.jsdelivr.net' # npm packages, user controlled
- 'https://unpkg.com' # npm packages
- 'https://cdnjs.cloudflare.com' # Generally trusted but broad
# If CDN is needed, prefer specific paths:
permissions:
content:
scripts:
# Specific version and file
- 'https://cdn.jsdelivr.net/npm/[email protected]/lodash.min.js'
PoC / Test Leads
- If
unsafe-inlinepresent, check fordangerouslySetInnerHTML(XSS combo). - If
unsafe-evalpresent, look for code injection sinks. - Test XSS payloads against apps with relaxed CSP.
- Verify necessity of each external source.
Remediation Guidance (advisory)
- Remove
unsafe-inline: Bundle all JavaScript, avoid inline handlers. - Remove
unsafe-eval: Update libraries, avoid dynamic code execution. - Replace wildcards with specific domains/paths.
- Audit necessity of each external source.
- Use subresource integrity (SRI) for external scripts where possible.
- If
unsafe-inlineis truly required, document the justification and ensure no XSS sinks exist.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 157 lines · 10 tokens per session scan A 7d004e7f02a0
content-security-policy is a cursor rule published in the GitHub repository atlassian/forge-skills (20 stars, last pushed 4d ago), licensed Apache-2.0. It adds 10 tokens to every session and 1,070 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.
control-plane-descriptors
Control plane descriptor and instance implementation patterns.
family-instance-domain-actions
Family instance domain action implementation patterns.