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/webtrigger-securitygit clone --depth 1 https://github.com/atlassian/forge-skillsWhat 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.00013 | $0.01255 |
| Opus 5 | $0.00006 | $0.00628 |
| Sonnet 5 | $0.00003 | $0.00251 |
| Haiku 4.5 | $0.00001 | $0.00126 |
Grade A, and why
webtrigger-security 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.
How it starts
The opening of the file, as written. The whole thing — 174 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context
- Forge web triggers are publicly accessible URLs with no built-in authentication. Apps must implement their own authentication, replay protection, and input validation.
- Related CWE: CWE-306 (Missing Authentication for Critical Function).
- Known footgun: PBAC-832 - Webtriggers have no supported authentication mechanism.
Scope & Signals
- Manifest:
moduleswithwebtriggertype. - Handler functions: Receive HTTP request, return HTTP response.
- Risk areas:
- No authentication header validation.
- No signature/HMAC verification.
- No replay protection (timestamp/nonce).
- Direct processing of untrusted request body.
- Sensitive operations without auth.
Vulnerable Patterns
// VULNERABLE - No authentication whatsoever
export async function webhookHandler(request) {
const data = JSON.parse(request.body);
// Directly processing untrusted input
await storage.set(`data-${data.id}`, data.payload);
// Triggering sensitive operations
await notifyUsers(data.users);
return { statusCode: 200 };
}
// VULNERABLE - Weak authentication (easily bypassed)
export async function webhookHandler(request) {
const apiKey = request.headers['x-api-key'];
// Hardcoded comparison (timing attack + hardcoded secret)
if (apiKey !== 'secret-api-key-12345') {
return { statusCode: 401 };
}
// Process request...
}
// VULNERABLE - No replay protection
export async function webhookHandler(request) {
const signature = request.headers['x-signature'];
if (verifySignature(request.body, signature)) {
// Valid signature, but could be replayed!
await processPayment(JSON.parse(request.body));
}
}
Secure Patterns
import crypto from 'crypto';
import { storage } from '@forge/api';
// SECURE - Full authentication with replay protection
export async function webhookHandler(request) {
// 1. Verify signature
const signature = request.headers['x-signature'];
const timestamp = request.headers['x-timestamp'];
const nonce = request.headers['x-nonce'];
if (!signature || !timestamp || !nonce) {
return { statusCode: 401, body: 'Missing auth headers' };
}
// 2. Check timestamp freshness (prevent replay)
const requestTime = parseInt(timestamp, 10);
const now = Date.now();
const MAX_AGE_MS = 5 * 60 * 1000; // 5 minutes
if (Math.abs(now - requestTime) > MAX_AGE_MS) {
return { statusCode: 400, body: 'Request expired' };
}
// 3. Check nonce hasn't been used (prevent replay)
const nonceKey = `nonce:${nonce}`;
const usedNonce = await storage.get(nonceKey);
if (usedNonce) {
return { statusCode: 400, body: 'Nonce already used' };
}
// 4. Verify HMAC signature
const secret = await storage.getSecret('webhook-secret');
const payload = `${timestamp}.${nonce}.${request.body}`;
const expectedSig = crypto
.createHmac('sha256', secret)
.update(payload)
.digest('hex');
if (!crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expectedSig)
)) {
return { statusCode: 401, body: 'Invalid signature' };
}
// 5. Store nonce to prevent replay
await storage.set(nonceKey, { used: true }, { ttl: MAX_AGE_MS / 1000 });
// 6. Validate and process request body
const data = validateAndParse(request.body);
await processWebhook(data);
return { statusCode: 200 };
}
// Helper: Constant-time comparison
function secureCompare(a, b) {
if (a.length !== b.length) return false;
return crypto.timingSafeEqual(Buffer.from(a), Buffer.from(b));
}
Detection Checklist
- Identify all
webtriggermodules in manifest.yml. - For each handler, check for authentication header processing.
- Verify signature validation uses timing-safe comparison.
- Check for timestamp validation (freshness).
- Look for nonce/idempotency key validation.
- Assess what operations the trigger performs (sensitivity).
- Verify input validation before processing body.
Authentication Methods
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.
- 2d ago First seen · 174 lines · 13 tokens per session scan A f01fbcdd9d63
webtrigger-security is a cursor rule published in the GitHub repository atlassian/forge-skills (20 stars, last pushed 2d ago), licensed Apache-2.0. It adds 13 tokens to every session and 1,255 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
project
4DA project rules and conventions.
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.
typescript
Changes to these high-fan-out internals can affect every message, delta, element, or rerun. Keep work in them minimal, and benchmark changes with representative stress-test apps.
coolify-ai-docs
Master reference to all Coolify AI documentation in .ai/ directory.
python_lib
Tips and guidelines specific to the development of the Streamlit Python library, not applicable to scripts and e2e tests.