other
- Location
SKILL.md:25- Finding
Overbroad Autonomous Workspace Scanning and Sensitive State Access
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:25-28,SKILL.md:48-50, andSKILL.md:133-137
Vulnerability Type: Overbroad workspace and sensitive information access
Risk Level: MediumVulnerable Instructions
The following is an English rendering of the relevant source instructions:
markdown ### Automatic trigger (at the end of every conversation) - Scan the workspace for Magic Doc files - Determine whether the current conversation contains new information relevant to each document - If so, update it automaticallybash # Scan the workspace for Magic Doc files grep -rl "<!-- MAGIC DOC" . --include="*.md" | head -20markdown User: Create a live document recording the network configuration of all devices Agent: 1. Create devices-network.md 2. Add <!-- MAGIC DOC scope="IP,SSH,network,devices" --> 3. Extract existing device information from MEMORY.md and TOOLS.md 4. Automatically update it whenever future conversations involve device changesTechnical Analysis
The skill instructs the agent to recursively scan Markdown files across the current workspace after every conversation and automatically modify matching documents. The scan begins at
.and does not define an allowlist, an approved directory boundary, or exclusions for sensitive and unrelated project locations.The initialization example further directs the agent to extract information from
MEMORY.mdandTOOLS.md. Such files can contain persistent agent state, infrastructure details, local tool configuration, operational notes, or credentials. Although the skill separately states that passwords and keys must not be written into the generated document, that safeguard does not prevent the agent from reading sensitive files or exposing their contents to the model context. It also does not reliably prevent indirect disclosure of sensitive operational metadata, such as internal addresses, device i ...[truncated 2350 chars]- Remediation
View remediation
Remediation Suggestions
- Require explicit user authorization before the initial workspace scan and before every automatic document modification.
- Replace recursive scanning from
.with an allowlist of user-approved files or a dedicated documentation directory. - Do not read
MEMORY.md,TOOLS.md, configuration files, or other persistent state sources by default. - Require users to explicitly select every source file from which information may be extracted.
- Add denylist protections for files likely to contain secrets or private state, including memory files, tool configuration, environment files, credential stores, and private keys.
- Generate a proposed diff and request confirmation before writing changes, especially when information originates outside the target document.
- Apply structured secret and sensitive-data detection before information is placed in model context or written to another file.
- Restrict updates to the approved scope and reject document markers found outside authorized paths.
- Record which source file and conversation fact justified each update so users can review provenance.
- Provide a disabled-by-default automatic-update mode, with manual updates as the secure default.
