erkamyaman/safe-anything

★ 432⑂ 31

Find the holes before someone else does. A fast, 100% Rust vulnerability scanner: XSS, SQL injection, leaked secrets, dependency CVEs and AI agent setups.

About erkamyaman/safe-anything

erkamyaman/safe-anything is an open-source project on GitHub, mainly written in Rust. Find the holes before someone else does. A fast, 100% Rust vulnerability scanner: XSS, SQL injection, leaked secrets, dependency CVEs and AI agent setups. It currently holds 432 stars and 31 forks with 27 open issues, and was last pushed on 2026-11-23 (repository created 2026-11-22).

Project Overview

AI Homed tracks it on the Today's Trending board, currently at rank #95 with 0 new stars today.

GitHub Repository Details

Repository erkamyaman/safe-anything · default branch main · size 1895 KB · watchers 3 · source: GitHub REST API and repository README

README

https://github.com/erkamyaman/safe-anything/blob/HEAD/The safe-anything tortoise

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.

https://github.com/erkamyaman/safe-anything/blob/HEAD/Rust share of the code https://github.com/erkamyaman/safe-anything/blob/HEAD/Native binaries for macOS, Linux and Windows https://github.com/erkamyaman/safe-anything/blob/HEAD/MIT license https://github.com/erkamyaman/safe-anything/blob/HEAD/crates.io version https://github.com/erkamyaman/safe-anything/blob/HEAD/npm version
https://github.com/erkamyaman/safe-anything/blob/HEAD/Pull requests reviewed by CodeRabbit https://github.com/erkamyaman/safe-anything/blob/HEAD/GitHub stars

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

https://github.com/erkamyaman/safe-anything/blob/HEAD/safe-anything scans OWASP Juice Shop: 1,195 files in 0.03 s, 67 findings including the SQL injection in routes/login.ts, eval in routes/userProfile.ts, seeded passwords and a token in localStorage. Then it scans an AI agent setup: a GitHub token in .mcp.json, bypassPermissions, pre-approved Bash, curl piped to sh in a hook, a skill that reads ~/.ssh, invisible Unicode, unpinned MCP servers.
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. Nine 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_. Always redacted 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.

safe-anything . --json             # machine-readable report
safe-anything . --sarif            # GitHub code scanning
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
and .claude/worktrees are skipped. List more paths in .safe-anything-ignore. --include-tests.

What it finds

74 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, SSRF, unsafe deserialization (pickle, yaml.load, ObjectInputStream, BinaryFormatter, unserialize, Marshal), TLS checks turned off, MD5/SHA-1, DES/RC4/ECB, JWT none, template injection, debug mode, insecure cookies, Math.random tokens. JS/TS, Python, Go, Java, Kotlin, PHP, Ruby, C#, SQL | | Secrets | AWS, GitHub, Slack, Stripe, OpenAI, Anthropic and Google keys, private 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, 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. More | | Mobile | Android debuggable, 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 ), GitHub Actions (pull_request_target, write-all, actions on @main, script injection from PR titles), privileged containers, hostNetwork, open Terraform ingress, public buckets, nginx autoindex, TLS 1.0/1.1 | | Dependencies | every locked version in package-lock.json, yarn.lock, pnpm-lock.yaml, Cargo.lock, requirements*.txt, poetry.lock, uv.lock, go.mod, Gemfile.lock, composer.lock and pubspec.lock, checked against OSV.dev, with the nearest fixed version |

https://github.com/erkamyaman/safe-anything/blob/HEAD/safe-anything on the with-mqtt-js example from the Next.js repository: 2 high findings, an MQTT password read from a NEXT_PUBLIC_ variable in app/page.tsx and environment.d.ts, which Next.js ships in the client bundle.
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. The skill is in skills/safe-anything.

In CI

- uses: erkamyaman/safe-anything@v1.0.2
  with:
    fail-on: high
  • 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.

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 | 53 | 0 | checked in CI on every push |

https://github.com/erkamyaman/safe-anything/blob/HEAD/safe-anything on expressjs/express: no problems found, 216 files scanned in 0.03 s.
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, ten lockfile formats. 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 74 problems were found, not that the code is safe. Design notes.

Credits

Cheat Sheet Series (CC BY-SA 4.0) that every rule links to. show its evidence. 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.

https://github.com/erkamyaman/safe-anything/blob/HEAD/Company sponsor: CodeRabbit

https://github.com/erkamyaman/safe-anything/blob/HEAD/Sponsors: Santosh Yadav, Hakan Soytürk, Ali Yilmaz, Ashley Hunter, Fatih Uzuntaş

https://github.com/erkamyaman/safe-anything/blob/HEAD/Become a sponsor https://github.com/erkamyaman/safe-anything/blob/HEAD/Buy me a coffee

Contributing

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

License

MIT

GitHub Stars & Activity

432Stars
31Forks
27Open issues
RustLanguage

GitHub Popularity

GitHub stars432
Forks31
Open issues27
Primary languageRust
LicenseMIT
Stars gained today0
Created2026-11-22
Last pushed2026-11-23

Trending History

Daily boardrank #95 · ▲ 0 stars

Related AI Projects

1

rtk-ai / rtk

Rust★ 87,593⑂ 5,627▲ 100 stars
→
2

janhq / jan

Rust★ 46,048⑂ 3,245▲ 36 stars
→
3

t8y2 / dbx

Rust★ 31,224⑂ 2,841▲ 95 stars
→
4

0xPlaygrounds / rig

Rust★ 9,238⑂ 1,030▲ 19 stars
→
5

EL4CTEO / fast-anything

Rust★ 3,034⑂ 194
→
6

mattpocock / skills

Shell★ 331,272⑂ 27,830▲ 759 stars
→
7

obra / superpowers

Shell★ 324,910⑂ 28,822▲ 838 stars
→
8

affaan-m / ECC

JavaScript★ 309,467⑂ 45,523▲ 649 stars
→

More AI Rankings