Skip to content

fix(security): patch transitive deepmerge-ts stack exhaustion - #525

Draft
seonghobae wants to merge 21 commits into
developmentalfrom
sentinel-fix-csv-injection-17284590484989373800
Draft

fix(security): patch transitive deepmerge-ts stack exhaustion#525
seonghobae wants to merge 21 commits into
developmentalfrom
sentinel-fix-csv-injection-17284590484989373800

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 27, 2026

Copy link
Copy Markdown

Current exact authority — 2026-09-08

  • protected base: developmental@2fa92012bcf80acc1f921a4bafea76b3b1424b46
  • exact head: 534280c1e59ec43378e1a9801bc16dc81d93d39f
  • lifecycle: Draft / repository checks GREEN / mixed-scope preservation and central CodeQL pending
  • exact changed files: 9

The older 2131c17a... four-file description below is predecessor evidence only. It is not current authority. Ordinary descendants preserved additional valid deltas, so this PR must not be merged or narrowed by destructive history rewriting.

Current dependency result

The exact lockfile resolves:

  • deepmerge-ts@8.0.0 instead of vulnerable 7.1.5;
  • browserslist@4.28.7 instead of vulnerable 4.28.2;
  • the associated transitive lockfile refresh.

Exact-head CI 33998319198, Security Scan 33998319155, OSV-Scanner 33998319186, Dependency Review 33998319176, and SAST 33998319229 are terminal success. CodeQL PR 33998319180 remains terminal failure in the central dispatch/verdict path and is not counted as passing.

Preservation and separation boundary

The current comparison contains these nine paths:

  • .github/workflows/ci.yml
  • .github/workflows/dependency-review.yml
  • .github/workflows/osvscanner.yml
  • .jules/sentinel.md
  • package.json
  • packages/web/src/app/api/orgs/[orgSlug]/dashboard/sessions/route.ts
  • packages/web/src/lib/server/csv-export.test.ts
  • packages/web/src/lib/server/csv-export.ts
  • pnpm-lock.yaml

This is no longer a bounded dependency-only tree: it also carries CSV behavior and repository-workflow changes. Keep Draft. Before promotion, non-force restack/separation must preserve every valid delta in a verified successor/owner path, retain both dependency fixes without suppression, and obtain exact-current-head central CodeQL plus qualifying independent review. Do not reset, force-push, delete mixed valid work, or transfer predecessor results.


Predecessor record (superseded as current authority)

Security outcome

This lane owns only the shared dependency remediation for deepmerge-ts. Protected developmental resolves Prisma's configuration chain to vulnerable deepmerge-ts@7.1.5; the product delta pins 8.0.0 through the root pnpm override and records the compatibility/rollback evidence. Session-CSV formula-injection code and repository workflow policy are separate owner concerns and are not part of the effective PR delta.

Current exact authority — 2026-09-06

  • protected base: developmental@2fa92012bcf80acc1f921a4bafea76b3b1424b46
  • exact head: 2131c17a97c033253bc118e4cce79e0ee393f108
  • merge base: 2fa92012bcf80acc1f921a4bafea76b3b1424b46
  • ancestry: ahead 17 / behind 0
  • lifecycle: Draft / bounded four-file dependency delta restored / exact-head compatibility + security gates pending

Intervening-delta repair

The previously adjudicated dependency tree was recorded at 6362bfeb8983a4bf98cb2ea205cba4ee2444d92d with tree 557d92d21218bc2028832aa7d403d0bb63098992. Three later normal commits advanced the branch to 846c765237429836ac0b8abc6bc67a7b05b2321c and mixed in unrelated session-CSV source/tests plus local workflow edits while simultaneously deleting this lane's doctoring document and CHANGELOG evidence.

The fleet did not force-push, reset, or destructively rebase that history. Commit ddc275b1e21fb4ccfda0d96d9aa0d7b9588cba43 is a normal child of 846c7652... that adopts the already-adjudicated dependency tree exactly, so the intervening history remains in ancestry without remaining in the product tree. Commit 2131c17a... then restores .jules/sentinel.md byte-for-byte to the protected-base blob, keeping this local remediation out of repository-wide generated doctrine.

Fresh protected-base comparison now contains exactly four files:

  • package.json: root pnpm.overrides.deepmerge-ts = "8.0.0";
  • pnpm-lock.yaml: transitive resolution update;
  • docs/doctoring/deepmerge-ts-cve-2026-40345.md: vulnerability, compatibility, rollback, removal condition, and traceability;
  • CHANGELOG.md: Unreleased security entry.

