fix(security): verify Semgrep rules across registry encodings #69
No reviewers
Labels
No labels
app-migration
bug
ci-cd
cluster
Documentation
duplicate
enhancement
gpu
invalid
networking
question
security
Storage
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Homelab/workflows!69
Loading…
Reference in a new issue
No description provided.
Delete branch "kiyi/canonical-semgrep-rules"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Failure and evidence
Renovate run 28 failed source security with zero blockers, zero mitigations and one Semgrep checksum error. Its image job was correctly skipped by the new source prerequisite. Tracks #4 and Homelab/renovate#6; does not close the broader security issue.
The reviewed v1.25.1 response was JSON (433,040 bytes, raw SHA256
5509b33e...). Three current urllib downloads returned YAML (473,625 bytes, raw SHA256b109a039...). Comparing every field of all 225 rules by ID finds no additions, removals or changes. JSON includesmissed: 0; YAML omits that zero envelope count. The changing serialization explains why changing only the raw checksum is unreliable. CI did not retain its raw response, so its exact encoding is not independently established.Change
canonical-rules-v1verification, paired with the updated library rule lock. Safely parse the pack and hash every complete rule object. Normalize mapping keys and inventory order only; preserve inner list order, patterns, severity, languages, paths, options, messages and metadata.missedcounts, unsupported modes and changed rule content. Emit expected/observed canonical digests on drift.Validation
54 local rule-integrity, security-policy, scanner-diagnostic and reporting tests pass; diff checks pass. Synthetic fixtures cover both encodings, reordered inventories, changed rule fields/counts, duplicate keys and incomplete/malformed packs. Source-scan integration mocks external execution and confirms changed rules never reach Semgrep and produce a failed report.
The new verifier accepts the retained reviewed JSON and all three current YAML responses as exactly 225 rules with canonical SHA256
5bc39e23a7580c9ba5c09b08f5a2b310f4648e5b41636ec49c3c08af7871aa73. Real hosted Library checks, source scans and secret-rejection fixtures remain required; no local container/scanner run or live deployment is claimed.Release and Renovate adoption
Commit:
818cbdafa0eb9153f09743f0b617c1c217b5ddcb. See docs/security.md for the dated evidence and exact hashing contract.