Skip to content

๐Ÿ›ก๏ธ Sentinel: [HIGH] Fix CSV formula injection bypass with NUL byte - #1155

Closed
seonghobae wants to merge 1 commit into
developfrom
sentinel-fix-csv-injection-nul-byte-18406434902956248137
Closed

๐Ÿ›ก๏ธ Sentinel: [HIGH] Fix CSV formula injection bypass with NUL byte#1155
seonghobae wants to merge 1 commit into
developfrom
sentinel-fix-csv-injection-nul-byte-18406434902956248137

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

๐Ÿ›ก๏ธ Sentinel: [HIGH] Fix CSV formula injection bypass with NUL byte

* ๐Ÿšจ Severity: HIGH
* ๐Ÿ’ก Vulnerability: CSV formula injection mitigation in the export module missed checking for the NUL byte (`\x00`).
* ๐ŸŽฏ Impact: An attacker could prepend a NUL byte which bypasses the check but is still evaluated by applications like Excel.
* ๐Ÿ”ง Fix: Include the NUL byte `\x00` in the regex character class checking for problematic leading characters. Added the appropriate eslint ignore comment.
* โœ… Verification: Tests added and run successfully. Monorepo quickcheck passed.

PR created automatically by Jules for task 18406434902956248137 started by @seonghobae


Devin Review

@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 Sep 3, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 53 minutes.

Check out review usage here.

View limit details

Limit details: Youโ€™ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

โš™๏ธ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: cdfa990a-387a-4c29-bd08-61715c7c4bc7

๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between 749511c and 29a51db.

๐Ÿ“’ Files selected for processing (3)
  • .jules/sentinel.md
  • apps/desktop/src/lib/export.test.ts
  • apps/desktop/src/lib/export.ts

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.

โœ… Devin Review: No Issues Found

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

Devin Review

Copy link
Copy Markdown
Collaborator Author

Superseded by canonical CSV export security owner #1103 after exact semantic comparison on the current heads.

Source examined: #1155 29a51dbece4a21d9312ff77046a7fcdf46a041ec against protected develop@749511c3ad4000090048718f685c6bee6b3d2c25.
Successor examined: #1103 910636e2d1f6d4b9acf4345829247c8af20987b1 against the same protected base.

The #1155 diff is exactly the same three-file desktop CSV boundary (apps/desktop/src/lib/export.ts, apps/desktop/src/lib/export.test.ts, .jules/sentinel.md). Its production delta adds NUL to the dangerous-leading-token regex. #1103 already contains that NUL guard and a strictly broader full-width operator guard. Its executable regressions include the exact \x00=1+2 case, whitespace-before-NUL, repeated-NUL, whitespace+repeated-NUL, and NUL-only cells. The #1155 \x00cmd assertion is not a distinct behavior/contract: #1103 explicitly treats NUL itself as the dangerous first token, demonstrated by the stronger NUL-only regression, so suffix content cannot bypass the same branch. #1155's one-space-before-NUL case is the same *-quantified prefix class already exercised by #1103's whitespace-before-NUL cases. The sentinel note is also subsumed by #1103's stronger repeated-NUL/NUL-only trust-boundary lesson.

No unique production behavior, test requirement, fixture, contract, or evidence remains in #1155 after this comparison. No check, review, approval, or workflow result transfers to #1103; #1103 must satisfy all current exact-head gates independently. Closing #1155 unmerged removes a competing writer without discarding a valid delta.

@seonghobae seonghobae closed this Sep 3, 2026
@google-labs-jules

Copy link
Copy Markdown

Superseded by canonical CSV export security owner #1103 after exact semantic comparison on the current heads.

Source examined: #1155 29a51dbece4a21d9312ff77046a7fcdf46a041ec against protected develop@749511c3ad4000090048718f685c6bee6b3d2c25.
Successor examined: #1103 910636e2d1f6d4b9acf4345829247c8af20987b1 against the same protected base.

The #1155 diff is exactly the same three-file desktop CSV boundary (apps/desktop/src/lib/export.ts, apps/desktop/src/lib/export.test.ts, .jules/sentinel.md). Its production delta adds NUL to the dangerous-leading-token regex. #1103 already contains that NUL guard and a strictly broader full-width operator guard. Its executable regressions include the exact \x00=1+2 case, whitespace-before-NUL, repeated-NUL, whitespace+repeated-NUL, and NUL-only cells. The #1155 \x00cmd assertion is not a distinct behavior/contract: #1103 explicitly treats NUL itself as the dangerous first token, demonstrated by the stronger NUL-only regression, so suffix content cannot bypass the same branch. #1155's one-space-before-NUL case is the same *-quantified prefix class already exercised by #1103's whitespace-before-NUL cases. The sentinel note is also subsumed by #1103's stronger repeated-NUL/NUL-only trust-boundary lesson.

No unique production behavior, test requirement, fixture, contract, or evidence remains in #1155 after this comparison. No check, review, approval, or workflow result transfers to #1103; #1103 must satisfy all current exact-head gates independently. Closing #1155 unmerged removes a competing writer without discarding a valid delta.

Understood. Acknowledging that this work is now obsolete (superseded by #1103) and stopping work on this task.

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