mr-onion

Security policy

Reporting a vulnerability

Please don’t report security problems in public issues, discussions or pull requests.

Report them privately through GitHub: on this repository’s Security tab, choose Report a vulnerability. That opens a private advisory that only the maintainer can see.

Please include what you found, how to reproduce it (the request, the config, the Mr Onion commit), and what an attacker could do with it.

What to expect. Mr Onion is maintained by one person, so responses are best effort: an acknowledgement within a week, then updates in the advisory until it is fixed or declined with a reason. Once a fix lands, the advisory is published with credit to the reporter, unless you’d rather not be named.

Supported versions

Versions are numbered from 0.2.0 (see docs/decisions/workflow-and-ci-backlog-2026-10-26.md, TFP-257), but only the current main branch is supported. Fixes are not backported.

Security model

Mr Onion is a local, single-user developer tool. It is not designed to be deployed, shared on a network or exposed to the internet.

What Mr Onion does to limit harm

Area What it does Where
Generated tests Read-only by default: a request guard blocks non-GET traffic to the target unless a run turns on the interactive gate; data-changing and attack-shaped tests need a typed ownership confirmation (Phase 43, not yet built: until then they don’t run) src/lib/run/, docs/decisions/phase-38-*, phase-43-*
Model-written tests Restricted to the page and expect: imports, Node APIs, non-GET requests, routes and code built at run time are refused before running. This is a filter, not a sandbox; the Docker sandbox is Phase 45 src/lib/gap-writer/, docs/decisions/phase-45-*
The gap writer Calls the Claude Code CLI with every tool and MCP server off, without this machine’s CLAUDE.md, auto memory or hooks (--safe-mode), from an empty temporary folder, with the page’s text marked as untrusted data src/lib/gap-writer/writers.ts
Child processes Every Playwright run gets only the environment Playwright needs, plus the proxy settings when set: no API keys, tokens or Mr Onion settings. A test can read a proxy setting, so a password in a proxy URL is within its reach src/lib/run/child-env.ts
Credentials Login credentials come only from environment variables; they’re redacted from every report, log and saved file; a run’s signed-in session file lives in a per-run folder outside the evidence and is deleted when the run’s process ends src/lib/run/auth.ts, redact.ts, docs/decisions/phase-20-*
Load on target sites Hosts other than local ones are capped: at most 3 workers sharing 5 requests per second src/lib/run/host-limits.ts, request-cap.ts
Local data Run history, site suites and candidates (target URLs and page structure; from Phase 43, ownership confirmations and their contact email) stay in the local data folder, never in the repo src/lib/storage/data-dir.ts
Browser hardening of the UI Content-Security-Policy without unsafe-eval in production, frame-ancestors 'none' next.config.ts

Testing other people’s sites

Mr Onion sends real traffic to the sites it tests. Only test sites you own or have permission to test, or the public practice sites listed in docs/decisions/practice-site-targets-2026-10-19.md. Standard runs are designed not to be intrusive, but they are still automated traffic.

Known gaps

For the maintainer