Skip to content
Closed
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 @@ -16,3 +16,8 @@
**Vulnerability:** A custom buffer length check (`if (signatureBytes.length !== expectedSignatureBytes.length) return false`) before calling `crypto.timingSafeEqual()` leaked the length of the expected signature, enabling timing attacks.
**Learning:** Never use custom 'homebrew' buffer-padding logic to match lengths for `crypto.timingSafeEqual()`, as early returns leak the length of the secret.
**Prevention:** Ensure inputs are hashed to a uniform length (e.g., using `crypto.createHash('sha256')`) before comparison.

## 2025-02-15 - [ERD 도ꡬ DDL 생성 μ‹œ SQL μΈμ μ…˜ λ°©μ§€]
**Vulnerability:** ERD λ„κ΅¬μ˜ μ½”μ–΄ λͺ¨λΈ(`packages/web/src/lib/erd.ts`)μ—μ„œ μ»¬λŸΌμ„ μΆ”κ°€ν•  λ•Œ, `column.type`에 μ„Έλ―Έμ½œλ‘ (`;`) λ“±μ˜ λ¬Έμž₯ μ’…κ²°μžκ°€ ν¬ν•¨λ˜μ–΄ μžˆμ„ 경우 이λ₯Ό ν•„ν„°λ§ν•˜μ§€ μ•Šκ³  κ·ΈλŒ€λ‘œ DDL 생성 μ‹œ μ‚¬μš©ν–ˆμŠ΅λ‹ˆλ‹€. 이λ₯Ό 톡해 μ•…μ˜μ μΈ μ‚¬μš©μžκ°€ μž„μ˜μ˜ SQL 쿼리(예: `DROP TABLE`)λ₯Ό μ£Όμž…(SQL μΈμ μ…˜)ν•  μœ„ν—˜μ΄ μžˆμ—ˆμŠ΅λ‹ˆλ‹€.
**Learning:** 데이터 λͺ¨λΈλ§ λ„κ΅¬μ—μ„œ DDL(Data Definition Language)을 λ™μ μœΌλ‘œ 생성할 λ•Œ, μ‹λ³„μž(ν…Œμ΄λΈ”, 컬럼λͺ… λ“±) 외에도 데이터 νƒ€μž…κ³Ό 같은 뢀뢄에 μ‚¬μš©μž μž…λ ₯이 κ·ΈλŒ€λ‘œ μ‚½μž…λœλ‹€λ©΄ SQL μΈμ μ…˜μ΄ λ°œμƒν•  수 μžˆμŠ΅λ‹ˆλ‹€.
**Prevention:** `assertNoStatementTerminator`와 같은 λ³„λ„μ˜ 검증 ν•¨μˆ˜λ₯Ό λ„μž…ν•˜μ—¬ DDL λ¬Έμžμ—΄ 생성에 μ‚¬μš©λ˜λŠ” λͺ¨λ“  μ‚¬μš©μž μž…λ ₯(특히 νƒ€μž…κ³Ό 같이 μœ μ—°ν•œ μž…λ ₯이 ν—ˆμš©λ˜λŠ” ν•„λ“œ)μ—μ„œ μ„Έλ―Έμ½œλ‘ κ³Ό 같은 λ¬Έμž₯ μ’…κ²°μžλ₯Ό μ—„κ²©νžˆ 차단해야 ν•©λ‹ˆλ‹€.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

### πŸ›‘οΈ λ³΄μ•ˆ (Security)

- ERD λ„κ΅¬μ˜ DDL 생성 κΈ°λŠ₯μ—μ„œ 데이터 νƒ€μž… ν•„λ“œ(`column.type`)에 λ¬Έμž₯ μ’…κ²°μž(μ„Έλ―Έμ½œλ‘  λ“±)λ₯Ό μ£Όμž…ν•  수 없도둝 검증 둜직(`assertNoStatementTerminator`)을 μΆ”κ°€ν•˜μ—¬ SQL μΈμ μ…˜ 취약점을 μˆ˜μ •ν–ˆμŠ΅λ‹ˆλ‹€.

### ✨ μΆ”κ°€ κΈ°λŠ₯ (Feature)

- ERD (Entity-Relationship Diagram) μ—”μ§„μ˜ μ½”μ–΄ λͺ¨λΈ 클래슀(`ERDModel`)λ₯Ό μ‹ κ·œ κ΅¬ν˜„ν–ˆμŠ΅λ‹ˆλ‹€.
Expand Down
Loading
Loading