T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:17- Finding
Overly Broad Tool Permissions Violate Least-Privilege Requirements
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 17
Vulnerability Type: Excessive execution, delegation, and repository modification permissions
Risk Level: MediumVulnerable configuration:
yaml allowed-tools: Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) AgentTechnical Analysis
The Skill provides Go naming advice and may optionally review or rename identifiers. Its declared functionality does not require unrestricted access to every Go, Git, and agent-delegation operation.
The wildcard permissions
Bash(go:*)andBash(git:*)permit substantially more than read-only validation. Depending on harness enforcement, these patterns may authorize operations such as:- Executing workspace code through
go run,go test, orgo generate. - Downloading dependencies through Go tooling.
- Modifying repository state through Git commands.
- Invoking repository-configured hooks through applicable Git workflows.
- Delegating work to another agent through the unrestricted
Agentcapability.
The Skill contains no malicious command and does not automatically exercise these permissions. Nevertheless, granting them creates an unnecessary privilege boundary: malicious repository content, evaluation input, or contextual instructions could attempt to induce execution of a permitted but unsafe command.
Read-only tools and narrowly scoped editing are adequate for normal naming reviews. Go compiler or linter access can be granted separately when validation is explicitly requested.
Attack Path
- An attacker places adversarial instructions or executable Go content in a repository inspected by the Skill.
- The Skill reads that content while performing a naming review.
- The content persuades the agent to validate or apply a change using a broadly permitted operation such as
go run,go generate, or a mutating Git command. - The harness accepts the operation beca ...[truncated 1183 chars]
- Executing workspace code through
- Remediation
View remediation
Remediation Suggestions
Apply least-privilege controls to the Skill configuration:
- Remove the unrestricted
Agentcapability unless delegation is essential and has a narrowly defined security boundary. - Replace
Bash(git:*)with an allowlist of read-only commands, such asgit status,git diff, andgit grep. - Replace
Bash(go:*)with only the validation commands required by the workflow. Explicitly denygo run,go generate, and other commands that execute workspace-controlled code. - Allow
EditandWriteonly when the user explicitly requests code changes; useRead,Glob, andGrepfor advisory reviews. - Require user confirmation before commands that download dependencies, execute tests, invoke hooks, modify repository state, or access the network.
- Run permitted Go and Git operations in a sandbox without sensitive environment variables, host credentials, or unrestricted filesystem access.
- Ensure delegated agents cannot inherit broader permissions than the parent task.
- Remove the unrestricted
