Skip to content

πŸ›‘οΈ Sentinel: [CRITICAL] 널 λ°”μ΄νŠΈ(Null Byte) μΈμ μ…˜ 취약점 μˆ˜μ •#62

Closed
seonghobae wants to merge 1 commit into
mainfrom
sentinel-fix-null-byte-injection-1008464456775417230
Closed

πŸ›‘οΈ Sentinel: [CRITICAL] 널 λ°”μ΄νŠΈ(Null Byte) μΈμ μ…˜ 취약점 μˆ˜μ •#62
seonghobae wants to merge 1 commit into
mainfrom
sentinel-fix-null-byte-injection-1008464456775417230

Conversation

@seonghobae

Copy link
Copy Markdown
Collaborator

이 PR은 DefaultDocumentValidationServiceμ—μ„œ λ°œμƒν•  수 μžˆλŠ” 널 λ°”μ΄νŠΈ(Null Byte) μΈμ μ…˜ 취약점을 μˆ˜μ •ν•©λ‹ˆλ‹€. μ—…λ‘œλ“œλœ 파일λͺ…에 널 λ°”μ΄νŠΈ(\u0000)κ°€ ν¬ν•¨λ˜μ–΄ μžˆλŠ” 경우, 이λ₯Ό ν—ˆμš©ν•˜μ§€ μ•Šκ³  μ¦‰μ‹œ μ˜ˆμ™Έλ₯Ό λ°œμƒμ‹œμΌœ μ•…μ˜μ μΈ 파일 ν™•μž₯자 우회 및 μ ˆμ‚­ 우회 곡격을 λ°©μ§€ν•©λ‹ˆλ‹€.

λ‹¨μœ„ ν…ŒμŠ€νŠΈλ₯Ό μΆ”κ°€ν•˜μ—¬ μˆ˜μ • 사항을 κ²€μ¦ν•˜μ˜€μœΌλ©°, .jules/sentinel.md νŒŒμΌμ— 이 취약점에 λŒ€ν•œ λ³΄μ•ˆ ν•™μŠ΅ λ‚΄μš©μ„ κΈ°λ‘ν–ˆμŠ΅λ‹ˆλ‹€.


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

🚨 심각도: CRITICAL
πŸ’‘ 취약점: 파일 μ—…λ‘œλ“œ μ‹œ 파일λͺ… 검증 κ³Όμ •μ—μ„œ 널 λ°”μ΄νŠΈ(`\u0000`) μΈμ μ…˜ 검증 λˆ„λ½
🎯 영ν–₯: μ•…μ˜μ μΈ μ‚¬μš©μžκ°€ 널 λ°”μ΄νŠΈλ₯Ό ν¬ν•¨ν•œ 파일λͺ…(예: `malware.hwp\u0000.pdf`)을 μ—…λ‘œλ“œν•˜μ—¬ ν™•μž₯자 차단 우회 및 μ ˆμ‚­ 우회 곡격(Truncation bypass)을 μ‹œλ„ν•  수 있음.
πŸ”§ μˆ˜μ • 사항: `DefaultDocumentValidationService`μ—μ„œ `MultipartFile`의 원본 파일λͺ…에 널 λ°”μ΄νŠΈκ°€ ν¬ν•¨λœ 경우 `IllegalArgumentException`을 던져 κ±°λΆ€ν•˜λ„λ‘ 변경함. `.jules/sentinel.md`에 λ³΄μ•ˆ κ΄€λ ¨ λ‚΄μš©μ„ 기둝함.
βœ… 검증: 널 λ°”μ΄νŠΈκ°€ ν¬ν•¨λœ 파일λͺ…에 λŒ€ν•΄ μ˜ˆμ™Έκ°€ λ°œμƒν•˜λŠ”μ§€ ν™•μΈν•˜λŠ” λ‹¨μœ„ ν…ŒμŠ€νŠΈ(`rejectsFilenameWithNullByte`)λ₯Ό μΆ”κ°€ 및 톡과 확인함.
@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.

@opencode-agent opencode-agent 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.

Pull request overview

OpenCode exhausted the configured model pool without a usable current-head review conclusion. This is not approval evidence, so the PR is blocked until a source-backed review can establish approval sufficiency or identify concrete fixes.

Findings

1. HIGH src/main/java/com/clearfolio/viewer/service/DefaultDocumentValidationService.java:1 - OpenCode could not establish approval sufficiency

  • Problem: every configured model path failed to produce a usable current-head control block.
  • Root cause: model execution, timeout, export, normalization, or approval-gate validation did not complete after exponential retry across the configured model pool.
  • Impact: approving from deterministic check state alone would miss PR-intent mismatches, missing files, edge-case bugs, robustness gaps, UX/DX regressions, security issues, and CodeGraph-backed base/head flow changes.
  • Fix: rerun OpenCode after model availability recovers, or update the PR with the missing files, tests, docs, generated artifacts, and verification evidence needed for a source-backed review conclusion.
  • Regression test: keep the approval gate posting REQUEST_CHANGES, not APPROVE or check-only failure, when no model produces a valid current-head review.

Summary

  • Result: REQUEST_CHANGES
  • Reason: coverage-evidence passed and peer GitHub Checks completed without failures, but no model produced a valid review control block.
  • Deterministic evidence checked but not used for approval: current-head changed-file evidence (.jules/sentinel.md, src/main/java/com/clearfolio/viewer/service/DefaultDocumentValidationService.java, src/test/java/com/clearfolio/viewer/service/DefaultDocumentValidationServiceTest.java); coverage-evidence result success; peer checks from statusCheckRollup excluding this OpenCode check.
  • Model outcome: model_pool=exhausted; selected_model=none.
  • Head SHA: b4eaee043436373f3faf1c1dd64c0e8095caf966
  • Workflow run: 28475319384
  • Workflow attempt: 1

