- Location
- SKILL.md:111
- Finding
- Unrestricted privileged Git command delegation from untrusted Workers<![CDATA[
## Vulnerability Details
**File Location**: `SKILL.md`, lines 14-18, 25-39, and 111-132
**Vulnerability Type**: Privileged instruction hijacking and missing command authorization controls
**Risk Level**: Critical
### Vulnerable Code
```markdown
The Manager has access to:
- Host's `.gitconfig` via `/host-share/.gitconfig` (symlinked to `/root/.gitconfig`)
- Git credentials (SSH keys, credential helpers) configured on the host
This allows git operations to use the correct author name, email, and authentication.
```
```markdown
**Extract:**
- `task-id`: Task identifier
- `workspace`: Path to work in (for clone: parent directory; for other ops: repo directory)
- `operations`: List of git commands to execute (literally what to run)
- `context`: (Optional) What the Worker is trying to accomplish
```
```markdown
## What Operations Can Be Delegated
**Any git operation**, including but not limited to:
| Category | Commands |
|----------|----------|
| Repository | `git clone`, `git init` |
| Branches | `git branch`, `git checkout`, `git switch` |
| Remote | `git remote`, `git fetch`, `git pull`, `git push` |
| Commits | `git add`, `git commit`, `git reset`, `git revert` |
| History | `git log`, `git show`, `git diff` |
| Rebase | `git rebase`, `git rebase -i` |
| Cherry-pick | `git cherry-pick` |
| Merge | `git merge` |
| Stash | `git stash` |
| Tags | `git tag` |
| Submodules | `git submodule` |
| Config | `git config` (local to repo) |
If git can do it, the Worker can delegate it.
```
### Technical Analysis
The skill explicitly instructs a Manager possessing host Git credentials to execute Worker-supplied Git commands literally. It does not define a structured command parser, operation allowlist, repository authorization check, remote allowlist, argument validation, or approval requirement for destructive and externally visible operations.
Treating commands as safe merely because they invoke Git does not establish a security boundary. Git supports h
...[truncated 2032 chars]
- Remediation
- <![CDATA[
## Remediation Suggestions
1. Replace literal command execution with a structured request schema containing an enumerated operation and separately validated arguments.
2. Allow only the minimum required operations. Deny Git aliases, hooks, external helpers, `git config`, `git -c`, arbitrary executables, submodule commands, and all shell syntax.
3. Bind each authenticated Worker and task to an explicit repository, branch set, and approved remote URL. Resolve authorization on the Manager side rather than trusting request fields.
4. Use per-repository, short-lived credentials with read-only access by default. Never expose general host Git credentials to delegated workflows.
5. Require explicit human or policy approval for pushes, force pushes, resets, rebases, remote changes, tags, submodules, and history rewriting.
6. Execute approved operations in an isolated environment with a minimal environment, disabled hooks, sanitized Git configuration, no host SSH agent, and restricted network access.
7. Validate every argument against operation-specific rules and reject options that alter configuration, credential helpers, protocol handlers, upload-pack, receive-pack, or executable paths.
8. Record the authenticated requester, normalized repository, exact validated operation, resulting commit identifiers, and authorization decision in tamper-resistant audit logs.
]]>