Skip to content

fix(deps): clear the two unremediated HIGHs in sdk-typescript/pnpm-lock.yaml (postcss + vite) - #51

Open
yakimoto wants to merge 3 commits into
mainfrom
fix/postcss-source-map-traversal
Open

fix(deps): clear the two unremediated HIGHs in sdk-typescript/pnpm-lock.yaml (postcss + vite)#51
yakimoto wants to merge 3 commits into
mainfrom
fix/postcss-source-map-traversal

Conversation

@yakimoto

@yakimoto yakimoto commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

User description

Clears two HIGHs that Dependabot is not reporting or not fixable by the obvious route on this repo, as two separate commits in the same file.

postcss  8.5.15 → 8.5.24    (dev scope, via vite + tsup)   — unreported by Dependabot
vite     8.0.14 → 8.1.5     (dev scope, peer of vitest)    — reported, but no lever moved it

Companion to wave-av/sdk#54, which does the same postcss bump on the other repo carrying it. Tracked in wave-av/claude-workstation#564.

Note

Scope changed after this PR was opened. It was postcss-only and manifest-free. The second commit adds three lines to sdk-typescript/package.json (a workspace-root devDependencies.vite) because — as measured below — a lockfile-only fix for vite is not possible with pnpm 9.15. Where this description below says "no manifest touched", that is true of the postcss commit and no longer true of the PR as a whole. Both commits are separately revertable.

Kept as one PR rather than a fourth: #48, #50 and #51 already rewrite sdk-typescript/pnpm-lock.yaml, and a separate vite PR would conflict with this one by construction.


Commit 2 — vite: the fix was available the whole time, and four tools refused to apply it

GHSA-fx2h-pf6j-xcffvite: server.fs.deny bypass via Windows alternate paths. HIGH · range >= 8.0.0, <= 8.0.15 · first patched 8.0.16.
GHSA-v6wh-96g9-6wx3launch-editor: NTLMv2 hash disclosure via UNC path handling on Windows. MODERATE · same range, same fix.

vite appears in no package.json in this workspace. It was reachable only as an auto-installed peer of vitest / @vitest/mocker@4.1.7, which declare:

vite: ^6.0.0 || ^7.0.0 || ^8.0.0

That range already admits the patched 8.0.16. So there was no parent constraint to break, no upstream to wait on, and no compatibility question — the only thing holding 8.0.14 in place was a sticky peer resolution in the lockfile. 8.0.14 satisfies the range, so nothing ever forced it forward.

Four levers, all measured, all no-ops

lever result
pnpm update vite --depth Infinity -r vite unchanged at 8.0.14
pnpm update vitest -r vitest 4.1.7 → 4.1.10, vite unchanged, and it rewrote 48 package.json files
pnpm.overrides { vite: ^8.0.16 } + install --force override written into the lockfile — and in the same run pnpm printed ✕ unmet peer vite@^8.0.16: found 8.0.14
pnpm dedupe vite unchanged

The third row is the useful one to remember: pnpm records the override in pnpm-lock.yaml, then declines to apply it, and reports the resulting inconsistency about itself. pnpm.overrides does not govern auto-installed peer dependencies. A lockfile that contains overrides: vite: ^8.0.16 while resolving vite@8.0.14 looks, to a reader or a scanner, like the fix landed.

The pnpm update vitest -r row is worth flagging separately: it rewrote every manifest in the workspace as a side effect while achieving nothing — the same class of silent 48-file churn as claude-workstation#555. It was reverted, not committed.

What actually works

A concrete declaration governs the peer where an override does not. One workspace-root devDependency:

"devDependencies": {
  "vite": "^8.0.16"
}

re-resolves vite for all 48 packages to a single 8.1.5, with zero references left at 8.0.14:

$ grep -c "vite@8.1.5"  pnpm-lock.yaml   → 53
$ grep -c "vite@8.0.14" pnpm-lock.yaml   → 0

