JavaScript SOQL injection from string concatenation
Rule ID: vetkit.js.soql-injection.string-building
SOQL query built with string concatenation or template interpolation. An unescaped value in a WHERE clause changes which Salesforce records are returned or matched (SOQL injection).
Last updated:
Suite: Security
javascript, typescript
SOQL query built with string concatenation or template interpolation. An unescaped value in a WHERE clause changes which Salesforce records are returned or matched (SOQL injection).
Category: SECURITY · Engine rule severity: WARNING
How to fix it
jsforce has no bind parameters for SOQL text: escape ' and \ in every interpolated value with one helper (for example sanitizeSoqlValue), or query through conn.sobject(...).find({ field: value }), which escapes for you.
References
Source: packages/engine/rules/sast/javascript.yml.
Related checks
- NextAuth allowDangerousEmailAccountLinking enabled
- NextAuth Auth.js debug: true logs tokens in production
- NextAuth Auth.js hardcoded secret in source code
- JavaScript eval() with a dynamic argument: code injection
- Node.js code injection: request input loads a module
- Node.js child_process command injection from user input
Check your own repository for this
vetkit runs this rule as part of a repository audit, alongside secret scanning, dependency vulnerabilities, code quality and AI code risk checks. It reads a temporary checkout and never executes your code.
Start with the free Security Quick Scan · See how the platform works
Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.