avento
by EntropyLogic
README.md
# Avento
**The security gate for shipping AI-built code into environments you don't own.**
[](https://github.com/EntropyLogic/avento/actions/workflows/ci.yml)
[](LICENSE)
This is the open-source scanner engine behind [Avento](https://avento.run): the `avento`
CLI, its MCP server and a self-hosted web UI. Site owners can opt out of scans with
`User-agent: Avento` in robots.txt.
Avento is an open-source, agent-native security scanner for AI-generated ("vibe-coded")
apps. It scans the **repository** *and* probes the **live deployment**, then **correlates
the two** — a finding is marked `CONFIRMED` only when static and dynamic evidence support the
same issue, in the same resource, **in the same application**.
That correlation is the whole point. Every other scanner is *either* a code reader *or* a
URL prober, which makes them noisy: a "missing RLS policy" in the code might be unreachable;
an open endpoint might have no source you can see. Avento says **CONFIRMED** only when it has
proven the issue is live:
```
CRITICAL CONFIRMED rls-missing-policy-exposed
Table public.profiles has no row level security and is readable by anyone
STATIC EVIDENCE supabase/migrations/20240101000000_init.sql:8
create table public.profiles ( id uuid primary key ..., user_id uuid not null
references auth.users (id) on delete cascade, email text not null, full_name te…
DYNAMIC EVIDENCE GET https://app.example.com/rest/v1/profiles?select=*&limit=1 → 200
HTTP 200 · 1247 row(s) readable. Columns: id, user_id, email, full_name.
Requested anonymously using the public anon key recovered from the deployed
bundle, with no user session. Row values were not retrieved and are not recorded.
↳ CONFIRMED: static and dynamic evidence match the same resource (table:public.profiles)
```
The migration says the table has no policy. The live probe proves anyone on the internet can
read 1,247 rows — in the Supabase project the repository itself references. Same table, same
project, both sides — **CONFIRMED**, not a maybe.
A shared name is never enough. The same table in another app's project, the same route on an
unrelated site, the same missing header on an arbitrary URL — those stay separate findings,
listed as *not confirmed* with the reason. When Avento can't observe that the URL is this
repository's deployment, you can declare it with `--same-app`; the report then says the link
was declared, not observed. See [`docs/correlation.md`](docs/correlation.md).
---
## Why Avento
Built for the **technical builder shipping AI-generated apps** — and, specifically, for the
person doing **forward-deployed / client-handoff work**: you built something in Lovable / Bolt
/ Cursor / Claude Code, and now you have to hand it to a client or ship it into infrastructure
you don't control. Avento is the gate before that handoff.
- **Correlated static + dynamic.** Kills the false-positive noise. A finding is `CONFIRMED`
only when the live deployment reproduces it.
- **Agent-native.** Ships as an **MCP server** so Claude Code / Cursor / Windsurf can scan,
read findings, apply a fix, and re-scan to confirm — a closed loop inside the editor. Output
is SARIF, which agents and GitHub code scanning consume natively.
- **Real attacker logic.** RLS-bypass, open-bucket enumeration, unauthenticated routes,
IDOR — probes that reflect actual pentest methodology, not just header checks.
- **A trust artifact.** `avento handoff` produces a client-presentable report — what was
checked, what's confirmed exploitable, residual risk — with an authorization attestation
baked in.
- **Open source.** Trust in a security tool comes from readable rules. MIT-licensed.
---
## Install
Requires **Node ≥ 20**.
```bash
git clone https://github.com/EntropyLogic/avento
cd avento
npm install
npm run build
npm link # puts `avento` (and its alias `avento`) on your PATH (optional)
```
Two optional dependencies unlock the full check set:
- **[Semgrep](https://semgrep.dev)** powers the code-layer checks (SQL injection, unsafe
eval/deserialization, dangerous CORS). Install with `pipx install semgrep`. Without it,
those checks are recorded as not run ("tool unavailable"), every report marks coverage
as incomplete, and the rest of the scan is unaffected.
- **[Playwright](https://playwright.dev)** improves JS-bundle collection (it captures
lazily-loaded chunks). Install with `npm i playwright && npx playwright install chromium`,
then pass `--browser`. Without it, Avento falls back to `fetch`.
---
## Quickstart — CLI
```bash
# Scan a repo (static only)
avento scan repo ./my-app
# Probe a live deployment (requires an authorization attestation)
avento scan url https://my-app.vercel.app --authorized-by "Your Name"
# Correlated mode — the CONFIRMED demo. Scan repo AND deployment, join the two.
avento scan repo ./my-app --url https://my-app.vercel.app --authorized-by "Your Name"
# …and declare the URL is this repo's deployment when Avento can't observe the link itself
avento scan repo ./my-app --url https://my-app.vercel.app --authorized-by "Your Name" --same-app
# Machine output
avento scan repo ./my-app --format sarif > findings.sarif
avento scan repo ./my-app --format json
# Visual report — a self-contained, offline HTML page (no server, no external requests)
avento scan repo ./my-app --url https://my-app.vercel.app --authorized-by "You" \
--format html > report.html
# CI gate — non-zero exit when a finding is at or above the threshold
avento scan repo ./my-app --fail-on high
```
**Exit codes:** `1` findings at/above the `--fail-on` threshold; `2` the scan could not
run or could not establish a result (bad target, missing attestation, a check failed, the
deployment couldn't be reached); `0` otherwise. Every result separates **what was found**
from **what was checked**: a check that failed, couldn't reach its target or lacked a tool
is reported as such, never as a pass. See [`docs/results.md`](docs/results.md).
### Safety
Probing a live URL is **active testing against infrastructure**. Every `url` and `handoff`
scan requires an `--authorized-by` attestation. Aggressive probes (IDOR object-id enumeration)
are **opt-in** behind `--aggressive` and never run by default. Avento **never logs or stores
secret values, row values, or file contents** — findings carry a redacted fingerprint (last 4
chars + a SHA-256 prefix), a row count, or column names only.
---
## Quickstart — MCP (the in-editor loop)
Avento ships as an MCP server so an agent can run the whole scan → fix → confirm loop without
leaving the editor.
Start the server:
```bash
avento mcp # speaks MCP over stdio
```
Register it with your editor. For example, in a Claude Code / Cursor MCP config:
```json
{
"mcpServers": {
"avento": { "command": "avento", "args": ["mcp"] }
}
}
```
Tools exposed:
| Tool | What it does |
| --- | --- |
| `scan_repo(path, url?)` | Scan a repo; add `url` to correlate against the deployment |
| `scan_url(url)` | Probe a live deployment (requires `authorized_by`) |
| `get_fix_prompt(finding_id)` | The ready-to-apply remediation for one finding |
| `rescan(finding_id)` | Re-run that finding's scan to confirm a fix landed |
**The loop:** the agent calls `scan_repo`, reads the `CONFIRMED` findings, calls
`get_fix_prompt`, applies the fix in the repo, then calls `rescan` → which reports the finding
`resolved`. That closed loop is the product's soul. `resolved` requires that the checks which
report the finding ran cleanly in the rescan; if one couldn't run (deployment down, tool
missing), `rescan` says `inconclusive` instead — missing evidence is never counted as a fix.
---
## Quickstart — self-hosted server (web UI + API + MCP)
One port, three surfaces over the same engine and the same in-memory scan list:
```bash
npm run build # compile the UI bundle once
avento serve # http://127.0.0.1:7341/ — UI, REST API, and MCP on /mcp
avento serve --root ~/clients/acme # repo paths resolve against, and stay inside, this root
```
Binds to loopback by default. Binding anywhere else **requires** an access token
(`--token` / `AVENTO_TOKEN`, min 16 chars), which then guards `/api` and `/mcp` as
`Authorization: Bearer <token>`. Loopback mode instead enforces Host and Origin checks, so a
hostile page can't drive the API via DNS rebinding or CSRF. URL scans are attestation-gated
in the UI exactly as on the CLI. Scans live in memory only — no database, nothing retained
across restarts. Full reference in [`docs/serve.md`](docs/serve.md).
---
## The client-handoff workflow
The moment the whole positioning is built around:
```bash
avento handoff ./my-app --url https://my-app.vercel.app \
--authorized-by "Your Name" --client "Acme Corp" \
--out acme-handoff.md
```
This runs the full suite, gates on severity, records the authorization attestation, and writes
a **client-presentable report** — distinct from the raw SARIF. It has: the attestation block,
a severity summary, what was checked — taken from what each check actually did, so failed,
unreachable and skipped checks are named with the reason — any findings suppressed by config,
findings with both evidence sides, and a plain-language residual-risk statement that says
what the scan could not vouch for. It's the artifact you hand to
the person you scanned on behalf of. See [`docs/handoff.md`](docs/handoff.md).
---
## What Avento checks
Organized by layer. **★ = correlated pair** — both a static and a dynamic check see it, so it
can reach `CONFIRMED`. One page per check in [`docs/checks/`](docs/checks/).
| Layer | Checks |
| --- | --- |
| **Code** | Hardcoded secrets ★ · unprotected API/admin routes ★ · SQL injection · unsafe eval / deserialization · dangerous CORS *(via Semgrep)* |
| **Config** | Supabase missing RLS ★ · permissive Firebase rules ★ · open storage buckets ★ · missing security headers ★ |
| **Runtime** | Secrets in the JS bundle ★ · Supabase RLS-bypass probe ★ · Firebase open-db/bucket ★ · unauthenticated routes ★ · missing headers ★ · reflected XSS · IDOR *(aggressive, opt-in)* |
---
## Configuration
A per-project `avento.config.json` (checked into each scanned repo) can tighten the CI gate and
propose findings to suppress (always disclosed). The repository is untrusted input: it can make a
scan stricter, never weaker, and it can't enable aggressive probes or widen network scope.
```json
{
"$schema": "./avento.config.schema.json",
"failOn": "high",
"ignore": {
"paths": ["test/fixtures/"],
"rules": ["missing-security-header"]
}
}
```
The operator (whoever runs Avento) sets the execution mode, network scope, limits and gate
floor with flags or environment variables (`--mode hosted`, `--allow-host`, `--deadline`,
`AVENTO_MODE`, …). Full schema and precedence: [`docs/configuration.md`](docs/configuration.md).
Security model: [`docs/security.md`](docs/security.md), [`docs/network-policy.md`](docs/network-policy.md).
---
## How it works
One engine, thin adapters — **not** four products.
```
CLI · MCP server ← thin surfaces (arg-parse / tool defs)
└──────┬──────┘
Scan session + config ← one orchestration path (runScan)
Correlation engine ← the differentiator; the only place CONFIRMED is set
┌──────┴──────┐
STATIC collector DYNAMIC collector
(repo / source) (live URL / attacker)
└──────┬──────┘
Unified Finding model → SARIF + per-finding agent fix-prompt
```
Every check — static or dynamic — emits a `Finding` and nothing else. The correlation engine
runs after both collectors finish and joins findings by **resource identity** (a secret's
fingerprint, a table name, a route path, a bucket name). Details in
[`docs/architecture.md`](docs/architecture.md).
---
## Avento Cloud
[Avento](https://avento.run) runs this engine as a hosted service: projects that join a
GitHub repository to a verified deployment, Full Scans run by isolated workers, scan
history with fix-by dates, exports and team workspaces, plus a free Quick Scan and a
ChatGPT app. The hosted service is a separate, commercial product; this repository is the
engine and everything you need to run it yourself.
The CLI can optionally send results there. Local Avento works without it.
- `avento cloud login --url <base>` stores an API token. It reads the token from
`AVENTO_CLOUD_TOKEN` or stdin, never from arguments.
- `avento scan … --upload` sends the redacted results to your workspace.
Every report, local or hosted, uses one model:
- `CONFIRMED`: seen in source and reproduced live.
- `OBSERVED`: seen live only.
- `POTENTIAL`: seen in source or configuration only.
Each report also says what it couldn't check.
---
## Development
```bash
npm test # vitest — every check ships with a fixture
npm run typecheck # strict TypeScript (engine, browser UI and tests), no `any` in the engine
npm run build # compile to dist/
npm run avento -- scan repo ./test/fixtures/vulnerable-app # run from source
```
Avento dogfoods itself: CI runs the test suite and then scans this repo with
`avento scan repo . --fail-on critical`.
---
## Non-goals
The open-source tool stays a tool: the CLI, local MCP and self-hosted server need no
account, keep no scan history and send nothing anywhere. Accounts, history and billing live
only in the optional Avento Cloud service. Neither ships compliance-report generators, and
neither fixes code on its own: fix prompts are for your agent.
---
## Security and contributing
Found a vulnerability in the scanner itself? Please report it privately; see
[SECURITY.md](SECURITY.md). Contributions are welcome: [CONTRIBUTING.md](CONTRIBUTING.md).
---
## License
MIT © Entropy Logic LLC. See [LICENSE](LICENSE).
The Avento name and logo are trademarks of Entropy Logic LLC. The MIT license covers the
code; it doesn't grant the right to use the name or logo to brand another product.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues