ci(#983): add pre-commit hook to verify URL #sha256= integrity pins - #985
ci(#983): add pre-commit hook to verify URL #sha256= integrity pins#985fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
Add hack/verify-sha256-pins, a field-agnostic script that scans harness/*.yaml and .fullsend/config.yaml for URL+#sha256=HASH integrity fragments, fetches each URL, computes the sha256 of the actual content, and fails if any pinned hash does not match. Container image digests (@sha256:) are correctly ignored. Placeholder/template hashes (e.g. <sha256sum>) are skipped. Wired as a local pre-commit hook (verify-sha256-pins) following the lint-agent-docs pattern, so the existing lint.yml workflow runs it automatically via pre-commit run --all-files. Test suite (hack/verify-sha256-pins-test.sh) covers: correct hash, wrong hash, local paths, image digests, field-agnostic multi-field scanning, .fullsend/config.yaml inclusion, fetch failure, placeholder skip, mismatch output details, mixed valid/invalid, and no-YAML-files edge case. Added to Makefile script-test target. Note: pre-commit could not run in sandbox (network-restricted). Hooks verified via direct execution: shellcheck passed, YAML valid, no trailing whitespace or missing EOF newlines. Closes #983
|
🤖 Finished Review · ✅ Success · Started 10:54 AM UTC · Completed 11:12 AM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $4.53 |
ReviewFindingsLow
|
Summary
hack/verify-sha256-pinsscript that scansharness/*.yamland.fullsend/config.yamlfor URL+#sha256=integrity fragments, fetches each URL, and verifies the pinned hash matches the actual content. Field-agnostic scanning covers all current and future YAML fields. Container image digests (@sha256:) and placeholder/template values are correctly skipped.verify-sha256-pins) in.pre-commit-config.yaml, following thelint-agent-docspattern so thelint.ymlworkflow runs it automatically.hack/verify-sha256-pins-test.sh) with 11 test cases and register it in theMakefilescript-testtarget.Testing
.fullsend/config.yamlinclusion, fetch failure, placeholder skip, mismatch output details, mixed valid/invalid, and no-YAML-files edge case.Closes #983
Post-script verification
agent/983-verify-sha256-pins)299f264ab55ffda8bd297642d787f751d6984789..HEAD)