Commands
scalp verify & checksum
Generate SHA-512 checksums for release artifacts and verify them against a checksums file. Dogfooding built in.
SCAL-P spends all day verifying npm packages. But what about SCAL-P itself? Binary verify closes the loop: the same hashing and policy engine that protects your dependencies also protects your SCAL-P binary.
Two commands form a release verification chain:
scalp checksum— generate SHA-512 checksums for filesscalp verify— verify a file against a checksums file
scalp checksum
Generate checksums for release artifacts:
scalp checksum scalp_linux_amd64.tar.gz scalp_darwin_amd64.tar.gz > checksums.txtOutput:
sha512-a1b2c3d4e5f6... scalp_linux_amd64.tar.gz
sha512-7f8e9d0c1b2a... scalp_darwin_amd64.tar.gzFlags
| Flag | Default | Description |
|---|---|---|
--output | stdout | Write checksums to file instead of stdout |
Write to file:
scalp checksum --output checksums.txt *.tar.gzscalp checksum is a pure hash tool. No policy, no audit, no enforcement.
scalp verify
Verify a downloaded artifact against a checksums file:
scalp verify \
--artifact scalp_linux_amd64.tar.gz \
--checksum checksums.txtOn match:
binary verifiedOn mismatch:
hash_mismatch: expected sha512-a1b2c3d4e5f6..., got sha512-7f8e9d0c1b2a...Flags
| Flag | Default | Description |
|---|---|---|
--artifact | required | Path to the downloaded release artifact |
--checksum | required | Path to the checksums file |
--policy | .scalp/policy.json | Policy controlling enforcement |
--ci | false | Override enforcement to block |
Enforcement
| Enforcement | Hash match | Hash mismatch |
|---|---|---|
warn (default) | exit 0 | logged, exit 0 |
block | exit 0 | exit 1 |
log | exit 0 | silent, exit 0 |
With --ci, enforcement is forced to block.
Verify with CI enforcement
scalp verify \
--artifact scalp_linux_amd64.tar.gz \
--checksum checksums.txt \
--ciOn mismatch, exit code 1:
hash_mismatch: expected sha512-a1b2..., got sha512-7f8e...Audit events
Every scalp verify call produces one audit event:
{
"ts": "2026-05-22T12:00:00Z",
"event": "binary_verify",
"pkg": "scalp_linux_amd64.tar.gz",
"status": "verified",
"hash_match": true
}Appended to .scalp/audit.log alongside all other events.
How it works
- Parses the checksums file (skips blank lines and
#comments) - Looks up the artifact filename in the checksums map
- Computes SHA-512 of the artifact via
hash.File() - Compares hashes (constant-time comparison)
- Logs a
binary_verifyaudit event - Applies enforcement if mismatch
Example: release pipeline
# Generate checksums during release
- run: scalp checksum scalp_*.tar.gz > checksums.txt
# Upload both
- run: |
gh release create v0.2.0 \
scalp_linux_amd64.tar.gz \
scalp_darwin_amd64.tar.gz \
checksums.txt# User verifies after download
- run: |
scalp verify \
--artifact scalp_linux_amd64.tar.gz \
--checksum checksums.txt \
--ciWhat it does NOT do
- Does not GPG-sign the checksums file (do that separately)
- Does not verify checksums file authenticity (HTTPS + signing is on you)
- Does not support wildcards in
--artifact(one file at a time)