Skip to content

🛡️ Sentinel: [security improvement] 방어적 민감 확장자 제외 추가 - #206

Closed
seonghobae wants to merge 1 commit into
masterfrom
sentinel-dynamic-extension-exclusion-10013109850563183073
Closed

🛡️ Sentinel: [security improvement] 방어적 민감 확장자 제외 추가#206
seonghobae wants to merge 1 commit into
masterfrom
sentinel-dynamic-extension-exclusion-10013109850563183073

Conversation

@seonghobae

Copy link
Copy Markdown
Collaborator

🚨 Severity: MEDIUM
💡 Vulnerability: 기존의 html4tree 크롤러는 숨김 파일(예: .env, .git) 및 하드코딩된 특정 시크릿 파일(예: id_rsa)만 차단하고 있었습니다. 이로 인해 .pem, .key, .db, .log 등과 같이 예측할 수 없는 이름의 민감한 파일들이 확장자로 존재할 경우 그대로 디렉토리 인덱스에 노출되어, 공격자나 비인가된 사용자에게 중요 정보(Information Exposure)를 유출할 위험이 있었습니다.
🎯 Impact: 자격 증명(키 파일)이나 백업, 데이터베이스 덤프 등이 외부에 공개되어 2차 공격에 활용될 수 있었습니다.
🔧 Fix: process_ignore_file 함수 내에서 확장자 기반 검사를 도입하였습니다. 파일명(대소문자 무관)이 .pem, .key, .keystore, .truststore, .sqlite, .db, .bak, .log, .pcap, .sql로 끝나는 파일들은 자동으로 제외 목록에 추가되도록 수정하여 Defense-in-depth를 강화했습니다.
Verification:

  1. src/test/kotlin/html4tree/MainTest.kt의 새로운 testProcessIgnoreFileSensitiveExtensions 테스트 케이스를 통해 위 확장자를 가진 파일(예: private.pem, database.DB)이 리스트에서 제외되고 일반 텍스트 파일 등은 유지됨을 검증했습니다.
  2. ./gradlew test jacocoTestReport jacocoTestCoverageVerification를 수행하여 코드 커버리지 100%가 깨지지 않았음을 확인했습니다.

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

- .pem, .db, .sqlite, .log 등 민감한 확장자를 동적으로 필터링하도록 추가
- 기존 테스트 코드에 민감 확장자 동적 제외 케이스 추가
- JaCoCo 100% 테스트 커버리지 유지
- Sentinel Journal 업데이트 완료
@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-agentopencode-agentBot 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 cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 5aef1cdfc3287a69d7e93995f97b0771fde341b7.

  • Head SHA: 5aef1cdfc3287a69d7e93995f97b0771fde341b7

  • Workflow run: 30424210302

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

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

@opencode-agent

Copy link
Copy Markdown

OpenCode Review Overview

  • Head SHA: 5aef1cdfc3287a69d7e93995f97b0771fde341b7
  • Workflow run: 30424210302
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 5aef1cdfc3287a69d7e93995f97b0771fde341b7.

  • Head SHA: 5aef1cdfc3287a69d7e93995f97b0771fde341b7

  • Workflow run: 30424210302

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

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

@seonghobaeChatGPT Codex Connector

Copy link
Copy Markdown
CollaboratorAuthor

Closing as superseded by current-base #424. #424 preserves this PR’s case-insensitive credential, keystore/truststore, database, backup, SQL, log, and packet-capture exclusions, adds certificate-container, swap, and editor-backup families, and uses locale-stable normalization. It has real test-first proof on exact head 79c9631abf18adba543cb68ae99759eb0f1ccecb: RED 31482449647; GREEN CI 31482588295, Security 31482588308, and SAST 31482588279.

@google-labs-jules

Copy link
Copy Markdown

Closing as superseded by current-base #424. #424 preserves this PR’s case-insensitive credential, keystore/truststore, database, backup, SQL, log, and packet-capture exclusions, adds certificate-container, swap, and editor-backup families, and uses locale-stable normalization. It has real test-first proof on exact head 79c9631abf18adba543cb68ae99759eb0f1ccecb: RED 31482449647; GREEN CI 31482588295, Security 31482588308, and SAST 31482588279.

Understood. Acknowledging that this work is superseded by #424 and stopping work on this task.

Sign up for freeto 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

@seonghobae