fix(export): contain spreadsheet formula interpretation in session CSV - #596
fix(export): contain spreadsheet formula interpretation in session CSV#596seonghobae wants to merge 10 commits 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. |
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks 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 |
Finding
The sessions CSV exporter quoted delimiters/quotes but did not treat spreadsheet formula interpretation as a separate output-boundary concern. Attacker-controlled session/project text beginning with formula-triggering characters could therefore become a formula when an authorized user opens the export in spreadsheet software.
The prior HIGH/RCE wording was broader than the current evidence. Practical impact depends on the spreadsheet application and user interaction. OWASP documents formula execution/data-exfiltration risks, but also notes that common quote/apostrophe mitigations are not universally reliable after Microsoft Excel save/re-open.
Repair
Current exact head:
1324e1ed2771ab10dfc87ac34833cdb4b6220581Protected target at repair start:
developmental@2fa92012bcf80acc1f921a4bafea76b3b1424b46.Effective product delta is intentionally scoped to:
packages/web/src/lib/server/csv.ts: pure, documented CSV field serialization boundary with an explicit string return contract;packages/web/src/lib/server/csv.test.ts: individually attributable formula-trigger, Unicode/control, delimiter/quote, leading-space and numeric-semantics regressions, aligned with the repository test strategy;docs/product-technical-gap-baseline.md: records the code-current boundary, evidence and spreadsheet-application acceptance gap.Normal repair descendants restored
.jules/sentinel.md, rootpackage.jsonandpnpm-lock.yamlto protected-base authority, removing unrelated dependency overrides and generated doctrine from this security lane.Acceptance
Keep Draft until the unchanged exact head has terminal-success type/lint/test/security/SAST/CodeQL evidence and current review/thread evidence. Unit tests establish deterministic serializer behavior, not universal spreadsheet safety. Before claiming the buyer-visible gap closed, validate benign payloads in the supported spreadsheet target(s), including Excel save/re-open if Excel is supported, and inspect the raw CSV to prove delimiter/quote inputs cannot create a second cell.
Reference: OWASP CSV Injection — https://owasp.org/www-community/attacks/CSV_Injection
Do not reintroduce unrelated dependency churn, source-neutral retriggers, self-approval, synthetic status, or gate weakening.