Skip to content

Commit 10d38bf

Browse files
AlexU-Aclaude
andcommitted
docs: add supply chain visual explainer and update README
- Replace placeholder docs/index.html with interactive architecture diagram (blueprint aesthetic, responsive nav, covers critic system + all 6 hardening layers + refresh/verify workflows) - Update README with supply chain security section, full command reference, js-critic-router agent, and shared-js-core skill in install instructions - Remove stale TODO section from CLAUDE.md, add visual explainer link - Link to GitHub Pages: https://zivtech.github.io/react-critic/ Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent eba26fe commit 10d38bf

3 files changed

Lines changed: 997 additions & 29 deletions

File tree

CLAUDE.md

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ python3 scripts/aggregate_stability.py
3434

3535
## Supply Chain Security
3636

37+
[Visual explainer](https://zivtech.github.io/react-critic/) — interactive architecture diagram hosted on GitHub Pages.
38+
3739
External skills are loaded by reference (pinned commit SHA + content SHA-256 hash).
3840

3941
- `content_sha256` in manifests stores the SHA-256 of each skill's SKILL.md at the pinned commit.
@@ -57,19 +59,3 @@ but should be verified before adding a new owner to `TRUSTED_OWNERS`.
5759
- Results: `research/benchmarks/results/`
5860
- Scoring: rubric-coverage evaluation (prompt checklist vs annotated fixture issues)
5961
- Seeds: 3 jackknife windows per critic; aggregate stability in `stability-report.md`
60-
61-
## TODO: Supply Chain Security for External Skills
62-
63-
The external skills manifests (`external-skills-manifest.yaml`) pin upstream skills by commit SHA, but the current tooling has supply chain gaps that need to be addressed:
64-
65-
1. **No diff review on refresh**`refresh_external_skills.py` updates pins to HEAD silently. No changelog or diff of what changed in upstream SKILL.md files between the old and new pin.
66-
2. **No content scanning** — nothing checks incoming skill content for suspicious patterns (prompt injection markers, instruction overrides, encoded payloads). These skills are prompt text injected into Claude's context.
67-
3. **No signature/author verification** — anyone with push access to an upstream repo can change what gets loaded.
68-
4. **No approval gate** — refresh runs and updates pins automatically with no PR/review step.
69-
70-
Minimum next steps:
71-
- Add diff output to `refresh_external_skills.py` so changes are visible before committing new pins.
72-
- Add basic content scanning rules (flag suspicious patterns like "ignore previous instructions", base64 blocks, etc.).
73-
- Consider requiring a PR for pin updates rather than committing directly.
74-
75-
See also: drupal-critic has the same gaps and the same TODO.

README.md

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,22 @@
22

33
A multi-critic review suite for React, Next.js, and React Native/Expo work, built in the same orchestration style as drupal-critic.
44

5+
[**Architecture Visual Explainer**](https://zivtech.github.io/react-critic/) &mdash; interactive diagram of the critic system and supply chain security model.
6+
57
## Included Critics
68

7-
- `react-critic`: React component and architecture review
8-
- `next-critic`: Next.js App Router and cache/runtime review
9-
- `react-native-critic`: React Native + Expo review
10-
- `proposal-critic`: Plan-first review for proposals, ADRs, RFCs, and migration specs across the React ecosystem
9+
- `react-critic`: React component and architecture review (9 external skills)
10+
- `next-critic`: Next.js App Router and cache/runtime review (11 external skills)
11+
- `react-native-critic`: React Native + Expo review (18 external skills)
12+
- `proposal-critic`: Plan-first review for proposals, ADRs, RFCs, and migration specs (5 external skills)
1113

1214
All four critics:
1315
- enforce harsh-critic style structured output
1416
- require evidence for CRITICAL/MAJOR findings
1517
- load a maximum of 3 external specialist skills per run
18+
- apply a Security Exploitability Gate to all security findings
19+
20+
A router agent (`js-critic-router`) dispatches to the correct critic based on framework signals.
1621

1722
## Install
1823

@@ -22,17 +27,37 @@ cp -r react-critic/.claude/skills/react-critic ~/.claude/skills/
2227
cp -r react-critic/.claude/skills/next-critic ~/.claude/skills/
2328
cp -r react-critic/.claude/skills/react-native-critic ~/.claude/skills/
2429
cp -r react-critic/.claude/skills/proposal-critic ~/.claude/skills/
30+
cp -r react-critic/.claude/skills/shared-js-core ~/.claude/skills/
31+
cp react-critic/.claude/agents/js-critic-router.md ~/.claude/agents/
2532
cp react-critic/.claude/agents/react-critic.md ~/.claude/agents/
2633
cp react-critic/.claude/agents/next-critic.md ~/.claude/agents/
2734
cp react-critic/.claude/agents/react-native-critic.md ~/.claude/agents/
2835
cp react-critic/.claude/agents/proposal-critic.md ~/.claude/agents/
2936
```
3037

31-
## Validation
38+
## Supply Chain Security
39+
40+
External skills are prompt text loaded from third-party GitHub repos into Claude's context. A compromised upstream repo means arbitrary prompt injection. This repo hardens against that:
41+
42+
- **Org allowlist**: `TRUSTED_OWNERS` (15 orgs) in `scripts/skill_security.py` — unknown owners are rejected
43+
- **Pinned commits + content hashes**: each skill pinned to a commit SHA with SHA-256 of the SKILL.md content
44+
- **Injection scanning**: 10 prompt injection patterns checked on every refresh
45+
- **Scan gate**: manifest updates blocked if scan warnings found (`--force` to override after review)
46+
- **Approval gate**: `refresh_external_skills.py` is dry-run by default — shows diffs, requires `--approve`
47+
- **Compare URLs**: refresh report includes clickable GitHub diff links for every pin change
48+
49+
See the [visual explainer](https://zivtech.github.io/react-critic/) for the full architecture diagram.
50+
51+
## Commands
3252

3353
```bash
34-
python3 scripts/refresh_external_skills.py --check
35-
python3 scripts/verify_no_copied_skills.py
54+
python3 scripts/refresh_external_skills.py # dry-run: show diffs
55+
python3 scripts/refresh_external_skills.py --approve # apply pin + hash updates
56+
python3 scripts/refresh_external_skills.py --check # CI: fail if updates needed
57+
python3 scripts/verify_no_copied_skills.py # validate manifest structure
58+
python3 scripts/verify_no_copied_skills.py --verify-content # fetch + hash verification
59+
python3 scripts/run_benchmark.py --all
60+
python3 scripts/aggregate_stability.py
3661
```
3762

3863
## License

0 commit comments

Comments
 (0)