JS 1.0 · Project evidence

JS App (Knex/Postgres 3): Find Vulnerabilities

Express.js app with Knex.js and PostgreSQL. Scaffolded from Cursor's Auto MAX mode.

Project purpose and scale

JS App (Knex/Postgres 3): Find Vulnerabilities

Express.js app with Knex.js and PostgreSQL. Scaffolded from Cursor's Auto MAX mode.

Source files
4
Reference findings
3
Matched signatures
15
Unmatched signatures
11

Reference context

Deterministic reference findings

These findings define the project reference set for JS 1.0. Their presence does not establish exhaustive ground truth.

ClassSeverityLocationReference ID
information-exposuremediumapp.js:14js-xpowered-by-header-3
hardcoded-credentialshighapp.js:9js-hardcoded-creds-3
sql-injectionhighuserMode.js:2js-sql-injection-3

Finding evidence

Reference-matched normalized signatures

Matched means agreement with the Snyk Code reference set, not independent ground-truth adjudication.

Severity and description show the deterministic most-frequent metadata variant; the final column records how many variants were observed across repetitions.

ConfigurationClassRepresentative severityLocationRecurrenceRepresentative descriptionMetadata variants
Claude Opus 4.6 Highhardcoded-credentialshighapp.js:95 of 5Hardcoded database password in DB config object1
Claude Opus 4.6 Highinformation-exposuremediumapp.js:145 of 5X-Powered-By header exposes information about the used framework to potential attackers1
Claude Opus 4.6 Highsql-injectionhighuserMode.js:25 of 5Unsanitized input from HTTP parameter flows into raw, where it is used in an SQL query. This may result in an SQL Injection vulnerability.1
Claude Opus 4.6 Mediumhardcoded-credentialshighapp.js:95 of 5Hardcoded database password in DB config object1
Claude Opus 4.6 Mediuminformation-exposuremediumapp.js:145 of 5X-Powered-By header exposes information about the used framework to potential attackers1
Claude Opus 4.6 Mediumsql-injectionhighuserMode.js:25 of 5Unsanitized input from HTTP parameter flows into raw, where it is used in an SQL query. This may result in an SQL Injection vulnerability.1
Claude Opus 4.7 Maxhardcoded-credentialshighapp.js:95 of 5Hardcoded database password in DB config object1
Claude Opus 4.7 Maxinformation-exposuremediumapp.js:144 of 5X-Powered-By header exposes information about the used framework to potential attackers1
Claude Opus 4.7 Maxsql-injectionhighuserMode.js:25 of 5Unsanitized input from HTTP parameter flows into raw, where it is used in an SQL query. This may result in an SQL Injection vulnerability.1
Claude Sonnet 4.6 Highhardcoded-credentialshighapp.js:95 of 5Hardcoded database password in DB config object1
Claude Sonnet 4.6 Highinformation-exposuremediumapp.js:145 of 5X-Powered-By header exposes information about the used framework to potential attackers1
Claude Sonnet 4.6 Highsql-injectionhighuserMode.js:25 of 5Unsanitized input from HTTP parameter flows into raw, where it is used in an SQL query. This may result in an SQL Injection vulnerability.1
Claude Sonnet 4.6 Mediumhardcoded-credentialshighapp.js:95 of 5Hardcoded database password in DB config object1
Claude Sonnet 4.6 Mediuminformation-exposuremediumapp.js:145 of 5X-Powered-By header exposes information about the used framework to potential attackers1
Claude Sonnet 4.6 Mediumsql-injectionhighuserMode.js:25 of 5Unsanitized input from HTTP parameter flows into raw, where it is used in an SQL query. This may result in an SQL Injection vulnerability.1

Finding evidence

Unmatched normalized signatures

Unmatched reports may be false-positive-shaped, adjacent, or likely product-gap candidates.

Severity and description show the deterministic most-frequent metadata variant; the final column records how many variants were observed across repetitions.

