v0.2.0 · live
CAPFRAME
← leaderboard/server-github/tool · create_or_update_file
§ toolsandboxserver-github

create_or_update_file

on npm:@modelcontextprotocol/server-github@2025.4.8

Severity

critical0
high2
medium1
low0
info0

3 findings on this tool

  1. highexcessive agencyf-r3-create_or_update_file

    Tool `create_or_update_file` name implies a side effect that is not declared

    `create_or_update_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 T0051CAST-01
  2. highfilesystem egressf-r9-create_or_update_file

    Tool `create_or_update_file` writes to or deletes from the host filesystem

    `create_or_update_file` appears to write, create, move, or delete files on the host filesystem (Create or update a single file in a GitHub repository). An agent manipulated by an indirect-injection payload can target sensitive paths (SSH keys, shell configs, application secrets) or establish persistence via cron / systemd.

    fix: Restrict the tool to an explicit allow-list of safe directories. Validate all path parameters server-side, reject traversal sequences (`../`), and gate write / delete operations behind a capframe-bind `path starts_with /safe/dir` caveat.

    OWASP LLM08NIST MANAGE-2.2ATLAS T0051CAST-01
  3. mediumunconstrained inputf-r1-create_or_update_file

    Tool `create_or_update_file` accepts unconstrained string input

    The following string parameter(s) have no `maxLength` constraint: `branch`, `content`, `message`, `owner`, `path`, `repo`, `sha`. 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 T0051CAST-03

About this tool

create_or_update_file is one of 26 tools exposed by server-github. The server scored 12/100 overall against the capframe rule engine (source: sandbox). Last scanned 2026-07-20.

The findings above are emitted by the public capframe.findings.v1 schema. Disagree with one? Open an issue.