使用
安裝前先知道:有已知漏洞
pickfit 在安裝時會一併裝上的套件裡找到 3 個已知的高風險或嚴重漏洞(OSV.dev,2026年11月16日),安裝前請先考慮。
go:github.com/docker/docker v28.5.2+incompatibleDocker:docker cp 的競爭條件可將 bind mount 重新導向至主機路徑 (GHSA-rg2x-37c3-w2rh,高風險,尚無修正版本)
再看 2 個
go:github.com/docker/docker v28.5.2+incompatible— GHSA-x86f-5xw2-fm2r(高風險),尚無修正版本go:github.com/docker/docker v28.5.2+incompatible— GO-2026-4887(高風險),尚無修正版本
Linux x86_64
這些步驟是在家目錄裡一個已經存在的 work 資料夾裡跑的。請先建立它,再從那裡執行:
mkdir -p "$HOME/work" && cd "$HOME/work"下載官方 install.sh(執行前請先閱讀)
curl -sSfL https://raw.githubusercontent.com/trufflesecurity/trufflehog/main/scripts/install.sh -o /tmp/install.sh以 -b ~/.local/bin 執行 install.sh,核對 sha256 後安裝 trufflehog v3.99.9
sh /tmp/install.sh -b "$HOME"/.local/bin
在 pickfit 驗證過的原始指令(沙盒裡實際執行的)
僅供查核:裡面是沙盒的家目錄 /home/sbx。
curl -sSfL https://raw.githubusercontent.com/trufflesecurity/trufflehog/main/scripts/install.sh -o /tmp/install.shsh /tmp/install.sh -b /home/sbx/.local/bintrufflehog --versionmkdir -p /home/sbx/work/scan/dir && cat > /home/sbx/work/scan/file1.txt <<'EOF'
[default]
aws_access_key_id = AKIAQX7RZ4MWT2LBNV6K
aws_secret_access_key = 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
EOF
cat > /home/sbx/work/scan/dir/config.env <<'EOF'
GITHUB_TOKEN=ghp_R7tKq2LmX9vB4nWc8Zp1Hs6Jd3Fy5Ga0Ue7T
EOFtrufflehog filesystem scan/file1.txt scan/dir --no-verification --no-update確認能用
trufflehog --version輸出應包含「trufflehog 3.99.9」。
先試試這個
mkdir -p "$HOME"/work/scan/dir && cat > "$HOME"/work/scan/file1.txt <<'EOF'
[default]
aws_access_key_id = AKIAQX7RZ4MWT2LBNV6K
aws_secret_access_key = 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
EOF
cat > "$HOME"/work/scan/dir/config.env <<'EOF'
GITHUB_TOKEN=ghp_R7tKq2LmX9vB4nWc8Zp1Hs6Jd3Fy5Ga0Ue7T
EOFtrufflehog filesystem scan/file1.txt scan/dir --no-verification --no-update執行 trufflehog filesystem <path> --no-verification --no-update,掃描本機檔案或資料夾中的機密資訊。
它能做什麼
- 在 git、聊天、wiki 與 bucket 中找出機密資訊已測試
怎麼使用
- 用
trufflehog filesystem <file> <dir> --no-verification --no-update掃描檔案或資料夾。 - 用
trufflehog git file://<repo> --no-verification --no-update掃描本機 git 儲存庫。 - 用
trufflehog git <repo-url> --results=verified --no-update掃描遠端儲存庫。
- 用
- 辨識超過 800 種機密資訊已測試
怎麼使用
- 執行
trufflehog filesystem <file> <dir> --no-verification --no-update。 - 查看每筆結果中的
Detector Type行,了解找到的機密類型。
- 執行
- 檢查找到的憑證是否仍可使用已測試
怎麼使用
- 執行
trufflehog git <repo-url> --results=verified --no-update,只顯示確認仍有效的帳密。 - 在輸出中尋找 "Found verified result"。
- 執行
- 分析外洩 API 金鑰的權限未測試
pickfit 測到哪一步
Linux x86_64
- 可以安裝
- 可以啟動
- 4 項功能中 3 項可用
- 可離線使用
macOS 和 Windows:專案說支援,但 pickfit 還沒試過。
適合用來
- 掃描 git 儲存庫中已驗證的機密資訊
- 掃描 S3 bucket 中外洩的憑證
- 掃描 Docker 映像檔中的機密資訊
- 在 CI 中檢查 pull request 分支的機密資訊
- 掃描本機檔案或資料夾中的憑證
pickfit 怎麼測的
每次測試都從乾淨的機器開始,照上面的步驟執行。 pickfit 怎麼驗證
Linux x86_64
主要功能可用
- 從頭重跑
- 可離線使用
- 檢查於 2026年11月15日
- 版本 3.99.9
測試機器遇到的差異
- README: curl ... install.sh | sh -s -- -b /usr/local/bin
測試中: 使用 -b /home/sbx/.local/bin,因為沒有 root 權限無法寫入 /usr/local/bin - README: Expected output shows AWS key AKIAYVP4CIPPERUVIFXG in commit fbc14303, file keys, line 4
測試中: 沒有。目前的 test_keys 儲存庫會回傳其他已驗證結果(new_key 中的 AWS canary 金鑰與 keys 中的 URI) - README: trufflehog git https://github.com/trufflesecurity/test_keys --results=verified
測試中: 需要連線到 GitHub 和 AWS。複製與驗證都需要網路,因此離線重跑時這項檢查無法通過