AI Tools & Scripts
Node.js Express Safety Check
Check Node.js API code before you merge: SQL built with template literals, child_process exec with user input, eval, hardcoded JWT and session secrets, CORS open with credentials, weak JWT checks, TLS checks off, open redirects and Math.random tokens.
What you get: 1 file · 22.09 KB · ZIP
See purchase optionsProduct description
One template literal in db.query() is a SQL injection, and one exec() with a request value lets anyone run commands on your server. This skill finds those and nine other security mistakes in Node.js server code (Express, Fastify, Koa, NestJS, plain Node; JavaScript or TypeScript) before you merge or deploy, and tells you how to fix each one.
Your agent runs a scanner on your .js and .ts files. It removes comments, keeps strings, follows a query or command built in a variable (also with +=) to the call that runs it, and knows promisify(exec), mysql2, pg, knex, Prisma raw queries, better-sqlite3 and TypeORM. Placeholders and tagged queries are fine. Browser code and test files are skipped. It never runs Node or installs packages. It returns BLOCK, REVIEW, or NOT FLAGGED, with the file, line, reason, and a safer approach. Secrets are never printed.
What it checks
BLOCK (fix before shipping)
E01: command injection: exec or execSync with a command built from changing values
E02: SQL built with a template literal or + and passed to query(), execute(), prepare(), $queryRawUnsafe() or whereRaw()
E03: eval, new Function or the vm module on changing code
E04: a hardcoded JWT secret, session secret, password or API key
REVIEW (check before release)
E11: CORS with any origin and credentials (cors, NestJS enableCors, Fastify)
E12: jwt.decode without verify, the none algorithm, or ignoreExpiration
E13: TLS certificate checks turned off
E14: secure or httpOnly false on session cookies
E15: res.redirect() to a URL from the request
E16: Math.random() for tokens, codes or salts
E17: stack traces sent to clients
What's included
The scanner (Python 3.9+, standard library only)
A rules guide with the reason and safer approach for each rule
A risky and a safe example server, and the real report the scanner produces on the risky one
Limits
It reads code as text, not as a full JavaScript parser: values are followed within a file only, and MongoDB injection, ORM escaping and dependencies are not checked. NOT FLAGGED is not a guarantee.
Contents
One ZIP file with 7 files: SKILL.md, the scanner in scripts/ (2 Python files), references/rules.md (every rule with its reason and safer approach), and examples/ (2 example files plus report.md, the real scanner output on the risky example).
How to use: This is an agent skill: a folder with a SKILL.md file and Python scripts that an AI coding agent such as Claude Code, Cursor, or Codex CLI can run. Unzip it into your agent's skills folder (for Claude Code: ~/.claude/skills/), then ask your agent to check your project. The scripts also run on their own with Python 3.9 or newer, with nothing to install. They read your files only: no network access, and nothing is sent anywhere.
What you get
1 file · 22.09 KB
- node-express-safety-check-1.0.0.zipZIP · 22.09 KB
AI Tools & Scripts
Node.js Express Safety Check
Check Node.js API code before you merge: SQL built with template literals, child_process exec with user input, eval, hardcoded JWT and session secrets, CORS open with credentials, weak JWT checks, TLS checks off, open redirects and Math.random tokens.
Included in Getly ProGet Pro
Tags
Frequently asked questions
Do I get access instantly?
Yes. This is a digital product - you can download it right after checkout, straight from your library.
Can I use it for commercial projects?
Yes. Commercial use is allowed: use it in your own business and in things you sell. You may not resell or redistribute the file itself.
What's your refund policy?
You can request a refund within 30 days. If something isn't right, request it from your order and the Getly team reviews it.
What file formats and sizes will I get?
You'll download 1 file - ZIP - 22.09 KB in total.
Do I get free updates?
Yes - when the seller ships a new version, you can re-download the latest files from your library at no extra cost. Check the changelog for recent updates.
Price
$5.00



