
Betterleaks Cloud - GitHub & S3 Secret Scanner
io.github.AnshumanAtrey由 GitHub 帳號 AnshumanAtrey 發布v0.3.4更新於 Oct 29, 2026
Betterleaks Cloud - GitHub Secret Scanner + Validator
概覽
雲端金鑰掃描服務,讓助理掃描 GitHub、git 儲存庫與 S3 儲存桶中外洩的憑證,並可選擇即時驗證是否仍有效。
- 可以做什麼
- 掃描 GitHub 組織、使用者、儲存庫、PR、issue、gist、Actions 與 release 中外洩的憑證
- 掃描 git clone 網址的完整歷史、S3/R2/MinIO 儲存桶、壓縮檔網址或貼上的文字
- 透過 Code Search 以關鍵字搜尋整個 GitHub 找出候選儲存庫
- 可選擇對每筆發現呼叫廠商 API 即時驗證,並標記為 valid、invalid、revoked、unknown 或 error
- 使用自訂 Betterleaks TOML 規則,或只啟用指定的規則 ID
- 以資料集紀錄回傳發現,包含檔案、提交與驗證資訊
- 適用情境
- 適合稽核自家 GitHub 組織中被提交進去的金鑰、併購前或事件回應的安全檢查、透過確認金鑰是否仍有效來篩選漏洞賞金線索,以及依排程持續監控。
- 執行需求
- 遠端 Apify 託管端點;需要 Apify API token,以 Authorization Bearer 標頭傳送,執行費用也計入該帳號。github 模式建議提供 GitHub token,global_github 模式必須提供;掃描私有儲存桶需要 S3 憑證。掃描依事件計費。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Betterleaks Cloud - GitHub & S3 Secret Scanner,將其新增到工作區。
- 連接 所需的 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
- 為需要使用其工具的對話啟用該服務。
Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。
交給代理程式安裝
把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。
閱讀 https://sourceweft.com/mcp/io.github.AnshumanAtrey%2Fbetterleaks-cloud/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。其他 MCP 客戶端
把它新增到你客戶端的 mcpServers 設定中。 客戶端會在首次連接時完成 OAuth 登入。
{
"mcpServers": {
"betterleaks-cloud-github-s3-secret-scann": {
"type": "http",
"url": "https://mcp.apify.com/?tools=anshumanatrey/betterleaks-cloud"
}
}
}README
Betterleaks Cloud - GitHub & S3 Secret Scanner
Cloud-hosted Betterleaks v1.3.1 for hunting leaked API keys, wallet private keys, and credentials anywhere on GitHub, in cloned git repos, or in S3 / R2 / MinIO buckets. Optional live validation probes each detected secret against the vendor API to flag which ones are still active.
Available as an Apify Actor. $0.05 start + $0.05 per repo scanned + $0.30 per live-validated key, each 10% less on Apify's Scale plan and 20% less on Business (the start fee excepted). No install, no CLI, flat JSON output.
What does it do?
Scans a GitHub org, user, repo, pull request, issue, gist, action workflow, or S3 bucket for leaked credentials. Built on Betterleaks (the Gitleaks successor, maintained by the original Gitleaks author Zachary Rice + co-maintainers from Red Hat, Amazon, RBC). Every Betterleaks CLI flag is exposed as an input field. When you enable validation, each finding is probed live against the vendor API and tagged valid, invalid, revoked, unknown, or error.
How is it different from running Betterleaks locally?
How is it different from our gitleaks-github-secret-scanner actor?
When should I use it?
- Auditing your own GitHub org for secrets that slipped into commits
- Bug bounty hunting where you want to validate keys live before reporting
- Pre-acquisition security check on a target company's GitHub footprint
- Continuous monitoring on a schedule, alerting on any new live-validated finding
- Forensics: tracing which dangling commit on which PR ref leaked a credential
- Scanning a Cloudflare R2 / AWS S3 bucket someone shared publicly
What does it cost?
Pay-per-event:
- $0.05 per actor start
- $0.05 per repo scanned (in github / git / global_github modes)
- $0.01 per finding pushed to the dataset
- $0.30 per live-validated secret (only when validation is on AND status returns
valid) - $0.005 per Code Search query (only in
global_githubmode)
Typical scans:
Compare to GitGuardian Enterprise at ~$5000/year flat. Per-comprehensive-scan with this actor is 300-500x cheaper.
Which modes can I scan in?
Which GitHub resources can it scan in github mode?
All 12 surfaces betterleaks supports, selectable via include / exclude:
repos(default),forksprs,pr-commentsissues,issue-commentsactions,action-artifactsdiscussionsreleases,release-assetsgists
You can also filter by since / until dates, exclude repos by glob pattern, or target specific GitHub Actions workflow files.
Does it find leaks that were deleted from current files?
Yes. Betterleaks scans the full git history. A secret that was committed and then deleted in a later commit still appears in the history and gets detected. The Commit field on each finding tells you which commit introduced the leak.
You can also enable advanced --log-opts pass-through to use git pickaxe (-S secret_string) for targeted historical searches.
Is the secret validated against the live vendor API?
Optional - off by default to keep scans fast. Set validation: true and Betterleaks fires HTTP requests against the vendor API for each finding using the rule's built-in CEL validator.
Output fields:
ValidationStatus:valid(still active),invalid(rejected),revoked(explicitly disabled),unknown(couldn't determine), orerrorValidationReason: human-readable whyValidationMeta: vendor-specific metadata. For a GitHub PAT, this includesusername,name, and grantedscopes. For Stripe, the test/live mode + account info.
Note: validation only fires for rules that ship with a validate CEL clause in their TOML. Not every detected secret type has one (the upstream rule set is expanding over time).
You can also tune validation behavior:
validation_timeout(per-request HTTP timeout)validation_workers(parallel HTTP workers)validation_status(filter output to only certain statuses)validation_debug(include raw HTTP response inValidationMeta)validation_extract_empty(include validator outputs even when empty)validation_env_vars(expose extra env vars to CEL validators)
Can I use a custom detection rule?
Yes - paste a full betterleaks TOML config into custom_config_toml. Either replaces the built-in rules or adds to them depending on how you write the TOML.
You can also use enable_rule to run only a whitelist of rule IDs (e.g. ["github-fine-grained-pat", "stripe-secret-key"]) from the built-in set without writing your own config.
Reference format: https://github.com/betterleaks/betterleaks/blob/main/.betterleaks.toml
What does the output look like?
Each dataset record is the raw Finding struct from betterleaks - no transformation, no field renaming:
The dataset has two pre-configured views:
- Findings: all records
- Live secrets only: filter to
ValidationStatus == valid, the high-signal triage list
How accurate is it?
Based on the underlying Betterleaks 1.3.1 rule set (200+ detectors), plus the upstream's BPE-tokenization based false-positive filter and CEL-based contextual filters. Compute usage observed in real test runs:
- Single small repo scan: ~7 seconds, 0.0084 compute units
- Scan of
anshumanatrey/*(~30 repos): ~134 seconds, 0.1491 compute units, 735 findings - 3-repo
global_githubscan with queryrzp_live_: ~8.5 seconds, 0.0095 compute units, 14 findings
Common questions
Q: Can I scan a private repo? Yes - provide a github_token with repo scope.
Q: Does it scan PR branches and dangling commits? PR refs yes via --include prs. Dangling commits aren't currently exposed but the underlying tool supports it.
Q: How does it handle rate limits? Without a github_token, GitHub limits to ~60 req/hr shared. With a token: 5000 req/hr on your account. Always provide a token for any real scan.
Q: Can I run it on a schedule? Yes via Apify Schedules. Recommended for continuous monitoring use cases.
Q: Can I use my own betterleaks rule TOML? Yes via custom_config_toml. Or whitelist specific built-in rules via enable_rule.
Q: What's global_github mode? Our addition on top of upstream betterleaks. You provide a search query, we use GitHub Code Search to find unique candidate repos, then run betterleaks git against each in parallel. Useful for hunting a specific secret pattern across all of GitHub.
Q: Why not use the cheaper gitleaks-github-secret-scanner actor instead? Use that one for high-volume cost-sensitive scans. Use this one when live validation matters (bug bounty triage, incident response, knowing which secrets to actually rotate).
Q: What happens to detected secrets? Written to the run's dataset, accessible only to the user who ran the actor. We never store them server-side.
Q: Can I scan an S3 bucket I don't own? Only if it's public (anonymous mode) or you have credentials.
Q: What's the maximum scan size? No hard cap on repos. max_target_megabytes (default 100) skips files larger than that.
Limitations
- Per-CEL-rule validation: only rules with a
validateclause actually probe live. Not every secret type has one yet. global_githubmode requires a GitHub PAT (Code Search is auth-only).dirmode requires the source to be a downloadable tarball URL, not a local file.- Apify run timeout caps individual scans at 30 minutes per subprocess. For org scans larger than 200 repos, split into multiple runs.
- The
stdinmode is limited by Apify's input size cap (~5 MB).
Ethical use
For authorized security testing only. This actor scans public GitHub content (the same content any logged-in GitHub user can see), or private repos that your PAT explicitly grants access to.
Findings should be reported through responsible disclosure channels:
- The leaking developer (commit author email)
- The vendor's
security@address - A bug-bounty program if one exists for the vendor
Using leaked credentials without owner authorization is illegal in most jurisdictions.
Other actors in my portfolio
- gitleaks-github-secret-scanner - the cheaper Gitleaks-based scanner without validation
- holehe-email-osint - email to registered accounts (120+ sites)
- phoneinfoga-phone-osint - phone OSINT
- theharvester-osint - emails / subdomains / hosts via public sources
- social-analyzer - username across 300+ social platforms
- nmap-scanner - Nmap port scanner
- netintel - DNS / WHOIS / IP geo / port scan / SSL / tech stack
- instagram-profile-intel-no-login - Instagram profile intel without login
- bug-bounty-finder - search HackerOne, Bugcrowd, Intigriti
License
MIT. The upstream Betterleaks binary is also MIT, maintained by betterleaks/betterleaks (Zachary Rice and co-maintainers from Red Hat, Amazon, RBC).
來源:README.md,提交 624d17b
工具
0版本歷史
2- v0.3.4最新Oct 29, 2026
- v0.3.1Sep 24, 2026
評分
已滿足適用檢查項的 85%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通必需25 分
- 已宣告認證方式必需10 分
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分