write_file
on npm:@wonderwhy-er/desktop-commander@0.2.41
Severity
2 findings on this tool
- highexcessive agencyf-r3-write_file
Tool `write_file` name implies a side effect that is not declared
`write_file` looks like a side-effecting tool (its name contains a mutation verb), but its `side_effects` declaration is []. A policy synthesizer cannot produce safe rules for this tool because it cannot tell what it actually does.
fix: Declare the tool's true side effects explicitly. If the tool is genuinely read-only, rename it to match (e.g. `email.preview` rather than `email.send`).
OWASP LLM08NIST MEASURE-2.6ATLAS T0051 - mediumunconstrained inputf-r1-write_file
Tool `write_file` accepts unconstrained string input
The following string parameter(s) have no `maxLength` constraint: `content`, `mode`, `path`. Unbounded strings let an attacker stuff arbitrary payloads through the tool, including indirect-injection content.
fix: Add a `maxLength` to each string property, or constrain with an `enum` or `pattern`. Most legitimate tool inputs fit under a few hundred bytes.
OWASP LLM01NIST MEASURE-2.3ATLAS T0051
About this tool
write_file is one of 26 tools exposed by Desktop Commander MCP. The server scored 14/100 overall against the capframe rule engine (source: sandbox). Last scanned 2026-06-05.
The findings above are emitted by the public capframe.findings.v1 schema. Disagree with one? Open an issue.