T08 · Insecure Dependencies
- Location
SKILL.md:28- Finding
Unpinned Remote Source and Dependency Resolution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 28-34
Vulnerability Type: Supply-chain exposure through mutable remote source and unverified dependencies
Risk Level: Mediumbash Repository: - GitHub: https://github.com/ParinLL/shlink-cli Install from source: ```bash git clone https://github.com/ParinLL/shlink-cli.git cd shlink-cli go mod tidy go build -o shlink-cli .text ### Technical Analysis The installation procedure clones the repository's mutable default branch rather than a specific reviewed release or commit. It then runs `go mod tidy`, which resolves the dependency graph, before building the resulting source. The instructions provide no commit pin, release checksum, signature verification, or dependency-integrity verification procedure. Consequently, the code built by a user can differ from the code reviewed during the skill audit. A malicious or compromised upstream repository could modify the CLI source or its dependency declarations. A compromised dependency source could similarly affect dependency resolution. The resulting binary would appear to be the expected Shlink CLI while containing attacker-controlled behavior. The use of HTTPS protects transport integrity but does not protect against compromise of the upstream repository, maintainer account, release process, or dependencies. ### Attack Path 1. An attacker compromises the upstream repository, a maintainer account, or a referenced dependency. 2. The attacker adds malicious code to the default branch or causes an unsafe dependency version to be resolved. 3. A user follows the documented `git clone` command without selecting a known, reviewed commit. 4. `go mod tidy` resolves the current dependency graph, and `go build` incorporates the affected code into the binary. 5. The user executes the binary to administer Shlink and supplies `SHLINK_API_KEY`. 6. The malicious code runs with the user's OS privileges and ...[truncated 707 chars]- Remediation
View remediation
Remediation Suggestions
- Pin installation instructions to a reviewed release tag and immutable commit hash.
- Provide expected SHA-256 checksums or cryptographic signatures for released source archives and binaries.
- Require users to verify the checksum or signature before building or installing the CLI.
- Use the repository's committed
go.modandgo.sumfiles rather than recommendinggo mod tidyas an installation step. - Prefer
go mod downloadfollowed bygo mod verifyto validate downloaded module contents againstgo.sum. - Document the exact verified release and commit to prevent a tag from being silently moved.
- Recommend reviewing provenance attestations or reproducible-build results when available.
- Avoid system-wide installation until the artifact's provenance and integrity have been verified.
