T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/execute.py:264- Finding
Unrestricted Modification of Attacker-Selected Files
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is meant to edit and roll back project files, but its scripts can be steered by artifacts or command-line paths to modify or copy arbitrary writable local files.
Review before installing. Use this only in a tightly controlled workspace with trusted ranking, receipt, and execution artifacts. Do not run it on untrusted artifacts, avoid --force and rollback --execute unless you have verified the paths, and run it as a low-privilege user because the current scripts can write anywhere that user can write.
scripts/execute.py:264Unrestricted Modification of Attacker-Selected Files
scripts/rollback.py:167Arbitrary Local File Copy and Overwrite Through Rollback Paths
scripts/execute.py:187State-Root Escape Through Unvalidated Run and Candidate Identifiers
The wording suggests broad apply/execute functionality and preview support, but the material mainly evidences rollback-related logic and artifact-driven restoration details. This is a real security concern because users may invoke the skill expecting safe preview semantics while the actual workflow performs state-changing operations or lacks the represented protections.
The wording suggests broad apply/execute functionality and preview support, but the material mainly evidences rollback-related logic and artifact-driven restoration details. This is a real security concern because users may invoke the skill expecting safe preview semantics while the actual workflow performs state-changing operations or lacks the represented protections.
The wording suggests broad apply/execute functionality and preview support, but the material mainly evidences rollback-related logic and artifact-driven restoration details. This is a real security concern because users may invoke the skill expecting safe preview semantics while the actual workflow performs state-changing operations or lacks the represented protections.
The wording suggests broad apply/execute functionality and preview support, but the material mainly evidences rollback-related logic and artifact-driven restoration details. This is a real security concern because users may invoke the skill expecting safe preview semantics while the actual workflow performs state-changing operations or lacks the represented protections.
The skill describes file read/write and environment-related capabilities but does not declare any explicit tool scope such as permissions or allowed-tools. In an agent platform, an undeclared write-capable skill can be invoked with broader authority than reviewers or routing logic expect, increasing the chance of unauthorized file modification or misuse.
The trigger phrase "execute candidate" is broad enough to match ordinary requests about running a candidate, not necessarily this file-modifying skill. Because the skill can write files, ambiguous invocation phrases raise the risk of accidental activation by an agent router and unintended modification of project content.
The trigger "回滚" is extremely broad and likely to collide with many unrelated rollback requests. In the context of a skill that can modify files and restore backups, accidental routing on such a generic phrase could revert changes outside the intended workflow or cause disruptive state changes.
The manifest says this skill is used to apply approved improvements, roll back previous changes, or preview change effects, and lists four supported actions. In code, ACTION_HANDLERS only implement direct file-modifying operations, while rollback is merely recorded as a pointer in the output artifact and no preview mode exists; unsupported actions are rejected instead.
The manifest describes four actions using the names append, replace, insert_before, and update_yaml, suggesting a stable public action interface. The code instead accepts append_markdown_section, replace_markdown_section, insert_before_section, and update_yaml_frontmatter, narrowing behavior to markdown/frontmatter-specific operations and mismatching the documented action contract.
A one-word trigger like "回滚" is too short for safe routing and can match many benign user requests. While lower severity than a direct code flaw, it still increases the chance of unintended invocation of a state-changing skill, especially in multilingual or loosely matched routing systems.
The top-level docstring says this file is an 'Executor for low-risk generic-skill candidates,' which does not match the surrounding manifest context for an improvement executor that applies approved improvements, supports rollback semantics, and is not for scoring or gating. This is not merely incomplete documentation; it describes a materially different intent and scope.
The CLI help says rollback will create backups named like pre-rollback-*.bak, which communicates a specific artifact format to operators. However, the implementation at L140 and L183 names files as <target>.pre-rollback-<timestamp> without the .bak suffix, so the inline documentation contradicts actual behavior.