Skip to content

fix: upgrade deps to clear Trivy HIGH CVE blocking cloud image build#123

Merged
akifbayram merged 19 commits into
mainfrom
feat/cloud-tos-consent
May 9, 2026
Merged

fix: upgrade deps to clear Trivy HIGH CVE blocking cloud image build#123
akifbayram merged 19 commits into
mainfrom
feat/cloud-tos-consent

Conversation

@akifbayram

Copy link
Copy Markdown
Owner

Summary

  • Upgrades server dependencies to resolve Trivy HIGH severity CVEs that were blocking the cloud image build
  • Updates server/package.json and server/package-lock.json

Test Plan

  • Frontend tests pass (1711 tests)
  • Server tests pass (1614 tests)
  • Verify cloud image build succeeds with no HIGH CVEs

akifbayram added 19 commits May 8, 2026 21:59
POST /api/auth/register now requires acceptedTos + acceptedPrivacy when
running in cloud mode (skipped on self-hosted). On success, recordConsent
is called with source='signup' before any location auto-join so the
audit trail orders consent first. The optional marketingOptIn is
forwarded but only honored when MARKETING_OPT_IN_VISIBLE is true.

Test helper createTestUser now sends both consent flags so existing
tests that mock isSelfHosted()=false (planGating, downgrade, etc.)
continue to satisfy the gate. Two direct register calls in
accountDeletion.e2e.test.ts updated for the same reason.
- Extract <ConsentCheckboxes> shared component (used by RegisterPage and
  CompleteSignupPage; eliminates ~50 lines of duplicated checkbox JSX).
- Add LEGAL_DOCUMENTS / LegalDocument / CONSENT_REQUIRED_CODE constants
  in legalVersions.ts and consume them in consent.ts, the migration,
  and requireCurrentConsent.
- Loop tos/privacy in recordConsent and migration backfill instead of
  copy-paste; consolidate byte-identical SQLITE/POSTGRES CREATE_STATEMENTS.
- Drop dead `req.consentVersions` global augmentation (zero readers).
- Drop redundant SELECT in /api/auth/complete-consent — the client
  refetches /me right after, so we just confirm the recorded versions.
- Fix CompleteSignupPage marketing opt-out: pass `marketingOptIn`
  directly instead of `marketingOptIn || undefined`, so unchecking on
  re-acceptance now opts the user out instead of silently preserving
  prior opt-in.
- Drop noise comments (apiKeys cross-reference, register.ts narration,
  duplicate JSDoc on RecordConsentOptions, registerConsent.test.ts
  cross-reference, isReacceptance useMemo).
@akifbayram akifbayram merged commit 786b4fd into main May 9, 2026
1 check 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.

1 participant