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/coldtatooine/vuln-skill-packWrote 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/coldtatooine/vuln-skill-pack/node-express-security)<a href="https://agentmods.dev/rules/coldtatooine/vuln-skill-pack/node-express-security"><img src="https://agentmods.dev/badge/rules/coldtatooine/vuln-skill-pack/node-express-security/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/coldtatooine/vuln-skill-pack/node-express-security"><img src="https://agentmods.dev/badge/rules/coldtatooine/vuln-skill-pack/node-express-security.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.00000 | $0.00658 |
| Opus 5.5 | $0.00000 | $0.00263 |
| Sonnet 5.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 2mo 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.
- 2mo 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 2mo 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
api-property-optionality-hygiene
Fix ApiProperty/ApiPropertyOptional optionality mismatches in DTO files; use for scheduled batch fixes or DTO edits.
python
Python best practices and patterns for modern software development with Flask and SQLite.
cursor
You are working on the checkout service. Preserve transaction integrity and auditability.
django
Definitive guidelines for writing maintainable, performant, and secure Django applications, emphasizing modern best practices, clear code organization, and efficient patterns.
selectools-providers
Rules for working with LLM provider adapters in selectools.
ehs-ims-conventions
EHS IMS app — RBAC, data layer, tRPC, migrations, AI boundaries.