Repository navigation
Releases
Releases · Vasishta03/leakscan
leakscan v0.5.2
Find leaked API keys and secrets in your code, pull requests and git history. Results go to code scanning (SARIF), the job summary, and optionally a PR comment.
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: Vasishta03/leakscan@v1
with:
mode: pr # full, pr or history
fail-on: HIGH
pr-comment: trueWhat's in 0.5.x
- 208 detection rules with stable IDs (
LS-AWS-001), covering cloud, AI/ML APIs, payments, CI tokens, databases, and secrets in Dockerfiles, Terraform, Kubernetes and GitHub Actions workflows - Scans PR diffs, git history, Jupyter notebooks (per cell and output), archives, Docker images, PyPI/npm packages and any git remote
- Fewer false positives: placeholder filtering, GitHub token checksums, Luhn and JWT validation, and a confidence score on every finding
- Optional live verification for 51 secret types, read-only, with an explicit consent flag for third-party targets
- Output formats: SARIF, JSON (versioned schema), HTML, JUnit, Markdown, SonarQube, DefectDojo
- Exit codes: 0 clean, 1 findings at or above
fail-on, 2 error
0.5.2 has no code changes. It's the first release published entirely under the new repository name Vasishta03/leakscan (formerly secret-scanner), which clears PyPI's provenance-change notice.
Full changelog: https://github.com/Vasishta03/leakscan/blob/main/CHANGELOG.md
Docs: https://vasishta03.github.io/leakscan/
leakscan v0.5.1
Changed
- The GitHub Action's display name is now "Leakscan Secret Scanner" so it can be listed on the Marketplace (the name
"leakscan" belongs to an existing GitHub account). Usage is unchanged:uses: Vasishta03/leakscan@v1. - Release and Docker workflows only run on version tags; Dependabot updates are grouped.
leakscan v0.5.0
CI-native, notebook-aware, benchmarked.
Added
- New scan targets: stdin (
leakscan scan -),--text, Jupyter notebooks (cells and outputs reported separately),
archives (--archives: zip, tar, tar.gz, whl, jar, with size, member-count, ratio and depth limits), any git remote
(GitHub, GitLab, Bitbucket, shallow clone with--clone-depth), GitHub orgs and users (--github-org, forks and
archived toggles,--repo-include/--repo-exclude, resumable with--resume), Docker images
(docker://image:tag, every layer plus image ENV and build history), PyPI and npm packages (pypi:name==ver,
npm:name@ver) and--followfor growing log files. - Diff scanning for CI:
--since-commit REF,--base BRANCHand--pr(reads GitHub, GitLab, Bitbucket and Jenkins env vars). - Stable rule IDs (
LS-AWS-001and so on) in every output format, SARIFruleId, config and inline ignores. # leakscan:ignoreand# leakscan:ignore LS-AWS-001,LS-GH-001inline suppression.nosec,gitleaks:allowand
secretscanner:allowstill work.- 101 new rules (208 total), including Mistral, Together, Fireworks, Perplexity, DeepSeek, xAI, Weights & Biases,
Comet, Kaggle, Modal, Cerebras, OpenRouter, LangSmith, Stripe restricted keys and webhook secrets, Okta, Auth0, Clerk,
Snowflake, Databricks, Algolia, Resend, Neon, Upstash, Turso, Render, Netlify, Heroku, GitHub fine-grained tokens,
Docker Hub, Tailscale, 1Password, plus file-aware rules for Dockerfile ENV/ARG, .env files, Terraform state and
tfvars, Kubernetes secrets and Helm values, GitHub Actions workflows, docker-compose, .npmrc, .pypirc and .netrc. - Validation: GitHub token CRC32 checksums, Luhn for card numbers, JWT structure plus expiry, AWS key ID alphabet.
- A
confidencescore on every finding, raised by nearby keywords and lowered in tests, fixtures and docs. Filter with--min-confidence. - Placeholder and stopword filtering (
EXAMPLE,changeme,xxxx,${VAR},<your-key>, common dummy passwords). --decodedecodes base64, hex and URL-encoded values one level before matching.- Config:
allowlist(regexes, paths, commits, stopwords),disable_rules,extends:, per-directoryoverrides,
fail_on, plusleakscan config validateandleakscan config schema(JSON schema for editors). - Rule packs:
leakscan rules list | show | disable | enable | import | remove | verifiers. - Verification: 18 more verifiers (51 secret types),
--verify-only,--verify-timeout,--verify-concurrency, rate
limiting, and statusesactive/inactive/unknown/errorwith a timestamp in every format.--yesis
required to verify keys found in targets you may not own. - Outputs:
html(single file, filterable),junit,markdown(PR comments),sonarqube,defectdojo, and
--also FORMAT:FILEto write several formats from one run. JSON output now hasschema_versionand a published
JSON schema. --fail-on SEVERITYand--exit-zero. Exit codes are documented: 0 clean, 1 findings, 2 error.- Official GitHub Action (
uses: Vasishta03/leakscan@v1) with SARIF upload, job summary, PR comments and full/pr/history modes. - Python API:
leakscan.scan_path(),scan_text(),scan_git(),scan_diff(), withpy.typed. leakscan hook(Claude Code and Cursor hooks that block secrets in agent tool calls) andleakscan mcp(MCP server).- Notifications: Microsoft Teams, generic JSON webhook and email (SMTP), alongside Slack and Discord.
--notifytakes a comma list. --cacheskips unchanged clean files using.leakscan-cache. The cache stores hashes only, never secrets.leakscan completion bash|zsh|fish.- Docker image on GHCR (
ghcr.io/vasishta03/leakscan, amd64 and arm64), standalone binaries for Linux, macOS and Windows,
PyPI trusted publishing with attestations, Sigstore signatures, build provenance and a CycloneDX SBOM per release. - Benchmarks against gitleaks and trufflehog (
benchmarks/), with methodology and raw results. - Documentation site, rule catalog with one page per rule, CI recipes, and a LICENSE file.
Changed
- Repository renamed from
secret-scannertoleakscan. Old URLs redirect, and the PyPI package name is unchanged. - Findings use paths relative to the scan root with forward slashes, which fixes SARIF locations in GitHub code scanning.
- SARIF
ruleIdis now the stable rule ID instead of the rule name. Share-oriented formats (SARIF, HTML, Markdown,
JUnit, SonarQube, DefectDojo) always redact matched values. - Keyword prefiltering and a process pool for large trees: about 2.5x faster per core than 0.4.0 with twice the rules.
- Git history is streamed from a single
git log -pinstead of onegit showper commit. PEM Certificateis now LOW and skips system CA bundles.- Placeholder values that 0.4.0 reported (such as AWS's documented
AKIAIOSFODNN7EXAMPLE) are now ignored. Pass--keep-placeholdersto see them. - PyYAML is now a required dependency, and tqdm has been dropped. In 0.4.0,
.leakscan.yamlwas silently ignored when PyYAML was missing.
Fixed
exclude_pathsin.leakscan.yamlandpyproject.tomlwas parsed but never applied.- The entropy detector flagged every base64 line inside PEM blocks, which meant thousands of false positives in repos with test certificates.
- Verifiers reported
REVOKEDon rate limits and server errors. These now come back asunknown. - The
aws_secret_access_key = "..."pattern missed keys whose variable name was longer than 20 characters. - UTF-16 files were skipped as binary, and Latin-1 files lost characters. Both are now decoded correctly.
- Symlinks pointing outside the scanned directory are no longer followed.
.leakscanignore/.secretignorepatterns with more than two**segments could hang a scan through regex backtracking.~/.leakscanrcis written with0600permissions.
v0.3.0
Staged scanning, custom config, 20+ new patterns, expanded verifier