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/static-analysis-forgegit clone --depth 1 https://github.com/atlassian/forge-skillsWhat 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.01419 |
| Opus 5 | $0.00005 | $0.00709 |
| Sonnet 5 | $0.00002 | $0.00284 |
| Haiku 4.5 | $0.00001 | $0.00142 |
Grade A, and why
static-analysis-forge 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 2d 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 — 213 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context
- Static analysis for Forge apps requires Forge-specific rules in addition to standard JavaScript/TypeScript scanning.
- Key tools: FSRT (Forge Static Review Tool), Semgrep, Snyk, ESLint security plugins.
Forge-Specific SAST Tools
Semgrep for Forge
# Install semgrep
brew install semgrep # macOS
# or
pip install semgrep
# Run with JavaScript security rules
semgrep --config p/javascript > semgrep-js.json
semgrep --config p/typescript > semgrep-ts.json
semgrep --config p/nodejsscan > semgrep-node.json
# Run with custom Forge rules
semgrep --config ./forge-rules/ > semgrep-forge.json
Custom Semgrep Rules for Forge
# forge-sql-injection.yaml
rules:
- id: forge-sql-injection-executeraw
patterns:
- pattern-either:
- pattern: sql.executeRaw(`... ${$VAR} ...`)
- pattern: sql.executeRaw("..." + $VAR + "...")
message: "SQL injection risk in sql.executeRaw - use bindParams"
severity: ERROR
languages: [javascript, typescript]
- id: forge-sql-injection-prepare
patterns:
- pattern: sql.prepare(`... ${$VAR} ...`).execute()
message: "SQL injection risk - prepare without bindParams"
severity: ERROR
languages: [javascript, typescript]
- id: forge-asapp-no-authz
patterns:
- pattern: |
resolver.define($NAME, async ({ payload, context }) => {
...
const $API = asApp();
...
})
- pattern-not: |
resolver.define($NAME, async ({ payload, context }) => {
...
if (...) { throw ... }
...
const $API = asApp();
...
})
message: "asApp() without apparent authorization check"
severity: WARNING
languages: [javascript, typescript]
- id: forge-dangerouslysetinnerhtml
pattern: dangerouslySetInnerHTML={{ __html: $VAR }}
message: "dangerouslySetInnerHTML - verify XSS sanitization"
severity: WARNING
languages: [javascript, typescript]
- id: forge-dynamic-code-execution
patterns:
- pattern-either:
- pattern: new Function(...)
- pattern: new AsyncFunction(...)
- pattern: eval(...)
message: "Dynamic code execution - high RCE risk"
severity: ERROR
languages: [javascript, typescript]
Snyk for SCA
# Scan dependencies for vulnerabilities
snyk test --severity-threshold=low --json > snyk-results.json
# Key checks:
# - Known CVEs in dependencies
# - Outdated packages
# - License compliance
Analysis Workflow
# 1. Manifest Analysis
cat manifest.yml | yq '.permissions'
# Check scopes, external permissions, CSP
# 2. FSRT Scan
fsrt scan --path . --output fsrt-results.json
# 3. Semgrep Scan
semgrep --config p/javascript --config p/typescript \
--config ./forge-rules/ --json > semgrep-results.json
# 4. Dependency Scan
snyk test --json > snyk-results.json
npm audit --json > npm-audit.json
# 5. Secret Scanning
gitleaks detect --source . --report-format json > secrets.json
# 6. Triage and Correlate
# Combine results, remove duplicates, prioritize
Detection Patterns Summary
| Category | Pattern | Tool |
|---|---|---|
| SQL Injection | sql.executeRaw(\...${}`)` |
Semgrep |
| XSS | dangerouslySetInnerHTML + unsafe-inline |
Semgrep + Manifest |
| RCE | new Function(), eval() |
Semgrep |
| AuthZ | asApp() without checks |
FSRT, Semgrep |
| Secrets | Basic auth, API keys | Gitleaks, FSRT |
| Dependencies | CVEs in node_modules | Snyk, npm audit |
False Positive Reduction
# Exclude test files
semgrep --exclude='**/test/**' --exclude='**/*.test.*'
# Exclude node_modules
semgrep --exclude='**/node_modules/**'
# Exclude webpack output
semgrep --exclude='**/webpack/**' --exclude='**/dist/**'
# Exclude bundled/minified files
semgrep --exclude='**/*.min.js' --exclude='**/bundled/**'
Triage Guidance
1. Critical Priority:
- SQL injection with user input
- RCE via dynamic code execution
- Hardcoded production secrets
- asApp without authorization
2. High Priority:
- XSS with unsafe-inline CSP
- Prototype pollution
- Web trigger without auth
- Global state tenant isolation
3. Medium Priority:
- Excessive scopes
- Wildcard external permissions
- Missing input validation
- Secrets in logs
4. Low Priority:
- Informational findings
- Best practice deviations
- Unused code patterns
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.
- 2d ago First seen · 213 lines · 10 tokens per session scan A 471a47af96c4
static-analysis-forge is a cursor rule published in the GitHub repository atlassian/forge-skills (20 stars, last pushed 3d ago), licensed Apache-2.0. It adds 10 tokens to every session and 1,419 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
project
4DA project rules and conventions.
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.