Repo of the Day
erkamyaman/safe-anything
Published: Nov 24, 2026
Open repository ↗Find the holes before someone else does. A fast, 100% Rust vulnerability scanner: XSS, SQL injection, leaked secrets, dependency CVEs and AI agent setups
Summary
safe-anything is a Rust command-line vulnerability scanner covering application code, leaked secrets, infrastructure configuration, locked dependencies, and AI-agent setup files. Its 77 rules report the affected line, the reason, and a fix, with JSON and SARIF output for local reviews, CI, and code-scanning workflows.
What it is useful for
Engineers can use it to review several security concerns in one pass:
- Application code: It looks for SQL and command injection, XSS-prone uses such as
innerHTML,eval, SSRF, path traversal, unsafe deserialization, disabled TLS checks, and weak cryptography across nine languages and SQL. - Secrets: It detects AWS, GitHub, Slack, Stripe, OpenAI, Anthropic, and Google credentials, private keys, committed
.envfiles, and secrets exposed through client-side variables such asNEXT_PUBLIC_orVITE_. Secret values are redacted in reports. - Project configuration: It checks Android and iOS settings, Dockerfiles, GitHub Actions, Kubernetes, Terraform, and nginx for documented risky configurations.
- Dependencies: It reads supported lockfiles and checks locked package versions against OSV.dev, reporting the nearest fixed version when an advisory exists.
- AI-agent configurations: It reviews MCP, Claude Code, Codex, Cursor, Gemini, and OpenCode settings, hooks, and skills. Examples include unapproved shell permissions, plain-text MCP tokens, unpinned MCP servers,
curl | shin hooks, and skills that read SSH or cloud credentials.
How engineers can use it
The README documents installation through Cargo or npm:
cargo install safe-anything
# or: npx safe-anything .
safe-anything .
No configuration or account is required. By default, the command exits with status 1 when it finds a high- or critical-severity issue, making it usable directly as a pre-commit or CI check.
Useful output and filtering options include:
safe-anything . --json
safe-anything . --sarif
safe-anything . --offline
safe-anything . --severity medium
safe-anything . --include-tests
safe-anything --list-rules
For CI, the documented GitHub Action can upload the generated SARIF to GitHub code scanning. The scanner can also run as an MCP server:
claude mcp add safe-anything -- safe-anything mcp
codex mcp add safe-anything -- safe-anything mcp
There are important limits. It finds known patterns but does not trace data through a program, so a clean scan does not mean the code is safe. The README notes false positives, particularly around innerHTML. Dependency checks send package names and versions to OSV.dev; --offline skips that check. Generated directories, large files, minified files, and several other paths are also excluded automatically.