T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:17- Finding
Overbroad Git and Network Tool Permissions Violate Least Privilege
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:17
Vulnerability Type: Excessive tool authorization
Risk Level: MediumVulnerable Code
yaml allowed-tools: Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent WebFetchTechnical Analysis
The Skill is intended to write and review Go documentation. File access and narrowly scoped validation commands are appropriate, but
Bash(git:*)authorizes the complete Git command surface rather than only the read-only operations needed to inspect documentation changes.This permission can include destructive repository operations, remote operations, Git configuration changes, and commands that invoke configured helpers or external programs. Unrestricted
WebFetchalso permits retrieval of content from arbitrary external locations. Although the reviewed Skill contains no instruction that directly abuses these capabilities, granting them creates an unnecessary privilege boundary violation and increases the impact of malicious user input, repository content, or externally retrieved instructions.Agentaccess can further amplify the exposed surface by delegating tasks to sub-agents, although sub-agent orchestration is part of the Skill's declared workflow. The primary least-privilege issue is the unrestricted Git and outbound-fetch capability.The pre-scan alert concerning
evals/evals.json:35was also reviewed. That line is an evaluation prompt containing ashields.iobadge URL andgo gettext; it does not download or execute an executable and does not reference a personal paste or code-hosting service. It is therefore not a confirmed remote-payload vulnerability.Attack Path
- An attacker supplies a crafted documentation request, repository document, or other content processed during a documentation audit.
- The content attempts to persuade the agent to perform an operation framed as necessary for documentation work, such a ...[truncated 1659 chars]
- Remediation
View remediation
Remediation Suggestions
Apply explicit least-privilege restrictions:
-
Replace
Bash(git:*)with a small allowlist of read-only commands required for documentation review, such as:git statusgit diffgit loggit showgit ls-files
-
Do not authorize mutation or remote operations by default, including
git push,git reset,git clean,git checkout,git switch,git config, and remote-management commands. -
Require explicit user confirmation before any operation that changes repository history, contacts a remote, publishes content, or modifies Git configuration.
-
Restrict
WebFetchto approved documentation domains such asgo.dev,pkg.go.dev, and the user-specified project host. Block private-network, loopback, link-local, and arbitrary redirect destinations. -
Treat fetched pages and repository documentation as untrusted data. Do not follow instructions embedded in that content, and do not execute downloaded material.
-
Constrain delegated agents to the same or a narrower tool policy. Limit sub-agents to the files or documentation layer assigned to them.
-
Where supported, run Git commands with credential prompts disabled and outbound network access denied unless a remote operation has been explicitly approved.
-
