eslint-plugin-typeorm-security 1.1.1 → 2.0.0

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 CHANGED
@@ -130,7 +130,7 @@ src/db.ts
130
130
  | Package | Version |
131
131
  | :--- | :--- |
132
132
  | ESLint | `^8.40.0 \|\| ^9.0.0 \|\| ^10.0.0` |
133
- | Node.js | `>=18.0.0` |
133
+ | Node.js | `>=22.13.0` |
134
134
 
135
135
  See the [ESLint Version Support Policy](../../docs/ESLINT_VERSION_SUPPORT.md) — current ecosystem share data, the 20% gate, and the forward-looking exception that covers v10.
136
136
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-typeorm-security",
3
- "version": "1.1.1",
3
+ "version": "2.0.0",
4
4
  "description": "ESLint plugin for typeorm — detects SQL injection in raw queries 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",
@@ -64,7 +64,7 @@
64
64
  "typescript"
65
65
  ],
66
66
  "engines": {
67
- "node": ">=18.0.0"
67
+ "node": ">=22.13.0"
68
68
  },
69
69
  "peerDependencies": {
70
70
  "eslint": "^8.40.0 || ^9.0.0 || ^10.0.0",
@@ -79,7 +79,7 @@
79
79
  }
80
80
  },
81
81
  "dependencies": {
82
- "@interlace/eslint-devkit": "^1.21.3"
82
+ "@interlace/eslint-devkit": "^2.0.0"
83
83
  },
84
84
  "funding": {
85
85
  "type": "github",
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-typeorm-security",exports.rules);exports.plugin={meta:{name:"eslint-plugin-typeorm-security",version:"1.1.1"},rules:exports.rules};exports.configs={flagship:{plugins:{"typeorm-security":exports.plugin},rules:{"typeorm-security/no-unsafe-query":"error"}},recommended:{plugins:{"typeorm-security":exports.plugin},rules:{"typeorm-security/no-unsafe-query":"error"}},strict:{plugins:{"typeorm-security":exports.plugin},rules:Object.fromEntries(Object.keys(exports.rules).map(ruleName=>[`typeorm-security/${ruleName}`,"error"]))}};exports.default=exports.plugin;
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-typeorm-security",exports.rules);exports.plugin={meta:{name:"eslint-plugin-typeorm-security",version:"2.0.0"},rules:exports.rules};exports.configs={flagship:{plugins:{"typeorm-security":exports.plugin},rules:{"typeorm-security/no-unsafe-query":"error"}},recommended:{plugins:{"typeorm-security":exports.plugin},rules:{"typeorm-security/no-unsafe-query":"error"}},strict:{plugins:{"typeorm-security":exports.plugin},rules:Object.fromEntries(Object.keys(exports.rules).map(ruleName=>[`typeorm-security/${ruleName}`,"error"]))}};exports.default=exports.plugin;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.noMassAssignment=void 0;const eslint_devkit_1=require("@interlace/eslint-devkit");exports.noMassAssignment=(0,eslint_devkit_1.createMassAssignmentRule)({meta:{type:"problem",docs:{description:"Disallow writing an inbound request object straight to the database through TypeORM, which lets the caller set every column the model exposes.",url:"https://github.com/ofri-peretz/eslint/blob/main/packages/eslint-plugin-typeorm-security/docs/rules/no-mass-assignment.md",cwe:"CWE-915",cvss:8.1,confidence:"high"}},methods:["save","insert","update","create","merge","preload","upsert"],payloadKeys:[],modules:["typeorm","@nestjs/typeorm"],fix:"Name the columns you accept, or build the entity explicitly and assign only the fields this endpoint owns. `save()` writes every property present on the object.",documentationLink:"https://typeorm.io/repository-api"});
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.noMassAssignment=void 0;const eslint_devkit_1=require("@interlace/eslint-devkit");exports.noMassAssignment=(0,eslint_devkit_1.createMassAssignmentRule)({meta:{type:"problem",docs:{description:"Disallow writing an inbound request object straight to the database through TypeORM, which lets the caller set every column the model exposes.",url:"https://github.com/ofri-peretz/eslint/blob/main/packages/eslint-plugin-typeorm-security/docs/rules/no-mass-assignment.md",cwe:"CWE-915",cvss:8.1,confidence:"high"}},methods:["save","insert","update","create","merge","preload","upsert","values","set"],payloadKeys:[],modules:["typeorm","@nestjs/typeorm"],fix:"Name the columns you accept, or build the entity explicitly and assign only the fields this endpoint owns. `save()` writes every property present on the object.",documentationLink:"https://typeorm.io/repository-api"});