T08 · Insecure Dependencies
- Location
SKILL.md:278- Finding
Unpinned Remote Repository Installation Permits Supply-Chain Substitution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 278-282
Vulnerability Type: Unpinned and unverified remote dependency
Risk Level: MediumVulnerable Code
bash git clone https://github.com/dglijin-oss/bazi-pan-skill.git cd bazi-pan-skill python3 scripts/bazi_pan.py --helpTechnical Analysis
The installation instructions clone the current default branch of a remote GitHub repository and immediately direct the user to execute a Python script from the downloaded content. No immutable commit hash, signed release, checksum, or other integrity verification is specified.
Because a repository branch is mutable, the downloaded implementation may differ from the version that was reviewed in this audit. If the repository or maintainer account is compromised, or if malicious content is subsequently committed, users following these instructions could execute substituted code without detecting the change.
This is a supply-chain weakness rather than evidence that the currently packaged
scripts/bazi_pan.pyfile is malicious. The audited local implementation does not itself retrieve or execute remote payloads.Attack Path
- An attacker compromises the referenced repository, a maintainer account, or another mechanism capable of modifying its default branch.
- The attacker replaces or modifies
scripts/bazi_pan.py, or adds malicious imported modules. - A user follows the documented installation instructions and clones the mutable default branch.
- The user runs
python3 scripts/bazi_pan.py --help. - Python executes attacker-controlled top-level code and imports with the privileges of the invoking user.
Impact Assessment
Successful exploitation permits arbitrary code execution under the account that follows the installation instructions. The resulting access is limited by that account's operating-system permissions, but may include reading or modifying user-accessible files, accessing environment variables and credentia ...[truncated 228 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin installation to an immutable, reviewed commit rather than the repository's mutable default branch:
bash git clone https://github.com/dglijin-oss/bazi-pan-skill.git cd bazi-pan-skill git checkout --detach <reviewed-commit-hash> python3 scripts/bazi_pan.py --help- Publish the expected commit hash in the documentation and update it only after reviewing the corresponding source.
- Prefer a signed, versioned release and document signature verification before execution.
- Publish SHA-256 checksums for release artifacts and require users to verify them.
- If cloning remains necessary, verify that the checked-out commit exactly matches the audited commit before invoking Python.
- Protect the upstream repository with multi-factor authentication, branch protection, restricted release permissions, and signed commits or tags.
