safe-anything

safe-anything

Rust code vulnerability and secret scanner

Description

AI writes code faster than ever, and the holes pile up with it: string-built SQL, a casual eval, a committed .env, an agent set to skip every permission prompt and never set back. By the time someone else finds them it is too late. safe-anything checks all of it in one command, and every finding comes with the line, the reason and the fix.

Written in Rust, it scans over a thousand files in a fraction of a second with no config, no account and no upload. Beyond code and secrets it also audits the setup of Claude Code, Codex, Cursor and their MCP servers, an area most scanners have not caught up with. It exits with 1 on high or critical findings, so it drops straight into a pre-commit hook or CI.

Features



Code vulnerabilities: SQL and command injection, XSS, eval, SSRF, path traversal, unsafe deserialization and weak crypto across nine languages and SQL.

Leaked secrets: Cloud and AI keys, tokens, private keys and passwords, committed env files, real values in .env.example and secrets exposed through NEXT_PUBLIC_ or VITE_, always redacted in the output.

Dependency CVEs: Every locked dependency is checked against OSV.dev, with an offline mode that skips it.

Config checks: Android and iOS settings, Docker, GitHub Actions, Kubernetes, Terraform and nginx.

AI agent audit: MCP servers and coding-agent settings, hooks and skills are checked for plaintext tokens, bypassed permissions, piped remote scripts and invisible Unicode.

Report formats: Terminal, JSON and SARIF for GitHub code scanning, plus a GitHub Action and a Claude Code plugin.

Line-level ignores: A safe-anything:ignore comment silences a line or specific rules, and a mistyped rule id silences nothing.