ci(security): release 단계가 의존성 advisory를 템플릿 정책으로 판정해 남긴다
문제: 의존성 취약점 판정은 운영 승격의 외부 provider에만 있었다. 로컬 supply chain은 스캔하지 않고 provider: UNCONFIGURED를 썼다. 그래서 lockfile이 템플릿 자신의 정책(high 이상 차단, 예외 0건)을 어겨도 merge· release 단계에서는 아무 신호가 없었고, provider가 없는 복사본은 끝까지 몰랐다. 갱신 자동화도 없었다(짝 백엔드에는 renovate.json이 있다). 고른 방법: - scan:dependency-advisories(scripts/scan-dependency-advisories.ts)가 pnpm audit --json에 config/security/vulnerability-policy.json과 예외 파일을 적용한다. 판정은 승격이 쓰는 validateVulnerabilityReport를 그대로 쓴다. 결과는 PASS / POLICY_VIOLATION(승격에서 막힐 항목 목록) / UNVERIFIED(레지스트리에 닿지 못함)이고, 운영·개발 의존성별 개수와 함께 gate 로그와 artifacts/security/dependency-advisories.json에 남는다. - FE-GATE-027(release-admission, release 단계, 후보 빌드 직후)이 이 명령을 두 번째로 돈다. 명령은 항상 exit 0이다. - renovate.json을 둔다(보안 업데이트만, 사람이 리뷰·merge). - 남은 운영 의존성 위반 2건과 올리지 않은 이유, 다시 볼 날짜 (2026-12-04)를 ci-quality-gates.md에 적는다. 버린 대안: merge 차단 audit(코드가 안 바뀌어도 advisory DB 변경으로 merge가 깨진다), 로컬 스캐너를 provider로 내장(서명 주체 분리라는 원래 목적이 사라진다), 새 evidence 산출물·스키마 등록(계약 변경이 커진다. gate 로그가 이미 release 단계 산출물이다). 위험·한계: 비차단이라 신호를 읽는 사람이 있어야 한다. 네트워크가 없는 runner에서는 UNVERIFIED로 남는다. Renovate runner는 붙어 있지 않아 renovate.json은 아직 동작하지 않는다. 남은 zod·react-router high 2건은 dependency-change-evidence의 reviewer(owner와 다른 사람)와 zod의 번들 예산 결정이 있어야 고칠 수 있다. 계약 기준선(contract-baseline.json)을 명령 100개·참조 104개로 다시 기록했다. 검증: dependency-advisories.test.ts 5건(정책 위반 판정, PASS, 유효한 예외, 보고서 없음 → UNVERIFIED, FE-GATE-027 배선과 exit 0). 상태 판정을 PASS로 고정하는 변이를 넣으면 실패한다. 실제 실행: POLICY_VIOLATION (운영 high 2, 개발 moderate 2), exit 0. 죽은 프록시로 돌리면 UNVERIFIED, exit 0. check:ci PASS, CI workflow bytes PASS, ci-workflow-generation· product-ci-overlay·ungated-scripts·removal-fixture·supply-chain 489건 통과, verify:documentation PASS_SCOPED. Refs: docs/reviews/2026-11-03-maturity-review/13-build-release-supply-chain.md 13-03
This commit is contained in:
@@ -476,6 +476,18 @@ Repository variables required by higher tiers:
|
||||
job runs FE-GATE-015 and then FE-GATE-027, and FE-GATE-027 refuses the
|
||||
candidate when `APP_PROFILE` is set and differs from `RELEASE_TARGET`. Both are
|
||||
repository-wide variables, so set them together for each release.
|
||||
FE-GATE-027 then runs `scan:dependency-advisories` (1103/13-03). It applies
|
||||
`config/security/vulnerability-policy.json` and its exceptions to the
|
||||
registry's advisory report for the lockfile (pnpm's audit command with
|
||||
`--json`) and writes the result to the gate log
|
||||
and `artifacts/security/dependency-advisories.json`: `PASS`,
|
||||
`POLICY_VIOLATION` (what the production promotion would refuse, with the
|
||||
findings) or `UNVERIFIED` (no registry). It never fails the gate, because an
|
||||
advisory database that changes under unchanged code would break releases;
|
||||
the signed verdict of the vulnerability provider still decides promotion.
|
||||
`renovate.json` opens security update PRs once a Renovate runner is attached;
|
||||
a dependency update re-approves the dependency baseline in the same change
|
||||
(`update:dependency-baseline`).
|
||||
- `FIELD_WEB_VITALS_INPUT` for the privacy-approved field sample document
|
||||
- `MIN_ELIGIBLE_SAMPLES` after the baseline decision
|
||||
- `VULNERABILITY_PROVIDER_COMMAND` and `PROVENANCE_PROVIDER_COMMAND` for the
|
||||
@@ -484,6 +496,17 @@ Repository variables required by higher tiers:
|
||||
`PROVENANCE_PUBLIC_KEY_PATH`, and `PROVENANCE_KEY_ID` for separately managed
|
||||
trusted Ed25519 verification material
|
||||
|
||||
Advisories at or above the policy's `high` that `scan:dependency-advisories`
|
||||
reports for this lockfile, checked 2026-11-04 (review 1103/13-03). Check again
|
||||
by 2026-12-04 or when the update below is made. The development-only ones
|
||||
(storybook, vite, vitest, undici, brace-expansion, nanoid, source-map-js) were
|
||||
updated within their declared ranges and are gone.
|
||||
|
||||
| Advisory | Package | Fixed in | Why it is not updated yet |
|
||||
|---|---|---|---|
|
||||
| GHSA-mrhx-c7xc-m3w5 (high) | `zod` 4.4.3 (production) | 4.6.6 | A direct production upgrade needs a `config/security/dependency-change-evidence.json` entry whose reviewer is not its owner. 4.6.7 also adds about 7 KB gzip of initial JavaScript, over the bundle budget, so the update needs a budget decision as well. The app reads HTTP bodies with a byte limit, which narrows the large-collection input the advisory needs (review estimate) |
|
||||
| GHSA-qwww-vcr4-c8h2 (high) | `react-router` 7.18.1, through `react-router-dom` (production) | 7.18.2 | Same evidence rule. The advisory concerns RSC mode, which this browser-router SPA does not use (review estimate, not verified). 7.18.5 adds about 470 B of initial JavaScript |
|
||||
|
||||
두 provider role은 서로 다른 key ID뿐 아니라 canonical DER-SPKI public-key bytes도
|
||||
사용해야 한다. 동일 key를 서로 다른 ID로 재등록한 구성도 finalizer가 거절한다.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user