eslint-plugin-node-security 4.8.0 → 4.8.1

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.
Files changed (41) hide show
  1. package/package.json +2 -2
  2. package/src/index.js +1 -95
  3. package/src/oxlint.js +1 -3
  4. package/src/rules/detect-child-process/index.js +1 -625
  5. package/src/rules/detect-eval-with-expression/index.js +1 -364
  6. package/src/rules/detect-non-literal-fs-filename/index.js +1 -516
  7. package/src/rules/detect-suspicious-dependencies/index.js +1 -69
  8. package/src/rules/lock-file/index.js +1 -92
  9. package/src/rules/no-arbitrary-file-access/index.js +1 -152
  10. package/src/rules/no-buffer-overread/index.js +1 -543
  11. package/src/rules/no-cryptojs/index.js +1 -99
  12. package/src/rules/no-cryptojs-weak-random/index.js +1 -103
  13. package/src/rules/no-data-in-temp-storage/index.js +1 -85
  14. package/src/rules/no-deprecated-buffer/index.js +1 -84
  15. package/src/rules/no-deprecated-cipher-method/index.js +1 -112
  16. package/src/rules/no-dynamic-algorithm-selection/index.js +1 -72
  17. package/src/rules/no-dynamic-command-string/index.js +1 -201
  18. package/src/rules/no-dynamic-dependency-loading/index.js +1 -45
  19. package/src/rules/no-dynamic-require/index.js +1 -96
  20. package/src/rules/no-ecb-mode/index.js +1 -108
  21. package/src/rules/no-insecure-key-derivation/index.js +1 -109
  22. package/src/rules/no-insecure-rsa-padding/index.js +1 -104
  23. package/src/rules/no-math-random-crypto/index.js +1 -192
  24. package/src/rules/no-self-signed-certs/index.js +1 -110
  25. package/src/rules/no-sha1-hash/index.js +1 -121
  26. package/src/rules/no-shell-injection/index.js +1 -68
  27. package/src/rules/no-ssrf/index.js +1 -221
  28. package/src/rules/no-static-iv/index.js +1 -129
  29. package/src/rules/no-timing-unsafe-compare/index.js +1 -106
  30. package/src/rules/no-toctou-vulnerability/index.js +1 -195
  31. package/src/rules/no-unsafe-buffer-alloc/index.js +1 -87
  32. package/src/rules/no-unsafe-dynamic-require/index.js +1 -93
  33. package/src/rules/no-weak-cipher-algorithm/index.js +1 -174
  34. package/src/rules/no-weak-hash-algorithm/index.js +1 -199
  35. package/src/rules/no-zip-slip/index.js +1 -410
  36. package/src/rules/prefer-native-crypto/index.js +1 -119
  37. package/src/rules/require-dependency-integrity/index.js +1 -62
  38. package/src/rules/require-secure-credential-storage/index.js +1 -45
  39. package/src/rules/require-secure-deletion/index.js +1 -82
  40. package/src/rules/require-storage-encryption/index.js +1 -45
  41. package/src/types/index.js +1 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-node-security",
3
- "version": "4.8.0",
3
+ "version": "4.8.1",
4
4
  "description": "ESLint plugin for Node.js security — detects command injection, path traversal, SSRF, zip slip, and weak crypto (MD5/SHA-1, ECB, static IV) in fs, child_process, vm, and crypto.",
5
5
  "type": "commonjs",
6
6
  "main": "./src/index.js",
@@ -78,7 +78,7 @@
78
78
  "node": ">=18.0.0"
79
79
  },
80
80
  "dependencies": {
81
- "@interlace/eslint-devkit": "^1.9.0"
81
+ "@interlace/eslint-devkit": "^1.10.0"
82
82
  },
