Trestle

com.trestlescan由 trestlescan.com 發布v1.4.1更新於 Oct 24, 2026

Detects leaked secrets (API keys, tokens, private keys) in source code.

已驗證STDIO僅桌面開發者工具安全與監控

概覽

AI 產生的概覽

本機金鑰掃描器,讓 AI 助理在提交前找出原始碼中外洩的 API 金鑰、權杖、密碼與私鑰。

可以做什麼
  • 掃描原始碼中外洩的憑證,例如 API 金鑰、存取權杖、密碼、私鑰與憑證檔
  • 辨識已知服務的憑證樣式,並透過熵值、變數名稱與周邊程式碼找出陌生金鑰
  • 依位置與觸發規則回報每一筆發現
  • 與同一工具的 CLI 掃描器、檔案監看、pre-commit 掛鉤與語言伺服器並存,以本機 MCP 伺服器方式執行
適用情境
當你希望助理檢查程式碼庫是否誤提交金鑰,或在提交、推送前審閱檔案時使用。適合希望掃描完全留在自己電腦上進行的開發者。
執行需求
透過 npx 從 npm 套件以本機程序執行;README 稱其為單一靜態二進位檔,無需安裝執行環境,也不需要帳號、註冊或網路。從原始碼建置需要 Rust 工具鏈。
安裝前請注意
掃描結果可能包含仍有效的憑證,應視為敏感資料。預設二進位檔不發出網路請求;只有另外的 trestle-net 二進位檔會聯絡服務供應商確認金鑰是否仍有效,這會把偵測到的金鑰傳送給第三方。社群版只回報發現,不提供修復指引,後者屬於付費 Pro 功能。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

[Trestle logo]

A local secret scanner for source code. Trestle finds API keys, access tokens, passwords, private keys, and certificates before commiting them by mistake, and keeps them from leaving your machine.

This is the Community edition. Open source under Apache-2.0, and a mirror of the version distributed at trestlescan.com.

What Trestle does

  • Detection. Hundreds of credential patterns from real services (OpenAI, Anthropic, Stripe, AWS, GitHub, Google, Slack, Sentry, and more), plus unfamiliar keys spotted by entropy, variable names, and surrounding code.
  • Code-aware. Trestle parses your files instead of running plain regular expressions, so it can tell an environment variable from a build argument, a header, a parameter, or a constant in source.
  • Runs everywhere you work. Command line scanner, file watcher, pre-commit hook, language server for LSP-aware editors (Neovim, Helix, Zed, JetBrains), MCP server for AI assistants (Claude Code, Cursor, Copilot, Codex), and a native VS Code extension.
  • Local only. Runs entirely on your machine. No network, no telemetry, no account, no signup.
  • One static binary. No runtime to install, multi-threaded, and honors .gitignore and your own skip rules.

Building from source

A recent stable Rust toolchain is the only prerequisite.

sh
cargo build --release

This builds two binaries: trestle, which does not make network requests, and trestle-net, which can check whether found secrets are still live.

Quick start

In any project directory:

sh
trestle install  # adds a pre-commit hook and AI instructionstrestle scan     # scans the current directory

Other commands:

  • trestle watch keeps scanning as files change.
  • trestle lsp starts the language server.
  • trestle mcp starts the MCP server.
  • trestle uninstall removes the integration from a project.

Checking whether a secret is live

The default trestle binary does not make network requests. The separate trestle-net binary adds an optional check that contacts each detected secret's provider to confirm whether the credential is still valid:

sh
trestle-net scan --validate

Each finding is then labeled (active), (inactive), or (could not verify). This check runs only in trestle-net, so the trestle binary remains fully offline.

The full documentation is available at trestlescan.com/documentation.

GitHub Action

Use the official GitHub Action to scan every push and pull request:

yaml
name: Secret scan
on:  push:  pull_request:
jobs:  trestle:    runs-on: ubuntu-latest    steps:      - uses: actions/checkout@v4      - uses: toro-guapo/trestle-action@v1

See toro-guapo/trestle-action for inputs, outputs, SARIF upload to the GitHub Security tab, and supported runners.

Community and Pro

Trestle is open core.

  • Community (this repository) handles detection. Every finding is reported with its location and the rule that flagged it. Apache-2.0 licensed.
  • Pro adds remediation guidance: for each finding, the steps to remove the secret from source, what to keep in your local .env, and per-platform rotation guides for AWS, GitHub Actions, Vercel, Netlify, Kubernetes, Doppler, and other targets. Distributed under a commercial license.

Pro is available at trestlescan.com.

About this repository

This is a read-only mirror, refreshed on every Community release. Development happens in a private repository.

Issues and discussion are welcome on GitHub. Pull requests are not accepted through this mirror. If you have a fix or an idea, please open an issue.

License

Apache License 2.0. See LICENSE.

來源:README.md,提交 d36bfbf

工具

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

版本歷史

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

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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