Repository navigation
v1.4.0
verify-attestation.sh changes in this release. The new sha256 is dc6f227a0ae92d9e1fe8e9852fb0d4b22bfe6868f2690a6a0d91497348b01123; v1.3.0's was 0e7d4a27…. If you pin the script by hash, update the pin.
Output changes. The text output is unchanged and exit codes keep their meaning, with these exceptions, all in "Security" below: options that were silently ignored or malformed are now usage errors (exit 2), a few runs that ended VERIFIED or GOOD (exit 0) now end otherwise, and --anchor-file is new. If a wrapper passes --status, --status-keys, --check-kid, --check-subject, --check-generated-at or --min-seq without --status-list, or a non-numeric value to a numeric option, it now gets exit 2.
Security
- Hardening of the standalone revocation query and the local environment (GHSA-h938-xchq-hhg4, medium; v1.0.0 to v1.3.0). No signature can be forged and no key is compromised; each issue needs a particular invocation or environment.
--check-kid,--check-subjectand--check-generated-atreplaced the document's own kid, slug andgeneratedAtin the revocation check, so a document signed by a revoked key, or with a withdrawn subject, could endGOOD(exit 0). The document's own values are now always checked, and these options add one more check;--check-kidmust have the shape of a key ID.- Every
python3the verifier runs is nowpython3 -I -X utf8, so ajson.pyin the current directory,PYTHON*variables or the locale cannot change a check. - Numeric options are validated before use and never evaluated as shell arithmetic:
--nowand--max-age-dayscould run commands, and--max-age-seconds 60smade the freshness check pass. - Every internal variable is initialised when the script starts, so a standalone
--status-listquery no longer reads exported environment variables. - Status-list options given without
--status-listwere silently ignored; each is now a usage error (exit 2).
- Other hardening (earlier releases are also affected):
- values read from a document keep their trailing newlines, so
--expect-slugand similar comparisons are against the signed value; a NUL byte is a failed check; --nowafter 9999-12-31 is refused;- the subject rule, the TTL ceiling and the status-list validity ceiling compare exact instants, not whole seconds;
- an empty signed
slugorissis a failed check (slug_empty,iss_empty, exit 1).
- values read from a document keep their trailing newlines, so
--anchor-fileis new in this release, and its own fixes are included (no earlier release is affected): the bundle must be exactly a Sigstore v0.3 bundle before cosign runs, cosign is asked a second time for the exact identity of the certificate the release tag is read from, and the certificate must carry this repository's numeric GitHub ID.
Changed
- Fixes to time and locale handling (earlier releases are also affected):
- without GNU date (macOS), a time's offset could be ignored; it is now refused instead of misread;
not_yet_validcompares exact instants;- the verdict no longer depends on the locale: the protected header is read in the C locale and every file is read as bytes or UTF-8.
- An option given without its value is a usage error (exit 2,
error: --jws needs a value), not exit 1. - Input files are copied once into the private work directory and only the copy is read, so a file that changes during a run, or a pipe such as
<(curl ...), is checked as one document. - Two
--jsonfixes:anchor.verifiedis true only when every anchor check that applies ran and held; the string encoder is no longer redefined. - Documentation: the
python3commands in the README anddocs/security/run aspython3 -I; §6 item 2 of the verification document no longer calls the Web PKI the only channel for the attestation key.
Added
--json(#38, #66).- One JSON object on stdout and nothing else: the verdict, the reason code that decided the exit code, every check, the attested content (only at exit 0; with
--raw, also the signed posture), the unverified values of a document that did not verify, and the--anchor-fileresult. - Exit codes do not change; an argument error is JSON too (
reasonusage, exit 2). - Schema
hodeishield.verifier.result.v1, in docs/security/json-output.md.
- One JSON object on stdout and nothing else: the verdict, the reason code that decided the exit code, every check, the attested content (only at exit 0; with
- Machine reason codes for every check (#64), listed in docs/security/reason-codes.md. The text output is unchanged.
--anchor-file STATEMENT(and--anchor-bundle FILE) (#39, #65).- Runs
cosign verify-blobon a release's key statement, with the signing identity fixed in the script, and requires the key that signed (and, with--status-list, the status-list key) to be listed under the right role with a matching retirement. - A statement that does not verify is exit 2, by design; a key it does not list is exit 1 (3 for the status-list key).
- A key statement from a release older than the verifier is refused (exit 2).
--versionnow shows the verifier's version. - Needs cosign 3.1.3 or later, for this option only. See Anchor the key and the decision record.
- Runs
keys-statement.json, a new release asset (#62).- The machine-readable list of the issuer's signing keys (schema
hodeishield.keys.statement.v1, sourcedocs/security/keys.json, kept identical tokeys.mdby a CI check). - Listed in
SHA256SUMSand signed with Sigstore (keys-statement.json.sigstore.json). Use it with--anchor-file. - A daily check compares the live key sets with
keys.json.
- The machine-readable list of the issuer's signing keys (schema
- A signed container image workflow (#22, #63). The container image was not built for v1.4.0; signed images start with the next release.
image.ymlbuilds the image from the release's verified script, signs it by digest with Sigstore keyless signing and attests an SBOM; the README ("A signed image") shows how to verify it. - An evaluation of Rust ML-DSA-65 implementations for a port of the verifier (#30, #61). It does not run any candidate against the test vectors; that stays open.
Tests and CI
- Vectors: 3 appended to
tests/vectors/v1/for--anchor-file, with real Sigstore bundles. 118 in total; the first 115 are unchanged. They are markedrequires: ["cosign"]and skipped where cosign is missing. tests/vectors.sh --jsonchecks the--jsonschema against every published vector.tests/run.sh: new cases for every change above. Several self-checks that could pass without checking (an unevaluable--jsoncheck, the forged-verdict check, the globals check, the duplicate-function check) now fail when they should, and check themselves.- CI:
VERIFIER_VERSIONmust equal the release tag and the changelog heading must be dated; a check of the latest release's key statement against the live workflow; the image is built and smoke-tested on pull requests.
Verify this release
sha256sum -c SHA256SUMS
cosign verify-blob --bundle verify-attestation.sh.sigstore.json \
--certificate-identity "https://github.com/Hodeitek/hodeishield-attest-verifier/.github/workflows/release.yml@refs/tags/v1.4.0" \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
verify-attestation.sh
cosign verify-blob --bundle keys-statement.json.sigstore.json \
--certificate-identity "https://github.com/Hodeitek/hodeishield-attest-verifier/.github/workflows/release.yml@refs/tags/v1.4.0" \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
keys-statement.jsonverify-attestation.sh sha256: dc6f227a0ae92d9e1fe8e9852fb0d4b22bfe6868f2690a6a0d91497348b01123
Full changelog: v1.3.0...v1.4.0