83
83
  "peerDependencies": {
84
84
  "eslint": "^8.0.0 || ^9.0.0 || ^10.0.0"
package/src/index.js CHANGED
@@ -1,95 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.configs = exports.plugin = exports.rules = void 0;
4
- exports.rules = {
5
- get 'detect-child-process'() { return require("./rules/detect-child-process").detectChildProcess; },
6
- get 'detect-eval-with-expression'() { return require("./rules/detect-eval-with-expression").detectEvalWithExpression; },
7
- get 'detect-non-literal-fs-filename'() { return require("./rules/detect-non-literal-fs-filename").detectNonLiteralFsFilename; },
8
- get 'no-unsafe-dynamic-require'() { return require("./rules/no-unsafe-dynamic-require").noUnsafeDynamicRequire; },
9
- get 'no-buffer-overread'() { return require("./rules/no-buffer-overread").noBufferOverread; },
10
- get 'no-deprecated-buffer'() { return require("./rules/no-deprecated-buffer").noDeprecatedBuffer; },
11
- get 'no-unsafe-buffer-alloc'() { return require("./rules/no-unsafe-buffer-alloc").noUnsafeBufferAlloc; },
12
- get 'no-toctou-vulnerability'() { return require("./rules/no-toctou-vulnerability").noToctouVulnerability; },
13
- get 'no-zip-slip'() { return require("./rules/no-zip-slip").noZipSlip; },
14
- get 'no-arbitrary-file-access'() { return require("./rules/no-arbitrary-file-access").noArbitraryFileAccess; },
15
- get 'no-data-in-temp-storage'() { return require("./rules/no-data-in-temp-storage").noDataInTempStorage; },
16
- get 'no-ssrf'() { return require("./rules/no-ssrf").noSsrf; },
17
- get 'no-shell-injection'() { return require("./rules/no-shell-injection").noShellInjection; },
18
- get 'no-dynamic-command-string'() { return require("./rules/no-dynamic-command-string").noDynamicCommandString; },
19
- get 'no-dynamic-algorithm-selection'() { return require("./rules/no-dynamic-algorithm-selection").noDynamicAlgorithmSelection; },
20
- get 'detect-suspicious-dependencies'() { return require("./rules/detect-suspicious-dependencies").detectSuspiciousDependencies; },
21
- get 'lock-file'() { return require("./rules/lock-file").lockFile; },
22
- get 'no-dynamic-dependency-loading'() { return require("./rules/no-dynamic-dependency-loading").noDynamicDependencyLoading; },
23
- get 'require-dependency-integrity'() { return require("./rules/require-dependency-integrity").requireDependencyIntegrity; },
24
- get 'require-secure-credential-storage'() { return require("./rules/require-secure-credential-storage").requireSecureCredentialStorage; },
25
- get 'require-secure-deletion'() { return require("./rules/require-secure-deletion").requireSecureDeletion; },
26
- get 'require-storage-encryption'() { return require("./rules/require-storage-encryption").requireStorageEncryption; },
27
- get 'no-dynamic-require'() { return require("./rules/no-dynamic-require").noDynamicRequire; },
28
- get 'no-cryptojs'() { return require("./rules/no-cryptojs").noCryptojs; },
29
- get 'no-cryptojs-weak-random'() { return require("./rules/no-cryptojs-weak-random").noCryptojsWeakRandom; },
30
- get 'no-deprecated-cipher-method'() { return require("./rules/no-deprecated-cipher-method").noDeprecatedCipherMethod; },
31
- get 'no-ecb-mode'() { return require("./rules/no-ecb-mode").noEcbMode; },
32
- get 'no-insecure-key-derivation'() { return require("./rules/no-insecure-key-derivation").noInsecureKeyDerivation; },
33
- get 'no-insecure-rsa-padding'() { return require("./rules/no-insecure-rsa-padding").noInsecureRsaPadding; },
34
- get 'no-math-random-crypto'() { return require("./rules/no-math-random-crypto").noMathRandomCrypto; },
35
- get 'no-self-signed-certs'() { return require("./rules/no-self-signed-certs").noSelfSignedCerts; },
36
- get 'no-sha1-hash'() { return require("./rules/no-sha1-hash").noSha1Hash; },
37
- get 'no-static-iv'() { return require("./rules/no-static-iv").noStaticIv; },
38
- get 'no-timing-unsafe-compare'() { return require("./rules/no-timing-unsafe-compare").noTimingUnsafeCompare; },
39
- get 'no-weak-cipher-algorithm'() { return require("./rules/no-weak-cipher-algorithm").noWeakCipherAlgorithm; },
40
- get 'no-weak-hash-algorithm'() { return require("./rules/no-weak-hash-algorithm").noWeakHashAlgorithm; },
41
- get 'prefer-native-crypto'() { return require("./rules/prefer-native-crypto").preferNativeCrypto; },
42
-
43
- };
44
- exports.plugin = {
45
- meta: {
46
- name: 'eslint-plugin-node-security',
47
- version: '4.8.0',
48
- },
49
- rules: exports.rules,
50
- };
51
- const recommendedRules = {
52
- 'node-security/detect-child-process': 'error',
53
- 'node-security/detect-eval-with-expression': 'error',
54
- 'node-security/detect-non-literal-fs-filename': 'warn',
55
- 'node-security/no-unsafe-dynamic-require': 'error',
56
- 'node-security/no-buffer-overread': 'warn',
57
- 'node-security/no-deprecated-buffer': 'error',
58
- 'node-security/no-unsafe-buffer-alloc': 'warn',
59
- 'node-security/no-toctou-vulnerability': 'error',
60
- 'node-security/no-zip-slip': 'error',
61
- 'node-security/no-arbitrary-file-access': 'error',
62
- 'node-security/no-data-in-temp-storage': 'error',
63
- 'node-security/no-ssrf': 'warn',
64
- 'node-security/no-shell-injection': 'error',
65
- 'node-security/no-dynamic-command-string': 'error',
66
- 'node-security/no-dynamic-algorithm-selection': 'error',
67
- 'node-security/no-timing-unsafe-compare': 'warn',
68
- 'node-security/detect-suspicious-dependencies': 'warn',
69
- 'node-security/lock-file': 'warn',
70
- 'node-security/require-dependency-integrity': 'error',
71
- 'node-security/no-weak-hash-algorithm': 'error',
72
- 'node-security/no-weak-cipher-algorithm': 'error',
73
- 'node-security/no-static-iv': 'error',
74
- 'node-security/no-ecb-mode': 'error',
75
- 'node-security/no-math-random-crypto': 'error',
76
- 'node-security/no-cryptojs': 'error',
77
- };
78
- exports.configs = {
79
- recommended: {
80
- plugins: {
81
- 'node-security': exports.plugin,
82
- },
83
- rules: recommendedRules,
84
- },
85
- strict: {
86
- plugins: {
87
- 'node-security': exports.plugin,
88
- },
89
- rules: Object.fromEntries(Object.keys(exports.rules).map((ruleName) => [
90
- `node-security/${ruleName}`,
91
- 'error',
92
- ])),
93
- },
94
- };
95
- exports.default = exports.plugin;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.configs=exports.plugin=exports.rules=void 0;exports.rules={get"detect-child-process"(){return require("./rules/detect-child-process").detectChildProcess},get"detect-eval-with-expression"(){return require("./rules/detect-eval-with-expression").detectEvalWithExpression},get"detect-non-literal-fs-filename"(){return require("./rules/detect-non-literal-fs-filename").detectNonLiteralFsFilename},get"no-unsafe-dynamic-require"(){return require("./rules/no-unsafe-dynamic-require").noUnsafeDynamicRequire},get"no-buffer-overread"(){return require("./rules/no-buffer-overread").noBufferOverread},get"no-deprecated-buffer"(){return require("./rules/no-deprecated-buffer").noDeprecatedBuffer},get"no-unsafe-buffer-alloc"(){return require("./rules/no-unsafe-buffer-alloc").noUnsafeBufferAlloc},get"no-toctou-vulnerability"(){return require("./rules/no-toctou-vulnerability").noToctouVulnerability},get"no-zip-slip"(){return require("./rules/no-zip-slip").noZipSlip},get"no-arbitrary-file-access"(){return require("./rules/no-arbitrary-file-access").noArbitraryFileAccess},get"no-data-in-temp-storage"(){return require("./rules/no-data-in-temp-storage").noDataInTempStorage},get"no-ssrf"(){return require("./rules/no-ssrf").noSsrf},get"no-shell-injection"(){return require("./rules/no-shell-injection").noShellInjection},get"no-dynamic-command-string"(){return require("./rules/no-dynamic-command-string").noDynamicCommandString},get"no-dynamic-algorithm-selection"(){return require("./rules/no-dynamic-algorithm-selection").noDynamicAlgorithmSelection},get"detect-suspicious-dependencies"(){return require("./rules/detect-suspicious-dependencies").detectSuspiciousDependencies},get"lock-file"(){return require("./rules/lock-file").lockFile},get"no-dynamic-dependency-loading"(){return require("./rules/no-dynamic-dependency-loading").noDynamicDependencyLoading},get"require-dependency-integrity"(){return require("./rules/require-dependency-integrity").requireDependencyIntegrity},get"require-secure-credential-storage"(){return require("./rules/require-secure-credential-storage").requireSecureCredentialStorage},get"require-secure-deletion"(){return require("./rules/require-secure-deletion").requireSecureDeletion},get"require-storage-encryption"(){return require("./rules/require-storage-encryption").requireStorageEncryption},get"no-dynamic-require"(){return require("./rules/no-dynamic-require").noDynamicRequire},get"no-cryptojs"(){return require("./rules/no-cryptojs").noCryptojs},get"no-cryptojs-weak-random"(){return require("./rules/no-cryptojs-weak-random").noCryptojsWeakRandom},get"no-deprecated-cipher-method"(){return require("./rules/no-deprecated-cipher-method").noDeprecatedCipherMethod},get"no-ecb-mode"(){return require("./rules/no-ecb-mode").noEcbMode},get"no-insecure-key-derivation"(){return require("./rules/no-insecure-key-derivation").noInsecureKeyDerivation},get"no-insecure-rsa-padding"(){return require("./rules/no-insecure-rsa-padding").noInsecureRsaPadding},get"no-math-random-crypto"(){return require("./rules/no-math-random-crypto").noMathRandomCrypto},get"no-self-signed-certs"(){return require("./rules/no-self-signed-certs").noSelfSignedCerts},get"no-sha1-hash"(){return require("./rules/no-sha1-hash").noSha1Hash},get"no-static-iv"(){return require("./rules/no-static-iv").noStaticIv},get"no-timing-unsafe-compare"(){return require("./rules/no-timing-unsafe-compare").noTimingUnsafeCompare},get"no-weak-cipher-algorithm"(){return require("./rules/no-weak-cipher-algorithm").noWeakCipherAlgorithm},get"no-weak-hash-algorithm"(){return require("./rules/no-weak-hash-algorithm").noWeakHashAlgorithm},get"prefer-native-crypto"(){return require("./rules/prefer-native-crypto").preferNativeCrypto}};exports.plugin={meta:{name:"eslint-plugin-node-security",version:"4.8.1"},rules:exports.rules};const recommendedRules={"node-security/detect-child-process":"error","node-security/detect-eval-with-expression":"error","node-security/detect-non-literal-fs-filename":"warn","node-security/no-unsafe-dynamic-require":"error","node-security/no-buffer-overread":"warn","node-security/no-deprecated-buffer":"error","node-security/no-unsafe-buffer-alloc":"warn","node-security/no-toctou-vulnerability":"error","node-security/no-zip-slip":"error","node-security/no-arbitrary-file-access":"error","node-security/no-data-in-temp-storage":"error","node-security/no-ssrf":"warn","node-security/no-shell-injection":"error","node-security/no-dynamic-command-string":"error","node-security/no-dynamic-algorithm-selection":"error","node-security/no-timing-unsafe-compare":"warn","node-security/detect-suspicious-dependencies":"warn","node-security/lock-file":"warn","node-security/require-dependency-integrity":"error","node-security/no-weak-hash-algorithm":"error","node-security/no-weak-cipher-algorithm":"error","node-security/no-static-iv":"error","node-security/no-ecb-mode":"error","node-security/no-math-random-crypto":"error","node-security/no-cryptojs":"error"};exports.configs={recommended:{plugins:{"node-security":exports.plugin},rules:recommendedRules},strict:{plugins:{"node-security":exports.plugin},rules:Object.fromEntries(Object.keys(exports.rules).map(ruleName=>[`node-security/${ruleName}`,"error"]))}};exports.default=exports.plugin;
package/src/oxlint.js CHANGED
@@ -1,3 +1 @@
1
- "use strict";
2
- const index_1 = require("./index");
3
- module.exports = index_1.plugin;
1
+ "use strict";const index_1=require("./index");module.exports=index_1.plugin;