UNPKG

eslint-plugin-no-secrets

Version:

An eslint rule that searches for potential secrets/keys in code

175 lines (174 loc) 7.38 kB
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "array", "items": { "description": "Options for no-secrets rule", "type": "object", "properties": { "tolerance": { "default": 4, "description": "Minimum randomness/entropy allowed. Only strings above this threshold will be shown", "type": "number", "minimum": 0, "exclusiveMinimum": true }, "ignoreModules": { "default": true, "description": "Ignores strings that are an argument in import() and require() or is the path in an import statement. ", "type": "boolean" }, "ignoreCase": { "default": false, "description": "Ignores character case when calculating entropy. This could lead to some false negatives", "type": "boolean" }, "ignoreContent": { "default": [], "description": "Will ignore the entire string if matched. Expects either a pattern or an array of patterns. This option takes precedent over additionalRegexes and the default regular expressions", "anyOf": [ { "anyOf": [ { "type": "string", "description": "A stringified regexp pattern" }, { "type": "object", "properties": {}, "additionalProperties": false, "description": "An instance of RegExp" } ], "description": "A string/RegExp pattern" }, { "type": "array", "items": { "anyOf": [ { "type": "string", "description": "A stringified regexp pattern" }, { "type": "object", "properties": {}, "additionalProperties": false, "description": "An instance of RegExp" } ], "description": "A string/RegExp pattern" } } ] }, "ignoreIdentifiers": { "default": [], "description": "Ignores the values of properties and variables that match a pattern or an array of patterns.", "anyOf": [ { "anyOf": [ { "type": "string", "description": "A stringified regexp pattern" }, { "type": "object", "properties": {}, "additionalProperties": false, "description": "An instance of RegExp" } ], "description": "A string/RegExp pattern" }, { "type": "array", "items": { "anyOf": [ { "type": "string", "description": "A stringified regexp pattern" }, { "type": "object", "properties": {}, "additionalProperties": false, "description": "An instance of RegExp" } ], "description": "A string/RegExp pattern" } } ] }, "additionalDelimiters": { "default": [], "description": "In addition to splitting the string by whitespace, tokens will be further split by these delimiters", "anyOf": [ { "anyOf": [ { "type": "string", "description": "A stringified regexp pattern" }, { "type": "object", "properties": {}, "additionalProperties": false, "description": "An instance of RegExp" } ], "description": "A string/RegExp pattern" }, { "type": "array", "items": { "anyOf": [ { "type": "string", "description": "A stringified regexp pattern" }, { "type": "object", "properties": {}, "additionalProperties": false, "description": "An instance of RegExp" } ], "description": "A string/RegExp pattern" } } ] }, "additionalRegexes": { "default": {}, "description": "Object of additional patterns to check. Key is check name and value is corresponding pattern", "type": "object", "additionalProperties": { "anyOf": [ { "type": "string", "description": "A stringified regexp pattern" }, { "type": "object", "properties": {}, "additionalProperties": false, "description": "An instance of RegExp" } ], "description": "A string/RegExp pattern" } } }, "required": [ "tolerance", "ignoreModules", "ignoreCase", "ignoreContent", "ignoreIdentifiers", "additionalDelimiters", "additionalRegexes" ], "additionalProperties": false } }