permission-scopes

permission-scopes is a cursor rule for Cursor from atlassian/forge-skills. It costs 11 tokens per session (981 once invoked), scanned A, original, Apache-2.0.

A security rule set for reviewing the permissions requested by Atlassian Forge apps. Forge apps are extensions that run on Jira or Confluence.

In plain words
What is it for?
Comparing manifest permissions with the code, identifying unnecessary read, write, administrator, or user-impersonation access, and explaining the risks.
Why use it?
It helps find permissions that are unused, broader than necessary, or more powerful than the app's job requires.

Cursor rule for Cursor ✓ vendor

Written for Cursor: a Cursor rule (.mdc).

Good fit Comparing manifest permissions with the code, identifying unnecessary read, write, administrator, or user-impersonation access, and explaining the risks.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/atlassian/forge-skills/permission-scopes
About the project

Atlassian Forge Skills supports Atlassian Forge, a platform for building and deploying apps that extend products such as Jira and Confluence. Its skills and MCP-backed tools help coding agents create Forge apps, review them before deployment, optimize usage, troubleshoot failures, and work with Forge APIs and the Atlassian Design System.

atlassian/forge-skills · 35 stars · on GitHub · developer.atlassian.com

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.

Clone the repo
git clone --depth 1 https://github.com/atlassian/forge-skills

Made for: Cursor.

Wrote 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.

agentmods badge for permission-scopes

README.md
[![agentmods](https://agentmods.dev/badge/rules/atlassian/forge-skills/permission-scopes/github.svg)](https://agentmods.dev/rules/atlassian/forge-skills/permission-scopes)
Your own site
<a href="https://agentmods.dev/rules/atlassian/forge-skills/permission-scopes"><img src="https://agentmods.dev/badge/rules/atlassian/forge-skills/permission-scopes/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for permission-scopes

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 981 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00011 $0.00981
Opus 5.5 $0.00004 $0.00392
Sonnet 5.5 $0.00002 $0.00196
Haiku 4.5 $0.00001 $0.00098

Measured 3mo ago against content hash d5454f790559, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 3mo 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-manifest-config/permission-scopes.mdc · 142 lines

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.scopes in 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.

Read the full file on GitHub · 142 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. 3mo ago First seen · 142 lines · 11 tokens per session scan A d5454f790559

Subscribe to this mod's changes

permission-scopes is a cursor rule published in the GitHub repository atlassian/forge-skills (35 stars, last pushed 4d ago), licensed Apache-2.0. It adds 11 tokens to every session and 981 once invoked, about $0.0000 per session on Opus 5.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.

Related

permission-scopes compared with cursor rules from other repositories

permission-scopes next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
permission-scopesatlassian/forge-skillsCursor rule354d agoApache-2.0A11Cursor
ponytailDietrichGebert/ponytailCursor rule201k8d agoMITA604Cursor
angular-20angular/angularCursor rule102k4d agoMITA0Cursor
dev-standardapache/supersetCursor rule76ktodayApache-2.0A1,147Cursor
prefer-assertions-over-defensive-checksprisma/ormCursor rule48ktodayApache-2.0A0Cursor
prefer-direct-imports-over-module-mocksprisma/ormCursor rule48ktodayApache-2.0A0Cursor
shared-plane-packagesprisma/ormCursor rule48ktodayApache-2.0A0Cursor