npm @trestlescan/mcpstdioApache-2.0updated 2mo ago
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.
O que dá para fazer com Trestle?
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
.gitignoreand your own skip rules.
Building from source
A recent stable Rust toolchain is the only prerequisite.
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:
trestle install # adds a pre-commit hook and AI instructions
trestle scan # scans the current directory
Other commands:
trestle watchkeeps scanning as files change.trestle lspstarts the language server.trestle mcpstarts the MCP server.trestle uninstallremoves 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:
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:
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.
Instalação
Adicione Trestle ao seu cliente. Escolha o que você usa.
claude mcp add mcp -- npx -y @trestlescan/mcpcodex mcp add mcp -- npx -y @trestlescan/mcpamp mcp add mcp -- npx -y @trestlescan/mcp{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@trestlescan/mcp"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@trestlescan/mcp"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"mcp","command":"npx","args":["-y","@trestlescan/mcp"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@trestlescan/mcp"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@trestlescan/mcp"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@trestlescan/mcp"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"mcp": {
"type": "local",
"command": "npx",
"args": [
"-y",
"@trestlescan/mcp"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"mcp": {
"command": {
"path": "npx",
"args": [
"-y",
"@trestlescan/mcp"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y @trestlescan/mcpRun `goose configure`, choose **Add Extension → Command-line Extension**, and paste this command.
Pontuação
39 / 100
Incompleta
- Documentação25/25
- Manutenção16/25
- Confiança13/20
- Capacidade0/15
- Instalação12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 72 days ago
- Has a release history
- Repository is not archived
- Licensed Apache-2.0
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint — no local install
Histórico de versões
| Versões | Publicada |
|---|---|
| 1.4.1Mais recente | 29 de jun. de 2026 |