import { type Linter } from 'eslint'; /** * @description Detects potentially unsafe regular expressions, which may take a very long time to run, blocking the event loop. * @link https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-unsafe-regex.md * * ```md * | key | value | * | :---------- | :---- | * | type | error | * | deprecated | false | * | recommended | true | * ``` */ declare namespace DetectUnsafeRegex { type RuleEntry = Linter.StringSeverity; } /** * @description Detects "RegExp(variable)", which might allow an attacker to DOS your server with a long-running regular expression. * @link https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-non-literal-regexp.md * * ```md * | key | value | * | :---------- | :---- | * | type | error | * | deprecated | false | * | recommended | true | * ``` */ declare namespace DetectNonLiteralRegexp { type RuleEntry = Linter.StringSeverity; } /** * @description Detects "require(variable)", which might allow an attacker to load and run arbitrary code, or access arbitrary files on disk. * @link https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-non-literal-require.md * * ```md * | key | value | * | :---------- | :---- | * | type | error | * | deprecated | false | * | recommended | true | * ``` */ declare namespace DetectNonLiteralRequire { type RuleEntry = Linter.StringSeverity; } /** * @description Detects variable in filename argument of "fs" calls, which might allow an attacker to access anything on your system. * @link https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-non-literal-fs-filename.md * * ```md * | key | value | * | :---------- | :---- | * | type | error | * | deprecated | false | * | recommended | true | * ``` */ declare namespace DetectNonLiteralFsFilename { type RuleEntry = Linter.StringSeverity; } /** * @description Detects "eval(variable)" which can allow an attacker to run arbitrary code inside your process. * @link https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-eval-with-expression.md * * ```md * | key | value | * | :---------- | :---- | * | type | error | * | deprecated | false | * | recommended | true | * ``` */ declare namespace DetectEvalWithExpression { type RuleEntry = Linter.StringSeverity; } /** * @description Detects if "pseudoRandomBytes()" is in use, which might not give you the randomness you need and expect. * @link https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-pseudoRandomBytes.md * * ```md * | key | value | * | :---------- | :---- | * | type | error | * | deprecated | false | * | recommended | true | * ``` */ declare namespace DetectPseudoRandomBytes { type RuleEntry = Linter.StringSeverity; } /** * @description Detects insecure comparisons (`==`, `!=`, `!==` and `===`), which check input sequentially. * @link https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-possible-timing-attacks.md * * ```md * | key | value | * | :---------- | :---- | * | type | error | * | deprecated | false | * | recommended | true | * ``` */ declare namespace DetectPossibleTimingAttacks { type RuleEntry = Linter.StringSeverity; } /** * @description Detects Express "csrf" middleware setup before "method-override" middleware. * @link https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-no-csrf-before-method-override.md * * ```md * | key | value | * | :---------- | :---- | * | type | error | * | deprecated | false | * | recommended | true | * ``` */ declare namespace DetectNoCsrfBeforeMethodOverride { type RuleEntry = Linter.StringSeverity; } /** * @description Detects calls to "buffer" with "noAssert" flag set. * @link https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-buffer-noassert.md * * ```md * | key | value | * | :---------- | :---- | * | type | error | * | deprecated | false | * | recommended | true | * ``` */ declare namespace DetectBufferNoassert { type RuleEntry = Linter.StringSeverity; } /** * @description Detects instances of "child_process" & non-literal "exec()" calls. * @link https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-child-process.md * * ```md * | key | value | * | :---------- | :---- | * | type | error | * | deprecated | false | * | recommended | true | * ``` */ declare namespace DetectChildProcess { type RuleEntry = Linter.StringSeverity; } /** * @description Detects "object.escapeMarkup = false", which can be used with some template engines to disable escaping of HTML entities. * @link https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-disable-mustache-escape.md * * ```md * | key | value | * | :---------- | :---- | * | type | error | * | deprecated | false | * | recommended | true | * ``` */ declare namespace DetectDisableMustacheEscape { type RuleEntry = Linter.StringSeverity; } /** * @description Detects "variable[key]" as a left- or right-hand assignment operand. * @link https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-object-injection.md * * ```md * | key | value | * | :---------- | :---- | * | type | error | * | deprecated | false | * | recommended | true | * ``` */ declare namespace DetectObjectInjection { type RuleEntry = Linter.StringSeverity; } /** * @description Detects instances of new Buffer(argument) where argument is any non-literal value. * @link https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-new-buffer.md * * ```md * | key | value | * | :---------- | :---- | * | type | error | * | deprecated | false | * | recommended | true | * ``` */ declare namespace DetectNewBuffer { type RuleEntry = Linter.StringSeverity; } /** * @description Detects trojan source attacks that employ unicode bidi attacks to inject malicious code. * @link https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-bidi-characters.md * * ```md * | key | value | * | :---------- | :---- | * | type | error | * | deprecated | false | * | recommended | true | * ``` */ declare namespace DetectBidiCharacters { type RuleEntry = Linter.StringSeverity; } export type EslintSecurityRules = Readonly<{ 'security/detect-unsafe-regex': DetectUnsafeRegex.RuleEntry; 'security/detect-non-literal-regexp': DetectNonLiteralRegexp.RuleEntry; 'security/detect-non-literal-require': DetectNonLiteralRequire.RuleEntry; 'security/detect-non-literal-fs-filename': DetectNonLiteralFsFilename.RuleEntry; 'security/detect-eval-with-expression': DetectEvalWithExpression.RuleEntry; 'security/detect-pseudoRandomBytes': DetectPseudoRandomBytes.RuleEntry; 'security/detect-possible-timing-attacks': DetectPossibleTimingAttacks.RuleEntry; 'security/detect-no-csrf-before-method-override': DetectNoCsrfBeforeMethodOverride.RuleEntry; 'security/detect-buffer-noassert': DetectBufferNoassert.RuleEntry; 'security/detect-child-process': DetectChildProcess.RuleEntry; 'security/detect-disable-mustache-escape': DetectDisableMustacheEscape.RuleEntry; 'security/detect-object-injection': DetectObjectInjection.RuleEntry; 'security/detect-new-buffer': DetectNewBuffer.RuleEntry; 'security/detect-bidi-characters': DetectBidiCharacters.RuleEntry; }>; export {}; //# sourceMappingURL=eslint-security-rules.d.mts.map