chore: sync the frontend template from ebea300 to af3d8e6
Carries 359 template commits, tag v0.2.0 plus one documentation commit: the generator-built feature index with its app, bounded-context and feature declarations, the src/platform kernel and scale tooling, the 2026-09-24 src review fixes, and the 2026-09-25 maturity review round with its CHANGELOG [보안]/[계약] rows. 691 of the 824 template paths are applied, 85 of them merged with product changes; 127 are not carried. Product identity is unchanged: name, version 0.1.0, routes, design and the TechLog domain. Three decisions worth naming. TechLog stays composed directly, as the last two syncs recorded; its directory carries a NOT_INSTALLED marker that says so, and every installed-* composer takes the template's projection with TechLog added on top. The reference sample is no longer installed: the template now installs a feature only through feature-module.ts and context-routes.ts, which load the screens this product deleted, so its three operations, six schemas and one topic leave the registries, recorded as registry change evidence. And AppRouter mounts the platform and TechLog routes only; the template's bounded-context route gateway waits for a generator-installed feature. Required fixes: readSubject on the BFF session owner (without it every HTTP Studio session would close as integration-failed), zod through the facade in nine TechLog files, noUnusedLocals, and public/config.json written out to match the local profile. Derived baselines were recomputed after reproducing both sides' values: CI contract 101 commands / 106 references / 141 artifacts, gate shape c9adcf85; registry approval 2dc6c3a3; the runtime config schema baseline equals the schema at8210d48. Verified here: types, lint, architecture, adapter inventory, CI contract, i18n, design system, diagnostics, browser security, dev release manifest, TechLog contract and build pass; 220 component, 155 integration, 15 contract, 418 TechLog, 43 reference-feature, 18 recipe and 46 release-coherence tests pass, and 2381 of 2383 unit tests. Reproduced at8210d48first and unchanged: check:registries (byte-identical), test:runtime-schema, verify:documentation. Brought by the template and escalated rather than suppressed: check:request-fanout on TechLog's cursor pagination, check:remediation-ledger (fails upstream too), the shared-chunk hash test, and the registry-dependent sample removal and second-feature tests. Playwright suites were not run. Full record, the five open questions and the follow-ups in docs/operations/template-sync-2026-09-29.md. (cherry picked from commit b2170cf265dea45dc9cc05d3c61e627e97f31cdb)
This commit is contained in:
@@ -7,7 +7,22 @@ maps are prohibited defaults.
|
||||
`config/hosting/security-headers.json` is the declared header set. Hosting
|
||||
verification compares that declaration with live responses. CSP deliberately
|
||||
omits `unsafe-inline` and `unsafe-eval`; production code and built assets must
|
||||
remain compatible with that baseline.
|
||||
remain compatible with that baseline. `tests/e2e/production-csp.spec.ts` (part of
|
||||
`test:e2e`, FE-GATE-008) serves the build with these headers and fails on a
|
||||
`securitypolicyviolation` event or console error (review 13-08). zod probes
|
||||
`Function("")` on its first object schema, which the policy would report on
|
||||
every boot. `src/contracts/zod.ts` sets `jitless` to skip that probe, and every
|
||||
module that builds a schema imports `z` from there, so the setting is applied
|
||||
before the first schema whatever order the bundler evaluates chunks in.
|
||||
`z.config` in the entry module would be too late. Import `z` from
|
||||
`src/contracts/zod.ts`, not from `zod`, in new schema code. Features that are off by
|
||||
default need CSP additions when a project selects them; see step 9 in
|
||||
[optional adapter recipes](../architecture/optional-adapter-recipes.md).
|
||||
`connect-src 'self' https:` lets script reach any HTTPS origin. Narrowing it to
|
||||
the runtime config's `API_BASE_URL` and `TELEMETRY_ENDPOINT` origins needs a
|
||||
header generated per environment at deploy time, because those values are set
|
||||
per deployment (`scripts/generate-runtime-config.ts`). That generator does not
|
||||
exist yet; a project that deploys should add it with its provider adapter.
|
||||
|
||||
Route guards are UX hints and client validation does not replace backend
|
||||
authorization or validation.
|
||||
|
||||
@@ -39,6 +39,75 @@ Changing it requires `DEPENDENCY_BASELINE_OWNER` and
|
||||
`DEPENDENCY_BASELINE_REASON`; editing the digest or hardcoding an empty diff is
|
||||
rejected.
|
||||
|
||||
## 무엇을 증명하고 무엇을 증명하지 않는가
|
||||
|
||||
리뷰 13-12. 산출물마다 증명 범위가 다르다. 아래 "증명하지 못하는 것"을 증명된
|
||||
것으로 읽지 않는다.
|
||||
|
||||
| 산출물 | 증명하는 것 | 증명하지 못하는 것 |
|
||||
|---|---|---|
|
||||
| SBOM(`artifacts/release/sbom.cdx.json`) | lockfile에 고정된 설치 그래프(`pnpm list --depth Infinity`, `scripts/generate-supply-chain.ts`)와 각 패키지의 sha512 integrity, license | 배포물에 실제로 들어간 부분 집합, 취약점 없음 |
|
||||
| 번들 패키지 목록(`artifacts/quality/vite-module-inventory.json`의 `packages`) | 배포 번들에 모듈이 하나 이상 들어간 패키지의 `name@version`. Vite가 번들에 넣은 모듈에서 바로 만든다(`scripts/lib/vite-module-inventory.ts`) | 패키지 안의 어떤 코드가 실행되는지, 취약점 없음 |
|
||||
| local provenance(`artifacts/release/provenance.json`) | dist digest, lockfile, source set, SBOM digest가 서로 맞음 | 빌드 과정이 변조되지 않았음, 빌드한 주체. 서명이 없는 자기 보고다(`builder.id`가 `local:`, `invocationId`가 `LOCAL_UNSIGNED`). `predicateType`이 SLSA provenance v1이어도 SLSA 수준을 뜻하지 않는다 |
|
||||
| 외부 provenance 서명 | 지정 키 보유자가 이 run, source revision, 후보 digest를 보고 서명함 | 빌드 job 자체의 격리, provider가 성실히 검사했음 |
|
||||
| 외부 vulnerability 서명 | provider가 이 lockfile·dist에 대해 결과를 주장함 | 오프라인 DB의 최신성, 누락 없음 |
|
||||
|
||||
번들 패키지 목록은 SBOM의 production 항목에 모두 들어 있어야 한다. 2026-09-25
|
||||
기준으로 한 건이 어긋난다. `scheduler@0.27.0`은 `react-dom`의 의존성이라 번들에
|
||||
들어가지만, SBOM과 `config/security/dependency-baseline.json`은 이것을
|
||||
`development`로 분류한다. `pnpm list` JSON이 production 트리 아래에서 이 패키지를
|
||||
다시 보여 주지 않고, 그래서 `scripts/lib/supply-chain.ts`의 순회가 development
|
||||
경로에서만 이것을 만난다. 분류를 고치면 dependency baseline을 다시 승인해야 하므로
|
||||
(`update:dependency-baseline`) 이 문서에 알려진 차이로 남긴다.
|
||||
|
||||
## 최소 구성과 전체 구성
|
||||
|
||||
리뷰 13-13. 승격 단계까지 쓰려면 이 문서 아래의 runner 조건(bwrap, prlimit,
|
||||
systemd-run, systemd user manager 254 이상, cgroup v2 위임)과 오프라인 데이터로
|
||||
Ed25519 서명 보고서를 내는 provider 두 개가 필요하다. 이 repo는 그 환경에서
|
||||
workflow 전체를 한 번도 돌리지 않았다. 그래서 두 구성을 나눠 적는다.
|
||||
|
||||
| 구성 | 켜는 것 | 보장하는 것 | 보장하지 않는 것 |
|
||||
|---|---|---|---|
|
||||
| 최소 구성(provider 없음) | merge·release stage 게이트, `immutable_build`(FE-GATE-015·027). provider 변수는 비워 둔다 | lockfile 무결성과 설치 스크립트 차단, SBOM과 local provenance의 digest 정합, secret scan, 재현 빌드, 후보 archive의 exact member와 digest, release 대상 환경 승인(FE-GATE-027) | 외부 취약점 검사, 서명된 provenance. provider job은 명령과 키가 없어 실패하고, `promotion` job은 두 provider job의 성공을 요구하므로 돌지 않는다. 승격은 사람이 결정한다 |
|
||||
| 전체 구성 | 위 전부와 `vulnerability_provider`·`provenance_provider`·`promotion` job, 아래 runner 조건과 provider 키 | 위 전부와, 지정 키 보유자가 이 후보 digest·run·source에 서명했다는 것, 승격된 exact-five bundle(`verify:promotion`) | provider가 성실히 검사했는지, 빌드 job 격리(위 "무엇을 증명하고" 표 참고) |
|
||||
|
||||
최소 구성으로 운영할 때 승격은 수동 승인이다. 승인자는 `immutable_build`가
|
||||
올린 후보 archive의 SHA-256(job output `archive_sha256`)과 local evidence를
|
||||
기록하고, 그 archive를 그대로 배포한다. 다시 빌드하지 않는다. `production_gate`는
|
||||
`promotion` 뒤에만 돌므로 이 구성의 workflow에서는 실행되지 않는다. 운영
|
||||
게이트(FE-GATE-019, 021~025)는 배포한 release를 대상으로
|
||||
`corepack pnpm ci:gate -- FE-GATE-0xx`로 따로 돌려 기록한다.
|
||||
|
||||
### provider 신뢰 키 교체와 폐기
|
||||
|
||||
신뢰 키는 repo 변수 `VULNERABILITY_PUBLIC_KEY_PATH`·`VULNERABILITY_KEY_ID`,
|
||||
`PROVENANCE_PUBLIC_KEY_PATH`·`PROVENANCE_KEY_ID`가 가리키는 공개 키 파일이다
|
||||
(`scripts/lib/provider-trust.ts`). 두 provider는 서로 다른 키를 써야 한다
|
||||
(`assertDistinctProviderTrust`). 승격 기록은 키 ID·지문과 trust policy
|
||||
SHA-256을 남긴다.
|
||||
|
||||
교체 순서:
|
||||
|
||||
1. provider가 새 키 쌍을 만들고 공개 키만 넘긴다.
|
||||
2. 새 공개 키 파일을 runner가 읽을 수 있는 경로에 두고, 두 변수를 새 경로와 새
|
||||
key ID로 한꺼번에 바꾼다. 키 ID는 새 값을 쓴다. 이전 ID를 재사용하면 기록만
|
||||
보고 어느 키였는지 구분할 수 없다.
|
||||
3. provider 쪽 서명 키를 새 키로 바꾼 뒤 release를 한 번 돌려 `promotion`이
|
||||
통과하는지 확인한다.
|
||||
4. 이전 공개 키 파일은 지우지 않고 보관한다. 이전 키로 승격된 release를 나중에
|
||||
배포하거나 그 release로 롤백할 때 `verify:promotion -- --archived`가 그 키를
|
||||
요구한다(`docs/operations/release-cache-rollback.md`).
|
||||
|
||||
폐기 순서(키 유출 등):
|
||||
|
||||
1. 해당 변수에서 그 키를 즉시 뺀다. 그 키로 서명된 새 승격은 이때부터 실패한다.
|
||||
2. 보관 중인 이전 공개 키 파일도 지운다. 그 키로만 서명된 과거 release는
|
||||
`verify:promotion -- --archived`를 통과하지 못한다.
|
||||
3. 그런 release를 다시 써야 하면 새 키로 provider 검증을 다시 받는다. 같은 후보
|
||||
archive를 대상으로 한 새 provider 실행이 필요하고, 다시 빌드하지 않는다. 이
|
||||
repo에는 이 재검증 전용 job이 없다. 필요한 프로젝트가 만든다.
|
||||
|
||||
## External promotion controls
|
||||
|
||||
Promotion reads the provider files named by `VULNERABILITY_REPORT_PATH` and
|
||||
|
||||
Reference in New Issue
Block a user