← Academy erkamyaman /safe-anything683MITRust

safe-anything

Scan your vibe-coded app before someone else does

One free command finds injections, XSS, leaked keys, risky config, vulnerable dependencies and the AI agent setup around your code. Every finding comes with the line, the reason and the fix. No account, no upload.

If you built an app with Claude Code, you probably never read every line of it. That is the point of vibe coding. It is also how an API key ends up in the browser, or a login form ends up open to SQL injection. safe-anything is a free scanner that looks for those holes in one command, before you launch.

erkamyaman /safe-anythingPublicFinds vulnerabilities in your code, leaked secrets, risky config and your AI agent setup.
Language
Rust
Stars
683 on 25 Nov 2026
License
MIT
Best for
A check before launch, or before installing someone else's skill
Open on GitHub ↗

What safe-anything is

safe-anything is a vulnerability scanner written in Rust by erKam Yaman. Its line is "Find the holes before someone else does." You point it at a folder, and it reports what it finds with a CWE id, an OWASP category and a link to the page that explains the problem.

Who is it for? A founder about to put a Claude-built booking app online. A designer who shipped a client landing page with a contact form. Anyone who installs skills and MCP servers from GitHub and wants to know what those files are allowed to do. The README says the agent part exists for that last case: "before you install someone else's skill or MCP server".

What it looks for

The README splits it into four areas:

  1. 01

    Your code

    SQL and command injection, XSS, eval, SSRF, path traversal, unsafe deserialization, weak crypto. Nine languages and SQL.

  2. 02

    Your secrets

    Cloud and AI keys, tokens, private keys, passwords, committed .env files, real values in .env.example, secrets behind NEXT_PUBLIC_ or VITE_ that ship to the browser. Always hidden in the output.

  3. 03

    Your stack

    Android and iOS settings, Docker, GitHub Actions, Kubernetes, Terraform, nginx, and every locked dependency checked against OSV.dev.

  4. 04

    Your agent

    MCP servers and the settings, hooks and skills of Claude Code, Codex, Cursor, Gemini and OpenCode.

On the agent side it flags things like bypassPermissions, pre-approved Bash, MCP servers started with unpinned npx, tokens in plain text in .mcp.json, curl | sh in a hook, skills that read ~/.ssh and invisible Unicode hidden in instructions.

How it works

The scan

  1. 01One fast walk over your folder
  2. 02Each file read once
  3. 03Every matching rule run on it

→ nothing is executed

The parts a pattern cannot judge

  1. 04MCP configs read as JSON
  2. 05Dockerfile stages
  3. 06Ten lockfile formats

→ parsed, not guessed

The report

  1. 07Each finding: the line, the reason, the fix
  2. 08Exit code 1 on anything high or critical

→ works as a pre-commit or CI check

The only network call is the dependency check. It sends package names and versions to OSV.dev. Your code stays on your machine. Use --offline to skip that check.


(01)Run it in your project folder

npx safe-anything .

If you use Rust, you can install it once instead:

cargo install safe-anything
safe-anything .

(02)Read the findings, worst first

Each finding names the file and line, says why it is a problem and how to fix it. To hide the low ones while you work:

safe-anything . --severity medium

(03)Fix, then scan again

Fix the high and critical ones first. Run the scan again until it is quiet. If a line is a known false alarm, a safe-anything:ignore comment on it silences that line.

(04)Give it to your agent

safe-anything is also an MCP server, so Claude Code can scan before it commits:

claude mcp add safe-anything -- safe-anything mcp

Or install it as a Claude Code plugin, with a skill that tells the agent how to sort and fix findings:

/plugin marketplace add erkamyaman/safe-anything
/plugin install safe-anything@safe-anything

(05)Keep it in your pipeline

It exits with 1 when something high or critical is found, so it can block a commit or a build as it is. The README also ships a GitHub Action that puts findings in the repository's Security tab.


When to use it, and when not

Use it before every launch, after a big change written by an agent, and before you install a skill or MCP server you found online.

Know its limit. It finds known patterns. It does not trace data through your program. The README says it plainly: a clean scan means none of these 92 problems were found, not that the code is safe. For an app that handles payments or personal data, it is a first check, not a security review.

Expect some noise. The README names its noisiest rule: any HTML built from a variable is flagged as possible XSS. Most of those in local tools cannot be reached by an attacker. It stays on because real XSS looks the same.

Stars
683 on 25 Nov 2026
License
MIT
Language
Rust
Run
npx safe-anything .
Rules
92 (25 Nov 2026), each with a CWE id and an OWASP category
Runs on
macOS, Linux, Windows

Common questions

Got any questions left?

Does it upload my code?

No. Nothing is executed and nothing is uploaded. The dependency check sends only package names and versions to OSV.dev, and --offline turns that off.

What does it skip?

It respects .gitignore. It never scans folders like node_modules, dist, build or .git, files over 2 MB, minified files or binaries. In tests and fixtures, only real keys count unless you pass --include-tests.

Did you scan your own projects with it?

Not for this post. The numbers here are the README's own: on OWASP Juice Shop, an app that is vulnerable on purpose, it scanned 1,195 files and found 67 problems, with 2 to 3 false positives. On expressjs/express it found none.

Can I get the results as a file?

Yes. --json writes a machine-readable report and --sarif writes the format GitHub code scanning reads.

Does it work with Codex too?

Yes. The README gives codex mcp add safe-anything -- safe-anything mcp.

Build systems that run your brand__

info@hybrdstudio.com
Share article X LinkedIn

Discover more