I verified the same mechanism from a single package (packages/core) first — it also hoists workspace-wide — and chose the workspace root because that is where a shared test-runner peer belongs, not inside one arbitrary package.

Exposure, stated plainly

Both advisories are Windows-specific path handling. CI and the publish path are Linux, so this was never an exposure in our own pipeline; contributors building on Windows were the real surface. vite is dev/test tooling and does not enter the published dependency graph of any @wave-av/* package. It is still a HIGH sitting in the build path with a one-line fix available.

Verification — measured with NODE_ENV=development

Dev scope must be forced on, or pnpm audit inherits omit=dev from the environment and silently drops every dev-scope entry — which would have hidden this advisory completely.

before   high 4   moderate 9   low 2      ← vite HIGH + vite MODERATE present
after    high 3   moderate 8   low 2      ← no vite entry at any severity

The remaining 3 highs are hono ×1 and fast-uri ×2, which #48 addresses.

Consumer proof, not an audit read. npm/pnpm audit compares version strings and never loads the module; vitest drives vite for every transform, so the test suite is the real exercise:

$ pnpm -r build && pnpm -r --no-bail test
48 packages · 52 test files · 143 tests · 0 failures      on vite 8.1.5

An earlier run before building showed failures in packages/adk (Failed to resolve entry for package "@wave-av/kernel"). That is unbuilt workspace:* links, not a vite regression — it clears entirely once pnpm -r build has run.


Commit 1 — postcss

Clears a HIGH that Dependabot is not reporting on this repo. Lockfile only — no manifest touched by this commit.

postcss  8.5.15 → 8.5.24    (dev scope, via vite + tsup)

The advisory, and why there's no alert for it

GHSA-r28c-9q8g-f849PostCSS: Path Traversal in Previous Source Map Auto-Loading (sourceMappingURL) leads to Arbitrary .map File Disclosure. HIGH · range <= 8.5.17 · first patched 8.5.18 · published 2026-07-24.

It's in the GitHub Advisory Database, but this repo's Dependabot alert list doesn't contain it. I found it by running an audit while measuring a different baseline, not by reading alerts.

I checked that the silence isn't just "no postcss here." Read from origin/main refs:

repo postcss on origin/main Dependabot alert correct?
sdks (sdk-typescript/pnpm-lock.yaml) 8.5.15 none ❌ miss
sdk 8.5.15 none ❌ miss
mcp-server absent none
adk absent none

The two repos with no postcss correctly report nothing, and alerts are demonstrably working here otherwise. So it's a detection gap, not absence — which means an empty alert list isn't evidence of a clean tree. That's the part worth carrying beyond this PR.

Still true 4 days later. Re-checked on 2026-07-28: this repo's open alerts are fast-uri ×2, hono, vite and friends — no postcss entry. GitHub's own push output on this branch reports 15 vulnerabilities (4 high, 9 moderate, 2 low), which matches the local dev-scope audit of the pre-fix tree exactly — and neither number contains postcss.

Scope

Dev-only, and off the exercised path. postcss arrives through the build toolchain (vite, tsup) and never enters the published dependency graph of any @wave-av/* package. The exploit needs a malicious sourceMappingURL comment in CSS the toolchain processes; this workspace ships no CSS. Low practical exposure — but it's a HIGH in the build path and the fix is a lockfile bump.

Landing on 8.5.24 (current latest) rather than the minimum 8.5.18, since the resolver picks the newest in-range and the intermediate releases are patch-level.

About the diff size — read this before assuming churn

142 insertions / 122 deletions is more than two packages' worth, and that deserves an explanation rather than a shrug. What actually moved:

removed: postcss@8.5.15, nanoid@3.3.12, lightningcss@1.32.0 (+11 platform binaries)
added:   postcss@8.5.24, nanoid@3.3.16, lightningcss@1.33.0 (+11 platform binaries),
         picomatch@4.0.5, tinyglobby@0.2.17

nanoid moves because postcss 8.5.24 declares nanoid: ^3.3.16. The lightningcss minor and the two added packages are pnpm re-resolving vite's optional/transitive tree within its already-declared ranges — not a forced upgrade of anything, and all dev-scope.

I tried to narrow it. Running without --depth Infinity produces the byte-identical result, because pnpm resolves the workspace as a whole. The only way to get a two-package diff would be hand-editing the lockfile, which is the thing I've been telling reviewers on #48/#50 not to do — a hand-merged or hand-trimmed pnpm lockfile installs a tree that matches nobody's intent. So this is the honest output of the tool, described rather than trimmed.

This is not the churn from claude-workstation#555. That was pnpm update --recursive --lockfile-only silently reformatting all 48 package.json files and unescaping into literal em-dashes inside published description fields. The postcss commit touched zero manifests.


Merge order

#48, #50 and #51 all rewrite sdk-typescript/pnpm-lock.yaml. Whichever lands last must re-run its own update command and force-push — never hand-merge a pnpm lockfile. A hand-resolved conflict in this file produces a tree no resolver would ever generate.

Verification caveat

CI has run on none of this. Actions are refusing every job org-wide on an account-level billing lock (plan=free, locked=yes, re-confirmed live today), so every number above is local measurement. Do not read a green-looking mergeStateStatus on this PR as CI approval — during this outage GitHub creates no Actions check-run at all, so there is no red to see.


Note

Low Risk
Dev-only build/test dependencies; no published @wave-av/* runtime graph changes, though the whole monorepo test path now runs on the new vite tree.

Overview
Addresses unremediated HIGH (and related) dev-tooling advisories in sdk-typescript by changing how vite is resolved and refreshing pnpm-lock.yaml.

The workspace root package.json now declares devDependencies.vite: ^8.0.16 so pnpm can hoist a patched vite for every package that pulls it in as a vitest peer (lockfile-only bumps and pnpm.overrides were not moving the sticky 8.0.14 peer install). The lockfile re-resolves vite to 8.2.2 across all vitest consumers and drops remaining 8.0.14 references.

The large lockfile diff is mostly transitive churn from that resolution (e.g. rolldown / @rolldown/binding-* updates, optional wasm/emnapi packages removed) plus the postcss bump carried in the same file for the separate advisory called out in the PR.

Reviewed by Cursor Bugbot for commit 80e1844. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by Sourcery

Remediate the remaining high-severity PostCSS and Vite vulnerabilities in the TypeScript SDK development dependency tree.

Bug Fixes:

  • Update development dependencies to remove vulnerable PostCSS and Vite versions from the TypeScript SDK toolchain.
  • Resolve Vite through a workspace development dependency so all packages use a patched release.

CodeAnt-AI Description

Update vulnerable build dependencies to patched versions

What Changed

  • Upgraded PostCSS to 8.5.28 to address its source-map traversal vulnerability
  • Replaced the vulnerable Vite 8.0.14 resolution with Vite 8.2.2 across the workspace
  • Added Vite as a workspace development dependency so all test and build packages use the patched version

Impact

✅ Protected Windows builds from Vite path-bypass vulnerabilities
✅ Reduced risk from PostCSS source-map traversal
✅ Consistent patched tooling across workspace packages

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@changeset-bot

changeset-bot Bot commented Jul 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 006c723

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@cursor

cursor Bot commented Jul 28, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_2afcbf60-4127-42ae-91a2-6835d74f032d)

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 55 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 98 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Team

Run ID: afcd97e0-4a63-4547-9f17-0fb1845ff481

📥 Commits

Reviewing files that changed from the base of the PR and between 564e500 and 80e1844.

⛔ Files ignored due to path filters (1)
  • sdk-typescript/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • sdk-typescript/package.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/postcss-source-map-traversal
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch fix/postcss-source-map-traversal

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

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 28, 2026
…h-pf6j-xcff

vite 8.0.14 was reachable only as an auto-installed PEER of vitest/@vitest/mocker,
which declare vite: ^6.0.0 || ^7.0.0 || ^8.0.0. That range already admits the patched
8.0.16, so nothing was blocking the fix except a sticky lockfile resolution.

Four levers were measured and every one was a no-op:
  pnpm update vite --depth Infinity -r   -> vite unchanged at 8.0.14
  pnpm update vitest -r                  -> vitest 4.1.7 -> 4.1.10, vite unchanged,
                                            and it rewrote 48 package.json files
  pnpm.overrides { vite: ^8.0.16 }       -> override written into the lockfile, and in
                                            the SAME run pnpm reported
                                            "unmet peer vite@^8.0.16: found 8.0.14"
  pnpm dedupe                            -> vite unchanged

pnpm overrides do not govern auto-installed peers. A concrete declaration does: one
workspace-root devDependency re-resolves vite for all 48 packages to a single 8.1.5,
with zero references left at 8.0.14.

Clears GHSA-fx2h-pf6j-xcff (high, server.fs.deny bypass via Windows alternate paths)
and GHSA-v6wh-96g9-6wx3 (moderate, launch-editor NTLMv2 hash disclosure over UNC paths).
Both are patched in 8.0.16; both are Windows-specific, so our Linux CI was never the
exposure - consumers building on Windows were.

Measured with NODE_ENV=development so dev scope is not silently omitted:
  before  high 4  moderate 9  low 2   (vite high + vite moderate present)
  after   high 3  moderate 8  low 2   (no vite entry of any severity)

Consumer proof, not an audit read - vitest drives vite for every transform:
  pnpm -r build && pnpm -r --no-bail test
  48 packages, 52 test files, 143 tests, 0 failures, on vite 8.1.5

CI could not run this: the org is under a GitHub billing lock (plan=free, locked=yes),
so all of the above is local measurement only.
@socket-security

socket-security Bot commented Jul 28, 2026

Copy link
Copy Markdown

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

@yakimoto yakimoto changed the title fix(deps): bump postcss to 8.5.24 (GHSA-r28c-9q8g-f849, unreported by dependabot) fix(deps): clear the two unremediated HIGHs in sdk-typescript/pnpm-lock.yaml (postcss + vite) Jul 28, 2026
@wave-bugbot

wave-bugbot Bot commented Aug 12, 2026

Copy link
Copy Markdown

🟢 WAVE BugBot — clear

No confident findings on the changed lines.

Local review · $0 inference · wave-dispatch

Regenerated sdk-typescript/pnpm-lock.yaml (pnpm install --lockfile-only)
instead of hand-merging the conflict; postcss now resolves to 8.5.28 and
vite to 8.2.2, both past the two unremediated HIGH advisories this PR
targets.
@codeant-ai

codeant-ai Bot commented Sep 6, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR 80e1844 Sep 06, 2026 · 22:36 22:38

@codeant-ai

codeant-ai Bot commented Sep 6, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@cursor

cursor Bot commented Sep 6, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_12a0e77d-3750-47a4-b7d5-080112730987)

@codeant-ai codeant-ai Bot added the size:L This PR changes 100-499 lines, ignoring generated files label Sep 6, 2026

@sourcery-ai sourcery-ai 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.

Sourcery assessment

Approved.

@macroscopeapp

macroscopeapp Bot commented Sep 6, 2026

Copy link
Copy Markdown

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — The changes are confined to ignored dependency paths and appear limited to development tooling, with no customer request-path or API behavior changes. Human review remains appropriate because the PR is explicitly security remediation and all changed files are owned by another team.

Not approved because:

  • Credit balance exhausted. Approvability relies on correctness review in order to determine eligibility

Review your spending limits in Billing settings. You can add or adjust custom eligibility rules. Learn more.

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

Labels

size:L This PR changes 100-499 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant