From 7885e9a7794ff291f072250426b69a13698ce2dd Mon Sep 17 00:00:00 2001 From: seonghobae <8172694+seonghobae@users.noreply.github.com> Date: Sat, 25 Jul 2026 13:40:29 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A1=EF=B8=8F=20Sentinel:=20[security?= =?UTF-8?q?=20improvement]=20CSP=20base-uri=20=EC=A0=9C=ED=95=9C=20?= =?UTF-8?q?=EA=B0=95=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .jules/sentinel.md | 4 ++++ CHANGELOG.md | 1 + index.html | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.jules/sentinel.md b/.jules/sentinel.md index 4f173bc..09a5d9d 100644 --- a/.jules/sentinel.md +++ b/.jules/sentinel.md @@ -38,3 +38,7 @@ **Vulnerability:** Missing input validation on `setLanguage()` could allow invalid strings (like Prototype Pollution payloads or arbitrary text) to be applied to the DOM (`lang` attribute) and stored in `localStorage`. **Learning:** The global `setLanguage` function assumed inputs would only come from predefined button clicks, skipping runtime validation. **Prevention:** Always sanitize and validate function arguments at the application boundary, even if the primary caller is trusted, to enforce defense in depth. +## 2024-07-25 - [Base URI Injection 방지] +**Vulnerability:** 명시적인 `` 태그가 불필요한 정적 사이트에서 CSP에 `base-uri 'self'`가 설정되어 있어, 악의적인 베이스 태그 인젝션 공격의 여지가 존재함. +**Learning:** `` 태그를 사용하지 않는 애플리케이션의 경우 `base-uri 'none'`을 명시함으로써 DOM-based XSS나 베이스 태그를 통한 경로 조작을 원천 차단할 수 있음. +**Prevention:** 정적 사이트의 CSP 구성 시, 불필요한 `base-uri` 허용을 피하고 기본적으로 'none'으로 강제할 것. diff --git a/CHANGELOG.md b/CHANGELOG.md index 56ad628..13dfc3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # CHANGELOG ## [Unreleased] +- **보안 개선**: 정적 사이트에서 불필요한 `` 태그 인젝션 공격을 방어하기 위해 CSP를 `base-uri 'none'`으로 변경했습니다. - **보안 개선**: 컴포넌트 갤러리의 인라인 스크립트와 스타일을 외부 파일로 분리하고, 엄격한 Content-Security-Policy를 적용해 XSS 방어를 강화했습니다. - **성능 회귀 복원**: 오프스크린 `.section` 렌더링을 `content-visibility: auto`로 지연하고, 일반 섹션은 600px·콘텐츠가 큰 DIKW/projects 섹션은 1000px의 `contain-intrinsic-size` placeholder를 유지해 초기 렌더링 비용과 스크롤바 이동을 함께 줄였습니다. - **보안 개선**: Trusted Types 기반 CSP 강화: 잠재적인 DOM 기반 XSS 공격을 방지하기 위해 `require-trusted-types-for 'script'` 지시어 추가 diff --git a/index.html b/index.html index c40fea3..25ee55a 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ - + 맥락지혜 연구실 | Contextual Wisdom Lab