T08 · Insecure Dependencies
- Location
SKILL.md:178- Finding
Unpinned Third-Party Packages and Mutable GitHub Actions References
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 178–214
Vulnerability Type: Supply-chain exposure through unpinned executable dependencies
Risk Level: MediumThe Skill recommends GitHub Actions referenced by mutable major-version tags and package installation commands that do not specify reviewed versions or integrity constraints.
yaml - uses: actions/checkout@v4 - uses: pnpm/action-setup@v3 with: { version: 9 } - uses: actions/setup-node@v4 with: node-version: 20 cache: 'pnpm' - run: pnpm install --frozen-lockfile - name: Cache Turborepo uses: actions/cache@v4bash # Install pnpm add -D openapi-typescript orval # Generate types npx openapi-typescript ./api/openapi.yaml -o ./src/types/api.d.tsTechnical Analysis
References such as
actions/checkout@v4,pnpm/action-setup@v3,actions/setup-node@v4, andactions/cache@v4are mutable tags rather than immutable commit SHAs. If an upstream repository or release process is compromised, a tag could resolve to modified action code after this Skill has been reviewed.The
pnpm addcommand resolves package versions from the configured registry without requiring exact reviewed versions. Dependency installation may execute lifecycle scripts from the selected packages or their transitive dependencies. The subsequentnpx openapi-typescriptcommand executes installed package code. Although normal lockfile use can improve reproducibility, the presented addition command does not itself pin exact package versions or establish integrity review for newly resolved dependencies.No evidence shows that the currently referenced packages or actions are malicious. The finding concerns avoidable supply-chain risk in the recommended configuration.
Attack Path
- An attacker compromises a referenced package publisher, action repository, release account, or relevant distribution path.
- The attacker publ ...[truncated 1360 chars]
- Remediation
View remediation
Remediation Suggestions
-
Pin every GitHub Action to a reviewed full commit SHA rather than a mutable major-version tag. Keep the human-readable release in a comment, for example:
yaml - uses: actions/checkout@<reviewed-full-commit-sha> # v4.x -
Use exact reviewed package versions when adding code-generation dependencies:
bash pnpm add --save-exact -D openapi-typescript@<reviewed-version> orval@<reviewed-version> -
Commit
pnpm-lock.yamland requirepnpm install --frozen-lockfilein CI so dependency resolution cannot silently modify the reviewed graph. -
Execute the locally installed and locked binary with
pnpm exec openapi-typescriptrather than allowingnpxto resolve or download an unexpected package. -
Review dependency provenance, lifecycle scripts, maintainer changes, and transitive dependency updates before lockfile changes are merged. Use automated dependency scanning while requiring approval for executable supply-chain changes.
-
Apply least-privilege GitHub Actions permissions, expose secrets only to steps that require them, avoid secrets in workflows triggered by untrusted contributions, and restrict network or release credentials where practical.
-
Consider installation controls that suppress lifecycle scripts when they are unnecessary, followed by explicit allowlisting for dependencies that legitimately require build scripts.
-
