Documentation Index
Fetch the complete documentation index at: https://mintlify.com/CarlosEduJs/SCAL-P/llms.txt
Use this file to discover all available pages before exploring further.
scalp verify applies the same hashing and policy enforcement engine that SCAL-P uses for npm packages to binary release artifacts. You point it at a downloaded file and a checksums file, and it tells you whether the artifact is what it claims to be. The result — verified or mismatch — is always recorded as a binary_verify event in .scalp/audit.log. This makes scalp verify useful both for verifying SCAL-P’s own releases and for any other release artifact in your pipeline.
Synopsis
Flags
Path to the release artifact file to verify. Only the base filename (not the full path) is used when looking up the expected hash in the checksums file.
Path to the checksums file. Each non-empty, non-comment line must follow the format
<hash> <filename> (two spaces between hash and filename). Lines beginning with # are skipped.Path to the policy file. The policy’s
on_violation setting controls what happens when a hash mismatch is detected. If the file is absent, SCAL-P defaults to warn enforcement.Override enforcement to
block regardless of on_violation in your policy. With this flag, a hash mismatch always exits 1.How it works
Load policy
Reads the policy file to determine
on_violation enforcement. If the file is missing, logs a warning and defaults to warn.Parse checksums file
Reads the checksums file line by line. Blank lines and lines starting with
# are skipped. Each valid line is parsed as <hash> <filename> (two-space delimiter).Look up artifact
Extracts the base filename from
--artifact and looks it up in the parsed checksums map. If the filename is not found, the command exits with an error.Hash the artifact
Computes the SHA-512 hash of the artifact file using the same
hash.File function used for npm packages.Compare hashes
Compares the computed hash against the expected hash from the checksums file. The result is either
verified or mismatch.Log audit event
Appends a
binary_verify event to .scalp/audit.log with the artifact filename, status, and hash match result.Checksums file format
The checksums file uses the same two-field format produced byscalp checksum:
<sha512-hash> <filename> — two spaces separate the hash from the filename.
Enforcement behavior
The--policy file’s on_violation field controls what happens when the computed hash does not match the expected hash.
| Enforcement | Hash match | Hash mismatch |
|---|---|---|
warn (default) | Exit 0 | Logged to audit, exit 0 |
block | Exit 0 | Exit 1 |
log | Exit 0 | Silent, exit 0 |
--ci, enforcement is always block regardless of policy.
Audit event
Everyscalp verify call produces exactly one audit event appended to .scalp/audit.log:
status is "verified" on a successful match and "mismatch" on failure. hash_match is a boolean.
Examples
Release pipeline example
Exit codes
| Code | Meaning |
|---|---|
0 | Hash verified — artifact matches the checksums file. |
1 | Hash mismatch and enforcement is block, the checksums file was not found, or the artifact filename was not found in the checksums file. |
What it does not do
- Does not verify the authenticity of the checksums file itself (use GPG signing or HTTPS separately).
- Does not support wildcards in
--artifact— one file per invocation. - Does not scan the artifact for malware.