fix(deps): clear high advisories and gate on audit - #36
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The changes consistently enforce an audit gate and resolve the stated high advisories with a targeted override and lockfile refresh.
Pull request overview
This PR addresses recently detected high-severity dependency advisories by updating the lockfile (nanoid and sharp) and adding an explicit pnpm audit --audit-level high gate to both local verification and CI, so high advisories can’t silently regress.
Changes:
- Add a pnpm override to force
sharpto>=0.35.4when a dependency still pins an older vulnerable version. - Refresh
pnpm-lock.yamlto resolvesharpto0.35.4andnanoidto3.3.19. - Add an
auditscript and run it in bothpnpm run verifyand the GitHub Actions verify workflow.
File summaries
| File | Description |
|---|---|
| pnpm-workspace.yaml | Adds a targeted override to bump vulnerable sharp versions to ^0.35.4. |
| pnpm-lock.yaml | Lockfile refresh reflecting the override and updated resolved versions for sharp and nanoid. |
| package.json | Introduces audit script and gates verify by running audit first. |
| .github/workflows/verify.yml | Runs pnpm run audit after frozen install to enforce the same security gate in CI. |
Review details
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
- Files reviewed: 3/4 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0798aca944
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "type": "module", | ||
| "scripts": { | ||
| "verify": "vp run ready", | ||
| "verify": "pnpm run audit && vp run ready", |
There was a problem hiding this comment.
Route the validation script through the audited verify command
When contributors use the documented canonical ./scripts/verify.sh entry point, the new audit is skipped because that script still invokes pnpm exec vp run ready directly (scripts/verify.sh:8), despite CONTRIBUTING.md:15-17 describing it as equivalent to pnpm run verify. Route the script through this package command or add the audit there so local validation actually gains the intended high-advisory gate.
AGENTS.md reference: AGENTS.md:L39-L40
Useful? React with 👍 / 👎.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Problem
pnpm audit --audit-level highfailed with two high advisories:@voidzero-dev/vite-plus-core > postcss > nanoidand@uinaf/design > postcss > nanoid@cloudflare/vitest-pool-workers > miniflare > sharpandwrangler > miniflare > sharpNothing gated on audit, so the advisories went unnoticed.
Solution
^3.3.17; the lockfile is refreshed to 3.3.19. No manifest change.@cloudflare/vitest-pool-workers(up to 0.22.0) pins a miniflare that pins sharp 0.35.2. Added override"sharp@<0.35.4": "^0.35.4"inpnpm-workspace.yaml. The range selector retires the override on its own once miniflare declares>=0.35.4(miniflare 5.20260910.0-alpha and later already do).auditscript (pnpm audit --audit-level high) chained intoverify, and apnpm run auditstep in the existingverifyjob right after the frozen install, so local and CI agree.Proof
pnpm audit --audit-level highexits 0 (2 moderate remain, out of scope)pnpm run verifypasses locallyactionlint .github/workflows/verify.ymlclean@img/sharp-libvips-*1.3.1 -> 1.3.3, nanoid 3.3.17 -> 3.3.19, plus@types/nodepeer-suffix rewrites; no major bumps