software-composition

A software composition analysis rule for checking Forge app dependencies, such as npm packages, for known security vulnerabilities.

In plain words
What is it for?
Running tools such as `npm audit`, Snyk, OSV Scanner, or Trivy and reviewing package-specific Forge risks.
Why use it?
It helps find risky or outdated third-party code before it creates security problems or blocks Marketplace compliance.

Cursor rule

Install

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.

agentmods
npx agentmods add rules/atlassian/forge-skills/software-composition
Clone the repo
git clone --depth 1 https://github.com/atlassian/forge-skills
Per session 7 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,004 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00007 $0.01004
Opus 5 $0.00003 $0.00502
Sonnet 5 $0.00001 $0.00201
Haiku 4.5 $0.00001 $0.00100

Measured 2d ago against content hash 76795ce36a6a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

software-composition 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.

skills/forge-security-review/assets/security-rules/forge-misc/software-composition.mdc · 162 lines

How it starts

The opening of the file, as written. The whole thing — 162 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Context

  • Forge apps depend on npm packages that may contain known vulnerabilities. SCA identifies CVEs in dependencies.
  • Related CWE: CWE-1104 (Use of Unmaintained Third Party Components).
  • Required for Marketplace security compliance.

SCA Tools and Commands

# npm audit (built-in)
npm audit --json > npm-audit.json
npm audit fix  # Auto-fix where possible

# Snyk (recommended)
snyk test --json > snyk-results.json
snyk monitor  # Continuous monitoring

# OSV Scanner (Google)
osv-scanner --lockfile=package-lock.json

# Trivy
trivy fs --scanners vuln .

Key Vulnerability Patterns for Forge

Package Vulnerability Type Forge Impact
lodash < 4.17.21 Prototype Pollution asUser→asApp escalation
axios < 0.21.1 SSRF Request forgery
minimist < 1.2.6 Prototype Pollution Various
node-fetch < 2.6.7 Header injection Request manipulation
jsonwebtoken < 9.0.0 JWT bypass Auth bypass

Detection Process

# 1. Check for vulnerable packages
npm audit

# 2. Detailed analysis
npm ls lodash  # Check specific package version

# 3. Review for Forge-specific risks
# Check if vulnerable package is used in:
# - Resolver code (backend)
# - Custom UI (frontend)
# - Build process only (lower risk)

Interpreting Results

┌───────────────┬──────────────────────────────────────────────────────┐
│ Severity      │ Action Required                                      │
├───────────────┼──────────────────────────────────────────────────────┤
│ Critical      │ Immediate update or removal                          │
│ High          │ Update before next release                           │
│ Medium        │ Plan update; assess exploitability                   │
│ Low           │ Track; update during maintenance                     │
└───────────────┴──────────────────────────────────────────────────────┘

Example Analysis

# npm audit output
┌───────────────┬──────────────────────────────────────────────────────┐
│ High          │ Prototype Pollution in lodash                        │
├───────────────┼──────────────────────────────────────────────────────┤
│ Package       │ lodash                                               │
│ Dependency of │ some-package                                         │
│ Path          │ some-package > lodash                                │
│ More info     │ https://npmjs.com/advisories/1065                    │
└───────────────┴──────────────────────────────────────────────────────┘

# Resolution
npm update lodash
# or if nested dependency:
npm update some-package
# or force resolution in package.json:
"overrides": {
  "lodash": "^4.17.21"
}

Detection Checklist

  • Run npm audit and record findings.
  • Run Snyk or alternative SCA tool.
  • Check for Forge-specific high-risk packages (lodash, axios).
  • Assess if vulnerable code paths are reachable.
  • Verify build-only dependencies vs runtime dependencies.
  • Check for outdated but not yet vulnerable packages.

False Positive Handling

# Some vulnerabilities may not apply:

1. Build-only dependencies
   - Vulnerability in webpack plugin
   - Not included in runtime bundle
   - Lower risk but should still update

2. Unused code paths
   - Vulnerable function not imported
   - Assess actual usage

3. Mitigated by Forge platform
   - Some network-level vulns blocked by Forge egress controls

Remediation Approaches

# 1. Direct update (preferred)
npm update package-name

# 2. Force specific version
npm install package-name@fixed-version

# 3. Override nested dependency
# In package.json:
{
  "overrides": {
    "vulnerable-package": "^fixed.version"
  }
}

# 4. Replace package entirely
npm uninstall old-package
npm install alternative-package

Reporting Guidance

  • List all vulnerabilities with severity, package, and CVE.
  • Note which are runtime vs build-only dependencies.
  • Assess exploitability in Forge context.
  • Provide specific version upgrade paths.
  • Map to CWE-1104; include CVE references.

Read the full file on GitHub · 162 lines

Changes

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.

  1. 2d ago First seen · 162 lines · 7 tokens per session scan A 76795ce36a6a

Subscribe to this mod's changes

software-composition is a cursor rule published in the GitHub repository atlassian/forge-skills (20 stars, last pushed 2d ago), licensed Apache-2.0. It adds 7 tokens to every session and 1,004 once invoked, about $0.0000 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.