Context
PR #240 introduced optional SHA-256 checksum verification for pack content. Currently, checksums are verified when present but missing checksums only produce a warning (backward compatibility during rollout). This leaves a downgrade attack vector (SEC-1): a compromised registry could strip or replace checksums to bypass verification entirely.
Proposal
Once all registry packs have checksums (after PackWeave/registry#4 merges):
- Bump
CURRENT_REGISTRY_SCHEMA_VERSION to 2
- Make
checksum: None a hard error on install/update — packs without checksums are rejected
- Make unknown algorithm prefixes (non-
sha256:) a hard error with a clear "please upgrade weave" message
- Update the
verify() function in src/core/checksum.rs to enforce these rules when registry schema >= 2
Why not now?
The registry is being migrated — old packs don't have checksums yet. Making them mandatory before migration completes would break all installs. This must wait until all published pack versions carry checksums.
Acceptance criteria
Context
PR #240 introduced optional SHA-256 checksum verification for pack content. Currently, checksums are verified when present but missing checksums only produce a warning (backward compatibility during rollout). This leaves a downgrade attack vector (SEC-1): a compromised registry could strip or replace checksums to bypass verification entirely.
Proposal
Once all registry packs have checksums (after PackWeave/registry#4 merges):
CURRENT_REGISTRY_SCHEMA_VERSIONto 2checksum: Nonea hard error on install/update — packs without checksums are rejectedsha256:) a hard error with a clear "please upgrade weave" messageverify()function insrc/core/checksum.rsto enforce these rules when registry schema >= 2Why not now?
The registry is being migrated — old packs don't have checksums yet. Making them mandatory before migration completes would break all installs. This must wait until all published pack versions carry checksums.
Acceptance criteria
checksum::verify()returnsErr(notOkwith warning) forNonechecksums when registry schema >= 2Errwith upgrade hintCURRENT_REGISTRY_SCHEMA_VERSIONbumped to 2