T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:8- Finding
Unnecessary Shell Permission Violates Least Privilege
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 8–13
Vulnerability Type: Excessive shell capability
Risk Level: MediumVulnerable configuration:
yaml permissions: filesystem: - read network: false shell: trueTechnical Analysis
The skill requests shell access even though its documented functionality only requires reading source and test files to identify coverage gaps. None of the reviewed instructions or examples require command execution.
Granting an unnecessary shell capability violates the principle of least privilege and expands the consequences of prompt injection, malicious repository content, or future unsafe changes to the skill. An agent operating with this permission could potentially execute arbitrary local commands under the privileges of its host process.
Attack Path
- A user invokes the skill against a repository containing attacker-controlled text or instructions.
- The agent reads that content while performing the requested coverage analysis.
- Crafted content influences the agent to invoke its available shell capability.
- Commands execute with the operating-system privileges of the agent process.
- Depending on host permissions, those commands could inspect or alter files and invoke locally available programs.
This path is conditional on the runtime exposing the declared shell capability and the agent being induced to misuse it. No direct command-execution instruction or malicious payload was found in the audited files.
Impact Assessment
Successful exploitation could permit command execution within the security context of the host agent. The accessible scope would depend on the operating-system account, sandbox boundaries, and filesystem controls applied by the runtime. Potential effects include unauthorized access to local files, modification or deletion of writable data, and execution of installed programs.
The configuration ...[truncated 169 chars]
- Remediation
View remediation
Remediation Suggestions
- Set
shell: falseor remove the shell permission entirely. - Retain only read-only filesystem access required for coverage analysis.
- Restrict filesystem access to the selected project directory when the runtime supports path-scoped permissions.
- If shell execution becomes necessary in a future version, document the required commands, use an explicit allowlist, avoid shell-string interpolation, and run commands inside a restricted sandbox.
- Add a permission-review check to release procedures so new capabilities must be justified by documented functionality.
- Set
