Safe Anything

Developer toolsSecurity

Find the holes before someone else does. A security reviewer for your code and your AI agent: 110 rules · 9 languages · 15 lockfile formats · MCP server, Claude Code plugin and GitHub Action. 100% Rust.

Your AI app calls the Safe Anything MCP server, which does the developer tools and security work and sends the result back to the chat.

About Safe Anything

Safe Anything is a community MCP server from erkamyaman, filed in our directory under developer tools and security. Find the holes before someone else does. A security reviewer for your code and your AI agent: 110 rules · 9 languages · 15 lockfile formats · MCP server, Claude Code plugin and GitHub Action. 100% Rust.

Safe Anything runs on your own machine: your AI app starts it with the command npx -y safe-anything and talks to it over standard input and output.

At a glance

Publisher
erkamyaman (community)
Runs
Locally on your machine
Install from
Node.js package on npm: safe-anything
Written in
Rust
License
MIT
GitHub stars
971

How to set up Safe Anything

  1. Install Node.js on the machine that runs your AI app, because Safe Anything starts with npx and downloads its package on first run.
  2. Check the Safe Anything README for keys or settings; the registry lists none that Safe Anything requires.
  3. Add Safe Anything to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Safe Anything tools to confirm the connection.
  5. Run one read-only task with Safe Anything first, and keep your app asking before each tool call until the results look right.

Safe Anything compared with similar servers

  • WebMCP (jasonjmcghee) by jasonjmcghee has fewer GitHub stars than Safe Anything (965 against 971); both are community servers, and both run locally.
  • Adobe Premiere Pro by hetpatel-11 has more GitHub stars than Safe Anything (976 against 971); both are community servers, and both run locally.
  • Jetbrains by JetBrains has fewer GitHub stars than Safe Anything (962 against 971); Jetbrains is official while Safe Anything is a community server, and both run locally.

Before you connect Safe Anything

  • Give Safe Anything its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Safe Anything tool call until you trust what it does with them.
  • Treat text that Safe Anything fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Safe Anything on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Safe Anything

How marketing and sales teams put Safe Anything to work, by company size. Pick the size closest to yours and start Safe Anything on one use case.

Small business

  • A small business with a developer can use Safe Anything to ship site and tracking fixes faster, with the AI reading the code it changes.
  • Technical founders can ask Safe Anything to explain and fix a marketing site issue without context switching between tools.
  • A small business can use Safe Anything to check its domains, logins and site for common gaps before they cost a customer's trust.
  • Safe Anything runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Growth engineers can use Safe Anything to build landing pages, tracking and integrations in fewer cycles, with reviews kept in the normal flow.
  • Marketing ops engineers can connect Safe Anything to keep scripts and automations documented and versioned as they change.
  • Marketing ops can use Safe Anything to review what each connected app can access and remove keys nobody uses.
  • Start Safe Anything on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprise engineering teams can roll out Safe Anything with repo scopes and audit logs, so agents work only where they are allowed.
  • Platform teams can standardize on Safe Anything so web and marketing engineering share one reviewed way of working with AI.
  • Enterprises can run Safe Anything in the security team's tooling, so marketing's agents and apps are reviewed like any other system.
  • Safe Anything is a community server, so have security review the code and pin a version before Safe Anything touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Safe Anything README

From erkamyaman/safe-anything on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

safe-anything

Find the holes before someone else does.
One command finds XSS, SQL injection and other vulnerabilities in your code, leaked secrets,
risky mobile and cloud config, vulnerable dependencies, and the AI agent setup that writes it all.
Every finding comes with the line, the reason and the fix.


Install · Releases · Claude Code plugin · GitHub Action · All 112 rules · Agent setups
Made in Türkiye 🇹🇷 by erKam Yaman, who also made rust-anything · ❤️ Sponsor me · Sponsored by CodeRabbit and Atak Domain


A real run on OWASP Juice Shop and on an agent setup with the usual mistakes (Apple M4). What it finds on other repositories.

Your code
SQL and command injection, XSS, eval, SSRF, path traversal, unsafe deserialization, weak crypto. Ten languages and SQL.
Your secrets
Cloud and AI keys, tokens, private keys, passwords, and .env mistakes: committed env files, real values in .env.example, secrets behind NEXT_PUBLIC_ or VITE_. The secrets it recognises are masked in the output.
Your stack
Android and iOS settings, Docker, GitHub Actions, Kubernetes, Terraform, nginx, and every locked dependency against OSV.dev.
Your agent
MCP servers, Claude Code, Codex, Cursor, Gemini and OpenCode settings, hooks and skills: the files that decide what your agent may do.