No PR approval was posted because model-output failure is not evidence that the PR has no blockers.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (3 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (3 files)"]
  R1 --> V1["required checks"]
Loading

}

String fileName = file.getOriginalFilename();
if (fileName != null && fileName.indexOf('\u0000') != -1) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH OpenCode could not establish approval sufficiency

  • Problem: the model pool exhausted without a valid current-head review control block, so this changed line cannot be approved from deterministic check state alone.
  • Impact: PR-intent mismatches, missing files, robustness bugs, UX/DX regressions, and CodeGraph-backed flow changes could be missed.
  • Fix: rerun OpenCode after model availability recovers, or add the missing source/test/docs/generated verification evidence needed for a source-backed approval.
  • Verification: rerun the OpenCode Review workflow and confirm it emits APPROVE or source-backed REQUEST_CHANGES for this head SHA.

@opencode-agent

Copy link
Copy Markdown

OpenCode Review Overview

  • Head SHA: b4eaee043436373f3faf1c1dd64c0e8095caf966
  • Workflow run: 28475319384
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode exhausted the configured model pool without a usable current-head review conclusion. This is not approval evidence, so the PR is blocked until a source-backed review can establish approval sufficiency or identify concrete fixes.

Findings

1. HIGH src/main/java/com/clearfolio/viewer/service/DefaultDocumentValidationService.java:1 - OpenCode could not establish approval sufficiency

  • Problem: every configured model path failed to produce a usable current-head control block.
  • Root cause: model execution, timeout, export, normalization, or approval-gate validation did not complete after exponential retry across the configured model pool.
  • Impact: approving from deterministic check state alone would miss PR-intent mismatches, missing files, edge-case bugs, robustness gaps, UX/DX regressions, security issues, and CodeGraph-backed base/head flow changes.
  • Fix: rerun OpenCode after model availability recovers, or update the PR with the missing files, tests, docs, generated artifacts, and verification evidence needed for a source-backed review conclusion.
  • Regression test: keep the approval gate posting REQUEST_CHANGES, not APPROVE or check-only failure, when no model produces a valid current-head review.

Summary

  • Result: REQUEST_CHANGES
  • Reason: coverage-evidence passed and peer GitHub Checks completed without failures, but no model produced a valid review control block.
  • Deterministic evidence checked but not used for approval: current-head changed-file evidence (.jules/sentinel.md, src/main/java/com/clearfolio/viewer/service/DefaultDocumentValidationService.java, src/test/java/com/clearfolio/viewer/service/DefaultDocumentValidationServiceTest.java); coverage-evidence result success; peer checks from statusCheckRollup excluding this OpenCode check.
  • Model outcome: model_pool=exhausted; selected_model=none.
  • Head SHA: b4eaee043436373f3faf1c1dd64c0e8095caf966
  • Workflow run: 28475319384
  • Workflow attempt: 1

No PR approval was posted because model-output failure is not evidence that the PR has no blockers.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (3 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (3 files)"]
  R1 --> V1["required checks"]
Loading

@seonghobae

Copy link
Copy Markdown
Collaborator Author

쀑볡 정리: 이 PR은 '파일 ν™•μž₯자/null-byte 검증' ν΄λŸ¬μŠ€ν„°μ˜ μ€‘λ³΅μž…λ‹ˆλ‹€. μ •λ³ΈμœΌλ‘œ #76 (APPROVED + CI green + MERGEABLE)을 μœ μ§€ν•©λ‹ˆλ‹€. 동일 νŒŒμΌμ„ μˆ˜μ •ν•΄ λ™μ‹œ 병합이 λΆˆκ°€λŠ₯ν•˜λ―€λ‘œ μ •λ¦¬ν•©λ‹ˆλ‹€. κ³ μœ ν•˜κ²Œ ν•„μš”ν•œ 변경이 있으면 #76에 λ°˜μ˜ν•˜κ±°λ‚˜ μž¬μ˜€ν”ˆν•˜μ„Έμš”.

@seonghobae seonghobae closed this Jul 7, 2026
@google-labs-jules

Copy link
Copy Markdown

쀑볡 정리: 이 PR은 '파일 ν™•μž₯자/null-byte 검증' ν΄λŸ¬μŠ€ν„°μ˜ μ€‘λ³΅μž…λ‹ˆλ‹€. μ •λ³ΈμœΌλ‘œ #76 (APPROVED + CI green + MERGEABLE)을 μœ μ§€ν•©λ‹ˆλ‹€. 동일 νŒŒμΌμ„ μˆ˜μ •ν•΄ λ™μ‹œ 병합이 λΆˆκ°€λŠ₯ν•˜λ―€λ‘œ μ •λ¦¬ν•©λ‹ˆλ‹€. κ³ μœ ν•˜κ²Œ ν•„μš”ν•œ 변경이 있으면 #76에 λ°˜μ˜ν•˜κ±°λ‚˜ μž¬μ˜€ν”ˆν•˜μ„Έμš”.

μ•Œκ² μŠ΅λ‹ˆλ‹€. 이 μž‘μ—…μ΄ μ€‘λ³΅μœΌλ‘œ κ°„μ£Όλ˜μ–΄ μ’…λ£Œλ˜μ—ˆμŒμ„ ν™•μΈν–ˆμœΌλ©°, λ³Έ μž‘μ—…μ— λŒ€ν•œ 진행을 μ€‘λ‹¨ν•˜κ² μŠ΅λ‹ˆλ‹€.

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