SECURITY.md
# Security and data handling: test-report-analyst
Published by AgentRove (provisional, configurable name).
## Permissions (from `agent.json`)
| Permission | Value | Notes |
| --- | --- | --- |
| filesystem | `read_write` | Reads report files only inside the **workspace folder**: `AGENTROVE_TEST_REPORTS_ROOT`, or the folder the CLI/MCP server started in if it looks like a project (a marker such as `.git`, `package.json`, `pyproject.toml` or `.agentrove-workspace`); drive roots, the home folder itself, the folder holding the home folders and system folders are refused (finding C6, 0.1.1). Only `write_report` writes: one new file per call, inside `reports/`. (The CLI also reads the `--input` file you name; that is the SDK runner, not a tool.) |
| network | none | The allowlist is empty and the code makes no network requests; XML never loads external entities or DTDs. |
| credentials | none | No API keys or tokens. `AGENTROVE_TEST_REPORTS_ROOT` is optional configuration, not a secret. |
| processes | none | It never runs tests or commands: no `child_process`, shell or worker threads (a test checks the source). |
## Side effects
- `summarize_results`, `compare_runs`, `coverage_report`: none (tests compare a snapshot of the
workspace before and after).
- `write_report`: `writes_local_files`, `requires_confirmation: true`. Creates one new `.md`,
`.markdown`, `.txt` or `.json` file inside the workspace's `reports/` folder, never with a name that AI
assistants, MCP clients or tools read as instructions or configuration (`CLAUDE.md`, `AGENTS.md`,
`GEMINI.md`, `SKILL.md`, `*.instructions.md`, `llms.txt`, `mcp.json`, `settings.json`,
`package.json`, `tsconfig.json`, `*.config.json`, `node_modules/`, `.claude/` and similar, in any
letter case; finding C5, 0.1.1), so a model-confirmed write cannot plant persistent instructions. It
is written with the exclusive `wx` flag (an existing file is never replaced;
`if_exists: "suffix"` picks a free `-2` ... `-99` name), creates missing folders one level at a time
inside the workspace, refuses links anywhere on the path, and deletes nothing. A test checks that
`write.js` is the only module that writes and that no module removes, renames or appends.
## XML safety
- A small built-in parser (no third-party XML library). Any `<!DOCTYPE>`, `<!ENTITY>`, `<!ELEMENT>` or
`<!ATTLIST>` declaration makes the file refused (`unsafe_xml`), so there is no entity expansion
("billion laughs"), no external entity or DTD loading (XXE), and no network or file access from XML.
- Only the five predefined entities and numeric character references are decoded; other entity
references stay literal text and are counted in a warning.
- Limits: 500,000 elements, nesting depth 64, 100 attributes per element; malformed XML is reported
with a line number and that file is skipped.
## Workspace confinement and limits
Same rules as workflow-automation: relative paths only; no `..`, drive letters, UNC paths, `:`,
control or Windows-reserved characters, reserved device names, trailing dots or spaces, or hidden
names (`.git`, `.env`, `.ssh`); reads follow links only when they resolve inside the workspace;
listings skip links and never follow linked folders; a drive or file-system root is refused as the
workspace. Per-file size (20 MB default, 50 MB maximum), 100 MB read per call, 200 files per run,
200,000 results, 60 s per call, 20 MB `results_text`, 5 MB report content. Binary files are refused;
UTF-8 and UTF-16 with a byte-order mark are read.
## Untrusted content
Test names, failure messages, stack traces and paths come from the code under test and may contain
anything, including text addressed to AI assistants. They are data: never executed or followed,
truncated to the first lines, Markdown-escaped in tables and lists, and placed in code blocks whose
fence is longer than any fence inside the message. A test checks this with an injection string.
## Residual risks
- Reports can contain secrets that a test printed (tokens in error messages, environment dumps). The
analysis output repeats the first lines of failure messages, and an MCP client passes them to its
model. Review what your tests print.
- Without `AGENTROVE_TEST_REPORTS_ROOT` the workspace is the start folder when it has a project marker;
anything non-hidden in it can be read as a report. The protected-name list is not exhaustive.
- Time-of-check/time-of-use between the checks in `write_report` and the write; the exclusive create
still never replaces a file that appears in between.
## Data handling
Nothing is stored beyond the report files you ask `write_report` to create. No telemetry, no
analytics, no calls to AgentRove services.
## Reporting
Report vulnerabilities through the AgentRove listing's report button or the responsible-disclosure
channel published on the AgentRove site.