Skip to content

fix(security): force postcss >= 8.5.12 via scoped resolution (dependabot #236) - #769

Merged
soberm merged 4 commits into
mainfrom
phandpau/fix/sec-dependabot-236
Jul 31, 2026
Merged

fix(security): force postcss >= 8.5.12 via scoped resolution (dependabot #236)#769
soberm merged 4 commits into
mainfrom
phandpau/fix/sec-dependabot-236

Conversation

@bobbor

@bobbor bobbor commented Jul 27, 2026

Copy link
Copy Markdown
Member

Security fix

Resolves Dependabot alert #236 (high severity): https://github.com/aws-amplify/amplify-data/security/dependabot/236

Finding: postcss — Arbitrary file read and information disclosure via attacker-controlled sourceMappingURL in CSS comments (CVE-2026-45623, GHSA-6g55-p6wh-862q). Vulnerable range: <= 8.5.11; first patched: 8.5.12. Transitive dev dependency in the root yarn.lock.

Why Dependabot can't auto-fix: the vulnerable postcss@8.4.31 enters via next@16.2.6, which pins it exactly (npm:8.4.31), so a plain upgrade won't help.

Fix

  • Added one scoped yarn resolution in the root package.json: "next/postcss": "^8.5.12" — following the repo's existing scoped-resolution precedent (e.g. next/sharp from fix(security): force sharp >=0.35.0 via next/sharp resolution (dependabot #231) #765). No other resolutions touched.
  • Regenerated yarn.lock via yarn install: the vulnerable postcss@npm:8.4.31 entry is replaced by postcss@npm:^8.5.128.5.23. The already-safe vite-side postcss@^8.5.15 entry is untouched.

Verification

  • yarn why postcss shows only 8.5.23 (next) and 8.5.15 (vite) — no version <= 8.5.11 remains anywhere in yarn.lock.
  • CI scripts pass locally: yarn build ✅, yarn lint ✅, yarn check:api ✅, yarn test:scripts ✅ (4/4); unit tests: 540 passed. (9 integration-test suites fail locally with a pre-existing environment error — TS2304: Cannot find name '__filename' — reproduced identically on an unmodified origin/main baseline; unrelated to this change.)

…via scoped resolution

Resolves https://github.com/aws-amplify/amplify-data/security/dependabot/236
(GHSA-6g55-p6wh-862q / CVE-2026-45623, high). next@16.2.6 exact-pins
postcss@8.4.31, which Dependabot cannot auto-fix; the scoped
"next/postcss" resolution follows the repo precedent of #765
(next/sharp) and leaves the already-safe postcss@^8.5.15 entry untouched.
@bobbor
bobbor requested review from a team as code owners July 27, 2026 20:15
@changeset-bot

changeset-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: d15fb87

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.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

soberm
soberm previously approved these changes Jul 31, 2026
soberm added 2 commits July 31, 2026 13:07
The lockfile was hand-edited rather than regenerated, leaving it in a form
yarn never emits: a duplicate "nanoid@npm:^3.3.16" entry and two separate
"postcss@npm:^8.5.12" / "postcss@npm:^8.5.15" entries that both resolve to
8.5.23. Yarn merges descriptors sharing a resolution into one key, so
`yarn install --immutable` failed with YN0028 and blocked prebuild.

Regenerated with yarn 4.13.0 on node 24; no dependency versions change.
@soberm
soberm merged commit 3b4ae5b into main Jul 31, 2026
9 checks passed
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.

3 participants