eslint-plugin-sequelize-security 0.3.5 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/index.js +1 -1
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ This plugin provides Security rules for the Sequelize ORM (SQL injection prevent
|
|
|
29
29
|
|
|
30
30
|
## Why Sequelize-specific?
|
|
31
31
|
|
|
32
|
-
An ORM is not a defence against SQL injection — it narrows the surface to the raw escapes, and those are still string-built. Sequelize has two: `sequelize.query()` and `Sequelize.literal()`. OWASP Juice Shop's two flagship injections are both the former, and neither was reported by any recommended preset in this ecosystem until this plugin existed — the only implementation of the detection shipped inside `eslint-plugin-
|
|
32
|
+
An ORM is not a defence against SQL injection — it narrows the surface to the raw escapes, and those are still string-built. Sequelize has two: `sequelize.query()` and `Sequelize.literal()`. OWASP Juice Shop's two flagship injections are both the former, and neither was reported by any recommended preset in this ecosystem until this plugin existed — the only implementation of the detection shipped inside `eslint-plugin-postgresql-security`, which no Sequelize user installs.
|
|
33
33
|
|
|
34
34
|
Being Sequelize-specific is what makes the rule precise. It knows the safe conventions to stay quiet on (`replacements`, `bind`), and it knows `literal()` is a SQL sink rather than an ordinary helper — so it catches `ORDER BY` injection that a generic string-concatenation linter has no reason to flag. It also tracks variable taint across statements, so `const sql = "SELECT..." + id; sequelize.query(sql)` reports even with the concatenation on a separate line.
|
|
35
35
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-sequelize-security",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"description": "ESLint plugin for the Sequelize ORM — detects SQL injection in raw sequelize.query() and Sequelize.literal() calls built with string concatenation or template literals, connection configuration that disables TLS or certificate validation, and hardcoded database credentials.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./src/index.js",
|
package/src/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.configs=exports.plugin=exports.rules=void 0;const eslint_devkit_1=require("@interlace/eslint-devkit");exports.rules={get"no-hardcoded-credentials"(){return require("./rules/no-hardcoded-credentials").noHardcodedCredentials},get"no-mass-assignment"(){return require("./rules/no-mass-assignment").noMassAssignment},get"no-unsafe-query"(){return require("./rules/no-unsafe-query").noUnsafeQuery},get"require-tls"(){return require("./rules/require-tls").requireTls}};(0,eslint_devkit_1.withCanonicalDocsUrls)("plugin-sequelize-security",exports.rules);exports.plugin={meta:{name:"eslint-plugin-sequelize-security",version:"0.3.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.configs=exports.plugin=exports.rules=void 0;const eslint_devkit_1=require("@interlace/eslint-devkit");exports.rules={get"no-hardcoded-credentials"(){return require("./rules/no-hardcoded-credentials").noHardcodedCredentials},get"no-mass-assignment"(){return require("./rules/no-mass-assignment").noMassAssignment},get"no-unsafe-query"(){return require("./rules/no-unsafe-query").noUnsafeQuery},get"require-tls"(){return require("./rules/require-tls").requireTls}};(0,eslint_devkit_1.withCanonicalDocsUrls)("plugin-sequelize-security",exports.rules);exports.plugin={meta:{name:"eslint-plugin-sequelize-security",version:"0.3.6"},rules:exports.rules};exports.configs={flagship:{plugins:{"sequelize-security":exports.plugin},rules:{"sequelize-security/no-unsafe-query":"error"}},recommended:{plugins:{"sequelize-security":exports.plugin},rules:{"sequelize-security/no-unsafe-query":"error"}},strict:{plugins:{"sequelize-security":exports.plugin},rules:Object.fromEntries(Object.keys(exports.rules).map(ruleName=>[`sequelize-security/${ruleName}`,"error"]))}};exports.default=exports.plugin;
|