Skip to content

chore: force patched postcss and prune obsolete security overrides - #387

Merged
allxsmith merged 1 commit into
mainfrom
claude/pnpm-audit-fix-failures-vpa0vp
Jul 24, 2026
Merged

allxsmith merged 1 commit into
mainfrom
claude/pnpm-audit-fix-failures-vpa0vp

Conversation

@allxsmith

@allxsmith allxsmith commented Jul 24, 2026 •

Copy link
Copy Markdown
Owner

Pull Request

Description

Unblocks the Audit (high severity) CI step, which was failing on every open PR, and clears out
hardening config that has since become dead weight. Only pnpm-workspace.yaml and pnpm-lock.yaml change
— no source, no published output.

  • bulma-ui (@allxsmith/bestax-bulma)
  • create-bestax (create-bestax)
  • docs (@allxsmith/bestax-docs)
  • Other: repo-root dependency policy (pnpm-workspace.yaml, pnpm-lock.yaml)

The failure. postcss resolved to 8.5.16 in the committed lockfile, and GHSA-r28c-9q8g-f849
(sourceMappingURL auto-loading follows ../ out of the source directory and discloses arbitrary .map
files) covers <=8.5.17. It is transitive-only — reached ~100 ways through the Storybook/Vite chain and the
Docusaurus webpack CSS pipeline — so nothing in the repo ever re-resolved it after the advisory published.
Every branch inherited the failure from main.

No cooldown exclusion needed this time. postcss@8.5.18 published 2026-07-12, well outside the 3-day
minimumReleaseAge window. With the override in place pnpm settles on 8.5.21 on its own — the newest
release that clears the cooldown — so the minimumReleaseAgeExclude list does not grow.

Pruning the last round's workaround. The fast-uri cooldown exclusion carried an explicit expiry of
2026-07-22; 3.1.4 published 2026-07-19 and now clears the cooldown unaided, so it is removed. That leaves
prettier as the only exclusion, which is intentional and permanent.

Three security overrides also turned out to be no-ops — their parent packages widened their own ranges.
Verified by re-resolving with each override removed and comparing:

Override With override Without override Verdict
brace-expansion (3 pins) 1.1.16 / 2.1.2 / 5.0.7 1.1.16 / 2.1.2 / 5.0.7 no-op — removed
fast-uri 3.1.4 3.1.4 no-op — removed
svgo 3.3.4 3.3.4 no-op — removed
serialize-javascript 7.0.6 6.0.2 (high, GHSA-5c6j-r48x-rmvq) load-bearing — kept
sharp 0.35.3 0.34.5 (high, GHSA-f88m-g3jw-g9cj) load-bearing — kept

Removing those five lines changes zero resolutions — the lockfile diff for that step is exactly the five
deleted overrides: declarations in the metadata header. To keep this from silently accumulating again, the
pruning procedure is now documented in pnpm-workspace.yaml: drop an entry, re-resolve, and leave it out if
the resolved version is unchanged and the audit stays clean.

Related Issue(s)

Closes #386

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Performance
  • Build tooling — dependency resolution policy and lockfile

Checklist

  • My code follows the project style guidelines
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or that my feature works — the CI audit step is
    itself the regression test for this class of change; a unit test is not applicable
  • I have added/updated documentation as needed — the override comments in pnpm-workspace.yaml
  • I have updated Storybook stories as needed (bulma-ui) — n/a, no source changes
  • My changes require a change to the documentation — n/a
  • All new and existing tests passed
  • Any relevant dependencies are updated
  • If this PR changes commands, conventions, or package structure, the affected CLAUDE.md files are
    updated — n/a, no command or structural changes

Verification

Run locally on the final tree:

  • pnpm audit --audit-level=high → exit 0 (was exit 1)
  • pnpm install --frozen-lockfile → no-op, lockfile in sync for CI parity
  • pnpm all → green (build, typecheck, test + coverage, bundle:stats, lint, format:check, Storybook build)

Additional Context

Four advisories remain below the gate threshold and are deliberately left alone, consistent with the repo's
existing posture of holding high and above at zero: uuid@8.3.2 (moderate), webpack-dev-server@5.2.5
(two moderate), body-parser@1.20.5 (low). All are dev/build-time only and none are reachable from
published package output.

chore: commit — no semantic-release version bump for any package.


Generated by Claude Code

Summary by CodeRabbit

  • Chores
    • Updated project tooling and package management safeguards.
    • Applied security-focused maintenance updates to improve build reliability and reduce exposure to known issues.
    • Standardized formatting tools across the workspace for more consistent development output.

The CI audit gate (`pnpm audit --audit-level=high`) failed on every open PR.
postcss resolved to 8.5.16 in the lockfile and GHSA-r28c-9q8g-f849 covers
<=8.5.17. It is transitive-only — reached ~100 ways through the Storybook/Vite
chain and the Docusaurus webpack CSS pipeline — so nothing ever re-resolved it
after the advisory published.

Add a `postcss@<8.5.18` override and refresh the lockfile. pnpm settles on
8.5.21, the newest release clear of the 3-day cooldown, so no cooldown
exclusion is needed for it.

Also prune hardening config that no longer does anything:

