使用 TruffleHog 下载并扫描 Helm charts 以查找机密信息。
给定一个 Helm 仓库 URL,chart-down 会获取仓库索引,下载每个 chart 归档文件,解压后对其内容运行 TruffleHog。
brew install trufflehog)go install github.com/RandomRobbieBF/chart-down@latest
或从源码构建:
git clone https://github.com/RandomRobbieBF/chart-down.git
cd chart-down
go build -o chart-down .
./chart-down -url <helm-repo-url> [-proxy <proxy-url>]
| 选项 | 是否必需 | 描述 |
|---|---|---|
-url | 是 | Helm 仓库 URL(如有需要会自动附加 /index.yaml) |
-proxy | 否 | HTTP 或 SOCKS5 代理 URL(例如 http://127.0.0.1:8080) |
# Basic scan
./chart-down -url https://charts.example.com
# Scan through a proxy
./chart-down -url https://charts.example.com -proxy http://127.0.0.1:8080
| 路径 | 描述 |
|---|---|
charts.txt | 所有 chart 下载 URL 的列表 |
charts-extracted/ | 解压后的 chart 内容 |
查看结果:
# Verified secrets only
cat trufflehog-results/verified-secrets.json 2>/dev/null | jq .
# All findings
cat trufflehog-results/*.json | jq .
trufflehog-results/| 每个 chart 的 JSON 扫描结果(仅包含有机密信息的 chart) |
trufflehog-results/verified-secrets.json | 整合后的已验证(确认为有效)机密信息 |