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 分