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/coldtatooine/vuln-skill-pack/node-express-securitygit clone --depth 1 https://github.com/coldtatooine/vuln-skill-packWhat 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.00000 | $0.00658 |
| Opus 5 | $0.00000 | $0.00329 |
| Sonnet 5 | $0.00000 | $0.00132 |
| Haiku 4.5 | $0.00000 | $0.00066 |
Grade A, and why
node-express-security scanned grade A with 1 finding 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.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
- **Command**: avoid `child_process.exec` with input; use `execFile`/`spawn` with an argument array and no shell. How it starts
The opening of the file, as written. The whole thing — 37 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Node.js & Express API Security Footguns
1. Authentication & authorization
- Auth middleware must actually be applied to every protected route. A route registered before/outside the
app.use(auth)line, or a router mounted without it, is public. Trace middleware order. - Authentication ≠ authorization. A valid token proves who, not whether they may. Check role/ownership per route.
- IDOR is the #1 API hole:
GET /users/:id/DELETE /orders/:idmust verify the token's user owns/may access that object — never look up by the path ID alone.
2. JWT pitfalls
- Verify, don't decode:
jwt.verify(token, secret)— neverjwt.decode()for auth (no signature check). - Pin the algorithm:
{ algorithms: ['HS256'] }. Acceptingalg: noneor RS256↔HS256 confusion lets attackers forge tokens. - Strong secret key (not a default/committed value). Check
exp. Have a revocation story.
3. CORS
cors({ origin: '*', credentials: true })is invalid and dangerous — with credentials, reflect a strict origin allowlist, never*. Don't reflect the incomingOriginheader unchecked.
4. Injection
- SQL/NoSQL: parameterized queries / prepared statements only; never string-concatenate input. For Mongo, guard operator injection (
{ $gt: '' }) by validating/casting types. - Command: avoid
child_process.execwith input; useexecFile/spawnwith an argument array and no shell. - Path traversal: normalize user-supplied filenames into
fs/path.join, confine to a base dir, reject...
5. Missing defenses
- Rate limiting on auth, password reset, expensive endpoints (
express-rate-limit). - Security headers:
helmet(). Body size limit: capexpress.json({ limit }). - Mass assignment:
Object.assign(user, req.body)lets a client setisAdmin/role. Allowlist writable fields.
6. Other
- Don't send stack traces / internal errors to clients in prod — central error handler, generic messages.
- Prototype pollution: deep-merge of untrusted JSON with
__proto__; validate/sanitize. - SSRF: allowlist hosts for server-side requests to user URLs; block internal ranges and cloud metadata.
- Secrets from
process.env, never committed; validate presence at boot.
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 · 37 lines · 0 tokens per session scan A 82532d0fbff0
node-express-security is a cursor rule published in the GitHub repository coldtatooine/vuln-skill-pack (2 stars, last pushed 7d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 658 tokens. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other cursor rules, from other repositories
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.
family-instance-domain-actions
Family instance domain action implementation patterns.