Quick start

cargo install safe-anything    # or: npx safe-anything .
safe-anything .

That's it. No config, no account, no upload. It exits with 1 when something high or critical is found, so it works as a pre-commit or CI check as is. It exits with 2 when the scan did not finish: the dependency check failed (OSV.dev unreachable, blocked or timed out), a lockfile was too large or binary to read, or a file or folder could not be read. The report then says "the scan did not finish" and names why, instead of "No problems found." --fail-on never keeps the exit code 0 and still prints the reason.

safe-anything . --json             # machine-readable report
safe-anything . --sarif            # GitHub code scanning
safe-anything . --sarif-file out   # SARIF to the file out, the report on screen
safe-anything . --offline          # no network (skips the dependency check)
safe-anything . --severity medium  # hide low findings
safe-anything . --fail-on never    # always exit 0 (or low, medium, high, critical)
safe-anything . --include-tests    # also report findings in tests and fixtures
safe-anything --list-rules
  • .gitignore files inside the folder you scan are respected, nested ones too. Ignore files outside it are not used: a .gitignore above the scanned folder, .ignore, .git/info/exclude and your global gitignore never hide a finding. A file that git tracks but .gitignore also lists (a .env committed before it was ignored) is scanned when git is installed and the folder is a repository. List more paths in .safe-anything-ignore, in the scanned folder or below it; it only adds to what is skipped, it cannot bring back a path .gitignore lists or what is listed below.
  • safe-anything mcp starts the MCP server. To scan a folder that is called mcp, write ./mcp.
  • These are never scanned when found inside the folder you scan, and the report only counts the files it did scan. Name one of the folders as the path itself (safe-anything build/) and it is scanned; the file rules below still apply:
    • folders .git, node_modules, target, vendor, dist, build, .next, .venv, venv, __pycache__, Pods, .gradle and .claude/worktrees, so generated code in build/ is not checked
    • any file over 2 MB. Lockfiles are read up to 64 MB, for the dependency check only (no code rules past 2 MB); a larger one is named in the report as not checked
    • *.min.js, *.map, *.jsonl and *.log
    • binary files: images, fonts, archives, media and compiled files by their extension (.png, .woff2, .zip, .mp4, .class, ...), and any other file with a zero byte in its first 8 KB. A text file saved under one of those extensions is not scanned either. UTF-16 files that start with a byte order mark (PowerShell's > output) are decoded and scanned, and a UTF-8 byte order mark is skipped; UTF-32 is not read.
    • *.lock files get the dependency check but no code rules
  • safe-anything:ignore in a comment silences that line (or the next one). Follow it with rule ids, // safe-anything:ignore code.weak-hash, code.eval, to silence only those rules. An id that is no rule (a typo) silences nothing, so the finding stays in the report.
  • In tests, specs and fixtures only real provider keys and private keys count, unless you pass --include-tests.
  • Env files are .env, .env.*, *.env (prod.env), *.env.example and .envrc. A value in a variable named like a secret (*_PASSWORD, *_SECRET, *_TOKEN, *_API_KEY) is reported from 8 characters on, in other credential-like names from 16; placeholders, URLs without a password and short values made only of digits or only of lowercase letters are skipped. NEXT_PUBLIC_, VITE_ and EXPO_PUBLIC_ variables whose name says secret, password, private key or an API, access, auth, admin, bearer, refresh or session token are reported, because the build ships them to the browser. Plain *_KEY and *_TOKEN names with a public prefix (NEXT_PUBLIC_SUPABASE_ANON_KEY, VITE_MAPBOX_TOKEN) are not reported, on purpose: those keys are public by design.

On a codebase that already has findings, save them once and fail only on new ones:

safe-anything . --write-baseline .safe-anything-baseline.json
safe-anything . --baseline .safe-anything-baseline.json

The baseline holds each finding's rule, path and a SHA-256 of its whole line, not the line itself, so it can be committed. Any secret on the line is masked as in the report before it is hashed, so the hash of a short password cannot be guessed from the file; the other side of that is that a secret rotated to a new value with the same first characters, on an otherwise identical line, stays hidden. A finding counts as known when all three match, wherever the line moved to, and an edit anywhere else on the line brings it back. Identical lines count one entry each. Paths are relative to the scanned folder, so scan the same folder you saved it from. A baseline written by an earlier release still works (it hashed the first 160 characters of the line); write a new one to get the whole-line hash. --write-baseline refuses to write after a scan that did not finish, because the file would leave findings out. Only files written by --write-baseline are read, not --json reports. Review changes to it like code: an entry added to it hides that finding.

What it finds

112 rules, each with a CWE id, an OWASP category and a link to the OWASP page that explains it. The full list is in docs/rules.md.

Code SQL injection, command injection, XSS (innerHTML, dangerouslySetInnerHTML, v-html, echo $_GET, raw), eval and new Function, path traversal, file inclusion from request input, SSRF, open redirects, unsafe deserialization (pickle, yaml.load, ObjectInputStream, BinaryFormatter, unserialize, Marshal), TLS checks turned off, MD5/SHA-1, DES/RC4/ECB, JWT none, template injection, CORS *, debug mode, insecure cookies, Math.random tokens, GRANT ALL and plain-text passwords in SQL files. JS/TS, Python, Go, Rust, Java, Kotlin, Scala, PHP, Ruby, C#, SQL
Secrets AWS (key ids and secret access keys), GitHub, GitLab, Slack, Stripe, Shopify, npm, PyPI, RubyGems, Docker Hub, OpenAI, Anthropic, Groq, Google, Hugging Face, Mailgun, SendGrid, Telegram, DigitalOcean, Heroku, Fly.io, Databricks, Perplexity, OpenRouter, Notion, Twilio, Linear, Prefect, Postman, Pulumi, HCP Terraform, Sentry, New Relic, Supabase, Grafana and Doppler keys, Google OAuth client secrets, Slack and Discord webhook URLs, private keys (also inside service-account JSON) and age keys, passwords in code, credentials in connection strings, committed .env files, real values in .env.example, a .gitignore that misses .env, secrets behind public prefixes (NEXT_PUBLIC_, VITE_, EXPO_PUBLIC_) that ship in the client bundle
Agent setups bypassPermissions and --dangerously-skip-permissions, pre-approved Bash, enableAllProjectMcpServers, MCP servers run with unpinned npx/uvx/docker, MCP tokens in plain text, remote MCP over http://, curl | sh in hooks and skills, prompt-injection text, skills that read ~/.ssh or cloud credentials, invisible Unicode in instructions. github.com/erkamyaman/safe-anything/blob/main/docs
Mobile Android debuggable, allowBackup, cleartext traffic, exported content providers, WebView file access and JS bridges, world-readable files; iOS ATS turned off; tokens in UserDefaults, SharedPreferences, AsyncStorage or localStorage
Config Docker (unpinned base, root, secrets in ENV, ADD <url>), curl | sh in scripts, Dockerfiles and workflow run: steps, GitHub Actions (pull_request_target, write-all, actions on @main, script injection from PR titles), privileged containers, hostNetwork, Terraform (open ingress, public buckets, S3 public access blocks turned off, public or unencrypted databases), nginx autoindex, TLS 1.0/1.1
Dependencies every locked version in package-lock.json, npm-shrinkwrap.json, yarn.lock, pnpm-lock.yaml, bun.lock, Cargo.lock, requirements*.txt, poetry.lock, uv.lock, pdm.lock, Pipfile.lock, go.mod, Gemfile.lock, composer.lock, pubspec.lock and Package.resolved, checked against OSV.dev, with the nearest fixed version


Of the 73 Next.js examples that come with env files, scanned one by one, the env checks flag one: a password behind NEXT_PUBLIC_.

For AI agents

safe-anything is also an MCP server, so your agent can scan before it commits, and before you install someone else's skill or MCP server.

claude mcp add safe-anything -- safe-anything mcp     # Claude Code
codex mcp add safe-anything -- safe-anything mcp      # Codex

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

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

Tools: scan (path, offline, severity, include_tests) and list_rules. A scan that did not finish answers with isError: true and an incomplete list, not an empty result. The skill is in skills/safe-anything.

In CI

- uses: erkamyaman/safe-anything@v1.2.1
  with:
    fail-on: high
    # baseline: .safe-anything-baseline.json   # fail only on findings not in it
- uses: github/codeql-action/upload-sarif@v4
  if: always()
  with:
    sarif_file: safe-anything.sarif

Findings then show up in the repository's Security tab and on pull requests. The job fails with exit code 2, after the SARIF file is written, when the scan did not finish (OSV.dev unreachable, a file that cannot be read); fail-on: never keeps the job green and still prints the reason.

Measured

Release build on an Apple M4, --offline, 2026-11-22. Every finding was read by hand. Times are the scan's own report; the same scan took 0.03 to 0.13 s depending on what else the machine was doing.

Repository Files Findings What they are
OWASP Juice Shop (vulnerable on purpose) 1,195 67 the login and search SQL injections, the eval challenges, MD5 passwords, tokens in localStorage, seeded passwords, open Terraform ingress; 2 to 3 false positives (a checksum MD5, innerHTML with trusted hint text)
DVWA (vulnerable on purpose) 233 63 the SQL injections, command injections, MD5 passwords and eval; about 4 false positives (setup-script inserts, input validated in the "impossible" level)
expressjs/express 216 0
pallets/flask 231 2 both false positives in practice: eval of the user's own shell startup file, SHA-1 for key derivation (reported as low)
modelcontextprotocol/servers 439 1 pull_request_target in a workflow, worth a look
anthropics/skills 392 6 innerHTML in local review pages (5), shell=True in a script that runs commands by design
vercel-labs/agent-skills 439 0
rust-anything 3,134 6 innerHTML in GIF demo pages (5), an action on @master
safe-anything itself 83 0 checked in CI on every push


Quiet on good code: expressjs/express, 216 files, no findings.

The noisiest rule is code.xss-inner-html: it fires on any HTML built from a variable, and most of those in local tooling are not reachable by an attacker. It stays on, because real XSS looks the same. Status per family: docs/STATUS.md.

How it works

One parallel walk over the repository (the ignore crate, the walker behind ripgrep), one read per file, and every rule that applies run as a compiled regex. Where a pattern can't tell right from wrong, the file is parsed: MCP configs as JSON with comments, Dockerfile stages, and every lockfile listed under Dependencies. Nothing is executed. The only network call is the dependency check, which sends package names and versions to OSV.dev (privacy).

It finds known patterns; it does not trace data through your program. A clean scan means none of these 112 problems were found, not that the code is safe. Design notes.

Credits

  • OWASP: the Top 10, the Top 10 for LLM Applications, MASVS, and the Cheat Sheet Series (CC BY-SA 4.0) that every rule links to.
  • CWE by MITRE for the weakness ids.
  • OSV.dev for the advisory data.
  • gitleaks (MIT) for showing how provider tokens are shaped.
  • Craft Anything for the idea that every answer should show its evidence.
  • How to Secure Anything by Veeral Patel, a reading list on security engineering, for the way of thinking about attack surface and least privilege.

Sponsors

safe-anything is free and open source. If it helps your work, please consider sponsoring it.
Your support keeps development going.

Your safety comes first: sponsors get a logo and a link here, nothing more. No paid recommendations and no setup guides for third-party AI API resellers, so nothing here steers your code, keys or data somewhere you didn't choose.

There is no safe-anything coin or token. Anyone offering or selling one is not affiliated with this project or with me, so don't trust anything shady or dodgy that uses these names.

Star history

Contributing

The most useful contribution is a fixture: a few lines safe-anything gets wrong. See CONTRIBUTING.md.

License

MIT

Questions about Safe Anything

What is the Safe Anything MCP server?

Find the holes before someone else does. A security reviewer for your code and your AI agent: 110 rules · 9 languages · 15 lockfile formats · MCP server, Claude Code plugin and GitHub Action. 100% Rust. Safe Anything is maintained by erkamyaman on GitHub at erkamyaman/safe-anything, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Safe Anything MCP server?

Add Safe Anything to your AI app's MCP config with the command npx -y safe-anything. In Claude Code, run claude mcp add --transport stdio safe-anything -- npx -y safe-anything. To run Safe Anything this way you need Node.js installed.

Does Safe Anything need an API key?

The registry lists no required keys for Safe Anything. Check the Safe Anything README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Safe Anything an official MCP server?

No. Safe Anything is a community server maintained by erkamyaman. Community servers can be excellent; read the code and the open issues before you give Safe Anything access to company data.

What license is Safe Anything under?

Safe Anything is released under the MIT license, according to its GitHub repository. The license covers the code of Safe Anything; the service it connects to has its own terms.