Download the PHP package selfphp/secrets-detector without Composer
On this page you can find all versions of the php package selfphp/secrets-detector. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package secrets-detector
๐ secrets-detector
Detect hardcoded secrets like API keys, tokens or passwords in PHP projects โ ideal for CI/CD pipelines, pre-commit hooks, or manual audits.
๐ Features
- ๐ Scans
.env,.ini, PHP source and config files for secrets - ๐ฆ Composer integration (autoload & CLI)
- ๐ง Framework-aware: supports Symfony (
APP_SECRET), Laravel (JWT_SECRET), and others - โ๏ธ Configurable scan paths via
.secrets-detector.json - ๐ Output formats: JSON, Markdown
- โ CI/CD-ready with exit codes for automated fail conditions
๐ฆ Installation
As a dev dependency:
Or install globally:
๐ง Usage
Options
| Option | Description |
|---|---|
--json=report.json |
Export results to JSON |
--markdown=report.md |
Export results to Markdown |
--fail-on-detect |
Exit with non-zero code on finding secrets |
Example
๐ Configuration
You can define custom include/exclude paths using a .secrets-detector.json file in your project root:
๐งช Testing
Run all unit tests:
โ CI Integration
See ready-made CI examples in docs/ci:
github-actions.ymlgitlab-ci.ymlbitbucket-pipelines.yml
Each file shows how to run the CLI and fail builds if secrets are detected.
๐ง Patterns Detected
- Stripe secrets:
sk_live_,sk_test_ - Bearer tokens:
Authorization: Bearer ... - AWS credentials:
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY - Database logins:
DB_PASSWORD,DB_USERNAME - JWT and app secrets:
JWT_SECRET,APP_SECRET - Google API keys:
AIza... - Private keys:
-----BEGIN PRIVATE KEY-----
(See PatternRegistry for all patterns.)
๐ License
MIT
๐ค Author
SELFPHP - Damir Enseleit
https://www.selfphp.de
@SELFPHP
All versions of secrets-detector with dependencies
PHP Build Version
Package Version
The package selfphp/secrets-detector contains the following files
Loading the files please wait ...