Skip to main content Switch to mobile version vibeaudit 0.17.0 Security and quality audit for AI-generated (vibe-coded) and LLM-powered apps: secrets, hallucinated packages, missing auth, injection, prompt injection, unsafe model output, cost limits and more.
pip install vibeaudit==0.17.0 Copy PIP instructions
A security and quality audit for apps built with AI coding assistants, and for apps that use LLMs.
vibeaudit reads a whole repository (frontend, backend, database rules, CI config and the AI parts) and gives you a prioritised list of what is actually dangerous or broken, each with file and line, why it matters and how to fix it.
It targets the mistakes that AI-generated ("vibe-coded") apps keep shipping: API keys in the browser bundle, API routes with no auth check, Supabase tables without Row Level Security, packages the assistant invented, model output piped into exec, unbounded token spend and security placeholders that were never finished. Beyond security it catches what makes generated apps break in production: unfinished stubs and missing imports, N+1 queries and money stored as floats, requests without timeouts, buttons that do nothing, inaccessible forms and frontend calls to API routes that do not exist.
Works offline with no API key. The network is used only for package-registry and vulnerability lookups (--offline turns that off); an LLM is used only if you ask for it.
Pure Python, no dependencies on 3.11+ (tomli on 3.9 and 3.10). Linux, macOS and Windows. Optional pip install vibeaudit[parse] adds a tree-sitter function index for Go, Rust and Java (vibeaudit doctor shows which is active; VIBEAUDIT_PARSER=regex turns it off).
96 stable rules (93.6% held-out precision) plus 84 preview rules (179 rules in 12 categories plus the optional LLM review), mapped to CWE, the OWASP Top 10 and the OWASP Top 10 for LLM Applications.
Terminal output plus JSON, SARIF 2.1.0 (GitHub code scanning), Markdown, HTML, an SVG badge, CycloneDX 1.6 AI-BOM (-r aibom), and a fix brief you can paste into an AI assistant.
Fits into CI (GitHub Action, --diff), pre-commit (--staged) and coding agents (an MCP server).
Contents: Quickstart - Architecture - Example output - What it checks - Install - Commands - Automatic fixes - Configuration - CI and pre-commit - Editors - MCP server - Scoring - False positives - Limits - Accuracy & Benchmarks - Contributing
flowchart LR Repo["Target Repository (Frontend, Backend, DB Rules, CI, AI/MCP)"] --> Discovery["Stack & Route Discovery (Flask, FastAPI, Next.js, Express, Supabase)"] Discovery --> PyAST["Python AST & Taint Engine"] Discovery --> JSLex["Offset-Preserving JS/TS Lexer"] Discovery --> CfgScan["Config, RLS, Supply-Chain & OSV Scanner"] Discovery --> ExtTools["Optional Tool Merger (gitleaks, bandit, semgrep, osv-scanner)"] PyAST & JSLex & CfgScan & ExtTools --> Rules["179 Rules Across 12 Domains (CWE & OWASP LLM Mapped)"] Rules --> Dedup["Deduplication, Domain Scoring & Fix Generator"] Dedup --> Out["Outputs: Terminal, SARIF 2.1.0, HTML, Studio UI, LSP & MCP Server"] Quickstart
pip install vibeaudit vibeaudit scan path/to/your/project vibeaudit scan path/to/your/project --report html The first command installs it, the second prints findings in the terminal, the third also writes vibeaudit-report.html, a self-contained page you can open in a browser. The exit code is 1 when there is a finding at high or above, so the same command works as a CI gate.
$ vibeaudit scan tests/fixtures/vuln_flask_llm Stack: Flask, OpenAI SDK [CRITICAL] AUTH008 Auth check stub always succeeds app.py:24 `verify_token()` always returns True. > def verify_token(token): Why: A function that is supposed to verify a token, password or permission just returns true... Fix: Implement the real check (verify signature, expiry, user and role) or use a maintained auth library. [CRITICAL] BE002 Command injection app.py:50 Request data flows into a shell command. > os.system("echo " + request.args.get("name", "")) ... Summary critical: 3 high: 20 medium: 15 low: 7 total: 45 ... Score: 0/100 Grade: F Domains: Security 0 AI 42 Quality 93 Data 96 Reliability 99 UI 100 That project is one of the deliberately vulnerable sample apps in tests/fixtures/.
84 of 180 rules are preview; vibeaudit rules lists them. Preview findings are reported but do not fail a build, with one exception: the severe classes (command injection, code execution, unsafe deserialization, open redirects and XSS) still gate while in preview, so a high-impact bug is never let through because its rule is new. Findings of any rule in Go, Java/Kotlin, C#, Rust and PHP code are preview; there, SQL injection, command injection and XSS still gate. STABILITY.md explains how a rule leaves preview.
Every rule, with its severity, why it matters and how to fix it, is in the rule catalogue (docs/RULES.md); vibeaudit rules prints the same list.
Routes are found for Flask, FastAPI, Django REST framework, Express, Fastify, Hono, Next.js (app and pages routers, server actions), SvelteKit, Supabase edge functions and Firebase functions. Python is analysed on its syntax tree with taint tracking (request data, model output and agent-tool arguments are followed into SQL, shell, eval, file paths, URLs, templates, redirects and HTML); JavaScript and TypeScript get the same checks on a lexer that keeps exact offsets.
Good tools exist, and vibeaudit runs them when they are installed instead of replacing them:
vibeaudit is on PyPI. Python 3.9 or newer:
pip install vibeaudit or, to keep it in its own environment:
pipx install vibeaudit To install from this repository instead: pip install "vibeaudit @ git+https://github.com/Ashin-06/vibeaudit.git@v0.17.0".
Optional: if gitleaks, bandit, osv-scanner or semgrep are on your PATH, their findings are merged into the report and de-duplicated.
Exit codes: 0 nothing at the --fail-on level, 1 findings at that level, 2 usage error.
What is scanned: in a git checkout, tracked and untracked files that are not git-ignored (a local, ignored .env is where secrets belong). Dependency and build folders (node_modules, .venv, dist, build, .next, ...) are skipped, except that committed bundles under dist/, build/ and out/ and minified files are still checked for secrets. In test files only real credentials are reported. Pinned versions for the vulnerability check come from requirements*.txt and from lockfiles next to each manifest (package-lock.json, pnpm-lock.yaml, yarn.lock, bun.lock, poetry.lock, uv.lock, pdm.lock, Pipfile.lock).
A repository is untrusted input, so the scan is built to finish whatever it contains. A file that triggers a bug is listed under meta.internal_errors in the JSON report while every other file is still scanned; a file that exceeds --file-timeout or is nested too deeply to parse is listed under meta.skipped. Symbolic links out of the project are not followed. Registry lookups retry timeouts and rate limits, stop calling a host that is down, and never report a package as missing unless the registry said 404 or 410.
LLM-assisted checks (optional)
GEMINI_API_KEY=... vibeaudit scan . --llm gemini --llm-review --llm-max-requests 10 Triage adds a verdict and a reason to medium and higher findings. The model can never remove or downgrade a finding, because the audited code is untrusted and may contain text aimed at the model. Secrets are redacted before anything is sent.
Review adds issues the rules did not cover as AI001, labelled model-generated and unverified.
Providers: gemini (GEMINI_API_KEY or GOOGLE_API_KEY), openai (OPENAI_API_KEY; OPENAI_BASE_URL for any compatible server such as Ollama), openrouter (OPENROUTER_API_KEY, default qwen/qwen-2.5-72b-instruct from data/llm_models.json) and anthropic (ANTHROPIC_API_KEY). Verdicts are cached, so an unchanged finding costs no request the next time.
Model: --llm-model (or llm_model in the configuration) picks the model; otherwise the VIBEAUDIT_LLM_MODEL environment variable does, and then the provider's default.
vibeaudit scan . --monorepo # or `monorepo = true` in .vibeaudit.toml By default the whole repository is one project, so a rate limiter, CSRF middleware or a dependency declared in one package counts for every package. With --monorepo every folder with its own manifest (package.json, pyproject.toml, requirements*.txt, setup.py, setup.cfg, Pipfile) is scanned on its own, against its own manifest and with only its own code as evidence; files outside every package (root scripts, CI, infrastructure) are one more unit, and folders under tests or examples stay test code. Three rules are about the repository, not a package (CI configuration QA002, the example env file DATA007 and a workspace lockfile DEP005), so they come from one scan of the whole repository; the mode costs about two normal scans. Findings keep their repository paths and fingerprints (baselines and feedback carry over), and the report adds a score per package.
vibeaudit studio . # opens the browser; --no-browser prints the link, --port picks the port studio scans the project and serves a web UI on this computer only: every route with its auth, write and AI badges, the data flows from user input and model output to model prompts, databases, shells, HTML and outgoing requests (traced as in explain), the score broken down by domain, category and rule, and the code and explanation of every finding. "Re-scan" re-runs the scan, reusing what did not change.
The server binds 127.0.0.1 only and uses no external assets. Data requests need the random token from the printed link (it is in the URL fragment, so it never reaches a log or a Referer header), the Host header must be 127.0.0.1 or localhost (against DNS rebinding), the code view serves only files the scan listed, and a strict Content-Security-Policy lets only the page's own script run; repository text is never rendered as HTML. It reads the project and never writes to it.
Data flow (traced back from the line, best effort): from app.py:15 plan = client.chat.completions.create(...) (`plan` comes from model output) via app.py:18 script = plan.choices[0].message.content (`script`) to app.py:19 exec(script) Watch mode
vibeaudit watch . # Ctrl+C to stop vibeaudit watch . --interval 2 --min-severity medium watch scans once, then checks for changed files every --interval seconds (default 1) and re-scans. It keeps every unchanged file's text, parse trees, lexer state and per-file analysis between scans, and replays the findings (and the routes) of per-file checks when nothing they depend on changed: the files they read, the facts about other files they use (the names a module exports, whether an excluded path exists on disk) and the project-wide facts they rely on (which functions call a model, which files sit behind auth middleware, the configured helpers). Everything else runs again, so the result is always the same as a fresh scan. A changed manifest or config file, or an added or removed file, replays nothing. On the benchmark repositories a re-scan after one edit takes 0.13 to 0.46 s (median per repository; under 0.3 s on four of five), against 0.5 to 4 s for a cold scan (tools/watch_latency.py). It runs offline, without external tools, and honours the configuration, --exclude and --config like scan.
Automatic fixes (vibeaudit fix)
vibeaudit fix . # print a unified diff, change nothing vibeaudit fix . --apply --verify # re-scan modified files and roll back automatically on regression vibeaudit fix . --rule REL001 # only some rules (repeatable) vibeaudit fix . > fixes.patch && git apply fixes.patch fix scans the project the same way scan does (configuration, suppressions, baseline and feedback apply) and rewrites the findings that have one obvious, deterministic repair:
A file's change is kept only when the file still parses (ast.parse for Python, balanced brackets for JavaScript and TypeScript). Files keep their line endings and byte order mark; files that are not UTF-8 or mix line endings are left alone, and so is a file that changed on disk after it was read. Running fix twice changes nothing the second time. Every finding a codemod could not rewrite is listed with the reason.
Patches from a model (optional). For findings without a codemod (auth checks, transactions, unverified tokens), --llm asks the provider (see LLM-assisted checks) for the smallest fix and writes it to --patch (default vibeaudit-fix.patch). It is never applied: a patch that does not parse, reaches outside the lines the model was shown or contains redacted text is dropped, and the rest are marked model-generated and unverified. --llm-model and --llm-max-requests work as for scan.
ANTHROPIC_API_KEY=... vibeaudit fix . --llm anthropic --patch auth-fixes.patch Configuration
Settings live in .vibeaudit.toml or in a [tool.vibeaudit] table of pyproject.toml. Command-line flags win over the file. Unknown keys and wrong types are errors, so a typo cannot quietly weaken a scan.
# .vibeaudit.toml fail-on = "high" min-severity = "low" exclude = ["legacy/**", "scripts/one_off_*.py"] disable = ["QA002"] baseline = ".vibeaudit-baseline.json" # relative to this file offline = false external = "auto" # Teach vibeaudit your project's own conventions auth-helpers = ["require_org_member", "withWorkspaceAuth"] # count as an auth check in a route sanitizers = ["clean_sql_input"] # their output is not tainted public-paths = ["/api/public/*", "/api/survey-*"] # intentionally unauthenticated routes Other keys: include-preview, gate-severe-preview, monorepo, llm, llm-model, llm-max-requests, max-file-size, file-timeout. The same settings apply to vibeaudit scan, vibeaudit routes, vibeaudit feedback, the MCP server and the Python API, except llm, which only vibeaudit scan reads: the LSP server, watch, studio, the MCP server and the API never send code to a model provider because a repository's config asks for it. The file is part of the scanned repository and can switch rules off: when you audit code you do not trust, use --no-config.
--diff and --staged still analyse the whole project (auth middleware and helpers in unchanged files count) but report only findings on added or changed lines.
GitHub Action, with results in the code scanning tab:
name: vibeaudit on: [push, pull_request] permissions: contents: read security-events: write jobs: audit: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 with: fetch-depth: 0 # needed for --diff - uses: Ashin-06/vibeaudit@v0.17.0 with: fail-on: high args: --diff origin/main # optional: only changed lines - uses: github/codeql-action/upload-sarif@v3 if: always() with: sarif_file: vibeaudit.sarif Inputs: path (default .), fail-on (default high), sarif (default vibeaudit.sarif), args (extra flags, split on spaces), setup-python (true/false), python-version, review (true posts review comments on pull requests), github-token (default: the workflow token) and parse (true/false, install optional tree-sitter parsers for Go, Rust and Java).
With review: "true" the action also comments on the pull request: one review comment per finding on a changed line (the 30 most severe), with why it matters, and a one-click GitHub suggestion when a vibeaudit fix codemod rewrites it inside the diff. A re-run does not repeat comments it already posted. The job needs pull-requests: write; on pull requests from forks the token is read-only and the review is skipped with a warning. Use pull_request, not pull_request_target, so the pull request's code never runs with a write token.
on: pull_request permissions: contents: read pull-requests: write jobs: review: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 with: fetch-depth: 0 - uses: Ashin-06/vibeaudit@v0.17.0 with: review: "true" args: --diff origin/${{ github.base_ref }} --baseline .vibeaudit-baseline.json --fail-on-regression 5 vibeaudit review . --diff origin/main prints the same review as JSON without posting it. To keep the overall score from slipping, commit a baseline (vibeaudit scan . --write-baseline .vibeaudit-baseline.json) and pass --fail-on-regression N: the build fails when the whole project's score drops more than N points below the baseline's, even if every new finding is below --fail-on.
GitLab CI: include the template, pinned to a release. Merge request pipelines report only changed lines; findings show in the merge request's Code Quality widget and in the pipeline's Tests tab. Set VIBEAUDIT_FAIL_ON or VIBEAUDIT_ARGS in your own variables: to change it.
include: - remote: https://raw.githubusercontent.com/Ashin-06/vibeaudit/v0.17.0/ci/gitlab-ci.yml CircleCI: copy ci/circleci.yml into .circleci/config.yml (or merge its job into yours). Branches other than VIBEAUDIT_BASE (default main) report only changed lines; findings show in the Tests tab, and the reports are stored even when findings fail the job.
Any other CI: run vibeaudit scan . --fail-on high -r sarif:results.sarif (or -r junit:vibeaudit.xml for a test report) and keep the exit code.
# .pre-commit-config.yaml repos: - repo: https://github.com/Ashin-06/vibeaudit rev: v0.17.0 hooks: - id: vibeaudit The vibeaudit hook analyses the whole project and reports findings on the staged lines, which takes a few seconds on a medium project. For a hook that never slows a commit down, use vibeaudit-secrets instead (or as well, with vibeaudit in CI): it runs only the secret checks, which need nothing but the file itself, on the staged content of the changed files, with one git diff call and without scanning the rest of the project. On a 300-file repository it takes about 0.2 s on Windows, most of it Python and git starting, against 1 to 5.5 s for the full hook on medium corpus repositories (tools/hook_latency.py). The same command is vibeaudit-hook. Settings, vibeaudit: ignore comments, the baseline and feedback apply.
Editors (VS Code, Cursor and other LSP clients)
vibeaudit lsp is a Language Server Protocol server on stdio, written with the standard library only. It scans the workspace like vibeaudit scan (offline, no external tools, with the workspace's configuration) and publishes every finding as a diagnostic, also for unsaved changes. It keeps unchanged files between scans as watch does, and re-scans 0.25 seconds after the last edit. The vibeaudit fix codemods are offered as quick fixes, plus a "fix all" action per file. The server never writes a file: the editor applies the edits you accept. It accepts only file: URIs inside the workspace folder and caps message sizes.
editors/vscode is a thin VS Code / Cursor extension that starts the server. CI builds it as a bundled .vsix artifact, and releases publish it to the VS Code Marketplace and Open VSX once the one-time setup in docs/PUBLISHING.md is done; until then, install it with Extensions: Install from VSIX.... Its vibeaudit.serverCommand and vibeaudit.serverArgs settings are machine-scoped and it does not run in untrusted workspaces, so a cloned repository cannot make it start another program. Other editors can run vibeaudit lsp directly, for example in Neovim:
vim.lsp.start({ name = "vibeaudit", cmd = { "vibeaudit", "lsp" }, root_dir = vim.fn.getcwd() }) MCP server for coding agents
vibeaudit mcp runs a Model Context Protocol server on stdio, so Claude Code, Cursor and other agents can audit their own changes before handing them back. All tools are read-only:
{ "mcpServers": { "vibeaudit": { "command": "vibeaudit", "args": ["mcp"] } } } claude mcp add vibeaudit -- vibeaudit mcp Custom rules and the Python API
# org_rules.py from vibeaudit import route_rule, file_rule @route_rule("ORG001", "Billing route without audit log", severity="high", fix="Call audit_log().") def billing_audit(route): if route.path.startswith("/api/billing") and "audit_log(" not in route.body: return f"{route.path} changes billing without calling audit_log()." @file_rule("ORG002", "print() in production code", severity="low", kinds=["py"]) def no_print(source_file): for number, line in enumerate(source_file.lines, 1): if line.strip().startswith("print("): yield number, "Use the logger instead of print()." vibeaudit scan . --plugin org_rules.py rule(...) registers a project-wide check that receives the project and the route table. Custom findings appear in every report format and can be suppressed and baselined like built-in ones. Plugins run Python code, so they are loaded only from --plugin or your own imports, never from the scanned repository.
from vibeaudit import scan, project_options result = scan("path/to/project", project_options("path/to/project", offline=True)) print(result.score, result.grade, result.domain_scores) for f in result.findings: print(f.severity, f.rule_id, f.file, f.line, f.message) for r in result.routes: print(r.methods, r.path, r.has_auth) scan(path) without options, and project_options(path, **overrides), apply the project's configuration; an explicit Options(...) is used exactly as given. scan() may be called from several threads; scans then run one at a time.
Every rule is mapped to the controls its findings are evidence for, in src/vibeaudit/data/compliance_map.json: the OWASP Top 10 2021, the OWASP Top 10 for LLM Applications 2025, themes of the EU AI Act (Art. 9, 10, 14 and 15), the SOC 2 Trust Services Criteria and, where they apply, the HIPAA Security and Privacy Rules and the GDPR (Art. 5, 25 and 32). Rules that no control fits (accessibility and other user-experience checks, for example) say so in a note.
vibeaudit scan . -r compliance:soc2 # writes vibeaudit-compliance-soc2.html vibeaudit scan . -r compliance:gdpr:reports/gdpr.html Frameworks: owasp, owasp-llm, eu-ai-act, soc2, hipaa, gdpr. The report is one self-contained HTML file (no scripts, fonts or other external assets) with a print stylesheet, so it prints or saves to PDF as is. For every control it shows a status (findings, no findings, not checked because the mapped rules were disabled, or not covered by any rule) and links each piece of evidence to its finding.
This is an aid for reviewers, not a certification, an audit result or legal advice. "No findings" means the automated checks found nothing, not that the control is met, and most controls need evidence that code scanning cannot provide. The SOC 2, HIPAA, GDPR and EU AI Act reports list only the controls code scanning can speak to.
Each finding has a severity. The overall score is 100 minus 25 per critical, 10 per high, 3 per medium and 1 per low finding, floored at 0. For large repositories where linear subtraction floors at 0, JSON reports also include summary.normalized_score (exponentially scaled by files scanned), summary.raw_penalty and summary.density_per_100_files. The grade is F if there is any critical finding, otherwise A (90 and up), B (75), C (60), D (40) or F.
The same formula gives a score per domain, so you can see where the problems are:
The terminal, JSON (summary.domains), Markdown and HTML reports all show them. A score is a summary for tracking progress, not a security guarantee: read the findings.
Findings of preview rules (marked (preview), "preview": true in JSON) are reported but left out of the score, the grade and --fail-on, unless you pass --include-preview. The exception is the severe preview rules (command injection, eval, unsafe deserialization, open redirect and XSS, marked "gates_in_preview": true): a miss there costs more than a false alarm, so they count by default; --no-gate-severe-preview leaves them out. A rule is in preview while its measured precision is below 90% or it is new; see STABILITY.md.
False positives and suppressing findings
Static analysis guesses, and some findings will be wrong for your project. In order of preference:
Teach it your conventions in the configuration file: auth-helpers for your own auth checks, sanitizers for your own cleaning functions, public-paths for routes that are meant to be open.
Record a verdict, shared with your team through git:
vibeaudit feedback false-positive AUTH001 app/api/internal.py:12 --note "only reachable from the VPN" vibeaudit feedback list Verdicts live in .vibeaudit/feedback.json. Later scans hide findings marked as false positives (the report says how many), demote rules with >30% false positives across at least 3 verdicts to preview for the repo, and track entries across line moves. Use vibeaudit feedback export to turn verdicts into pytest regressions or vibeaudit feedback suggest-helpers to propose auth-helpers updates. Absolute paths and paths copied from an editor work; --config and --plugin work as for scan.
Inline: # vibeaudit: ignore[AUTH001] (or // vibeaudit: ignore[AUTH001], or without the bracket for every rule) on the line or the line above.
Paths, rules, existing debt: --exclude or .vibeauditignore, --disable, and --baseline to see only new findings.
An empty except/catch with an explanatory comment is treated as deliberate. If a rule is wrong in a way that is not specific to your code, please open an issue with a minimal example.
Offline and air-gapped use
--offline makes no network connection (a test runs every offline command with the network disabled). Only --llm, which you ask for explicitly, still sends code to its model provider. The popular-package lists used by the typosquat check ship with vibeaudit. To use fresh data and check known vulnerabilities without network, make a bundle on a connected machine and import it:
vibeaudit update --export vibeaudit-data.zip --osv PyPI,npm # connected machine (downloads OSV's dumps) vibeaudit update --import vibeaudit-data.zip # air-gapped machine vibeaudit scan . --offline The bundle has the data files and, with --osv, a vulnerability index per ecosystem built from OSV's public dumps: for every package, each advisory's listed affected versions and fixed ranges. An offline scan reports a pinned version that an advisory lists (DEP004, with the version to upgrade to) and says in its notes which index date it used, or that vulnerabilities were not checked. Advisories that give only version ranges and no version list are left out of the index (the export says how many). --import checks every file against the SHA-256 in the bundle's manifest, accepts only vibeaudit's own data files and validates their contents before it writes anything.
Registry answers and vulnerability advisories are cached for a day ("package does not exist" for an hour, because a name can be registered at any time); failed lookups are never cached. The cache is in %LOCALAPPDATA%\vibeaudit, ~/Library/Caches/vibeaudit or ~/.cache/vibeaudit (VIBEAUDIT_CACHE_DIR overrides it). --no-cache or VIBEAUDIT_NO_CACHE=1 turns it off.
vibeaudit update downloads the latest popular-package lists (used for typosquat checks) and retired-model list (LLM012) from this repository; a file is used only if it passes validation. Set GITHUB_TOKEN if you hit GitHub's rate limit.
vibeaudit update also downloads the signed threat feed: slopsquatted package names (DEP001, also offline), a model sunset calendar with retirement dates and replacements (LLM012) and prompt-injection patterns for agent instruction files such as CLAUDE.md and .cursorrules (LLM025). The same data ships with vibeaudit, so every check works offline; the feed only adds what was published since the release. A feed is used only when its signature verifies against the key shipped with vibeaudit and it has not expired (30 days); otherwise vibeaudit warns and uses the shipped data. Bundles made with --export carry the feed too. How to submit an entry, and how the feed is signed: docs/THREAT_FEED.md.
Limits and what is not covered
Data flow is followed inside a function and, in Python, into the functions it calls (same file, self methods and functions imported from the project, up to 3 calls deep); methods of other objects and dynamic calls are not followed. In JavaScript and TypeScript, calls are followed into functions of the same file and named imports from project files (3 calls deep); methods of objects and default imports are not.
JavaScript and TypeScript are read with a lexer and patterns, not a full parser.
Java and Kotlin: Spring and JAX-RS/Quarkus routes feed the route checks, with @PreAuthorize, @Secured, @RolesAllowed and the Spring Security filter chain counted as authentication (JAVA001 when there is no filter chain). Mappings inherited from annotated interfaces are not followed yet.
"Authenticated" means an auth check is visible in the route or its helpers, not that the check is correct.
Rate limiting and input validation are detected project-wide, so one limiter anywhere counts.
Router prefixes are resolved for FastAPI (APIRouter(prefix=...), include_router), Flask blueprints (url_prefix, register_blueprint) and Express (app.use("/api", router)), through imports and nested routers, when each prefix is a string literal and each router is mounted once. The frontend-backend contract rules run when every route's full path is known (or the project has no prefixes). Django URLconfs, NestJS and Remix routes are only partly covered.
Ruby on Rails gets routes from config/routes.rb (resources, namespaces, verb routes) with before_action authentication (inherited, only:/except:, skip_before_action), and SQL injection, command injection, constantize/send, Marshal/YAML.load, send_file, open redirects (off on Rails 7 defaults), mass assignment (permit!, permitted admin/role attributes) and raw ERB output. Ruby findings are preview; injection and XSS still gate.
RPC entry points are routes too, so AUTH001-003 apply: tRPC procedures (publicProcedure vs protectedProcedure and custom procedures built with .use(...)), GraphQL resolvers (Apollo-style resolver maps, Strawberry, graphene; a shield, auth directive or a context that throws makes them authenticated) and gRPC handlers (Go, Python, Node, Java/Kotlin; an auth interceptor counts for its language). The method comes from the kind (a query is a GET) or the name (deleteX is a DELETE).
UI rules cover React, Next.js, Vue and Svelte single-file components (templates and onMounted/onMount hooks) and HTML templates; Astro files get only the alt-text and placeholder checks.
Go (net/http, Gin, Echo, Fiber, Chi, GORM), Java/Kotlin (Spring Boot, Quarkus), C#/.NET (ASP.NET Core, EF Core), Rust (Actix, Axum) and PHP (Laravel, Symfony) get route/auth discovery, SQL and command injection (BE001, BE002), template XSS (FE001), loop N+1 queries (DATA001) and HTTP client timeout checks (REL001). Go, Java/Kotlin, C#, Rust and PHP also follow request data into file paths, outbound URLs and redirects and have a labelled corpus; findings in these languages stay preview until measured on held-out repositories (injection and XSS still gate; PHP SQL injection, BE001, has left preview, see STABILITY.md).
vibeaudit test-exploit FINDING --url http://127.0.0.1:8000 [--send] builds (and with --send, runs) a single non-destructive localhost proof-of-concept request without following redirects; vibeaudit.runtime offers double-gated staging-only observability middleware for FastAPI and Express (VIBEAUDIT_RUNTIME=1).
The per-file time budget is checked between regex matches and statements; a single regex step cannot be interrupted, which is why every pattern is tested for linear time.
Swift (iOS and Vapor) and Elixir (Phoenix) get route/auth discovery plus injection, deserialization, raw HTML XSS, TLS bypass, and mobile plist/UserDefaults checks in preview.
XXE (BE021, preview) checks unsafe XML parser configurations across Python, Java/Kotlin, C#, PHP and JS/TS.
Not covered (see ROADMAP.md; contributions welcome):
Infrastructure as code beyond the AWS, GCP and Azure Terraform and AWS CloudFormation checks above (no Terraform modules or variables resolved, Helm templates read as plain YAML).
Prompt injection and jailbreaks against a live model (use promptfoo or garak for live model red-teaming).
Every rule is measured on a labelled benchmark: 142 public repositories pinned to exact commits, where each of the 4,250 findings was read in the code and labelled true or false, plus seeded examples for recall. 96 repositories were used to find and fix false positives; 46 are held out and never used for tuning.
Preview rules are reported but do not gate, and most false positives are theirs. Recall, F1 and the misses: docs/BENCHMARK.md.
Precision per rule on both splits, seeded recall and the status of every rule are in benchmark/RESULTS.md. Every stable rule with at least 5 labelled findings is at 90% or above; rules below that are in preview, and a rule leaves preview only on its held-out precision. CI fails when a rule's precision drops, a labelled true positive disappears or seeded recall drops.
Reproduce it (the repositories are cloned into ~/.cache/vibeaudit-bench, never into this one):
python tools/benchmark.py run --json results.json How the corpus was chosen and how findings are labelled: benchmark/README.md. Precision, recall, F1, the misses and the comparison with Semgrep and Bandit: docs/BENCHMARK.md (python tools/benchmark.py report).
Help wanted: independent labellers. All labels so far are the maintainers' own. If you can spend an hour or two labelling a blind sample of 150 findings, see docs/LABELLING.md; every set of answers is published with its agreement score (Cohen's kappa), disagreements included.
A sample report for a deliberately vulnerable app (HTML and the six compliance reports) is published from .github/workflows/pages.yml.
Sample apps. Five deliberately vulnerable apps (Flask + OpenAI, Next.js + Supabase, Express + MongoDB, FastAPI + LangChain agent with an MCP config, config files only) and one clean app. Every expected finding is marked in the code; the tests compare the exact set of (file, line, rule), so a missed finding or a false alarm fails, and the clean app must produce nothing. Fake credentials are generated at test time.
Property tests. Each vulnerable app is changed in ways that keep it vulnerable (lines shifted, variables renamed, CRLF, moved into a monorepo, routes moved into a blueprint) and every finding must stay; 33 safe rewrites (parameterise the query, add the auth check, ...) must each remove exactly the targeted finding.
Fuzzing and hostile input. Random and malformed files with fixed seeds (garbage code, binary files, odd encodings, 3,000-level nesting, 1 MB single lines, broken manifests and lockfiles, symlink loops, unreadable files): the scan must not crash, hang or write invalid JSON or SARIF. Every regular expression is timed against input designed to make it backtrack.
Scale. A generated 10,000-file repository scans in about a minute (59 s on a Windows laptop, 130 MB peak traced memory); CI runs 2,000 files on every platform and 10,000 on Linux.
Real projects. Precision is measured on 142 pinned public repositories (benchmark/corpus.json), where every finding was read and labelled, alongside 255 GHSA security advisories in benchmark/advisories.json and 17 pinned pre-fix vulnerable locations in benchmark/recall.json; confirmed problems included an unauthenticated route in a popular chat UI that loads any user's API key by id with the service-role key.
Four external audits. Each finding was reproduced with a failing test before it was fixed; see the CHANGELOG.
Packaging. The built wheel was installed in fresh environments on Python 3.9, 3.11, 3.12 and 3.13 and every command was run; CI runs the tests on 3.10 to 3.13 on Linux, macOS and Windows and on 3.9 on macOS and Windows (the current Ubuntu runner has no 3.9), and also from a plain checkout without installing.
Each GitHub release has the wheel, the sdist and a CycloneDX SBOM (vibeaudit-VERSION.cdx.json), built by the release workflow from the tagged commit. Their build provenance is signed with GitHub artifact attestations (Sigstore). With the GitHub CLI:
gh attestation verify vibeaudit-0.17.0-py3-none-any.whl --repo Ashin-06/vibeaudit Run the same for the .tar.gz and the .cdx.json file. The check passes only if the file was built by this repository's release workflow; --format json shows the commit and workflow it came from. The SBOM lists what the wheel installs (vibeaudit has no runtime dependencies on Python 3.11 and later, and tomli before that). PyPI receives these same attested files through trusted publishing; to install a wheel you verified yourself, run pip install vibeaudit-0.17.0-py3-none-any.whl.
Contributing, security and license
Contributing: see CONTRIBUTING.md. Bug reports with a minimal example are the most useful contribution, especially false positives and missed findings.
Security issues in vibeaudit itself: see SECURITY.md; please do not open a public issue.
License: MIT, see LICENSE. Popular-package lists derive from top-pypi-packages and npm-high-impact; vulnerability data comes from OSV.dev.
Both files in this release have provenance metadata.
security sast static-analysis llm ai vibe-coding prompt-injection slopsquatting supply-chain secrets accessibility sarif mcp code-review
Development Status 4 - Beta
Intended Audience Developers
License OSI Approved :: MIT License
Operating System OS Independent
Programming Language Python :: 3
Software Development :: Quality Assurance
Software Development :: Testing
Release files for vibeaudit 0.17.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 1.6 MB
Release files / vibeaudit-0.17.0.tar.gz
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Release files / vibeaudit-0.17.0-py3-none-any.whl
Security for vibeaudit 0.17.0
Both files in this release have been uploaded with provenance metadata.
With provenance vibeaudit-0.17.0.tar.gz Nov 26, 2026
With provenance vibeaudit-0.17.0-py3-none-any.whl Nov 26, 2026
Attestation for vibeaudit-0.17.0.tar.gz
Attestation for vibeaudit-0.17.0-py3-none-any.whl
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Dec 2, 2026 2 release files Full provenance
Dec 1, 2026 2 release files Full provenance
Nov 30, 2026 2 release files Full provenance
Nov 28, 2026 2 release files Full provenance
Nov 27, 2026 2 release files Full provenance
Nov 26, 2026 2 release files Full provenance
Nov 25, 2026 2 release files Full provenance
Nov 23, 2026 2 release files Full provenance
Nov 22, 2026 2 release files Full provenance
Nov 18, 2026 2 release files Full provenance
Nov 17, 2026 2 release files Full provenance
Nov 16, 2026 2 release files Full provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation




