An ESLint plugin that detects potential secrets and credentials in code and JSON files using entropy analysis and pattern matching.
eslint-plugin-no-secrets is an ESLint plugin that prevents accidental commits of sensitive information like API keys, tokens, and passwords. It scans JavaScript and JSON files to identify strings that resemble secrets using entropy-based detection and pattern matching, helping developers maintain security in their codebases.
JavaScript and TypeScript developers working on projects that handle sensitive data, particularly those integrating with third-party APIs or managing authentication credentials. It is also suitable for teams enforcing security best practices in their CI/CD pipelines.
Developers choose this plugin because it integrates directly into ESLint workflows, catching secrets early in development without disrupting legitimate code. Its AST-aware scanning provides precise analysis within code structures, and its high configurability allows teams to tailor detection to their specific needs.
An eslint plugin to find strings that might be secrets/credentials
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses cryptographic entropy to identify high-entropy strings like secrets, catching patterns that regex alone might miss, as highlighted in the README's examples.
Leverages ESLint's Abstract Syntax Tree for precise analysis within code structures, reducing false positives in complex code such as string templates or comments.
Offers customizable options like tolerance, ignore lists, and additional regex patterns, allowing teams to tailor detection to their specific needs, as shown in the configuration examples.
Works with JSON files when paired with plugins like eslint-plugin-jsonc, extending secret scanning to configuration files, though this requires additional setup.
Requires installing and configuring additional plugins like eslint-plugin-jsonc for JSON file support, adding complexity to the setup process as admitted in the README.
Entropy detection can flag legitimate high-entropy strings like base64 character sets, necessitating manual ignore lists or comments, which adds maintenance overhead.
Restricted to JavaScript and JSON files via ESLint, making it unsuitable for projects with multi-language codebases or non-text files.