Skip to content

fix(export): neutralize formula-leading CSV string fields - #608

Draft
seonghobae wants to merge 5 commits into
developmentalfrom
sentinel/fix-csv-injection-908129433517164735
Draft

fix(export): neutralize formula-leading CSV string fields#608
seonghobae wants to merge 5 commits into
developmentalfrom
sentinel/fix-csv-injection-908129433517164735

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 9, 2026

Copy link
Copy Markdown

변경

세션 CSV export의 공통 csvField 경계에서 number type은 기존 수치 표현을 유지하고, string이 =, +, -, @, tab, CR/LF 또는 적용 대상 full-width variant로 시작하거나 앞선 whitespace 뒤에 해당 prefix가 오면 단일 따옴표를 추가한 뒤 기존 CSV quoting/quote-doubling을 수행합니다.

OWASP는 이런 입력이 Excel·LibreOffice 등에서 formula로 해석될 수 있다고 설명하며, separator/quote에 의해 공격 문자열이 새 cell의 시작으로 이동하는 경우까지 검증하도록 요구합니다. 다만 command execution까지의 영향은 spreadsheet 기능, client configuration 및 사용자 상호작용에 의존합니다. 또한 Excel의 save/re-open 과정에서 quote/escape가 제거될 수 있어 single-quote 방식이 모든 downstream workflow에서 보편적으로 안전하다고 볼 수 없습니다.

References:

경계와 검증

기존 [CRITICAL] 및 "관리자 PC에서 임의 코드 실행을 방지했다"는 표현은 현재 evidence보다 강하므로 철회합니다. 이 PR은 흔한 formula interpretation을 줄이는 defense-in-depth이며, 실제 severity와 완료 판정은 제품이 지원하는 spreadsheet/workflow에서 검증해야 합니다.

현재 exact head: d62b1b784a9904f0fa315d34ff05d9a96de509f4

docs/product-technical-gap-baseline.md에 다음 acceptance를 기록했습니다.

  • 실제 session export route의 raw CSV에서 comma/quote/newline이 formula-leading 새 cell을 만들지 않는지 확인
  • safe benign formulas로 각 trigger prefix 및 필요한 full-width variant 검증
  • 실제 지원하는 Excel/LibreOffice consumer에서 formula bar가 literal text인지 isolated E2E 확인
  • save/re-open이 지원 workflow라면 mitigation 지속 여부를 별도 확인하고 실패 시 human-view/machine-import contract 분리 또는 target-specific mitigation 결정
  • current-head unit/integration, Security Scan, SAST, CodeQL, review를 같은 generation에서 확인

현재 구현 방향은 유지하지만 실제 spreadsheet acceptance가 없어 Draft입니다. predecessor check나 기존 unit-test GREEN을 이 새 documentation head로 전용하지 않습니다.

@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 9, 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.

@seonghobae
seonghobae marked this pull request as draft September 10, 2026 00:12
@seonghobae seonghobae changed the title 🛡️ Sentinel: [CRITICAL] 세션 내보내기 CSV 수식 주입 취약점 수정 fix(export): neutralize formula-leading CSV string fields Sep 10, 2026
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