fix(security): 선언한 CSP를 검사하고 hosting fixture가 선언을 복사하지 않는다 #31
Closed
donghyeon.kang
wants to merge 0 commits from
donghyeon.kang/fix/r9-security-config AGit into main
pull from: donghyeon.kang/fix/r9-security-config
merge into: :main
:main
:fix/r9-structure-locale
:fix/r9-adapter-carryover
:test/shared-build-lock-order
:ci/dependency-cache-same-filesystem
:ci/release-tag-for-a11y-review
:ci/merge-dependency-cache
:fix/test-timeouts-measured
:fix/feature-residue-word-boundary
:fix/provider-wait-stderr
:fix/provider-job-host-requirements
:fix/ungated-vitest-spec
:fix/a11y-evidence-routes
:fix/verify-parts-diagnostics
:claude/w2-fe-ci-perf-dce080
:fix/child-process-test-timeouts
:chore/layout-rules-r2-r5
:claude/fe-b-docs-korean-645f55
:chore/ci-merge-jobs
:chore/layout-3-merge
:claude/fe-c-harness-0ae061
:chore/layout-2-sample-removal
:chore/layout-1-cleanup
:docs/review-guide-pointer
:fix/maturity-review-2026-11-06
:fix/maturity-review-2026-11-05-b
:docs/improvement-manual
:fix/maturity-review-2026-11-05
:fix/session-subject-required
:fix/ui-design-audit-2026-11-01
:fix/maturity-review-2026-09-25
:lane/D
:lane/B
:fix/src-review-round3
:refactor/domain-scalable
:develop
:feature-frontend-optional-adapter-recipes
:feature-frontend-supply-chain-verification
:feature-frontend-test-registry-evidence-hardening
:frontend-test-registry-evidence-hardening
:feature-frontend-diagnostics-telemetry-runtime
:feature-frontend-i18n-message-formatting-contract
:feature-frontend-design-system-platform
:feature-frontend-form-page-platform
:feature-frontend-reference-feature-vertical-slice
:feature-frontend-routing-release-recovery-runtime
:feature-frontend-http-query-contract-execution
:feature-frontend-application-boundary-runtime
:feature-frontend-typescript-tooling-foundation
:feature-frontend-platform-capability-review
:feature-frontend-performance-route-contract
:feature-frontend-starter-experience-quality-contract
:feature-frontend-responsive-theme-contract
:feature-frontend-ui-primitives-gallery-contract
:feature-frontend-app-shell-navigation-contract
:feature-frontend-runtime-composition-contract
:feature-frontend-ci-quality-gates-contract
:feature-web-vitals-performance-budget-contract
:feature-frontend-release-cache-rollback-contract
:feature-accessibility-baseline-contract
:feature-frontend-project-bootstrap-toolchain-contract
:feature-frontend-operational-runbook-contract
:feature-frontend-contract-compatibility-governance
:feature-frontend-contract-registry-governance
:feature-frontend-browser-security-boundary-contract
:feature-frontend-build-bundle-supply-chain-contract
:feature-tailwind-design-token-styling-contract
:feature-sample-feature-slice-contract-fixture
:feature-frontend-render-recovery-boundary-contract
:feature-routing-navigation-guard-contract
:feature-boundary-mapper-viewmodel-contract
:feature-async-ui-state-contract
:feature-frontend-observability-logging-trace-contract
:feature-frontend-storage-registry-contract
:feature-server-state-caching-contract
:feature-frontend-auth-session-integration-contract
:feature-frontend-error-classification-boundary-contract
:feature-runtime-schema-validation-contract
:feature-api-client-response-envelope-contract
:feature-frontend-env-runtime-config-contract
:feature-frontend-architecture-enforcement-lint-contract
:feature-frontend-test-taxonomy-contract
:feature-frontend-clean-architecture-layering-contract
No Reviewers
Labels
No items
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Assignees
donghyeon.kang (동현 강)
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: donghyeon.kang/clean-architecture-frontend-template#31
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
무엇을, 왜
pnpm-workspace.yaml의minimumReleaseAgeExclude넷(@playwright/test, playwright, playwright-core 1.62.0, eslint 10.8.0)은 2026-07-25에 그 버전이 최소 공개 경과 기간보다 어릴 때 더했다. 주석이 적은 제거 조건(「설정한 최소 경과 기간보다 오래되면 지운다」)을 몇 달 전에 넘겼다. 남은 예외는 같은 버전의 다른 출처가 생겨도 지연 검사를 건너뛰게 한다(1112/07-02).config/hosting/security-headers.json의 CSP가 무엇을 허용하는지 보는 검사가 없다.script-src에'unsafe-inline'을 넣은 선언도 모든 게이트를 지난다. hosting fixture는 선언한 보안 header 일곱을 표면 넷에 그대로 복사해, CSP를 바꾸면 다섯 곳을 고쳐야 한다(0929/13-04).고른 방법과 버린 대안
scripts/lib/csp-policy.ts:cspPolicyProblems가 code 지시어(default-src,script-src*,style-src*,object-src)의'unsafe-inline'·'unsafe-eval'·*와, script 계열의 scheme 통째 허용(https:)을 거절한다.script-src와default-src가 둘 다 없는 정책도 거절한다.declaredCspProblems가 선언 문서를 읽고,check:browser-security(FE-GATE-013)가 그것을 부른다.check:security:fixtures(FE-GATE-029)가 거절 fixture(tests/fixtures/security/csp/, 대소문자를 바꾼'unsafe-inline'이 앞script-src에 있음)를 거절하고 선언을 받는지 본다. 새 검사에 거절 fixture를 함께 둔다는 규칙대로다.verify-hosting-headers의 fixture 모드는 보안 header가 필요한 표면에 선언을 답으로 채운다. fixture가 적은 값은 그대로 host의 답으로 비교한다.위험과 영향
connect-src의https:는 보지 않는다(스크립트 실행이 아니다).config/hosting/security-headers.json하나만 고친다. 자기 hosting fixture에 보안 header를 복사해 두었다면 지워도 된다(round9 마지막 CHANGELOG에 적는다).검증
desktop, CI env,
scripts/verify.sh(flock).tests/unit/csp-policy.test.ts모듈이 없어 실패. 로그/tmp/claude-gates/r9f13-red/. GREENcsp-policy·pnpm-install-policy10 passed.afcd2487의 시험만): 브라우저식 읽기 여섯,declaredCspProblems넷, 「선언만 바꾼 뒤 fixture 통과」가 실패(11건). 「fixture가 적은 header는 비교」는 대조군으로 통과. 로그/tmp/claude-gates/r9f13b-red/.csp-policy·hosting-probe·service-worker-build-output·cache-policy72 passed. 로그/tmp/claude-gates/r9f13b-green/.check:security:fixtures(FE-GATE-029의 명령): rc=0.73c84839= head 트리): FE-GATE-002·003·005 rc=0.parts FE-GATE-013은test:system만 rc=1(desktop 호스트의 user namespace 사전 점검, 결정 D8)이고 뒤 명령 넷(verify:reproducible-build,build:release-candidate,verify:local-evidence,check:browser-security)은 rc=0. FE-GATE-001(lockfile)은 첫 커밋 트리에서 rc=0.리뷰어가 볼 곳
scripts/lib/csp-policy.ts의directivesOf(앞 지시어만, 소문자).scripts/verify-hosting-headers.ts의 fixture 모드(선언을 답으로 채우는 곳).관련
docs/reviews/2026-11-round9-07-security.md07-02, 이월 0929/13-04(docs/reviews/2026-11-round9-11-prior-findings-b.md3.29절)(PR #23)pnpm-workspace.yaml의 minimumReleaseAgeExclude 넷(@playwright/test, playwright, playwright-core 1.62.0, eslint 10.8.0)은 2026-07-25에 그 버전이 최소 공개 경과 기간보다 어릴 때 더했다. 주석이 적은 제거 조건("설정한 최소 경과 기간보다 오래되면 지운다")을 몇 달 전에 넘겼다. 남은 예외는 같은 버전의 다른 출처가 생겨도 지연 검사를 건너뛰게 한다. 고른 방법: 넷과 그 주석을 지운다. 버전 고정(package.json exact pin)은 그대로다. 버린 대안: 주석만 고치기(예외가 할 일이 없다). 위험·한계: 이 버전들을 다시 받을 때 pnpm이 지연 검사를 한다. 이미 하루 넘게 지난 버전이라 설치는 바뀌지 않는다. 검증: FE-GATE-001(verify:lockfile)과 tests/unit/pnpm-install-policy.test.ts, desktop의 frozen-lockfile 오프라인 설치(PR 본문). RED 없음 — 설정 정리라 동작이 바뀌지 않는다. Refs: 1112/07-02#40으로 병합됐다(main
ee47480c). 이 PR의 heade941c3df가 #40 브랜치에 merge 커밋으로 들어 있고, #40의 runner merge job 셋이 그 합친 트리로 초록이었다. runner 대기를 줄이려고 이번만 쓴 방식이다(소유자 승인, 2026-11-13).Pull request closed