ConfigurationClassRepresentative severityLocationRecurrenceRepresentative descriptionMetadata variants
Claude Opus 4.7 Maxallocation-of-resources-without-limits-or-throttlinglowapp.js:171 of 5The /users endpoint has no rate limiting, request size limits, or throttling, allowing potential resource-exhaustion abuse.1
Claude Opus 4.7 Maximproper-type-validationmediumapp.js:182 of 5req.query.id is passed directly to the SQL layer without any type validation/coercion (e.g., parseInt) or schema validation, contributing to the SQL injection and unexpected behavior on malformed input.2
Claude Opus 4.7 Maxsql-injectioncriticalapp.js:201 of 5Untrusted req.query.id is forwarded unsanitized to fetchUserById, which constructs a raw SQL query — propagates the SQL injection vulnerability.1
Claude Sonnet 4.6 Highallocation-of-resources-without-limits-or-throttlingmediumapp.js:174 of 5No rate limiting or request throttling is applied to any endpoint. This allows unlimited automated requests, enabling brute-force enumeration of user records and amplifying the impact of other vulnerabilities such as SQL injection.4
Claude Sonnet 4.6 Highcode-injectionmediumapp.js:21 of 5The Node.js `vm` module is imported but never used. This module enables execution of arbitrary JavaScript code in a V8 context. Its presence alongside unvalidated user input (req.query.id) raises concern that future code paths may pass user-supplied data to vm.runInContext() or similar, enabling code injection. The unused import should be removed and any future use of `vm` with user input must be strictly sandboxed.1
Claude Sonnet 4.6 Highidorhighapp.js:172 of 5The /users endpoint accepts a caller-supplied id parameter and returns user records with no authentication or authorization checks. Any unauthenticated client can retrieve arbitrary user records by enumerating id values.2
Claude Sonnet 4.6 Highotherlowapp.js:21 of 5The node:vm module (which enables arbitrary code execution) is imported but never used. Its unexplained presence may indicate dead code from a prior unsafe code-execution feature, or intent to execute user-controlled code in future changes.1
Claude Sonnet 4.6 Mediumallocation-of-resources-without-limits-or-throttlingmediumapp.js:171 of 5The /users endpoint has no rate limiting, request throttling, or pagination. Any unauthenticated caller can issue unlimited requests, enabling enumeration attacks, brute-force, and potential denial-of-service via resource exhaustion.1
Claude Sonnet 4.6 Mediumcode-injectionmediumapp.js:21 of 5The Node.js `vm` module is imported but never used. Its presence is suspicious; if user-controlled data is ever passed to vm.runInNewContext(), vm.runInThisContext(), or similar APIs, it would result in arbitrary code execution. The vm module does not provide a true security sandbox.1
Claude Sonnet 4.6 Mediumimproper-type-validationmediumapp.js:181 of 5The query parameter `req.query.id` is used directly without any type, format, length, or presence validation. Query string values are always strings (or arrays if repeated), and no check is performed before passing the value to the database layer, enabling malformed or missing input to cause unexpected behavior.1
Claude Sonnet 4.6 Mediumotherlowapp.js:21 of 5The Node.js 'vm' module is imported but never used. This module enables execution of arbitrary JavaScript code in a sandbox context and its unexplained presence is a code hygiene concern. If it is ever wired to user input it would constitute a critical code-injection vulnerability. The unused import should be removed.1

Model behavior

Recurrence by configuration

Stable recurrence measures repeated behavior, not independent validity.

ConfigurationMatched signaturesMatched all fiveUnmatched signaturesUnmatched all five
Claude Opus 4.6 High3300
Claude Opus 4.6 Medium3300
Claude Opus 4.7 Max3230
Claude Sonnet 4.6 High3340
Claude Sonnet 4.6 Medium3340

Inspectable source context

Reference locations

Apache-licensed fixture excerpts are shown around declared reference lines. They are evidence, not runnable examples.

app.js:14js-xpowered-by-header-3
});

const app = express();
app.use(express.json());
app.js:9js-hardcoded-creds-3
    host: "127.0.0.1",
    user: "your_database_user",
    password: "your_database_password",
    database: "myapp_test",
  },
userMode.js:2js-sql-injection-3
function fetchUserById(knex, userProvidedValue) {
  return knex.raw(`SELECT * FROM users WHERE id = ${userProvidedValue}`);
}

Interpretation boundary

Inspect divergence before classifying it

Unmatched reports may be false-positive-shaped, adjacent to the release reference scope, or likely valid product-gap candidates. Missed reference findings may expose representative-versus-systematic coverage behavior.

Return to explorer evidence