Skip to content

chore(deps): security audit updates + mjml fix#12

Merged
chriskehayias merged 1 commit into
mainfrom
chore/dep-security-updates
May 20, 2026
Merged

chore(deps): security audit updates + mjml fix#12
chriskehayias merged 1 commit into
mainfrom
chore/dep-security-updates

Conversation

@chriskehayias

Copy link
Copy Markdown
Contributor

Summary

Resolves 3 of 7 npm audit vulnerabilities + applies safe minor/patch updates across the dependency tree.

Security fixes

  • kysely high (JSON-path injection, GHSA-pv5w-4p9q-p3v2) — resolved via better-auth 1.6.5 → 1.6.11
  • @xmldom/xmldom (scoped) — 4 high advisories resolved
  • brace-expansion moderate (DoS)
  • next 16.2.4 → 16.2.6 — patches DoS via Server Components (GHSA-8h8q-6873-q5fj)

Other updates (safe minor/patch via npm update)

react / react-dom, zod, vitest, @vitest/coverage-v8, tailwindcss, @tailwindcss/postcss, postcss, mjml, openai, react-hook-form, lucide-react, tsx, docxtemplater, grapesjs, eslint-config-next, plus types/dev tooling.

Code change

src/components/template-editor/actions.tsmjml 5.0.1 → 5.2.2 made mjml2html() return a Promise. Added await to keep the build green. One line.

Remaining (not auto-fixable)

  • xmldom (unscoped, deprecated) critical via docxtemplater-image-module-free — no upstream fix; needs library replacement or explicit risk acceptance.
  • postcss moderate, nested under next's internal copy — will resolve in a future Next release.

Test plan

  • npm run test:run → 647/647 passing (44 files)
  • npm run build → green
  • Spot-check template editor MJML preview after merge

🤖 Generated with Claude Code

Resolves 3 of 7 vulnerabilities reported by npm audit:
- kysely high (JSON-path injection, GHSA-pv5w-4p9q-p3v2) via better-auth 1.6.5 -> 1.6.11
- @xmldom/xmldom scoped: 4 high (DoS, injection)
- brace-expansion moderate (DoS)

Patched next 16.2.4 -> 16.2.6 (DoS via Server Components, GHSA-8h8q-6873-q5fj).

Applied safe minor/patch bumps via npm update across react/react-dom,
zod, vitest, tailwindcss, postcss, mjml, openai, react-hook-form,
lucide-react, tsx, docxtemplater, grapesjs, eslint-config-next, and
@vitest/coverage-v8 and other dev/types packages.

mjml 5.0.1 -> 5.2.2 made mjml2html() async; added await in
src/components/template-editor/actions.ts to keep the build green.

Remaining vulnerabilities (not auto-fixable):
- xmldom (unscoped, deprecated) critical via docxtemplater-image-module-free
  (no upstream fix; requires library replacement or risk acceptance)
- postcss moderate nested under next (will resolve in future Next release)

Validation:
- npm run test:run -> 647/647 passing (44 files)
- npm run build -> green

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@chriskehayias chriskehayias merged commit e161380 into main May 20, 2026
@chriskehayias chriskehayias deleted the chore/dep-security-updates branch May 20, 2026 14:44
norm613 pushed a commit to norm613/MPNext-Tools that referenced this pull request Jun 24, 2026
MP stores datetimes as wall-clock values in the domain's configured time
zone, not UTC. Existing write paths in GroupService and FamilyService tagged
values as UTC (via `${date}T00:00:00Z` or `new Date().toISOString()`),
which caused saved records to drift by the offset between the Node server's
local zone and MP's domain zone. Edits compounded the drift on each save.

- Add DomainTimezoneService — singleton wrapping getDomainInfo() with
  Windows->IANA mapping and SQL datetime conversion (toMpSqlDatetime,
  parseMpDatetime).
- Add shared server action getMpTimezone() for client-side display.
- Fix GroupService.createGroup/updateGroup to route Start_Date / End_Date /
  Promotion_Date through the service.
- Fix FamilyService Participant_Start_Date and Donor Setup_Date writes to
  use MP-TZ wall-clock instead of new Date().toISOString().
- Update groupService.test.ts: mock getDomainInfo, reset both singletons in
  beforeEach, assert MP-SQL format, add round-trip regression proving three
  consecutive saves of the same date do not shift.
- Add reference doc .claude/references/ministryplatform.datetimehandling.md.
- Update CLAUDE.md with Key Development Practice MinistryPlatform-Community#12 + reference link.

Tests: 16 new in domainTimezoneService.test.ts, 1 round-trip regression in
groupService.test.ts. Full suite passes (664/664) under TZ=UTC and
TZ=America/Los_Angeles.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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