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/permission-scopesgit 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/permission-scopes)<a href="https://agentmods.dev/rules/atlassian/forge-skills/permission-scopes"><img src="https://agentmods.dev/badge/rules/atlassian/forge-skills/permission-scopes.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.00011 | $0.00981 |
| Opus 5 | $0.00005 | $0.00491 |
| Sonnet 5 | $0.00002 | $0.00196 |
| Haiku 4.5 | $0.00001 | $0.00098 |
Grade A, and why
permission-scopes 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 5d 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 — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context
- Forge apps declare required scopes in
permissions.scopesin manifest.yml. Excessive scopes violate least privilege and increase impact if the app is compromised. - Related CWE: CWE-269 (Improper Privilege Management), CWE-732 (Incorrect Permission Assignment).
- Scope review is a key part of Marketplace security requirements.
- Broad scopes risks are low severity issues
Scope & Signals
- Manifest location:
permissions.scopes[] - Risk indicators:
- Scopes not used by any code path.
- Write scopes when only read is needed.
- Admin scopes for non-admin functionality.
- Broad scopes when narrow alternatives exist.
Scope Categories
# READ scopes (lower risk)
- read:jira-work
- read:confluence-content.all
- read:me
# WRITE scopes (higher risk)
- write:jira-work
- write:confluence-content.all
# ADMIN scopes (highest risk)
- manage:jira-configuration
- manage:confluence-configuration
# USER IMPERSONATION (special concern)
- act:jira
- act:confluence
Detection Process
1. Extract scopes from manifest.yml
2. For each scope:
a. Search codebase for APIs requiring this scope
b. If no usage found → flag as potentially unnecessary
c. If write scope → verify write operations exist
d. If admin scope → verify admin functionality
3. Check for scope upgrades (read → write → admin)
4. Verify scope justification in Marketplace listing
Analysis Patterns
// Search for scope-requiring API patterns:
// read:jira-work
api.requestJira(route`/rest/api/3/issue/${issueId}`, { method: 'GET' })
// write:jira-work
api.requestJira(route`/rest/api/3/issue/${issueId}`, { method: 'PUT' })
api.requestJira(route`/rest/api/3/issue`, { method: 'POST' })
// read:confluence-content.all
api.requestConfluence(route`/wiki/api/v2/pages/${pageId}`)
// storage scopes
storage.get(), storage.set() // Requires storage:app
// manage scopes
api.requestJira(route`/rest/api/3/project`, { method: 'POST' })
Common Over-Privileged Patterns
# OVER-PRIVILEGED - Write scope but only reads data
permissions:
scopes:
- write:jira-work # But code only calls GET endpoints
# OVER-PRIVILEGED - Admin scope for display-only feature
permissions:
scopes:
- manage:jira-configuration # Only reads config, doesn't manage
# OVER-PRIVILEGED - Broad scope when specific exists
permissions:
scopes:
- read:jira-work # When only read:jira-work:issue needed
Detection Checklist
- List all scopes from manifest.yml.
- For each scope, grep for API calls requiring that scope.
- Flag scopes with no corresponding API usage.
- Check if write scopes could be replaced with read scopes.
- Verify admin scopes are justified by admin functionality.
- Compare against Marketplace listing scope justifications.
- Note any scopes added but not yet used (future features?).
Scope to API Mapping (Examples)
| Scope | Required For |
|---|---|
read:jira-work |
GET issue, search, project info |
write:jira-work |
POST/PUT/DELETE issues, comments |
read:confluence-content.all |
GET pages, spaces |
write:confluence-content.all |
Create/update pages |
storage:app |
Forge storage API |
read:me |
Get current user info |
PoC / Test Leads
- Remove unused scope and verify app still functions.
- Downgrade write to read scope and check for failures.
- Map each API call to its required scope.
Remediation Guidance (advisory)
- Remove all scopes not required by actual code paths.
- Downgrade write scopes to read where writes aren't performed.
- Replace broad scopes with more specific alternatives.
- Document justification for each remaining scope.
- Implement scope review as part of deployment checklist.
- Consider future features separately (add scopes when needed).
Reporting Guidance
- List all declared scopes with usage status.
- Highlight unused or over-privileged scopes.
- Provide specific downgrade recommendations.
- Note impact of each unnecessary scope.
- Map to CWE-269; reference least privilege principle.
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.
- 5d ago First seen · 142 lines · 11 tokens per session scan A d5454f790559
permission-scopes is a cursor rule published in the GitHub repository atlassian/forge-skills (21 stars, last pushed 6d ago), licensed Apache-2.0. It adds 11 tokens to every session and 981 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
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
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.