A scanner that also audits your AI agent's permissions
safe-anything checks code, secrets, configs and dependencies, and then goes after the files that decide what your Claude or Codex agent is allowed to do.

What it does: A single Rust CLI that walks a repository once and applies 74 rules across four fronts: injection and XSS patterns in nine languages plus SQL, leaked keys and .env mistakes, risky Docker/Kubernetes/Terraform/mobile settings, and known CVEs in every locked dependency via OSV.dev. The unusual fourth column is the agent itself: it flags bypassPermissions, pre-approved Bash, unpinned npx MCP servers, curl | sh in hooks, and skills that read ~/.ssh. Every finding ships with the line, the reason, and a fix, and secrets are redacted in output.
The interesting bit: It also runs as an MCP server and a Claude Code plugin, so the agent that writes your code can scan it before committing, and you can vet someone else’s skill or MCP server before installing it. The scanner watching the agent is a neat closing of the loop.
Key highlights
- Fast: 1,195 files scanned in 0.03 s on an Apple M4, per the project’s own measurements on OWASP Juice Shop (67 findings, 2 to 3 false positives).
- Runs fully offline with
--offline; the only network call otherwise sends package names and versions to OSV.dev. - Exits nonzero on high or critical findings, so it drops straight into pre-commit or CI, with SARIF output for GitHub code scanning.
- Honest about limits: it matches known patterns and does not trace data through your program, and the README says so plainly.
- The noisiest rule is
code.xss-inner-html, which fires on any HTML built from a variable; the author keeps it on because real XSS looks the same.
Caveats
- Pattern matching, not dataflow analysis: a clean scan means none of these 74 problems were found, not that the code is safe.
- False positives exist and are documented (a checksum MD5,
innerHTMLwith trusted text), so expect some triage.
Verdict: Worth a look if you want one cheap pre-commit check covering code, secrets, config, dependencies and now agent setups. Skip it if you need taint tracking or deep semantic analysis; this is deliberately a fast pattern scanner, and it admits that.
Frequently asked
- What is erkamyaman/safe-anything?
- safe-anything checks code, secrets, configs and dependencies, and then goes after the files that decide what your Claude or Codex agent is allowed to do.
- Is safe-anything open source?
- Yes — erkamyaman/safe-anything is open source, released under the MIT license.
- What language is safe-anything written in?
- erkamyaman/safe-anything is primarily written in Rust.
- How popular is safe-anything?
- erkamyaman/safe-anything has 508 stars on GitHub.
- Where can I find safe-anything?
- erkamyaman/safe-anything is on GitHub at https://github.com/erkamyaman/safe-anything.