Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .jules/sentinel.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,8 @@
**Vulnerability:** The document hashing routine in `DefaultDocumentConversionService` processed file streams without enforcing any maximum size limit on the bytes read. An attacker could exploit this by uploading a maliciously large stream (or exploiting a compression bomb if unzipping), exhausting system memory, CPU, or disk space (DoS).
**Learning:** Checking the declared file size (e.g., `file.getSize()`) in initial validation is not always sufficient if the input stream itself can be spoofed or dynamically expanded during reading. The actual bytes read must be verified against bounds continuously.
**Prevention:** Always enforce a strict, configurable size limit (e.g., `ConversionProperties.maxUploadSizeBytes`) within the `while` loop that reads from untrusted input streams. Track `totalRead` and throw an exception immediately if the limit is exceeded.

## 2026-08-19 - ν™˜κ²½ λ³€μˆ˜ 기반 λΉ„λ°€κ°’ μ£Όμž… 제거 (KV Configtree λ§ˆμ΄κ·Έλ ˆμ΄μ…˜)
**Vulnerability:** `application-buyer-demo.yml`μ—μ„œ `clearfolio.artifact-token.secret` 및 `clearfolio.tenant-claims.hmac-secret`와 같은 λŸ°νƒ€μž„ 비밀값을 ν™˜κ²½ λ³€μˆ˜ λŒ€μ²΄(placeholder) `${ENV_VAR:}` λ°©μ‹μœΌλ‘œ μ£Όμž…ν•˜κ³  μžˆμ—ˆμŠ΅λ‹ˆλ‹€. μ΄λŠ” ν”„λ‘œμ„ΈμŠ€ ν™˜κ²½μ„ 톡해 λ―Όκ°ν•œ 자격 증λͺ…을 λ…ΈμΆœμ‹œν‚¬ 수 μžˆμŠ΅λ‹ˆλ‹€.
**Learning:** Spring Bootμ—μ„œ λŸ°νƒ€μž„ μ‹œν¬λ¦Ώμ€ ν™˜κ²½ λ³€μˆ˜κ°€ μ•„λ‹Œ KV(Key-Value) 기반 μ €μž₯μ†Œλ₯Ό 톡해 λ‘œλ“œν•΄μ•Ό ν•©λ‹ˆλ‹€. λ³Έ μ €μž₯μ†Œμ—μ„œλŠ” `application.yml`에 μ„€μ •λœ `spring.config.import: "optional:configtree:..."` κΈ°λŠ₯을 μ‚¬μš©ν•˜μ—¬ 마운트된 λ””λ ‰ν† λ¦¬μ˜ νŒŒμΌλ“€μ„ μ½μ–΄λ“€μ΄λŠ” 방식이 ν‘œμ€€μž…λ‹ˆλ‹€.
**Prevention:** Configtree둜 μ›ν™œν•˜κ²Œ μ—°λ™ν•˜κΈ° μœ„ν•΄ YAML νŒŒμΌμ—μ„œ 빈 λ¬Έμžμ—΄λ‘œ μ˜€λ²„λΌμ΄λ“œλ  수 μžˆλŠ” μ‹œν¬λ¦Ώ μ„€μ • ν‚€ 자체λ₯Ό μ™„μ „νžˆ μ œκ±°ν•˜μ—¬, Spring Bootκ°€ μ˜¬λ°”λ₯΄κ²Œ KV μ €μž₯μ†Œμ—μ„œ ν•΄λ‹Ή μ‹œν¬λ¦Ώλ“€μ„ κ°€μ Έμ˜€λ„λ‘ κ°•μ œν•΄μ•Ό ν•©λ‹ˆλ‹€.
3 changes: 0 additions & 3 deletions src/main/resources/application-buyer-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ viewer:
frame-ancestors: ${CLEARFOLIO_FRAME_ANCESTORS:self}

clearfolio:
artifact-token:
secret: ${CLEARFOLIO_ARTIFACT_TOKEN_SECRET:}
tenant-claims:
hmac-secret: ${CLEARFOLIO_TENANT_CLAIMS_HMAC_SECRET:}
max-skew-seconds: ${CLEARFOLIO_TENANT_CLAIMS_MAX_SKEW_SECONDS:300}
artifact-link-ledger:
path: ${CLEARFOLIO_ARTIFACT_LINK_LEDGER_PATH:}
Expand Down
Loading