code-review-nodejs
Skill20 starsChanged 3 months agoMITView on GitHub
Security review of Node.js / JavaScript code — dangerous sinks and Express/framework pitfalls. Load when reviewing a Node/JS codebase/PR, on package.json + Express/Next/Nest, or "review this Node app". Signals: child_process, eval, Function, prototype pollution, JWT, Mongoose/Sequelize.
In this repository207 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ad-adcsSkill
- ad-dacl-abuseSkill
- ad-delegation-abuseSkill
- ad-kerberoastingSkill
- ad-pivot-arsenalSkill
- ai-agent-tool-abuseSkill
- ai-insecure-output-handlingSkill
- ai-jailbreakSkill
- ai-llm-dosSkill
- ai-mcp-securitySkill
- ai-model-extractionSkill
- ai-prompt-injectionSkill
- ai-rag-poisoningSkill
- ai-sensitive-data-disclosureSkill
- ai-supply-chainSkill
- ai-system-prompt-leakageSkill
- api-auth-attacksSkill
- api-bolaSkill
- api-fuzzingSkill
- api-graphqlSkill
- api-grpcSkill
- api-mass-assignmentSkill
- api-mongo-agg-facet-bypassSkill
- api-testing-checklistSkill
- api-versioningSkill
- automation-browserSkill
- automation-nuclei-templatesSkill
- automation-recon-pipelineSkill
- cloud-azureSkill
- cloud-container-escapeSkill
- cloud-docker-api-abuseSkill
- cloud-docker-registrySkill
- cloud-gcpSkill
- cloud-iam-privescSkill
- cloud-imds-ssrfSkill
- cloud-kubernetesSkill
- cloud-s3-exposureSkill
- code-review-cicdSkill
- code-review-cppSkill
- code-review-dangerous-sinksSkill
- code-review-dotnetSkill
- code-review-goSkill
- code-review-iacSkill
- code-review-javaSkill
- code-review-methodologySkill
- code-review-phpSkill
- code-review-pythonSkill
- code-review-rubySkill
- code-review-rustSkill
- code-review-secrets-detectionSkill
- code-review-soliditySkill
- crypto-oracle-attacksSkill
- crypto-rsa-attacksSkill
- ctf-cryptoSkill
- ctf-forensicsSkill
- ctf-methodologySkill
- ctf-pwnSkill
- ctf-revSkill
- The first 60 shown.
The file
Files
Node.js / JavaScript security code review
When it applies
Reading Node/JS source (Express, Next.js, NestJS, a package). Language companion to
code-review-methodology — the exact sinks and framework gotchas to grep and trace.
Sinks & patterns (grep, then trace to user input)
- Command exec:
child_process.exec/execSyncwith user input (useexecFile/spawnw/ arg array); template strings in commands. - Code eval:
eval,new Function,vm.runIn…,setTimeout("string")— RCE. - Prototype pollution: recursive merge/
Object.assign/lodash.merge/set,JSON.parseinto object merges, query parsers —__proto__/constructorkeys (→web-prototype-pollution). - SQL/NoSQL: string-built SQL; Mongo queries taking raw
req.body/req.query(operator injection{$gt:''}); Sequelize.query()/literal. - SSRF:
axios/fetch/http.get/requeston a user URL. - Path/upload:
fs.readFile/sendFile/path.joinwith user paths;res.sendFiletraversal. - XSS (server + client):
res.sendof unescaped input; DOM sinksinnerHTML,document.write,dangerouslySetInnerHTML(React),v-html(Vue). - Deserialization:
node-serialize/funcster(unserialize RCE), untrustedJSON→object merge.
Framework specifics
- Express: missing
helmet/CSP, over-broadcors(),req.query/req.paramsinto sinks, weak sessionsecret, no per-object authz (IDOR/BOLA),app.useorder bypassing auth middleware. - JWT:
jsonwebtokenwithalgorithmsnot pinned (alg confusion /none), weak secret (→web-auth-jwt), secret in code. - Next.js/SSR:
getServerSidePropstrusting client input; API routes missing auth; SSRF in image/proxy. - Mass assignment: spreading
req.bodyinto a model/create(→api-mass-assignment).
Method
rg -n "child_process|eval\(|new Function|innerHTML|dangerouslySetInnerHTML|\.merge\(|__proto__|node-serialize";
run njsscan . and semgrep --config auto; trace user input to each sink.
Gotchas
- Client-side
innerHTML/v-html= DOM XSS even in a "backend" review — check the front-end too. - Mongo operator injection needs input validation/casting, not just parameterization.
References
njsscan; Semgrep JS/TS rules; OWASP Node.js & NodeGoat; Express security best practices.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

