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 skills add makifbaysal/tasktrooper --skill node-typescript-security-pitfallsgit clone --depth 1 https://github.com/makifbaysal/tasktrooperWrote 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/skills/makifbaysal/tasktrooper/node-typescript-security-pitfalls)<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/node-typescript-security-pitfalls"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/node-typescript-security-pitfalls/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/skills/makifbaysal/tasktrooper/node-typescript-security-pitfalls"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/node-typescript-security-pitfalls.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.00053 | $0.01739 |
| Opus 5.5 | $0.00021 | $0.00696 |
| Sonnet 5.5 | $0.00011 | $0.00348 |
| Haiku 4.5 | $0.00005 | $0.00174 |
Grade A, and why
node-typescript-security-pitfalls 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 1mo 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.
description: Use when reviewing Node.js or TypeScript server code - Express/Fastify/Nest handlers, Next.js server actions and route handlers, child_process, ORM raw queries, prototype pollution, template engines, JWT and How it starts
The opening of the file, as written. The whole thing — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Node and TypeScript Security Pitfalls
Overview
TypeScript types vanish at runtime: req.query.id: string can arrive as an array or an object. Most Node findings come from that gap, from exec with a template string, from raw-query escape hatches in otherwise safe ORMs, and — in Next.js — from forgetting that a server action is a public endpoint.
1. Runtime Types Are Not Declared Types
// ❌ ?id[$ne]=x or ?id[]=a&id[]=b gives an object or array, not a string
const doc = await Orders.findOne({ id: req.query.id as string, owner: user.id });
// ✅ validate at the boundary (zod/valibot/class-validator) and coerce
const { id } = z.object({ id: z.string().uuid() }).parse(req.query);
Length, includes and equality checks on an unvalidated query value can be bypassed the same way.
2. child_process (CWE-78, CWE-88)
// ❌ shell
exec(`convert ${file} out.png`);
spawn("git", ["clone", url], { shell: true });
// ✅ no shell, end of options
execFile("git", ["clone", "--", url, dir]);
Also check the env option for request-controlled keys (NODE_OPTIONS=--require …).
3. Raw Queries in Safe ORMs (CWE-89)
| Library | Unsafe | Safe |
|---|---|---|
| Prisma | $queryRawUnsafe, $executeRawUnsafe, Prisma.raw() |
$queryRaw tagged template, model methods |
| TypeORM | query("… " + x), .where(\id = ${id}`)` |
.where("id = :id", { id }) |
| Sequelize | sequelize.query(\… ${x}`), literal(x)` |
replacements / bind |
| Knex | knex.raw(\… ${x}`)` |
knex.raw("… ?", [x]) |
| Drizzle | sql.raw(x) |
sql\… ${x}`` |
Mongo/Mongoose: operator injection from JSON bodies (section 1), $where.
4. Next.js Server Actions and Route Handlers
- Every exported async function in a
"use server"file is a callable POST endpoint, whether or not a page renders a form for it. Each must authenticate and authorize inside the action.
// ❌ the page is admin-only, the action is not
"use server";
export async function deleteUser(id: string) { await db.user.delete({ where: { id } }); }
// ✅
export async function deleteUser(id: string) {
const session = await auth();
if (session?.user.role !== "admin") throw new Error("forbidden");
await db.user.delete({ where: { id } });
}
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.
- 1mo ago First seen · 124 lines · 53 tokens per session scan A 4922efce063e
node-typescript-security-pitfalls is a skill published in the GitHub repository makifbaysal/tasktrooper (123 stars, last pushed today), licensed Apache-2.0. It adds 53 tokens to every session and 1,739 once invoked, about $0.0002 per session on Opus 5.5. 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-10-09.
node-typescript-security-pitfalls compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| node-typescript-security-pitfallsmakifbaysal/tasktrooper | Skill | 123 | today | Apache-2.0 | A | 53 | Claude Code, Codex |
| V3 CLI Modernizationruvnet/ruflo | Skill | 83k | today | MIT | A | 35 | Claude Code |
| V3 Core Implementationruvnet/ruflo | Skill | 83k | today | MIT | A | 37 | Claude Code |
| V3 DDD Architectureruvnet/ruflo | Skill | 83k | today | MIT | A | 34 | Claude Code |
| ts-debugberekvolgyipeter/dotclaude | Skill | 2 | yesterday | MIT | A | 68 | Claude Code, Codex |
| cuequivariance-jaxNVIDIA/skills | Skill | 4.2k | 2d ago | Apache-2.0 | A | 38 | Claude Code, Codex |
| cuequivariance-torchNVIDIA/skills | Skill | 4.2k | 2d ago | Apache-2.0 | A | 37 | Claude Code, Codex |