Skip to content

security: harden CI and dependency supply chain - #19

Open
CMonnin wants to merge 1 commit into
mainfrom
security/hardening-pass
Open

CMonnin wants to merge 1 commit into
mainfrom
security/hardening-pass

Conversation

@CMonnin

@CMonnin CMonnin commented Oct 27, 2026

Copy link
Copy Markdown
Member

Summary

  • .npmrc protections were inert. minimum-release-age requires pnpm ≥10.16 and block-exotic-subdeps requires ≥10.26, but packageManager pinned 10.10.0, which ignores both silently. Bumped to pnpm@10.34.7 (which itself clears the 7-day release-age window).
  • CI (ci.yml)
    • All actions pinned to full commit SHAs (same major versions, tag in a comment).
    • Workflow permissions default to {}. build gets contents: read only; pages: write and id-token: write are scoped to deploy. Previously the PR build job held them too.
    • persist-credentials: false on checkout, job timeouts, and a pnpm audit --prod --audit-level high gate.
  • Dependencies: vite ^5.4.12 → ^6.4.4, plus pnpm.overrides for brace-expansion, js-yaml, nanoid, postcss, postcss-selector-parser and source-map-js. pnpm audit: 34 advisories (19 high) → 0. Build-script blocks for docsify/esbuild made explicit via ignoredBuiltDependencies.

Testing

  • pnpm install --frozen-lockfile, tsc and vite build pass under pnpm 10.34.7.
  • ESLint reports 9 errors (mostly prefer-const). The same 9 appear on main, so this PR doesn't introduce them.

Local installs now need pnpm ≥10.34.7 to match CI.

🤖 Generated with Claude Code

- Bump packageManager to pnpm 10.34.7 so the .npmrc settings
  minimum-release-age (>=10.16) and block-exotic-subdeps (>=10.26)
  actually take effect; 10.10.0 silently ignored them.
- Pin GitHub Actions to commit SHAs, default workflow permissions to {}
  and grant per-job least privilege, disable persisted checkout
  credentials, add job timeouts and a prod audit gate.
- Upgrade vite to ^6.4.4 and override vulnerable transitive deps;
  pnpm audit goes from 34 advisories (19 high) to 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant