π‘οΈ Sentinel: [CRITICAL] Fix CSV formula injection via NUL bytes - #1175
π‘οΈ Sentinel: [CRITICAL] Fix CSV formula injection via NUL bytes#1175seonghobae wants to merge 1 commit into
Conversation
|
π 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
No actionable comments were generated in the recent review. π βΉοΈ Recent review infoβοΈ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: π Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. π WalkthroughWalkthroughCSV μμ μ£Όμ λ°©μ΄ μ κ·μμ NUL λ°μ΄νΈκ° μΆκ°λμμ΅λλ€. NUL λ°μ΄νΈκ° ν¬ν¨λ μν μ λ ₯μ μ΄μ€μΌμ΄ν ν μ€νΈμ λμ μ§μΉ¨λ μΆκ°λμμ΅λλ€. ChangesCSV μμ μ£Όμ λ°©μ΄
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: βͺ Minimal Β· up to CSV exports now prefix NUL-padded formula-like values with a protective quote, preventing this formula-injection bypass. The changed behavior is covered by targeted tests and presents no remaining merge-blocking risk. π₯ Pre-merge checks | β 5β Passed checks (5 passed)
β¨ Finishing Touchesπ Generate docstrings
π§ͺ Generate unit tests (beta)
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. Comment |
|
Succession receipt: #1177 ( |
Understood. Acknowledging that this work is now obsolete and superseded by PR #1177, which provides a more comprehensive fix. Stopping work on this task. |
π¨ Severity: CRITICAL
π‘ Vulnerability: The existing CSV formula injection mitigation was vulnerable to bypasses using NUL bytes (
\x00). Spreadsheets like Excel will often ignore these bytes and still evaluate the subsequent payload (e.g.\x00=cmd).π― Impact: An attacker could exploit this to achieve arbitrary formula injection/remote code execution when a victim opens a crafted, exported CSV file.
π§ Fix: Expanded the mitigation regex in
apps/desktop/src/lib/export.tsto include\x00. Used// eslint-disable-next-line no-control-regexto permit the deliberate control character usage.β Verification: Verified by updating tests in
apps/desktop/src/lib/export.test.tsto assert that NUL bytes are properly sanitized and runningnpm run testand./scripts/harness/quickcheck.sh.PR created automatically by Jules for task 2418472041287486662 started by @seonghobae
Summary by CodeRabbit
λ²κ·Έ μμ
ν μ€νΈ