Skip to content

fix: remediate production dependency audit findings - #264

Merged
audrzejq merged 2 commits into
mainfrom
factory/bug-dependencies-security-audit
Sep 1, 2026
Merged

fix: remediate production dependency audit findings#264
audrzejq merged 2 commits into
mainfrom
factory/bug-dependencies-security-audit

Conversation

@foreman-ai-billing

Copy link
Copy Markdown
Contributor

Problem

The production dependency audit failed with critical Auth.js findings in the advanced Polar chatbot example, plus other moderate-or-higher findings in the shared dependency graph. Root pnpm.overrides was also ignored by pnpm 10.

Approach

  • Updated all six next-auth beta.31 example pins to 5.0.0-beta.32, resolving @auth/core 0.41.3.
  • Moved overrides to pnpm-workspace.yaml, where pnpm 10 reads them, and removed the ignored root configuration.
  • Updated the shared Next catalog to 16.2.11 and regenerated the lockfile with patched production dependency resolutions.

The linkify-it and nanoid overrides stay within their existing major versions. An unbounded update broke a chatbot build because linkify-it 6 removed the default export expected by markdown-it.

Acceptance criteria

  • Frozen pnpm installation succeeds with the committed lockfile.
  • All direct vulnerable next-auth pins use beta.32 and resolve patched @auth/core.
  • Next and the audited transitive dependencies resolve to their patched versions.
  • Override policy is in pnpm 10-supported workspace configuration.
  • pnpm audit --audit-level moderate --prod exits 0 with no known vulnerabilities.
  • Affected lint, type, test, and build checks pass.
  • No application source/API changes or changeset were added.

Verification

Command Result
pnpm install --frozen-lockfile Passed
pnpm audit --audit-level moderate --prod Passed, no known vulnerabilities
pnpm turbo run lint --affected --concurrency=4 Passed, 53/53
pnpm turbo run check-types --affected --concurrency=4 Passed, 53/53
pnpm turbo run test --affected --concurrency=4 Passed, 42/42
pnpm turbo run build --affected --concurrency=4 Passed, 32/32

The default-concurrency affected build exceeded the available sandbox memory. It passed with concurrency set to 4.

Deviations

The initial plan used unbounded minimum versions for linkify-it and nanoid. Their overrides were capped to patched versions within the existing majors to keep markdown-it compatible. No application code changed.

Closes #263

@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-billing-storybook Ready Ready Preview Aug 31, 2026 8:37pm

Request Review

@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@audrzejq
audrzejq marked this pull request as ready for review September 1, 2026 08:29
@audrzejq
audrzejq requested a review from a team September 1, 2026 08:29
@audrzejq
audrzejq merged commit c3f89d8 into main Sep 1, 2026
21 checks passed
@audrzejq
audrzejq deleted the factory/bug-dependencies-security-audit branch September 1, 2026 08:29
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.

fix: dependencies security audit

1 participant