T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:22- Finding
Mutable Remote Skills Can Be Installed into Persistent Agent Storage
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 22–40
Vulnerability Type: Remote supply-chain payload retrieval
Risk Level: HighVulnerable Code
markdown ### Install a skill from GitHub ```bash bash <this-skill-path>/scripts/install-skill.sh --repo owner/repo --path path/to/skill [--ref branch]Or from a full GitHub URL:
bash bash <this-skill-path>/scripts/install-skill.sh --url https://github.com/owner/repo/tree/main/path/to/skillBehavior
- Downloads the skill directory from GitHub via zip archive (public repos) or falls back to
git sparse-checkout(private repos). - Validates that the downloaded directory contains a
SKILL.md. - Aborts if the destination skill directory already exists.
- Installs to
.grok/skills/<skill-name>(persisted across sessions).
text ### Technical Analysis The documented interface accepts a user-selected GitHub repository, path, URL, and optional branch reference. Branches such as `main` are mutable, so the downloaded content can change after the installer or repository was reviewed. The only documented content validation is checking whether the downloaded directory contains a `SKILL.md`. This does not establish source authenticity or detect malicious instructions, executable scripts, symlinks, path traversal entries, or other unsafe files. No commit pinning, signature verification, expected digest, repository allowlist, or content security review is documented. Installation into `.grok/skills/` makes the downloaded content available across sessions. While the artifact does not prove that arbitrary native code is executed during installation, a remotely controlled skill may subsequently influence agent behavior or invoke included scripts when loaded. ### Attack Path 1. An attacker prepares a GitHub repository containing a syntactically valid skill and the required `SKILL.md`. 2. The attacker persuades a use ...[truncated 1211 chars]- Downloads the skill directory from GitHub via zip archive (public repos) or falls back to
- Remediation
View remediation
Remediation Suggestions
- Restrict installation to explicitly approved repositories and owners.
- Resolve every branch or tag to an immutable commit SHA and show that SHA to the user before installation.
- Verify a trusted signature or an independently obtained expected digest for downloaded content.
- Stage downloads outside the active skills directory and inspect the complete file tree before activation.
- Reject absolute paths,
..traversal, unsafe archive entries, device files, and symlinks that escape the staging or destination directory. - Audit
SKILL.mdand every executable file for dangerous instructions, shell execution, credential access, and unexpected network behavior. - Require explicit confirmation that identifies the repository, path, resolved commit, destination, and detected executable files.
- Apply least privilege and prevent installed skills from automatically receiving secrets or unrestricted tools.
- Use an atomic installation process and record provenance metadata for later review and removal.
