Repository navigation
Supply-chain hardening: blockExoticSubdeps, SHA-pinned actions, least-privilege CI, GHA cooldown - #69
Merged
Merged
Conversation
CallumHoward
force-pushed
the
claude/youthful-mccarthy-yyoqkm
branch
from
September 27, 2026 09:30
ce371d4 to
56ffa9c
Compare
pnpm 11 already defaults this to true: only direct dependencies may resolve from git or tarball URLs, so transitive deps can't bypass minimumReleaseAge and trustPolicy. Setting it explicitly documents the intent and gives the config guard something to assert against a future default change. Co-Authored-By: Claude Opus 4.8 <[email protected]> Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01KvPbYiZxbqWVnJyNkoVzky
…ooldown - ci.yml: add top-level `permissions: contents: read` (least privilege) - Pin every action to a tagged release's commit SHA with an exact `# vX.Y.Z` comment, so a moved/compromised tag cannot alter what runs - `persist-credentials: false` on checkouts; neither workflow pushes with GITHUB_TOKEN - Pin diff-cover, which `pipx run` otherwise fetches unpinned from PyPI - dependabot.yml: add github-actions ecosystem with a 7-day cooldown, the min-release-age equivalent for Actions; Dependabot bumps the pinned SHAs and keeps the version comment current Co-Authored-By: Claude Opus 4.8 <[email protected]> Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01KvPbYiZxbqWVnJyNkoVzky
Parses pnpm-workspace.yaml (via the yaml devDep) and asserts trustPolicy, blockExoticSubdeps, minimumReleaseAge, minimumReleaseAgeStrict, and the absence of a global build allowlist. pnpm silently ignores unknown keys, so this fails CI if a protection is removed or misspelled instead of no-opping unnoticed. Co-Authored-By: Claude Opus 4.8 <[email protected]> Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01KvPbYiZxbqWVnJyNkoVzky
CallumHoward
force-pushed
the
claude/youthful-mccarthy-yyoqkm
branch
from
September 27, 2026 12:29
56ffa9c to
846415d
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Explicit strict release-age and complete build-policy regression checks are still needed.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Hardens pnpm dependency resolution and GitHub Actions against supply-chain risks.
Changes:
- Adds pnpm policy configuration and regression tests.
- SHA-pins workflow actions, restricts permissions, and disables persisted credentials.
- Pins
diff-coverand adds GitHub Actions Dependabot cooldowns.
| File | Summary |
|---|---|
src/lib/supply-chain-config.test.ts |
Adds configuration guards; strict mode and build-policy assertions need strengthening, including wildcard rejection. |
pnpm-workspace.yaml |
Enables exotic-subdependency blocking; explicitly configure strict release-age enforcement. |
pnpm-lock.yaml |
Locks the new YAML dependency. |
package.json |
Adds yaml as a development dependency. |
.github/workflows/update-pnpm.yml |
Pins actions and disables persisted checkout credentials. |
.github/workflows/ci.yml |
Hardens permissions, action references, credentials, and tooling. |
.github/dependabot.yml |
Adds GitHub Actions updates with cooldown. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The implicit default only holds while minimumReleaseAge is set, and the previous `not.toBe(false)` guard also passed when the key was absent. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Supply-chain hardening for pnpm and CI.
blockExoticSubdeps: true: transitive deps must resolve from the registry, not git/tarball URLs. This is already the pnpm 11 default; setting it explicitly documents intent and lets the config guard catch a future default change.ci.ymlgets top-levelpermissions: contents: read.# vX.Y.Zcomment (all releases are >7 days old), so a moved or compromised tag can't change what runs. Majors are unchanged; Dependabot handles bumps.persist-credentials: falseon both checkouts. Neither workflow pushes withGITHUB_TOKEN;create-pull-requestuses the App token.diff-coverpinned to10.5.1(pipx runotherwise pulls latest from PyPI each run).github-actionsDependabot block with a 7-daycooldown, matching the npm cooldown.src/lib/supply-chain-config.test.tsparsespnpm-workspace.yaml(newyamldevDep) and assertstrustPolicy,blockExoticSubdeps,minimumReleaseAge,minimumReleaseAgeStrict, and no global build allowlist. pnpm ignores unknown keys silently, so a typo'd or removed setting would otherwise go unnoticed.Git/tarball deps and mutable action tags both skip registry and provenance checks, which
minimumReleaseAgeandtrustPolicydon't cover.Follow-ups (not in this PR)
sha_pinning_required), so future unpinneduses:fail instead of relying on review.diff-coverisn't tracked by Dependabot; bump it by hand.Verification
pnpm install --frozen-lockfilepasses the supply-chain policies; the only new dep isyaml.main(cca6ad3); peers, typecheck, lint, format, fallow, tests and build pass locally.🤖 Generated with Claude Code