nyx/tests/dynamic_fixtures/js/sqli_unsupported.js
2026-06-05 10:16:30 -05:00

15 lines
558 B
JavaScript

// SQL injection — unsupported fixture.
// The entry point accepts an HTTP request object, not a plain string.
// HarnessSpec derivation will map this to HttpBody slot (unsupported by JS emitter).
// Entry: handleRequest(req) Cap: SQL_QUERY
// Expected verdict: Unsupported (EntryKindUnsupported or ConfidenceTooLow)
class UserRepository {
findUser(req) {
const name = req && req.body && req.body.name;
const query = "SELECT * FROM users WHERE name='" + name + "'";
return query;
}
}
module.exports = { UserRepository };