Repository navigation
Conversation
Pins every action to a commit SHA, scopes GITHUB_TOKEN per job, moves the Pages publish permissions to the deploy job only, stops persisting checkout credentials, installs with --ignore-scripts, and adds zizmor plus Dependabot with a 7-day release cooldown.
There was a problem hiding this comment.
I reviewed this PR and didn't find any bugs. The change edits GITHUB_TOKEN permissions and pins third-party actions by SHA, so a human should still confirm the pins before merging.
What was reviewed:
- Permissions split in pages.yml: build gets only
contents: read, deploy gets onlypages/id-token: write. The deploy job runs onlyactions/deploy-pages, so the new comment is accurate. persist-credentials: false: no later step pushes or uses git auth. The excalidraw fetch is an anonymous public clone.npm ci --ignore-scripts: no package in package-lock.json hashasInstallScript, and the root package.json has no install or prepare hook.- Not done: I couldn't check that the four pinned SHAs match their comments (checkout v7.0.1, setup-node v7.1.0, upload-pages-artifact v5.0.0, deploy-pages v5.0.1) or that upload v5 and deploy v5 work together, because this sandbox has no network access.
Extended reasoning...
The change touches only .github/workflows/ci.yml and .github/workflows/pages.yml. It scopes GITHUB_TOKEN permissions, pins four actions to commit SHAs with major version bumps, disables persisted checkout credentials and skips npm install scripts. Workflow token permissions and action pins are security-sensitive. A SHA that doesn't match its version comment would itself be a supply-chain risk, and that couldn't be checked offline. I deferred because the pins and the new major-version pairing need upstream confirmation, not because of any bug in the diff.
What & why
Hardens CI against the supply-chain vectors in Socket's Hardening GitHub Actions against outside threats. The workflows already avoided
pull_request_target,workflow_run, expression injection, secrets, caches and self-hosted runners; this closes the remaining gaps:GITHUB_TOKENscoped explicitly:ci.ymliscontents: read;pages.ymldefaults to{}, withpages: write/id-token: writeonly on thedeployjob, which runs no project code.actions/checkoutwithpersist-credentials: false.npm ci --ignore-scripts(no locked dependency needs install scripts).Checklist
npm testpasses (stats · playbook · doctor · trace · bundle · lcp-attribution self-tests)claude plugin validate . --strictpasses (if manifests changed)CHANGELOG.mdupdatedpackage.json/plugin.json/marketplace.json(release PRs only)README.md,.claude/CLAUDE.md,skills/browsergnome/references/)Locally verified with
npm ci --ignore-scripts,npm testand actionlint (clean). Manifests unchanged, CI-only change so no CHANGELOG entry.