Skip to main content

JavaScript and TypeScript

Vulkro finds the endpoints in a Node.js or TypeScript project, traces request data to dangerous sinks and checks npm dependencies against the local CVE bundle. TypeScript is read directly, with no build or type-check step.

vulkro scan .
vulkro discover . # endpoint map only

What is analysed​

AreaCoverage
Project detectionpackage.json, with versions from package-lock.json, pnpm-lock.yaml or yarn.lock
Server frameworksExpress, Fastify, NestJS, Next.js (App Router and Pages Router), Koa, Hono, Elysia, AdonisJS, tRPC
Other surfacesGraphQL (Apollo, graphql-yoga), gRPC, WebSocket (ws, Socket.IO), React and Angular client code (XSS and DOM sinks, postMessage without an origin check)
Route compositionRouter mounts across files (Express Router, Hono app.route, Fastify register prefixes, Next.js route segments), so paths match what the server serves
Access modelEach endpoint gets an auth tier (Anonymous, User, Admin, Service, Machine, Unknown), scopes and tenant scoping. A finding already covered by a visible auth gate is suppressed
Taint sourcesreq.body, req.query, req.params, req.headers, Next.js route-handler equivalents, handler parameters
Taint sinksSQL builders (knex.raw, sequelize.query, db.query, pool.query), child_process.exec, eval / Function(...), fetch(...) (SSRF), redirect(...), template-string XSS, __proto__ writes (prototype pollution)
Dependenciesnpm packages, direct and transitive, matched against the local CVE bundle. See Dependencies and CVEs

Each taint finding carries the source-to-sink hop chain (SARIF codeFlows). See Taint analysis.

Example finding​

app.get('/users', async (req, res) => {
const result = await pool.query("SELECT * FROM users WHERE name = '" + req.query.name + "'");
res.json(result.rows);
});
CRITICAL Tainted request value reaches SQL query without parameter binding
CWE-89 SQL injection · proven (admitted)
server.js:8
Fix: Use parameter binding. For raw SQL use the driver's prepared-statement API.
id: js-taint-sql-001:...

Run vulkro explain JS-TAINT-SQL-001 for the full guidance.