Skip to content

Commit 8f1bb4d

Browse files
wanshuiyinclaude
andcommitted
feat(ci): seal the gate against HTML-output tampering (B5)
Adds verify_reviews.py --reproduce: re-renders each managed HTML from its source MD (committed render-manifest flags) and diffs modulo the generation timestamp, catching a hand-edited HTML body whose source/meta were left untouched — the one real hole the B4 Codex review flagged. CI now runs --mode strict --reproduce. Hardened per a fresh Codex adversarial review of this seal (thread 019e7d44): fail-CLOSED (a managed product absent from the manifest is HTML_TAMPERED, not skipped; a missing/unparseable manifest is fatal exit 2); _normalize() strips the timestamp only in its 3 template-generated spots (not globally) so a body timestamp can't hide a tamper; subprocess pinned to cwd=repo-root; CI paths now include render_html.py / templates/ / manifest, and the code declares renderer+template+manifest a trusted TCB needing human review. docs/index.html re-rendered onto the current template (it had been left on the 2026-05-20 template) and added to the render manifest. Verified: 47 artifacts reproduce byte-identically modulo timestamp; body tamper caught; deleting a manifest entry fails closed; missing manifest aborts. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 84fea14 commit 8f1bb4d

4 files changed

Lines changed: 644 additions & 17 deletions

File tree

.github/workflows/review-audit.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,18 @@ on:
1111
paths:
1212
- 'docs/**'
1313
- 'tools/verify_reviews.py'
14+
- 'tools/render_html.py'
15+
- 'tools/templates/**'
16+
- 'tools/tutorials_render_manifest.json'
1417
- '.github/workflows/review-audit.yml'
1518
push:
1619
branches: [main]
1720
paths:
1821
- 'docs/**'
1922
- 'tools/verify_reviews.py'
23+
- 'tools/render_html.py'
24+
- 'tools/templates/**'
25+
- 'tools/tutorials_render_manifest.json'
2026
- '.github/workflows/review-audit.yml'
2127
workflow_dispatch:
2228

@@ -35,5 +41,5 @@ jobs:
3541
- uses: actions/setup-python@v5
3642
with:
3743
python-version: '3.12'
38-
- name: Verify the review audit chain (strict)
39-
run: python3 tools/verify_reviews.py --mode strict
44+
- name: Verify the review audit chain (strict + reproduce)
45+
run: python3 tools/verify_reviews.py --mode strict --reproduce

0 commit comments

Comments
 (0)