Ghosthunt

io.github.78degrees由 GitHub 帳號 78degrees 發布v1.0.0更新於 Oct 24, 2026

Find every leaked secret on your machine — API keys in .env files, shell history, and configs.

已驗證STDIO僅桌面檔案與儲存安全與監控

概覽

AI 產生的概覽

掃描本機,找出散落在 .env 檔案、shell 歷史與開發設定中的外洩 API 金鑰、權杖與憑證。

可以做什麼
Ghosthunt 是一個本機 MCP 伺服器,用來在開發機器上搜尋暴露的機密。scan_secrets 工具會回傳詳細結果,包含檔案路徑、行號、嚴重程度與修補建議;scan_summary 則回傳 0-100 的健康分數以及各嚴重程度的數量。它會檢查環境檔案、AWS 憑證、SSH 金鑰、Docker 設定、npm 與 PyPI 權杖、GitHub CLI 權杖、shell 歷史、Kubernetes 設定、netrc,以及 35 種以上的機密樣式。
適用情境
適合在輪換金鑰、清理 shell 歷史或確認 .env 檔案沒有外洩之前,讓助理稽核自己的機器。定期執行一次摘要掃描也可當作安全衛生檢查。
執行需求
透過 stdio 在本機執行,通常使用 npx ghosthunt 或寫入 Claude Desktop 設定。清單宣告需要一個名為 YOUR_API_KEY 的必填機密環境變數,但 README 稱掃描完全在本機離線進行。僅支援桌面端,無法在網頁中執行。
安裝前請注意
掃描會讀取本機敏感檔案,包括 SSH 私鑰、雲端憑證與 shell 歷史,結果會進入助理對話,可能包含金鑰值或片段。清單要求名為 YOUR_API_KEY 的環境變數,這與 README 所稱資料不離開本機相矛盾,安裝前應釐清該金鑰的用途。掃描為唯讀,不會寫入或刪除資料。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Ghosthunt,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

GhostHunt

Find every leaked secret on your machine.

GhostHunt is an MCP server that scans your development machine for API keys, tokens, and credentials hiding in places you forgot to check: .env files scattered across projects, shell history, AWS/SSH/Docker configs, and more.

Everything runs locally. No data leaves your machine.

What It Scans

  • Environment files — recursively finds every .env, .env.local, .env.production, etc. under your home directory
  • AWS credentials — ~/.aws/credentials and session tokens
  • SSH keys — unprotected private keys in ~/.ssh/
  • Docker config — registry auth tokens in ~/.docker/config.json
  • npm/PyPI tokens — ~/.npmrc, ~/.pypirc auth tokens
  • GitHub CLI — OAuth tokens in ~/.config/gh/hosts.yml
  • Shell history — API keys pasted into bash, zsh, or fish commands
  • Kubernetes — ~/.kube/config credentials
  • Netrc — ~/.netrc passwords
  • 35+ secret patterns — AWS, Stripe, GitHub, OpenAI, Anthropic, Google, Slack, Twilio, SendGrid, database connection strings, private keys, and more

Install

Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

json
{  "mcpServers": {    "ghosthunt": {      "command": "npx",      "args": ["-y", "ghosthunt"]    }  }}

Restart Claude Desktop. Then ask Claude: "Scan my machine for leaked secrets"

Direct Usage

bash
npx ghosthunt

Tools

scan_secrets

Full detailed scan. Returns every finding with file paths, line numbers, severity ratings, and remediation steps.

Example prompt: "Run a full GhostHunt scan and show me everything"

scan_summary

Quick health check. Returns your health score (0-100) and a count by severity. Run this first to see if you have a problem.

Example prompt: "Give me a quick GhostHunt health check"

Example Output

# GhostHunt Scan Report
**Health Score: 37/100** (Critical)
- Secrets found: **12**- Critical: 3 | High: 5 | Medium: 2 | Low: 2- Locations scanned: 47- Scan time: 142ms
## Environment Files (.env)
- **[CRITICAL]** Stripe Live Secret Key  - File: `/Users/you/project-a/.env:4`  - Context: `STRIPE_SECRET_KEY`  - Value: `sk_l****_8xQ`
- **[CRITICAL]** OpenAI API Key  - File: `/Users/you/side-project/.env.local:12`  - Context: `OPENAI_API_KEY`  - Value: `sk-p****kFJ9`
## Shell History
- **[HIGH]** Bearer Token in Header  - File: `/Users/you/.zsh_history:8847`  - Context: `curl -H "Authorization: Bearer sk_live_...`  - Value: `sk_l****_m3K`
## Recommendations
1. **Rotate critical secrets immediately.** Any API key marked CRITICAL   should be revoked and regenerated from the provider's dashboard.2. **Clear your shell history** of sensitive commands.3. **Audit your .env files.** Ensure they are in .gitignore.

Health Score

Your score starts at 100 and drops based on what GhostHunt finds:

FindingPenalty
Critical secret-15
High severity-8
Medium severity-3
Low severity-1

A score below 50 means you have secrets that need immediate attention.

Privacy

GhostHunt runs entirely on your local machine. It does not:

  • Send any data to any server
  • Phone home or track usage
  • Store scan results anywhere
  • Access the internet

Your secrets stay on your machine. The scan results stay in your Claude conversation.

License

MIT

來源:README.md,提交 fde95aa

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.0最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。