eslint-plugin-secure-coding 3.0.1 → 3.0.2
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/AGENTS.md +1 -1
- package/README.md +60 -226
- package/package.json +6 -5
- package/src/index.d.ts +2 -2
- package/src/index.js +29 -263
- package/src/rules/detect-non-literal-regexp/index.d.ts +3 -1
- package/src/rules/detect-object-injection/index.d.ts +3 -1
- package/src/rules/detect-weak-password-validation/index.d.ts +3 -1
- package/src/rules/no-directive-injection/index.d.ts +3 -1
- package/src/rules/no-electron-security-issues/index.d.ts +3 -1
- package/src/rules/no-format-string-injection/index.d.ts +3 -1
- package/src/rules/no-graphql-injection/index.d.ts +3 -1
- package/src/rules/no-hardcoded-credentials/index.d.ts +3 -1
- package/src/rules/no-hardcoded-session-tokens/index.d.ts +3 -1
- package/src/rules/no-improper-sanitization/index.d.ts +3 -1
- package/src/rules/no-improper-type-validation/index.d.ts +3 -1
- package/src/rules/no-insecure-comparison/index.d.ts +3 -1
- package/src/rules/no-ldap-injection/index.d.ts +3 -1
- package/src/rules/no-missing-authentication/index.d.ts +3 -1
- package/src/rules/no-missing-authentication/index.js +0 -1
- package/src/rules/no-pii-in-logs/index.d.ts +3 -1
- package/src/rules/no-privilege-escalation/index.d.ts +3 -1
- package/src/rules/no-redos-vulnerable-regex/index.d.ts +3 -1
- package/src/rules/no-sensitive-data-exposure/index.d.ts +3 -1
- package/src/rules/no-unchecked-loop-condition/index.d.ts +3 -1
- package/src/rules/no-unlimited-resource-allocation/index.d.ts +3 -1
- package/src/rules/no-unsafe-deserialization/index.d.ts +3 -1
- package/src/rules/no-unsafe-regex-construction/index.d.ts +3 -1
- package/src/rules/no-weak-password-recovery/index.d.ts +3 -1
- package/src/rules/no-xpath-injection/index.d.ts +3 -1
- package/src/rules/no-xxe-injection/index.d.ts +3 -1
- package/src/rules/require-backend-authorization/index.d.ts +3 -1
- package/src/rules/require-secure-defaults/index.d.ts +3 -1
- package/src/types/index.d.ts +5 -52
- package/src/rules/detect-child-process/index.d.ts +0 -28
- package/src/rules/detect-child-process/index.js +0 -534
- package/src/rules/detect-eval-with-expression/index.d.ts +0 -26
- package/src/rules/detect-eval-with-expression/index.js +0 -397
- package/src/rules/detect-mixed-content/index.d.ts +0 -10
- package/src/rules/detect-mixed-content/index.js +0 -45
- package/src/rules/detect-non-literal-fs-filename/index.d.ts +0 -24
- package/src/rules/detect-non-literal-fs-filename/index.js +0 -459
- package/src/rules/detect-suspicious-dependencies/index.d.ts +0 -10
- package/src/rules/detect-suspicious-dependencies/index.js +0 -76
- package/src/rules/no-allow-arbitrary-loads/index.d.ts +0 -10
- package/src/rules/no-allow-arbitrary-loads/index.js +0 -48
- package/src/rules/no-arbitrary-file-access/index.d.ts +0 -10
- package/src/rules/no-arbitrary-file-access/index.js +0 -200
- package/src/rules/no-buffer-overread/index.d.ts +0 -37
- package/src/rules/no-buffer-overread/index.js +0 -611
- package/src/rules/no-clickjacking/index.d.ts +0 -34
- package/src/rules/no-clickjacking/index.js +0 -401
- package/src/rules/no-client-side-auth-logic/index.d.ts +0 -10
- package/src/rules/no-client-side-auth-logic/index.js +0 -74
- package/src/rules/no-credentials-in-query-params/index.d.ts +0 -10
- package/src/rules/no-credentials-in-query-params/index.js +0 -62
- package/src/rules/no-data-in-temp-storage/index.d.ts +0 -10
- package/src/rules/no-data-in-temp-storage/index.js +0 -69
- package/src/rules/no-debug-code-in-production/index.d.ts +0 -10
- package/src/rules/no-debug-code-in-production/index.js +0 -54
- package/src/rules/no-disabled-certificate-validation/index.d.ts +0 -10
- package/src/rules/no-disabled-certificate-validation/index.js +0 -66
- package/src/rules/no-dynamic-dependency-loading/index.d.ts +0 -10
- package/src/rules/no-dynamic-dependency-loading/index.js +0 -54
- package/src/rules/no-exposed-debug-endpoints/index.d.ts +0 -10
- package/src/rules/no-exposed-debug-endpoints/index.js +0 -67
- package/src/rules/no-exposed-sensitive-data/index.d.ts +0 -28
- package/src/rules/no-exposed-sensitive-data/index.js +0 -345
- package/src/rules/no-http-urls/index.d.ts +0 -15
- package/src/rules/no-http-urls/index.js +0 -119
- package/src/rules/no-insecure-redirects/index.d.ts +0 -24
- package/src/rules/no-insecure-redirects/index.js +0 -221
- package/src/rules/no-insecure-websocket/index.d.ts +0 -10
- package/src/rules/no-insecure-websocket/index.js +0 -66
- package/src/rules/no-missing-cors-check/index.d.ts +0 -26
- package/src/rules/no-missing-cors-check/index.js +0 -404
- package/src/rules/no-missing-csrf-protection/index.d.ts +0 -28
- package/src/rules/no-missing-csrf-protection/index.js +0 -185
- package/src/rules/no-missing-security-headers/index.d.ts +0 -24
- package/src/rules/no-missing-security-headers/index.js +0 -223
- package/src/rules/no-password-in-url/index.d.ts +0 -10
- package/src/rules/no-password-in-url/index.js +0 -55
- package/src/rules/no-permissive-cors/index.d.ts +0 -10
- package/src/rules/no-permissive-cors/index.js +0 -74
- package/src/rules/no-sensitive-data-in-analytics/index.d.ts +0 -10
- package/src/rules/no-sensitive-data-in-analytics/index.js +0 -66
- package/src/rules/no-sensitive-data-in-cache/index.d.ts +0 -10
- package/src/rules/no-sensitive-data-in-cache/index.js +0 -53
- package/src/rules/no-toctou-vulnerability/index.d.ts +0 -24
- package/src/rules/no-toctou-vulnerability/index.js +0 -213
- package/src/rules/no-tracking-without-consent/index.d.ts +0 -10
- package/src/rules/no-tracking-without-consent/index.js +0 -72
- package/src/rules/no-unencrypted-transmission/index.d.ts +0 -28
- package/src/rules/no-unencrypted-transmission/index.js +0 -241
- package/src/rules/no-unescaped-url-parameter/index.d.ts +0 -26
- package/src/rules/no-unescaped-url-parameter/index.js +0 -360
- package/src/rules/no-unsafe-dynamic-require/index.d.ts +0 -17
- package/src/rules/no-unsafe-dynamic-require/index.js +0 -111
- package/src/rules/no-unvalidated-deeplinks/index.d.ts +0 -10
- package/src/rules/no-unvalidated-deeplinks/index.js +0 -67
- package/src/rules/no-unvalidated-user-input/index.d.ts +0 -26
- package/src/rules/no-unvalidated-user-input/index.js +0 -425
- package/src/rules/no-verbose-error-messages/index.d.ts +0 -10
- package/src/rules/no-verbose-error-messages/index.js +0 -73
- package/src/rules/no-zip-slip/index.d.ts +0 -33
- package/src/rules/no-zip-slip/index.js +0 -450
- package/src/rules/require-code-minification/index.d.ts +0 -10
- package/src/rules/require-code-minification/index.js +0 -48
- package/src/rules/require-csp-headers/index.d.ts +0 -10
- package/src/rules/require-csp-headers/index.js +0 -69
- package/src/rules/require-data-minimization/index.d.ts +0 -10
- package/src/rules/require-data-minimization/index.js +0 -55
- package/src/rules/require-dependency-integrity/index.d.ts +0 -10
- package/src/rules/require-dependency-integrity/index.js +0 -69
- package/src/rules/require-https-only/index.d.ts +0 -10
- package/src/rules/require-https-only/index.js +0 -67
- package/src/rules/require-mime-type-validation/index.d.ts +0 -10
- package/src/rules/require-mime-type-validation/index.js +0 -71
- package/src/rules/require-network-timeout/index.d.ts +0 -10
- package/src/rules/require-network-timeout/index.js +0 -57
- package/src/rules/require-package-lock/index.d.ts +0 -10
- package/src/rules/require-package-lock/index.js +0 -64
- package/src/rules/require-secure-credential-storage/index.d.ts +0 -10
- package/src/rules/require-secure-credential-storage/index.js +0 -53
- package/src/rules/require-secure-deletion/index.d.ts +0 -10
- package/src/rules/require-secure-deletion/index.js +0 -45
- package/src/rules/require-storage-encryption/index.d.ts +0 -10
- package/src/rules/require-storage-encryption/index.js +0 -53
- package/src/rules/require-url-validation/index.d.ts +0 -10
- package/src/rules/require-url-validation/index.js +0 -77
|
@@ -32,5 +32,7 @@ export interface Options extends SecurityRuleOptions {
|
|
|
32
32
|
requireResourceValidation?: boolean;
|
|
33
33
|
}
|
|
34
34
|
type RuleOptions = [Options?];
|
|
35
|
-
export declare const noUnlimitedResourceAllocation: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener
|
|
35
|
+
export declare const noUnlimitedResourceAllocation: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
|
|
36
|
+
name: string;
|
|
37
|
+
};
|
|
36
38
|
export {};
|
|
@@ -34,5 +34,7 @@ export interface Options extends SecurityRuleOptions {
|
|
|
34
34
|
validationFunctions?: string[];
|
|
35
35
|
}
|
|
36
36
|
type RuleOptions = [Options?];
|
|
37
|
-
export declare const noUnsafeDeserialization: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener
|
|
37
|
+
export declare const noUnsafeDeserialization: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
|
|
38
|
+
name: string;
|
|
39
|
+
};
|
|
38
40
|
export {};
|
|
@@ -24,5 +24,7 @@ export interface Options {
|
|
|
24
24
|
maxPatternLength?: number;
|
|
25
25
|
}
|
|
26
26
|
type RuleOptions = [Options?];
|
|
27
|
-
export declare const noUnsafeRegexConstruction: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener
|
|
27
|
+
export declare const noUnsafeRegexConstruction: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
|
|
28
|
+
name: string;
|
|
29
|
+
};
|
|
28
30
|
export {};
|
|
@@ -32,5 +32,7 @@ export interface Options extends SecurityRuleOptions {
|
|
|
32
32
|
secureTokenFunctions?: string[];
|
|
33
33
|
}
|
|
34
34
|
type RuleOptions = [Options?];
|
|
35
|
-
export declare const noWeakPasswordRecovery: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener
|
|
35
|
+
export declare const noWeakPasswordRecovery: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
|
|
36
|
+
name: string;
|
|
37
|
+
};
|
|
36
38
|
export {};
|
|
@@ -33,5 +33,7 @@ export interface Options extends SecurityRuleOptions {
|
|
|
33
33
|
xpathValidationFunctions?: string[];
|
|
34
34
|
}
|
|
35
35
|
type RuleOptions = [Options?];
|
|
36
|
-
export declare const noXpathInjection: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener
|
|
36
|
+
export declare const noXpathInjection: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
|
|
37
|
+
name: string;
|
|
38
|
+
};
|
|
37
39
|
export {};
|
|
@@ -30,5 +30,7 @@ export interface Options {
|
|
|
30
30
|
xmlValidationFunctions?: string[];
|
|
31
31
|
}
|
|
32
32
|
type RuleOptions = [Options?];
|
|
33
|
-
export declare const noXxeInjection: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener
|
|
33
|
+
export declare const noXxeInjection: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
|
|
34
|
+
name: string;
|
|
35
|
+
};
|
|
34
36
|
export {};
|
|
@@ -6,5 +6,7 @@
|
|
|
6
6
|
export interface Options {
|
|
7
7
|
}
|
|
8
8
|
type RuleOptions = [Options?];
|
|
9
|
-
export declare const requireBackendAuthorization: import("@typescript-eslint/utils/ts-eslint").RuleModule<"violationDetected", RuleOptions, unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener
|
|
9
|
+
export declare const requireBackendAuthorization: import("@typescript-eslint/utils/ts-eslint").RuleModule<"violationDetected", RuleOptions, unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
10
|
+
name: string;
|
|
11
|
+
};
|
|
10
12
|
export {};
|
|
@@ -6,5 +6,7 @@
|
|
|
6
6
|
export interface Options {
|
|
7
7
|
}
|
|
8
8
|
type RuleOptions = [Options?];
|
|
9
|
-
export declare const requireSecureDefaults: import("@typescript-eslint/utils/ts-eslint").RuleModule<"violationDetected", RuleOptions, unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener
|
|
9
|
+
export declare const requireSecureDefaults: import("@typescript-eslint/utils/ts-eslint").RuleModule<"violationDetected", RuleOptions, unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
10
|
+
name: string;
|
|
11
|
+
};
|
|
10
12
|
export {};
|
package/src/types/index.d.ts
CHANGED
|
@@ -7,28 +7,13 @@
|
|
|
7
7
|
* eslint-plugin-secure-coding Type Exports
|
|
8
8
|
*
|
|
9
9
|
* Barrel file that exports all security rule Options types with consistent naming.
|
|
10
|
-
*
|
|
11
|
-
* Usage:
|
|
12
|
-
* ```typescript
|
|
13
|
-
* import type { NoHardcodedCredentialsOptions } from 'eslint-plugin-secure-coding/types';
|
|
14
|
-
*
|
|
15
|
-
* const config: NoHardcodedCredentialsOptions = {
|
|
16
|
-
* ignorePatterns: ['test/*'],
|
|
17
|
-
* };
|
|
18
|
-
* ```
|
|
19
10
|
*/
|
|
20
|
-
import type { Options as DetectEvalWithExpressionOptions } from '../rules/detect-eval-with-expression';
|
|
21
|
-
import type { Options as DetectChildProcessOptions } from '../rules/detect-child-process';
|
|
22
|
-
import type { Options as NoUnsafeDynamicRequireOptions } from '../rules/no-unsafe-dynamic-require';
|
|
23
11
|
import type { Options as NoGraphqlInjectionOptions } from '../rules/no-graphql-injection';
|
|
24
12
|
import type { Options as NoXxeInjectionOptions } from '../rules/no-xxe-injection';
|
|
25
13
|
import type { Options as NoXpathInjectionOptions } from '../rules/no-xpath-injection';
|
|
26
14
|
import type { Options as NoLdapInjectionOptions } from '../rules/no-ldap-injection';
|
|
27
15
|
import type { Options as NoDirectiveInjectionOptions } from '../rules/no-directive-injection';
|
|
28
16
|
import type { Options as NoFormatStringInjectionOptions } from '../rules/no-format-string-injection';
|
|
29
|
-
import type { Options as DetectNonLiteralFsFilenameOptions } from '../rules/detect-non-literal-fs-filename';
|
|
30
|
-
import type { Options as NoZipSlipOptions } from '../rules/no-zip-slip';
|
|
31
|
-
import type { Options as NoToctouVulnerabilityOptions } from '../rules/no-toctou-vulnerability';
|
|
32
17
|
import type { Options as DetectNonLiteralRegexpOptions } from '../rules/detect-non-literal-regexp';
|
|
33
18
|
import type { Options as NoRedosVulnerableRegexOptions } from '../rules/no-redos-vulnerable-regex';
|
|
34
19
|
import type { Options as NoUnsafeRegexConstructionOptions } from '../rules/no-unsafe-regex-construction';
|
|
@@ -36,52 +21,28 @@ import type { Options as DetectObjectInjectionOptions } from '../rules/detect-ob
|
|
|
36
21
|
import type { Options as NoUnsafeDeserializationOptions } from '../rules/no-unsafe-deserialization';
|
|
37
22
|
import type { Options as NoHardcodedCredentialsOptions } from '../rules/no-hardcoded-credentials';
|
|
38
23
|
import type { Options as NoInsecureComparisonOptions } from '../rules/no-insecure-comparison';
|
|
39
|
-
import type { Options as NoUnvalidatedUserInputOptions } from '../rules/no-unvalidated-user-input';
|
|
40
|
-
import type { Options as NoUnescapedUrlParameterOptions } from '../rules/no-unescaped-url-parameter';
|
|
41
24
|
import type { Options as NoImproperSanitizationOptions } from '../rules/no-improper-sanitization';
|
|
42
25
|
import type { Options as NoImproperTypeValidationOptions } from '../rules/no-improper-type-validation';
|
|
43
26
|
import type { Options as NoMissingAuthenticationOptions } from '../rules/no-missing-authentication';
|
|
44
27
|
import type { Options as NoPrivilegeEscalationOptions } from '../rules/no-privilege-escalation';
|
|
45
28
|
import type { Options as NoWeakPasswordRecoveryOptions } from '../rules/no-weak-password-recovery';
|
|
46
|
-
import type { Options as
|
|
47
|
-
import type { Options as NoMissingCorsCheckOptions } from '../rules/no-missing-cors-check';
|
|
48
|
-
import type { Options as NoMissingSecurityHeadersOptions } from '../rules/no-missing-security-headers';
|
|
49
|
-
import type { Options as NoInsecureRedirectsOptions } from '../rules/no-insecure-redirects';
|
|
50
|
-
import type { Options as NoUnencryptedTransmissionOptions } from '../rules/no-unencrypted-transmission';
|
|
51
|
-
import type { Options as NoClickjackingOptions } from '../rules/no-clickjacking';
|
|
52
|
-
import type { Options as NoExposedSensitiveDataOptions } from '../rules/no-exposed-sensitive-data';
|
|
29
|
+
import type { Options as RequireBackendAuthorizationOptions } from '../rules/require-backend-authorization';
|
|
53
30
|
import type { Options as NoSensitiveDataExposureOptions } from '../rules/no-sensitive-data-exposure';
|
|
54
|
-
import type { Options as
|
|
31
|
+
import type { Options as NoPiiInLogsOptions } from '../rules/no-pii-in-logs';
|
|
55
32
|
import type { Options as NoUnlimitedResourceAllocationOptions } from '../rules/no-unlimited-resource-allocation';
|
|
56
33
|
import type { Options as NoUncheckedLoopConditionOptions } from '../rules/no-unchecked-loop-condition';
|
|
57
34
|
import type { Options as NoElectronSecurityIssuesOptions } from '../rules/no-electron-security-issues';
|
|
58
|
-
export type {
|
|
35
|
+
export type { NoGraphqlInjectionOptions, NoXxeInjectionOptions, NoXpathInjectionOptions, NoLdapInjectionOptions, NoDirectiveInjectionOptions, NoFormatStringInjectionOptions, DetectNonLiteralRegexpOptions, NoRedosVulnerableRegexOptions, NoUnsafeRegexConstructionOptions, DetectObjectInjectionOptions, NoUnsafeDeserializationOptions, NoHardcodedCredentialsOptions, NoInsecureComparisonOptions, NoImproperSanitizationOptions, NoImproperTypeValidationOptions, NoMissingAuthenticationOptions, NoPrivilegeEscalationOptions, NoWeakPasswordRecoveryOptions, NoPiiInLogsOptions, RequireBackendAuthorizationOptions, NoSensitiveDataExposureOptions, NoUnlimitedResourceAllocationOptions, NoUncheckedLoopConditionOptions, NoElectronSecurityIssuesOptions, };
|
|
59
36
|
/**
|
|
60
37
|
* Combined type for all security rule options
|
|
61
|
-
* Useful for creating unified configuration objects
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* ```typescript
|
|
65
|
-
* const config: AllSecurityRulesOptions = {
|
|
66
|
-
* 'no-hardcoded-credentials': {
|
|
67
|
-
* ignorePatterns: ['test/*'],
|
|
68
|
-
* },
|
|
69
|
-
* };
|
|
70
|
-
* ```
|
|
71
38
|
*/
|
|
72
39
|
export type AllSecurityRulesOptions = {
|
|
73
|
-
'detect-eval-with-expression'?: DetectEvalWithExpressionOptions;
|
|
74
|
-
'detect-child-process'?: DetectChildProcessOptions;
|
|
75
|
-
'no-unsafe-dynamic-require'?: NoUnsafeDynamicRequireOptions;
|
|
76
40
|
'no-graphql-injection'?: NoGraphqlInjectionOptions;
|
|
77
41
|
'no-xxe-injection'?: NoXxeInjectionOptions;
|
|
78
42
|
'no-xpath-injection'?: NoXpathInjectionOptions;
|
|
79
43
|
'no-ldap-injection'?: NoLdapInjectionOptions;
|
|
80
44
|
'no-directive-injection'?: NoDirectiveInjectionOptions;
|
|
81
45
|
'no-format-string-injection'?: NoFormatStringInjectionOptions;
|
|
82
|
-
'detect-non-literal-fs-filename'?: DetectNonLiteralFsFilenameOptions;
|
|
83
|
-
'no-zip-slip'?: NoZipSlipOptions;
|
|
84
|
-
'no-toctou-vulnerability'?: NoToctouVulnerabilityOptions;
|
|
85
46
|
'detect-non-literal-regexp'?: DetectNonLiteralRegexpOptions;
|
|
86
47
|
'no-redos-vulnerable-regex'?: NoRedosVulnerableRegexOptions;
|
|
87
48
|
'no-unsafe-regex-construction'?: NoUnsafeRegexConstructionOptions;
|
|
@@ -89,22 +50,14 @@ export type AllSecurityRulesOptions = {
|
|
|
89
50
|
'no-unsafe-deserialization'?: NoUnsafeDeserializationOptions;
|
|
90
51
|
'no-hardcoded-credentials'?: NoHardcodedCredentialsOptions;
|
|
91
52
|
'no-insecure-comparison'?: NoInsecureComparisonOptions;
|
|
92
|
-
'no-unvalidated-user-input'?: NoUnvalidatedUserInputOptions;
|
|
93
|
-
'no-unescaped-url-parameter'?: NoUnescapedUrlParameterOptions;
|
|
94
53
|
'no-improper-sanitization'?: NoImproperSanitizationOptions;
|
|
95
54
|
'no-improper-type-validation'?: NoImproperTypeValidationOptions;
|
|
96
55
|
'no-missing-authentication'?: NoMissingAuthenticationOptions;
|
|
97
56
|
'no-privilege-escalation'?: NoPrivilegeEscalationOptions;
|
|
98
57
|
'no-weak-password-recovery'?: NoWeakPasswordRecoveryOptions;
|
|
99
|
-
'no-
|
|
100
|
-
'
|
|
101
|
-
'no-missing-security-headers'?: NoMissingSecurityHeadersOptions;
|
|
102
|
-
'no-insecure-redirects'?: NoInsecureRedirectsOptions;
|
|
103
|
-
'no-unencrypted-transmission'?: NoUnencryptedTransmissionOptions;
|
|
104
|
-
'no-clickjacking'?: NoClickjackingOptions;
|
|
105
|
-
'no-exposed-sensitive-data'?: NoExposedSensitiveDataOptions;
|
|
58
|
+
'no-pii-in-logs'?: NoPiiInLogsOptions;
|
|
59
|
+
'require-backend-authorization'?: RequireBackendAuthorizationOptions;
|
|
106
60
|
'no-sensitive-data-exposure'?: NoSensitiveDataExposureOptions;
|
|
107
|
-
'no-buffer-overread'?: NoBufferOverreadOptions;
|
|
108
61
|
'no-unlimited-resource-allocation'?: NoUnlimitedResourceAllocationOptions;
|
|
109
62
|
'no-unchecked-loop-condition'?: NoUncheckedLoopConditionOptions;
|
|
110
63
|
'no-electron-security-issues'?: NoElectronSecurityIssuesOptions;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025 Ofri Peretz
|
|
3
|
-
* Licensed under the MIT License. Use of this source code is governed by the
|
|
4
|
-
* MIT license that can be found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* ESLint Rule: detect-child-process
|
|
8
|
-
* Detects instances of child_process & non-literal exec() calls
|
|
9
|
-
* LLM-optimized with comprehensive command injection prevention guidance
|
|
10
|
-
*
|
|
11
|
-
* @see https://owasp.org/www-community/attacks/Command_Injection
|
|
12
|
-
* @see https://cwe.mitre.org/data/definitions/78.html
|
|
13
|
-
*/
|
|
14
|
-
import type { TSESLint } from '@interlace/eslint-devkit';
|
|
15
|
-
type MessageIds = 'childProcessCommandInjection' | 'useExecFile' | 'useSpawn' | 'useSaferLibrary' | 'validateInput' | 'useShellFalse' | 'strategyValidate' | 'strategySanitize' | 'strategyRestrict';
|
|
16
|
-
export interface Options {
|
|
17
|
-
/** Allow exec() with literal strings. Default: false (stricter) */
|
|
18
|
-
allowLiteralStrings?: boolean;
|
|
19
|
-
/** Allow spawn() with literal arguments. Default: false (stricter) */
|
|
20
|
-
allowLiteralSpawn?: boolean;
|
|
21
|
-
/** Additional child_process methods to check */
|
|
22
|
-
additionalMethods?: string[];
|
|
23
|
-
/** Strategy for fixing command injection: 'validate', 'sanitize', 'restrict', or 'auto' */
|
|
24
|
-
strategy?: 'validate' | 'sanitize' | 'restrict' | 'auto';
|
|
25
|
-
}
|
|
26
|
-
type RuleOptions = [Options?];
|
|
27
|
-
export declare const detectChildProcess: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener>;
|
|
28
|
-
export {};
|