Install
4Internet / network security
Accidental Secret Detector
Find possible exposed secrets in text or a source ZIP without displaying matched values.
A practical guide
How to use Accidental Secret Detector
Scan source text before sharing it to catch accidental credential exposure. Betterleaks applies its pinned rules offline; the report contains rule IDs and file/line locations, never matched secret values. The sample token is deliberately synthetic and no credential is validated against a provider.
- Submit only material you are authorized to inspect. Paste a text sample or choose a small ZIP of source files; remove any known live credential before sending it to a hosted tool.
- Choose Analyze and review each rule, source file and line. The submitted source is cleared from the returned form, and temporary files are removed after processing.
- If you confirm a real exposed credential, revoke or rotate it at its issuer and remove it from the relevant files and history. Rerun the scan on the corrected source; a clean report is not proof that no secrets remain.
Worked example
Illustrative input and expected interpretation. This example is not a live measurement.
Input
The supplied synthetic ghp_ token in a github_token assignment.
What to expect
A github-pat finding at line 1, with no token value or matched source snippet in the report.
What to watch for
- Pattern matches can be false positives and unknown formats can be missed. No live API validation, repository fetching or AI transmission occurs.
- ZIP input is limited to 49,146 bytes, 32 entries, 64 KiB per file and 256 KiB total uncompressed content. Symlinks, unsafe paths, encrypted members and nested archive decoding are unavailable.
- The pinned default rules and Go standard-library regex engine are used. User scanner configurations, ignore files and inline allow comments cannot suppress findings.
Your input: submitted to this server for processing. This tool does not send it to an AI provider. Your input is processed for this request. Temporary processing files are removed afterward. Avoid pasting secrets or personal data.