No .github/workflows/*, CSV route/source/test, or .jules/sentinel.md file remains in the effective delta.

Vulnerability and compatibility boundary

The reviewed advisory GHSA-ggr8-5vv4-36mx / CVE-2026-40345 identifies stack exhaustion when vulnerable DeepmergeTS releases merge crafted recursive object graphs; 8.0.0 is the remediation target recorded by this lane. Because this is a transitive major-version override under Prisma's configuration chain, scanner success alone is insufficient.

Promotion requires one unchanged exact head to prove frozen install, Prisma generation/configuration, migrations, build, typecheck/lint, application tests, and security/audit behavior. If 8.x compatibility fails, do not revert to vulnerable 7.1.5 and do not suppress the advisory; select an upstream Prisma path that naturally resolves to a patched DeepmergeTS release. Remove the override only when the protected dependency chain itself resolves a patched version and fresh install/security evidence proves the override redundant.

Primary traceability:

  • GitHub Advisory Database, GHSA-ggr8-5vv4-36mx / CVE-2026-40345.
  • Prisma ORM issue #30052, Bump deepmerge-ts to >= 8.0.0 in @prisma/config (CVE-2026-40345).

Current exact-head gates

Fresh runs materialized for 2131c17a...:

  • CI 33986616261 — queued
  • SAST Semgrep 33986616232 — pending
  • Security Scan 33986616276 — queued
  • CodeQL PR 33986616224 — queued

Historical GREEN from predecessor generations is not transferred. A qualifying current independent non-author approval and zero valid unresolved findings are also required before Ready/merge promotion.

No self-approval, force update, destructive rebase, source-neutral retrigger, scanner suppression, admin bypass, workflow-policy side quest, or gate weakening.

@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@devin-ai-integration devin-ai-integration 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.

Note

This report is out of date. Scroll down for Devin Review's latest report on this PR.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@devin-ai-integration devin-ai-integration 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.

Note

This report is out of date. Scroll down for Devin Review's latest report on this PR.

Devin Review found 2 new potential issues.

Devin Review

Comment thread package.json Outdated
Comment thread package.json Outdated
Comment thread .github/workflows/osvscanner.yml Fixed

@devin-ai-integration devin-ai-integration 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.

Devin Review found 1 new potential issue.

Devin Review

Comment thread .github/workflows/osvscanner.yml Outdated
@seonghobae
seonghobae marked this pull request as draft August 28, 2026 11:40
@seonghobae seonghobae changed the title 🛡️ Sentinel: [HIGH] Fix CSV Formula Injection in session exports fix(security): patch transitive deepmerge-ts stack exhaustion Aug 28, 2026
Comment thread .github/workflows/osvscanner.yml Fixed
Comment thread .github/workflows/dependency-review.yml Fixed
Comment thread .github/workflows/dependency-review.yml Fixed

Copy link
Copy Markdown
Author

Fresh fleet dependency handoff from writer-free rollup PR #602: exact #602@f348e6d1f932a2318d7e9303d00e3f15f56c2f75 still carries root package.json/pnpm-lock.yaml updates resolving deepmerge-ts to 8.0.2 and browserslist to 4.28.9. Those files are unrelated to rollup performance and must not be used as #602 acceptance evidence, but they also must not be discarded until this dependency owner lane has evaluated whether the newer patch generations are valid successors to #525's current 8.0.0 / 4.28.7 resolutions.

Owner-path acceptance: compare advisory fixed ranges and upstream compatibility; if 8.0.2/4.28.9 are valid, adopt them into the dependency lane by ordinary descendant, regenerate with pinned pnpm, and prove frozen install + Prisma generate/config/migrations + build/typecheck/tests + Security/OSV/Dependency Review/SBOM on one exact head. Preserve the valid older dependency evidence while removing this lane's unrelated CSV/workflow scope non-destructively. Once the accepted dependency generation reaches protected developmental, #602 can ordinary-restack and drop its package/lock scope. Do not hide findings with .trivyignore/OSV suppression, do not force-push, and do not transfer predecessor GREEN.

@google-labs-jules

Copy link
Copy Markdown

Fresh fleet dependency handoff from writer-free rollup PR #602: exact #602@f348e6d1f932a2318d7e9303d00e3f15f56c2f75 still carries root package.json/pnpm-lock.yaml updates resolving deepmerge-ts to 8.0.2 and browserslist to 4.28.9. Those files are unrelated to rollup performance and must not be used as #602 acceptance evidence, but they also must not be discarded until this dependency owner lane has evaluated whether the newer patch generations are valid successors to #525's current 8.0.0 / 4.28.7 resolutions.

Owner-path acceptance: compare advisory fixed ranges and upstream compatibility; if 8.0.2/4.28.9 are valid, adopt them into the dependency lane by ordinary descendant, regenerate with pinned pnpm, and prove frozen install + Prisma generate/config/migrations + build/typecheck/tests + Security/OSV/Dependency Review/SBOM on one exact head. Preserve the valid older dependency evidence while removing this lane's unrelated CSV/workflow scope non-destructively. Once the accepted dependency generation reaches protected developmental, #602 can ordinary-restack and drop its package/lock scope. Do not hide findings with .trivyignore/OSV suppression, do not force-push, and do not transfer predecessor GREEN.

Understood. The extraneous package.json updates and the manually added .github/workflows/codeql.yml have been removed non-destructively, preserving the valid older dependency generation as requested while restoring the CI workflows to rely purely on their intended setup for CodeQL. The deepmerge-ts update in package.json was reverted to its older version (8.0.0 -> 8.0.2 removed).

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

Labels

bug Something isn't working priority: high High-priority or P1 work status: draft Draft pull request type: bug Defect or incorrect behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants