T08 · Insecure Dependencies
- Location
.github/workflows/validate.yml:18- Finding
Unpinned Remote Dependency Is Installed and Executed in CI
- Content
View full analysis
Vulnerability Details
File Location:
.github/workflows/validate.yml, lines 18–22
Vulnerability Type: Mutable third-party dependency execution
Risk Level: MediumVulnerable Code
yaml - name: Validate Agent Skills format run: | git clone --depth 1 https://github.com/agentskills/agentskills.git /tmp/agentskills python3 -m pip install /tmp/agentskills/skills-ref skills-ref validate "$GITHUB_WORKSPACE"Technical Analysis
The workflow clones the current default branch of an external Git repository and installs its
skills-refpackage without pinning a reviewed commit. The effective dependency can therefore change independently of this repository.Python package installation can execute code through its build backend and installation hooks. A compromise of the upstream repository, its maintainers, or its default branch could introduce code that executes automatically on the GitHub Actions runner during
pip install.The workflow limits
GITHUB_TOKENto read-only repository-content access, which reduces potential impact, but does not prevent malicious dependency code from reading the checked-out repository, accessing runner environment data, using outbound network connectivity, altering generated validation results, or interfering with later workflow steps.Attack Path
- An attacker compromises the upstream
agentskills/agentskillsrepository, a maintainer account, or another mechanism controlling its default branch. - The attacker modifies the
skills-refpackage or its build configuration to execute malicious code during installation. - A push to
mainor a pull request triggers the validation workflow. - The workflow clones the attacker-controlled current revision because no commit SHA is specified.
python3 -m pip install /tmp/agentskills/skills-refinvokes the malicious build or installation logic.- The payload executes with the privileges of the GitHub-hosted runner and the workflow's avail ...[truncated 609 chars]
- An attacker compromises the upstream
- Remediation
View remediation
Remediation Suggestions
- Pin the external repository to a reviewed full commit SHA rather than cloning its mutable default branch.
- Verify the checked-out commit before installation.
- Prefer a trusted, versioned package artifact with cryptographic hashes and install it using a hash-locked requirements file and
pip --require-hashes. - Keep the workflow token at its existing least-privilege level.
- Restrict outbound network access during validation where the CI platform permits it.
- Pin third-party GitHub Actions, including
actions/checkout, to full commit SHAs for additional supply-chain hardening. - Use dependency update automation to propose and review pin changes explicitly.
