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/asapp-privilege-escalationgit 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/asapp-privilege-escalation)<a href="https://agentmods.dev/rules/atlassian/forge-skills/asapp-privilege-escalation"><img src="https://agentmods.dev/badge/rules/atlassian/forge-skills/asapp-privilege-escalation.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.1 | $0.00013 | $0.01527 |
| Opus 5 | $0.00006 | $0.00763 |
| Sonnet 5 | $0.00003 | $0.00305 |
| Haiku 4.5 | $0.00001 | $0.00153 |
Grade A, and why
asapp-privilege-escalation 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 — 170 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context
asApp()operates with the app's full permissions, which typically exceed those ofasUser(). This creates privilege escalation risks when asApp is used without verifying the requesting user has permission for the action.- For user-invoked actions, default to
asUser()when possible. IfasApp()is required, perform explicit permission verification for the same target resource before theasApp()sink. - Related CWE: CWE-269 (Improper Privilege Management), CWE-862 (Missing Authorization).
- Past issues: EPSP-301, VULN-1628326 (Rovo A4J elevated privileges).
Scope & Signals
- Sources: Resolver payloads, web trigger requests, event payloads, Rovo agent actions.
- Sinks:
api.asApp().requestJira(),api.asApp().requestConfluence(),api.asApp().requestBitbucket,api.asApp().requestGraphand other request types, storage mutations, any state-changing operations. - Red flags:
asApp()calls immediately after receiving payload without permission checks.- Authorization checks that are missing, generic, or not bound to the same resource ID used by the sink call.
- Using
asApp()for operations the requesting user couldn't perform directly and not checking user permissions. - Missing validation that the user owns or has access to the target resource.
Vulnerable Patterns
// VULNERABLE - user-controlled target reaches asApp sink with no authz check
resolver.define('updateIssue', async ({ payload }) => {
await api.asApp().requestJira(route`/rest/api/3/issue/${payload.issueId}`, {
method: 'PUT',
body: JSON.stringify(payload.fields)
});
});
// VULNERABLE - check is not coupled to the same resource used in asApp sink
resolver.define('transitionIssue', async ({ payload }) => {
// Checks permission on payload.issueId ...
const canEdit = await authorize().onJiraIssue(payload.issueId).canEdit();
if (!canEdit) throw new Error('Forbidden');
// ... but mutates payload.targetIssueId (attacker-controlled)
await api.asApp().requestJira(route`/rest/api/3/issue/${payload.targetIssueId}/transitions`, {
method: 'POST',
body: JSON.stringify({ transition: { id: payload.transitionId } })
});
});
Secure Patterns
// SECURE - prefer asUser when operation should respect caller permissions
resolver.define('updateIssueAsUser', async ({ payload }) => {
return api.asUser().requestJira(route`/rest/api/3/issue/${payload.issueId}`, {
method: 'PUT',
body: JSON.stringify(payload.fields)
});
});
// SECURE - asApp only after explicit permission check on same resource
resolver.define('updateIssueAsApp', async ({ payload }) => {
const canEdit = await authorize().onJiraIssue(payload.issueId).canEdit();
if (!canEdit) {
throw new Error('Forbidden');
}
return api.asApp().requestJira(route`/rest/api/3/issue/${payload.issueId}`, {
method: 'PUT',
body: JSON.stringify(payload.fields)
});
});
// SECURE - explicit permission check via Forge auth + permissions/check endpoint
resolver.define('updateIssueWithExplicitPermissionEndpoint', async ({ payload }) => {
const permissionRes = await api.asUser().requestJira(route`/rest/api/3/permissions/check`, {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
projectPermissions: [
{
permissions: ['EDIT_ISSUES'],
issues: [Number(payload.issueId)]
}
]
})
});
const permissionJson = await permissionRes.json();
const canEdit = permissionJson?.projectPermissions?.some(
(grant) =>
grant.permission === 'EDIT_ISSUES' &&
Array.isArray(grant.issues) &&
grant.issues.includes(Number(payload.issueId))
) === true;
if (!canEdit) {
throw new Error('Forbidden');
}
// Uses the same issueId that was authorized above.
return api.asApp().requestJira(route`/rest/api/3/issue/${payload.issueId}`, {
method: 'PUT',
body: JSON.stringify(payload.fields)
});
});
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 · 170 lines · 13 tokens per session scan A 97836e4b5c81
asapp-privilege-escalation is a cursor rule published in the GitHub repository atlassian/forge-skills (21 stars, last pushed 6d ago), licensed Apache-2.0. It adds 13 tokens to every session and 1,527 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.