- The `fast-uri` cooldown exclusion carried an explicit expiry of 2026-07-22.
  3.1.4 published 2026-07-19 and now clears the cooldown unaided, leaving
  prettier as the only exclusion — which is intentional and permanent.
- The brace-expansion, fast-uri and svgo overrides are no-ops: their parents
  widened their own ranges, and re-resolving without them yields byte-identical
  versions and a clean audit. serialize-javascript and sharp stay — without
  them the tree drops to 6.0.2 and 0.34.5, both under high advisories.

Document the pruning procedure in pnpm-workspace.yaml so dead overrides do not
silently accumulate again.

Closes #386

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015wkR9URhcpY6VuU1chR6mV
@coderabbitai

coderabbitai Bot commented Jul 24, 2026 •

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The workspace dependency policy pins Prettier 3.9.4, adds a patched PostCSS override, retains required serialize-javascript and sharp overrides, and removes obsolete overrides for other transitive dependencies.

Changes

Dependency policy

Layer / File(s) Summary
Update workspace override rules
pnpm-workspace.yaml
Adds the Prettier and PostCSS overrides, retains patched serialize-javascript and sharp ranges, and removes obsolete brace-expansion, fast-uri, and svgo entries.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: deep-review

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive Workspace changes match the issue, but the lockfile refresh and validation steps can't be verified because pnpm-lock.yaml is excluded by path filters. Provide the pnpm-lock.yaml diff or remove the path filter (!**/pnpm-lock.yaml, !pnpm-lock.yaml) so the lockfile and audit requirements can be verified.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: forcing patched PostCSS and pruning obsolete security overrides.
Description check ✅ Passed The description mostly follows the template and includes the summary, affected package, issue reference, change type, checklist, verification, and context.
Out of Scope Changes check ✅ Passed No unrelated changes are evident; the diff stays focused on the dependency policy update and override pruning.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/pnpm-audit-fix-failures-vpa0vp

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

Preview Deployment

Preview URL: https://21d99785.bestax.pages.dev

Copy link
Copy Markdown
Owner Author

@coderabbitai review

The earlier run hit the per-developer review rate limit and never looked at the diff; the window has since reopened. Note pnpm-lock.yaml is excluded by .coderabbit.yaml path filters, so pnpm-workspace.yaml is the only file in scope here.


Generated by Claude Code

@coderabbitai

coderabbitai Bot commented Jul 24, 2026 •

Copy link
Copy Markdown

@allxsmith I’ll review the in-scope changes in pnpm-workspace.yaml.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pnpm-workspace.yaml`:
- Around line 51-55: Update the PostCSS override selector in pnpm-workspace.yaml
to target only vulnerable PostCSS 8.x versions below 8.5.18, such as >=8.0.0
<8.5.18, while preserving the >=8.5.18 <9 replacement range. Regenerate or
adjust the lockfile so the override remains focused on vulnerable 8.x consumers.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: fc6d98c0-e1d9-48ee-b538-4a4f3c5aae20

📥 Commits

Reviewing files that changed from the base of the PR and between 55935e0 and 5a7f896.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !pnpm-lock.yaml
📒 Files selected for processing (1)
  • pnpm-workspace.yaml

Comment thread pnpm-workspace.yaml
@allxsmith
allxsmith merged commit 9df6a04 into main Jul 24, 2026
37 checks passed
@allxsmith
allxsmith deleted the claude/pnpm-audit-fix-failures-vpa0vp branch July 24, 2026 22:39
allxsmith added a commit that referenced this pull request Jul 25, 2026
A new high-severity advisory landed against brace-expansion —
GHSA-mh99-v99m-4gvg, unbounded expansion length causing an out-of-memory
crash — published shortly after #387 merged, turning main red. It covers
<=5.0.7, and 5.0.8 is the only patched release on any major line, so all
three resolved copies (1.1.16, 2.1.2, 5.0.7) are affected at once.

Force `brace-expansion: '>=5.0.8'`. With no 1.x/2.x backport available this
pulls those consumers across majors, which is safe here: 5.x keeps a `require`
export condition so CJS consumers still resolve, its engines (node 20 || >=22)
fit the repo's Node 22/24, and every consumer is dev tooling — bulma-ui ships
one runtime dependency (bulma) and brace-expansion reaches only the private
docs site. Verified by the full gate, which exercises eslint, jest, the builds
and Storybook.

5.0.8 published 2026-07-23, inside the 3-day cooldown, so pnpm cannot reach it
unaided. Add a `minimumReleaseAgeExclude` entry following the fast-uri
precedent, with a dated note: the cooldown elapses 2026-07-26, after which the
exclusion should be removed and the override kept.

Net effect is a smaller tree — three brace-expansion copies collapse to one,
and balanced-match@1.0.2 and concat-map@0.0.1 drop out entirely.

Refs #386
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@bestax-release-bot

Copy link
Copy Markdown

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@bestax-release-bot

Copy link
Copy Markdown

🎉 This PR is included in version 5.8.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@bestax-release-bot

Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] CI audit gate fails on every PR — high-severity postcss advisory (GHSA-r28c-9q8g-f849)

2 participants