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.
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.
git 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/sql-injection)<a href="https://agentmods.dev/rules/atlassian/forge-skills/sql-injection"><img src="https://agentmods.dev/badge/rules/atlassian/forge-skills/sql-injection/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.
<a href="https://agentmods.dev/rules/atlassian/forge-skills/sql-injection"><img src="https://agentmods.dev/badge/rules/atlassian/forge-skills/sql-injection.svg" alt="Reviewed on agentmods" width="80" 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.00012 | $0.01082 |
| Opus 5.5 | $0.00005 | $0.00433 |
| Sonnet 5.5 | $0.00002 | $0.00216 |
| Haiku 4.5 | $0.00001 | $0.00108 |
Grade A, and why
sql-injection 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 20d 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 — 132 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context
- Forge SQL API provides
sql.executeRaw()andsql.prepare()for database operations. SQL injection occurs when untrusted input is interpolated into query strings. - Related CWE: CWE-89 (SQL Injection).
- Severity: Critical - can lead to data exfiltration, manipulation, and privilege escalation.
Scope & Signals
- Dangerous APIs:
sql.executeRaw()- Direct query execution (highest risk)sql.prepare()withoutbindParams()- Prepared statement misusemigrationRunner.enqueue()with dynamic content
- Sources: Resolver payloads, web trigger bodies, event data, user input from Custom UI.
- Sinks: Any SQL query construction using string interpolation/concatenation.
Vulnerable Patterns
// CRITICAL - Direct interpolation in executeRaw
const userId = payload.userId;
sql.executeRaw(`SELECT * FROM users WHERE id = ${userId}`);
// CRITICAL - String concatenation
sql.executeRaw("SELECT * FROM users WHERE username = '" + username + "'");
// HIGH - Prepared statement without bindParams
sql.prepare(`SELECT * FROM users WHERE email = '${email}'`).execute();
// HIGH - Template literal in prepare (still vulnerable)
const query = `SELECT * FROM products WHERE category = '${category}'`;
sql.executeRaw(query);
// MEDIUM - Indirect flow through variable
const userQuery = `SELECT * FROM orders WHERE user_id = ${payload.userId}`;
// ... later ...
sql.executeRaw(userQuery);
Secure Patterns
// SECURE - Parameterized query with bindParams
const query = sql.prepare(`SELECT * FROM users WHERE id = $1`);
query.bindParams({ $1: userId });
await query.execute();
// SECURE - Multiple parameters
const query = sql.prepare(
`SELECT * FROM users WHERE username = $1 AND active = $2`
);
query.bindParams({ $1: username, $2: isActive });
await query.execute();
// SECURE - Named parameters (alternative style)
const query = sql.prepare(
`SELECT * FROM users WHERE email = :email AND role = :role`
);
query.bindParams({ email: userEmail, role: userRole });
await query.execute();
// SECURE - Input validation + parameterization
if (!/^\d+$/.test(userId)) {
throw new Error('Invalid user ID format');
}
const query = sql.prepare(`SELECT * FROM users WHERE id = $1`);
query.bindParams({ $1: parseInt(userId, 10) });
Detection Checklist
- Search for
sql.executeRawwith template literals or string concatenation. - Find
sql.preparecalls without correspondingbindParams(). - Trace variables used in SQL strings back to untrusted sources.
- Check
migrationRunner.enqueuefor dynamic schema/table names. - Look for custom "sanitization" functions (often insufficient).
Severity Classification
| Severity | Pattern |
|---|---|
| Critical | Direct user input in sql.executeRaw() |
| High | sql.prepare() without bindParams() |
| Medium | Indirect flow with some transformations |
| Low | Input validated against strict allowlist |
Common Pitfalls
// WRONG - Numeric values still need binding
sql.executeRaw(`SELECT * FROM products WHERE id = ${productId}`);
// WRONG - Custom escaping is insufficient
const safe = input.replace(/'/g, "''");
sql.executeRaw(`SELECT * FROM users WHERE name = '${safe}'`);
// WRONG - toString() doesn't sanitize
sql.executeRaw(`SELECT * FROM logs WHERE date = '${date.toString()}'`);
PoC / Test Leads
- Inject SQL metacharacters:
' OR '1'='1,'; DROP TABLE users; -- - Test UNION-based injection:
' UNION SELECT * FROM sensitive_table -- - Try time-based blind SQLi:
' AND SLEEP(5) -- - Test in numeric fields:
1 OR 1=1
Remediation Guidance (advisory)
- Always use
sql.prepare()withbindParams()for all queries. - Use positional (
$1,$2) or named (:param) parameters. - Validate input types before use (even with parameterization).
- For dynamic table/column names, use strict allowlists.
- Never use string concatenation or interpolation for SQL.
Deterministic Signals (OpenGrep rules)
forge-dynamic-raw-sql-query(ERROR): request data flows into the SQL text ofexecuteRaw,queryRaw,prepareRaw,prepareorexecuteDDL.Number(),parseInt,.length, schema.parse()and the SQL client's own escaping helpers count as sanitisers; a custom quote-escaping function does not.
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.
- 20d ago Changed · -11 lines 8281df6ab3d9
- 3mo ago First seen · 143 lines · 12 tokens per session scan A fabdfd6edf6c
sql-injection is a cursor rule published in the GitHub repository atlassian/forge-skills (35 stars, last pushed 4d ago), licensed Apache-2.0. It adds 12 tokens to every session and 1,082 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.
sql-injection compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| sql-injectionatlassian/forge-skills | Cursor rule | 35 | 4d ago | Apache-2.0 | A | 12 | Cursor |
| ponytailDietrichGebert/ponytail | Cursor rule | 201k | 8d ago | MIT | A | 604 | Cursor |
| angular-20angular/angular | Cursor rule | 102k | 4d ago | MIT | A | 0 | Cursor |
| dev-standardapache/superset | Cursor rule | 76k | today | Apache-2.0 | A | 1,147 | Cursor |
| prefer-assertions-over-defensive-checksprisma/orm | Cursor rule | 48k | today | Apache-2.0 | A | 0 | Cursor |
| prefer-direct-imports-over-module-mocksprisma/orm | Cursor rule | 48k | today | Apache-2.0 | A | 0 | Cursor |
| shared-plane-packagesprisma/orm | Cursor rule | 48k | today | Apache-2.0 | A | 0 | Cursor |