From c79c02e3925aeff379d400a2aa3ceb3aed5f4c32 Mon Sep 17 00:00:00 2001 From: luckyPipewrench Date: Thu, 30 Jul 2026 17:03:38 -0400 Subject: [PATCH 1/5] feat: verify endorsed receipt rotations --- CHANGELOG.md | 17 ++ README.md | 26 +++ pipelock_verify/__init__.py | 10 +- pipelock_verify/__main__.py | 31 ++- pipelock_verify/_rotation.py | 215 ++++++++++++++++++ pipelock_verify/_verify.py | 170 +++++++++++++- pyproject.toml | 2 +- .../g1-rotated-close-count-valid.jsonl | 6 + .../conformance/g1-rotated-twice-valid.jsonl | 9 + .../g1-rotation-endorsement-2.json | 10 + .../conformance/g1-rotation-endorsement.json | 10 + tests/test_conformance.py | 121 ++++++++++ 12 files changed, 614 insertions(+), 13 deletions(-) create mode 100644 pipelock_verify/_rotation.py create mode 100644 tests/conformance/g1-rotated-close-count-valid.jsonl create mode 100644 tests/conformance/g1-rotated-twice-valid.jsonl create mode 100644 tests/conformance/g1-rotation-endorsement-2.json create mode 100644 tests/conformance/g1-rotation-endorsement.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c08336..aeeb545 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,23 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.4.0] - 2026-07-30 + +### Added + +- **Old-key-endorsed ActionReceipt rotation verification.** `verify_chain()` + accepts a pinned root, signed recorder session, and rotation + endorsements. It verifies each endorsement under the retiring key, binds it + to the exact prior sequence and tail hash, and authorizes the successor key. + Missing, altered, duplicate, cross-session, replayed, boundary-mismatched, + unknown-field, duplicate-key, and trailing-token endorsements fail closed. +- **Rotation endorsement API and CLI.** `load_rotation_endorsement()` and + `verify_rotation_endorsement()` expose strict standalone verification. The + CLI accepts repeatable `--rotation-endorsement FILE` plus `--session-id`. +- **Go-generated rotation conformance fixtures.** Python verifies the same + rotated chain and endorsement consumed by the Go, TypeScript, and Rust + implementations. + ## [0.3.0] - 2026-07-24 ### Fixed diff --git a/README.md b/README.md index 3531263..00c563a 100644 --- a/README.md +++ b/README.md @@ -78,12 +78,38 @@ consistency check in Go's `receipt.VerifyChain`. `verify()` or `verify_evidence()`; v2 chain verification is reserved for a follow-up release once the cross-version chain-linking rules are specified. +For an ActionReceipt v1 chain that rotated signing keys, pin the original root +and supply one old-key-signed endorsement for each rotation boundary: + +```python +import pipelock_verify + +endorsement = pipelock_verify.load_rotation_endorsement( + "receipt-rotation-2026-07-30.json" +) +chain = pipelock_verify.verify_chain( + "evidence-proxy.jsonl", + public_key_hex="4655a7e605c12ebb00a46037881c33c5bca5eb74b45a02e8e7261a7ff5a21678", + session_id="proxy", + rotation_endorsements=[endorsement], +) +``` + +The endorsement is verified under the retiring key and bound to the exact +prior sequence, tail hash, recorder session, and successor key. Missing, +altered, duplicate, replayed, cross-session, and unused endorsements fail +closed. + ### CLI ```bash python -m pipelock_verify receipt.json python -m pipelock_verify evidence.jsonl python -m pipelock_verify evidence.jsonl --key 70b991eb77816fc4... +python -m pipelock_verify evidence.jsonl \ + --key 4655a7e605c12ebb00a46037881c33c5bca5eb74b45a02e8e7261a7ff5a21678 \ + --session-id proxy \ + --rotation-endorsement receipt-rotation-2026-07-30.json ``` Exit codes match `pipelock verify-receipt`: 0 on success, 1 on failure. diff --git a/pipelock_verify/__init__.py b/pipelock_verify/__init__.py index 0aa551d..24a5475 100644 --- a/pipelock_verify/__init__.py +++ b/pipelock_verify/__init__.py @@ -52,6 +52,11 @@ evidence_receipt_hash, verify_evidence, ) +from ._rotation import ( + RotationEndorsement, + load_rotation_endorsement, + verify_rotation_endorsement, +) from ._verify import ( ChainResult, InvalidReceiptError, @@ -60,7 +65,7 @@ verify_chain, ) -__version__ = "0.3.0" +__version__ = "0.4.0" __all__ = [ "PAYLOAD_AUTHORITY", @@ -71,12 +76,15 @@ "DirectoryKey", "EvidenceVerifyResult", "InvalidReceiptError", + "RotationEndorsement", "VerifyResult", "__version__", "evidence_receipt_hash", "fetch_directory", + "load_rotation_endorsement", "parse_directory", "verify", "verify_chain", "verify_evidence", + "verify_rotation_endorsement", ] diff --git a/pipelock_verify/__main__.py b/pipelock_verify/__main__.py index 33d3213..b1dc6bb 100644 --- a/pipelock_verify/__main__.py +++ b/pipelock_verify/__main__.py @@ -13,6 +13,8 @@ from pathlib import Path from . import __version__ +from ._common import InvalidReceiptError +from ._rotation import load_rotation_endorsement from ._verify import ChainResult, VerifyResult, verify, verify_chain @@ -97,6 +99,19 @@ def main(argv: Sequence[str] | None = None) -> int: default="auto", help="force single or chain mode; default auto-detects from file suffix", ) + parser.add_argument( + "--session-id", + default="proxy", + help="signed recorder session for rotation endorsements; default proxy", + ) + parser.add_argument( + "--rotation-endorsement", + action="append", + default=[], + type=Path, + metavar="FILE", + help="old-key-signed rotation endorsement; repeat for each rotation boundary", + ) parser.add_argument( "--version", action="version", @@ -113,7 +128,21 @@ def main(argv: Sequence[str] | None = None) -> int: mode = args.mode if args.mode != "auto" else _detect_mode(path) if mode == "chain": - chain_result = verify_chain(path, args.public_key_hex) + try: + endorsements = [ + load_rotation_endorsement(endorsement_path) + for endorsement_path in args.rotation_endorsement + ] + except (InvalidReceiptError, UnicodeDecodeError) as exc: + print(f"CHAIN BROKEN: {path}") + print(f" Error: {exc}") + return 1 + chain_result = verify_chain( + path, + args.public_key_hex, + session_id=args.session_id, + rotation_endorsements=endorsements, + ) # Empty files are rejected at the CLI layer to match the Go CLI's # behavior (internal/cli/signing/receipt.go returns an error when # the extracted receipt list is empty). The library function keeps diff --git a/pipelock_verify/_rotation.py b/pipelock_verify/_rotation.py new file mode 100644 index 0000000..6215bf2 --- /dev/null +++ b/pipelock_verify/_rotation.py @@ -0,0 +1,215 @@ +"""Old-key-signed receipt rotation endorsement verification.""" + +from __future__ import annotations + +import hashlib +import json +import re +from dataclasses import dataclass +from pathlib import Path +from typing import Any + +from cryptography.exceptions import InvalidSignature +from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PublicKey + +from ._common import InvalidReceiptError, _is_valid_rfc3339, loads_no_duplicate_keys + +_VERSION = 1 +_DOMAIN = b"pipelock-rotation-endorsement-v1\x00" +_SIGNATURE_PREFIX = "ed25519:" +_MAX_BYTES = 64 << 10 +_FIELDS = frozenset( + { + "version", + "session_id", + "prior_signer_key", + "prior_final_seq", + "prior_tail_hash", + "new_signer_key", + "rotated_at", + "endorsement", + } +) +_LOWER_HEX_32 = re.compile(r"^[0-9a-f]{64}$") +_CANONICAL_UTC = re.compile( + r"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}" + r"(?:\.[0-9]{0,8}[1-9])?Z$" +) + + +@dataclass(frozen=True) +class RotationEndorsement: + """A retiring receipt key's authorization of its successor.""" + + version: int + session_id: str + prior_signer_key: str + prior_final_seq: int + prior_tail_hash: str + new_signer_key: str + rotated_at: str + endorsement: str + + +def _normalize_go_string(value: str) -> str: + """Replace lone UTF-16 surrogates as Go encoding/json does.""" + out: list[str] = [] + index = 0 + while index < len(value): + code = ord(value[index]) + if 0xD800 <= code <= 0xDBFF: + if index + 1 < len(value) and 0xDC00 <= ord(value[index + 1]) <= 0xDFFF: + high = code - 0xD800 + low = ord(value[index + 1]) - 0xDC00 + out.append(chr(0x10000 + high * 0x400 + low)) + index += 2 + continue + out.append("\ufffd") + elif 0xDC00 <= code <= 0xDFFF: + out.append("\ufffd") + else: + out.append(value[index]) + index += 1 + return "".join(out) + + +def _require_string(value: Any, field: str) -> str: + if not isinstance(value, str) or not value: + raise InvalidReceiptError(f"rotation endorsement {field} is invalid") + return _normalize_go_string(value) + + +def _require_hex(value: Any, field: str) -> str: + text = _require_string(value, field) + if _LOWER_HEX_32.fullmatch(text) is None: + raise InvalidReceiptError(f"rotation endorsement {field} is invalid") + return text + + +def _decode(value: dict[str, Any]) -> RotationEndorsement: + unknown = set(value) - _FIELDS + if unknown: + raise InvalidReceiptError( + f"rotation endorsement contains unknown field {sorted(unknown)[0]}" + ) + missing = _FIELDS - set(value) + if missing: + raise InvalidReceiptError( + f"rotation endorsement is missing required field {sorted(missing)[0]}" + ) + version = value["version"] + if isinstance(version, bool) or version != _VERSION: + raise InvalidReceiptError(f"unsupported rotation endorsement version {version!r}") + prior_final_seq = value["prior_final_seq"] + if ( + isinstance(prior_final_seq, bool) + or not isinstance(prior_final_seq, int) + or not 0 <= prior_final_seq <= 2**64 - 1 + ): + raise InvalidReceiptError("rotation endorsement prior_final_seq is invalid") + session_id = _require_string(value["session_id"], "session_id") + if not session_id.strip(): + raise InvalidReceiptError("rotation endorsement session_id is empty") + prior_key = _require_hex(value["prior_signer_key"], "prior_signer_key") + new_key = _require_hex(value["new_signer_key"], "new_signer_key") + if prior_key == new_key: + raise InvalidReceiptError("rotation endorsement successor key must differ from prior key") + rotated_at = _require_string(value["rotated_at"], "rotated_at") + if _CANONICAL_UTC.fullmatch(rotated_at) is None or not _is_valid_rfc3339(rotated_at): + raise InvalidReceiptError( + "rotation endorsement rotated_at must be canonical UTC RFC3339Nano" + ) + return RotationEndorsement( + version=_VERSION, + session_id=session_id, + prior_signer_key=prior_key, + prior_final_seq=prior_final_seq, + prior_tail_hash=_require_hex(value["prior_tail_hash"], "prior_tail_hash"), + new_signer_key=new_key, + rotated_at=rotated_at, + endorsement=_require_string(value["endorsement"], "signature"), + ) + + +def _canonical_bytes(endorsement: RotationEndorsement) -> bytes: + ordered = { + "version": endorsement.version, + "session_id": endorsement.session_id, + "prior_signer_key": endorsement.prior_signer_key, + "prior_final_seq": endorsement.prior_final_seq, + "prior_tail_hash": endorsement.prior_tail_hash, + "new_signer_key": endorsement.new_signer_key, + "rotated_at": endorsement.rotated_at, + } + encoded = json.dumps( + ordered, + ensure_ascii=False, + separators=(",", ":"), + ) + encoded = ( + encoded.replace("&", "\\u0026") + .replace("<", "\\u003c") + .replace(">", "\\u003e") + .replace("\u2028", "\\u2028") + .replace("\u2029", "\\u2029") + ) + return encoded.encode() + + +def verify_rotation_endorsement( + source: RotationEndorsement | dict[str, Any] | str | bytes, +) -> RotationEndorsement: + """Strictly parse and verify one rotation endorsement.""" + if isinstance(source, RotationEndorsement): + endorsement = _decode(vars(source)) + else: + if isinstance(source, bytes): + if len(source) > _MAX_BYTES: + raise InvalidReceiptError(f"rotation endorsement exceeds {_MAX_BYTES} bytes") + try: + text = source.decode("utf-8") + parsed = loads_no_duplicate_keys(text) + except (UnicodeDecodeError, json.JSONDecodeError) as exc: + raise InvalidReceiptError(f"unmarshal rotation endorsement: {exc}") from exc + elif isinstance(source, str): + if len(source.encode()) > _MAX_BYTES: + raise InvalidReceiptError(f"rotation endorsement exceeds {_MAX_BYTES} bytes") + try: + parsed = loads_no_duplicate_keys(source) + except json.JSONDecodeError as exc: + raise InvalidReceiptError(f"unmarshal rotation endorsement: {exc}") from exc + elif isinstance(source, dict): + parsed = source + else: + raise InvalidReceiptError("rotation endorsement must be a JSON object") + if not isinstance(parsed, dict): + raise InvalidReceiptError("rotation endorsement must be a JSON object") + endorsement = _decode(parsed) + if not endorsement.endorsement.startswith(_SIGNATURE_PREFIX): + raise InvalidReceiptError( + f"invalid endorsement signature format: missing {_SIGNATURE_PREFIX} prefix" + ) + try: + signature = bytes.fromhex(endorsement.endorsement[len(_SIGNATURE_PREFIX) :]) + except ValueError as exc: + raise InvalidReceiptError("invalid endorsement signature") from exc + if len(signature) != 64: + raise InvalidReceiptError("invalid endorsement signature") + digest = hashlib.sha256(_DOMAIN + _canonical_bytes(endorsement)).digest() + try: + Ed25519PublicKey.from_public_bytes(bytes.fromhex(endorsement.prior_signer_key)).verify( + signature, digest + ) + except InvalidSignature as exc: + raise InvalidReceiptError("rotation endorsement signature verification failed") from exc + return endorsement + + +def load_rotation_endorsement(path: str | Path) -> RotationEndorsement: + """Read and verify one bounded endorsement file.""" + file = Path(path) + try: + data = file.read_bytes() + except OSError as exc: + raise InvalidReceiptError(f"read rotation endorsement: {exc}") from exc + return verify_rotation_endorsement(data) diff --git a/pipelock_verify/_verify.py b/pipelock_verify/_verify.py index a3769c9..485d79d 100644 --- a/pipelock_verify/_verify.py +++ b/pipelock_verify/_verify.py @@ -4,6 +4,7 @@ import hashlib import json +from collections.abc import Sequence from dataclasses import dataclass from pathlib import Path from typing import Any @@ -29,6 +30,7 @@ from ._common import InvalidReceiptError as InvalidReceiptError from ._common import _is_valid_rfc3339 as _is_valid_rfc3339 from ._common import loads_no_duplicate_keys +from ._rotation import RotationEndorsement, verify_rotation_endorsement # Wire format constants — keep in sync with internal/receipt/receipt.go. _RECEIPT_VERSION = 1 @@ -188,6 +190,9 @@ def verify( def verify_chain( jsonl_path: str | Path, public_key_hex: str | None = None, + *, + session_id: str = "proxy", + rotation_endorsements: Sequence[RotationEndorsement | dict[str, Any] | str | bytes] = (), ) -> ChainResult: """Verify a receipt chain from a flight recorder JSONL file. @@ -198,6 +203,10 @@ def verify_chain( ``signer_key`` of the first receipt is taken as the expected key and every subsequent receipt must share it. This matches the Go ``VerifyChain`` signer-consistency check. + session_id: Signed recorder session expected by each endorsement. + rotation_endorsements: Old-key-signed successor authorizations for + the chain's rotation boundaries. Supplying endorsements requires ``public_key_hex``; + the pinned key remains the root of trust. Returns: A :class:`ChainResult`. On failure, ``broken_at_seq`` and ``error`` @@ -215,7 +224,19 @@ def verify_chain( # normal failure result instead of propagating a raw exception. return ChainResult(valid=False, error=f"parsing JSONL: {exc}") - return _verify_chain_list(receipts, public_key_hex) + try: + verified_endorsements = [ + verify_rotation_endorsement(endorsement) for endorsement in rotation_endorsements + ] + except (InvalidReceiptError, json.JSONDecodeError, UnicodeDecodeError) as exc: + return ChainResult(valid=False, error=str(exc)) + + return _verify_chain_list( + receipts, + public_key_hex, + session_id=session_id, + rotation_endorsements=verified_endorsements, + ) # ---- internals ---- @@ -1014,6 +1035,9 @@ def _validate_session_control_state( def _verify_chain_list( receipts: list[dict[str, Any]], public_key_hex: str | None, + *, + session_id: str = "proxy", + rotation_endorsements: Sequence[RotationEndorsement] = (), ) -> ChainResult: if not receipts: return ChainResult(valid=True, receipt_count=0) @@ -1041,23 +1065,69 @@ def _verify_chain_list( ), ) + if rotation_endorsements: + if public_key_hex is None or not public_key_hex.strip(): + return ChainResult( + valid=False, + error="rotation endorsement verification requires at least one trusted root key", + ) + if not session_id.strip(): + return ChainResult( + valid=False, + error="rotation endorsement verification requires a recorder session ID", + ) + first_boundary = next( + ( + index + for index, receipt in enumerate(receipts[1:], start=1) + if (receipt.get("action_record") or {}).get("key_transition") is not None + ), + len(receipts), + ) + root_open_found = False + for index, receipt in enumerate(receipts): + open_payload = _session_control_open(receipt.get("action_record") or {}) + if open_payload is None: + continue + recorder_session = open_payload.get("recorder_session", "") + if recorder_session != session_id: + return ChainResult( + valid=False, + error=( + f"signed recorder session {recorder_session!r} does not match " + f"endorsement session {session_id!r}" + ), + ) + if index < first_boundary: + root_open_found = True + if not root_open_found: + return ChainResult( + valid=False, + error="root receipt segment has no signed session_open recorder binding", + ) + # When no key is pinned, lock to the first receipt's signer_key so an # attacker can't splice receipts from a second signer into the chain. - expected_key = public_key_hex or receipts[0].get("signer_key", "") + expected_key = str(public_key_hex or receipts[0].get("signer_key", "")).lower() + root_key = expected_key.lower() prev_hash: str | None = None + prior_segment_seq: int | None = None + segment_start_index = 0 + segment_base_seq = 0 run_nonces: dict[str, str] = {} closed_runs: dict[str, bool] = {} active_run = "" active_open = "" segment_receipt_count = 0 + used_endorsements: set[int] = set() for i, receipt in enumerate(receipts): ar = receipt.get("action_record") or {} seq = ar.get("chain_seq", i) marker = ar.get("key_transition") - if marker is not None: - if i == 0: + if i == 0: + if marker is not None: return ChainResult( valid=False, broken_at_seq=seq, @@ -1066,19 +1136,91 @@ def _verify_chain_list( f"{seq}: chain starts at a key_transition segment without the prior segment" ), ) + segment_base_seq = seq + elif marker is not None: if seq != 0: return ChainResult( valid=False, broken_at_seq=seq, error=f"seq {seq}: key_transition marker on a non-genesis receipt (seq != 0)", ) + if not isinstance(marker, dict): + return ChainResult( + valid=False, + broken_at_seq=seq, + error=f"seq {seq}: key_transition is not an object", + ) + if prev_hash is None or marker.get("prior_chain_hash") != prev_hash: + return ChainResult( + valid=False, + broken_at_seq=seq, + error=( + f"seq {seq}: key_transition prior_chain_hash does not match " + "actual prior tail hash" + ), + ) + if ar.get("chain_prev_hash") != prev_hash: + return ChainResult( + valid=False, + broken_at_seq=seq, + error=( + f"seq {seq}: segment-genesis chain_prev_hash does not match prior tail hash" + ), + ) + if marker.get("prior_signer_key") != expected_key: + return ChainResult( + valid=False, + broken_at_seq=seq, + error=( + f"seq {seq}: key_transition prior_signer_key does not match " + "prior segment key" + ), + ) + if marker.get("prior_chain_seq") != prior_segment_seq: + return ChainResult( + valid=False, + broken_at_seq=seq, + error=( + f"seq {seq}: key_transition prior_chain_seq does not match " + "prior segment final seq" + ), + ) + successor = str(receipt.get("signer_key", "")).lower() + prior_receipt = receipts[i - 1] + prior_ar = prior_receipt.get("action_record") or {} + matches = [ + endorsement_index + for endorsement_index, endorsement in enumerate(rotation_endorsements) + if endorsement_index not in used_endorsements + and endorsement.session_id == session_id + and endorsement.prior_signer_key == expected_key + and endorsement.prior_final_seq == prior_ar.get("chain_seq") + and endorsement.prior_tail_hash == prev_hash + and endorsement.new_signer_key == successor + ] + if len(matches) > 1: + return ChainResult( + valid=False, + broken_at_seq=seq, + error="multiple rotation endorsements match one receipt boundary", + ) + if matches: + used_endorsements.add(matches[0]) + if successor != root_key and not matches: + return ChainResult( + valid=False, + broken_at_seq=seq, + error="rotation endorsement does not match receipt boundary", + ) + expected_key = successor + segment_start_index = i + segment_base_seq = 0 + segment_receipt_count = 0 + elif seq == 0: return ChainResult( valid=False, broken_at_seq=seq, - error=( - f"seq {seq}: key_transition rotation verification is not implemented " - "by this Python verifier" - ), + error=f"seq {seq}: unexpected seq 0 without a key_transition boundary", ) result = _verify_receipt_dict(receipt, expected_key) @@ -1089,11 +1231,12 @@ def _verify_chain_list( error=f"seq {seq}: signature: {result.error}", ) - if seq != i: + expected_seq = segment_base_seq + (i - segment_start_index) + if seq != expected_seq: return ChainResult( valid=False, broken_at_seq=seq, - error=f"seq gap: expected {i}, got {seq}", + error=f"seq gap: expected {expected_seq}, got {seq}", ) actual_prev = ar.get("chain_prev_hash", "") @@ -1157,8 +1300,15 @@ def _verify_chain_list( ) prev_hash = _compute_receipt_hash(receipt) + prior_segment_seq = seq segment_receipt_count += 1 + if len(used_endorsements) != len(rotation_endorsements): + return ChainResult( + valid=False, + error="unused rotation endorsement does not match a required boundary", + ) + first_ar = receipts[0].get("action_record") or {} last_ar = receipts[-1].get("action_record") or {} return ChainResult( diff --git a/pyproject.toml b/pyproject.toml index 4057785..bf6680b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "pipelock-verify" -version = "0.3.0" +version = "0.4.0" description = "Verify Pipelock receipts: ActionReceipt v1 chains and individual EvidenceReceipt v2 envelopes." readme = "README.md" license = "Apache-2.0" diff --git a/tests/conformance/g1-rotated-close-count-valid.jsonl b/tests/conformance/g1-rotated-close-count-valid.jsonl new file mode 100644 index 0000000..936f603 --- /dev/null +++ b/tests/conformance/g1-rotated-close-count-valid.jsonl @@ -0,0 +1,6 @@ +{"v":2,"seq":0,"ts":"2026-04-15T12:00:00Z","session_id":"conformance-session","type":"action_receipt","transport":"receipt_session","summary":"receipt: allow unclassified receipt_session","detail":{"version":1,"action_record":{"version":1,"action_id":"g1-session-open","action_type":"unclassified","timestamp":"2026-04-15T12:00:00Z","principal":"org:conformance-test","actor":"agent:conformance-runner","delegation_chain":["test-policy-v1","test-grant"],"target":"receipt-session:open","side_effect_class":"external_write","reversibility":"compensatable","policy_hash":"sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","verdict":"allow","transport":"receipt_session","layer":"session_control","chain_prev_hash":"g1:819d66c67d157d04575db8660d145e19f9b8572f9f0a1ae0514d1dc4a2140ac8","chain_seq":0,"run_nonce":"0123456789abcdef0123456789abcdef","session_control":{"kind":"session_open","open":{"run_nonce":"0123456789abcdef0123456789abcdef","open_nonce":"open-nonce-g1","recorder_session":"conformance-session","policy_hash":"sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","signer_key_epoch":"epoch-2026-04","heartbeat_seconds":30,"chain_open_seq":0,"genesis_hash":"g1:819d66c67d157d04575db8660d145e19f9b8572f9f0a1ae0514d1dc4a2140ac8","genesis_anchor_head":"anchor-head-0001","genesis_anchor_log":"anchor-log-0001","posture_capsule_sha256":"sha256:1111111111111111111111111111111111111111111111111111111111111111","posture_signer_key_id":"posture-key-1","containment_nonce":"containment-nonce-0001","contained_uid":"966"}}},"signature":"ed25519:8a7344d1bdfc7f2b6c89153f88977233d5b1176e504af01f4b29e9e27061efedcc2695b9f0aad071b47c67aace89b0f5671a1d10f3152242f4de10ad7ff3ac00","signer_key":"4655a7e605c12ebb00a46037881c33c5bca5eb74b45a02e8e7261a7ff5a21678"},"prev_hash":"genesis","hash":"e363e532f3fb9330af063e02c4c11bfc8c293752dd95fa77ca071a5959b01b8a"} +{"v":2,"seq":1,"ts":"2026-04-15T12:00:01Z","session_id":"conformance-session","type":"action_receipt","transport":"https","summary":"receipt: allow write https","detail":{"version":1,"action_record":{"version":1,"action_id":"g1-decision-intent","action_type":"write","timestamp":"2026-04-15T12:00:01Z","principal":"org:conformance-test","actor":"agent:conformance-runner","delegation_chain":["test-policy-v1","test-grant"],"target":"https://api.example.com/conformance","intent":"write_customer_record","side_effect_class":"external_write","reversibility":"compensatable","policy_hash":"sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","verdict":"allow","decision_phase":"intent","transport":"https","method":"POST","chain_prev_hash":"9f9cd7c940cdddede621366d0f441880822ad17631d2dd3266da0391863b60df","chain_seq":1,"run_nonce":"0123456789abcdef0123456789abcdef"},"signature":"ed25519:c910ee12729f54ac035ca9c0ee60ddb8a4de782e8c979f895a9f51085718a1825b4c77bb6fe0b1a157ad528fb4c7ebd896ac9b1e892071658ea2a6cb17501d0c","signer_key":"4655a7e605c12ebb00a46037881c33c5bca5eb74b45a02e8e7261a7ff5a21678"},"prev_hash":"e363e532f3fb9330af063e02c4c11bfc8c293752dd95fa77ca071a5959b01b8a","hash":"5c74af0f8e1467bc3f4efc38f2a1fa18256d7b56b9f17e1c428358c3087c1caf"} +{"v":2,"seq":2,"ts":"2026-04-15T12:00:02Z","session_id":"conformance-session","type":"action_receipt","transport":"https","summary":"receipt: allow write https","detail":{"version":1,"action_record":{"version":1,"action_id":"g1-decision-outcome","action_type":"write","timestamp":"2026-04-15T12:00:02Z","principal":"org:conformance-test","actor":"agent:conformance-runner","delegation_chain":["test-policy-v1","test-grant"],"target":"https://api.example.com/conformance","intent":"write_customer_record","side_effect_class":"external_write","reversibility":"compensatable","policy_hash":"sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","verdict":"allow","decision_phase":"outcome","transport":"https","method":"POST","chain_prev_hash":"1f05da57e1dd4a25b954aafb764f1bbd3c998dba1c80b6c6eaaac9e2691cb6ad","chain_seq":2,"run_nonce":"0123456789abcdef0123456789abcdef"},"signature":"ed25519:b78a9fba2662844733bfd372e021f9a36e285f0bc5760a4cfaa907bcfc95877c2a9ece9a291706c9d06e700906e49dcb99cf389374a95887e061169942b8330f","signer_key":"4655a7e605c12ebb00a46037881c33c5bca5eb74b45a02e8e7261a7ff5a21678"},"prev_hash":"5c74af0f8e1467bc3f4efc38f2a1fa18256d7b56b9f17e1c428358c3087c1caf","hash":"0db94ab95333b7c9f560431bf94dd007d34d05b2e1ada58a488f3192352c8ada"} +{"v":2,"seq":3,"ts":"2026-04-15T12:00:00Z","session_id":"conformance-session","type":"action_receipt","transport":"receipt_session","summary":"receipt: allow unclassified receipt_session","detail":{"version":1,"action_record":{"version":1,"action_id":"g1-session-open-rotated","action_type":"unclassified","timestamp":"2026-04-15T12:00:00Z","principal":"org:conformance-test","actor":"agent:conformance-runner","delegation_chain":["test-policy-v1","test-grant"],"target":"receipt-session:open","side_effect_class":"external_write","reversibility":"compensatable","policy_hash":"sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","verdict":"allow","transport":"receipt_session","layer":"session_control","chain_prev_hash":"4f2e18befefd0e43f1522e5d5d095adaed5459c80329145d7bc0d6dfd60a11eb","chain_seq":0,"run_nonce":"11223344556677889900aabbccddeeff","key_transition":{"prior_signer_key":"4655a7e605c12ebb00a46037881c33c5bca5eb74b45a02e8e7261a7ff5a21678","prior_chain_seq":2,"prior_chain_hash":"4f2e18befefd0e43f1522e5d5d095adaed5459c80329145d7bc0d6dfd60a11eb"},"session_control":{"kind":"session_open","open":{"run_nonce":"11223344556677889900aabbccddeeff","open_nonce":"open-nonce-g1-rotated","recorder_session":"conformance-session","policy_hash":"sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","signer_key_epoch":"epoch-2026-04-rotated","heartbeat_seconds":60,"chain_open_seq":0,"prior_chain_head":"4f2e18befefd0e43f1522e5d5d095adaed5459c80329145d7bc0d6dfd60a11eb","prior_chain_seq":2}}},"signature":"ed25519:79dba7773c3bfa1739002128ecfc87dfa3375a71387bb32d76bb7b354f4c071fc8d2daed3907f05c7f29c02c60bfb6a6e6a3020957512c7cf53a46633c144b09","signer_key":"970955695494cf0fb3109671e673ecaeb0a161e834861a325b97b0656e3c9cd1"},"prev_hash":"0db94ab95333b7c9f560431bf94dd007d34d05b2e1ada58a488f3192352c8ada","hash":"2e8b5bd7d4ae94d7ffe1706f6a32bfe16d3c879061eaa656e946119508c7bc14"} +{"v":2,"seq":4,"ts":"2026-04-15T12:00:01Z","session_id":"conformance-session","type":"action_receipt","transport":"receipt_session","summary":"receipt: allow unclassified receipt_session","detail":{"version":1,"action_record":{"version":1,"action_id":"g1-session-heartbeat-rotated","action_type":"unclassified","timestamp":"2026-04-15T12:00:01Z","principal":"org:conformance-test","actor":"agent:conformance-runner","delegation_chain":["test-policy-v1","test-grant"],"target":"receipt-session:heartbeat","side_effect_class":"external_write","reversibility":"compensatable","policy_hash":"sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","verdict":"allow","transport":"receipt_session","layer":"session_control","chain_prev_hash":"b2154084d6d927d6aa5e11922143efe73bb777bb64e3ddca5014a64ec562f0fb","chain_seq":1,"run_nonce":"11223344556677889900aabbccddeeff","session_control":{"kind":"heartbeat","heartbeat":{"run_nonce":"11223344556677889900aabbccddeeff","open_nonce":"open-nonce-g1-rotated","beat":1,"chain_head":"b2154084d6d927d6aa5e11922143efe73bb777bb64e3ddca5014a64ec562f0fb","chain_seq_head":0,"heartbeat_time":"2026-04-15T12:00:04Z","fsync_errors_gated":6,"durability_blocks":10}}},"signature":"ed25519:011ef28ccb308454305da8ae01ecf247af5d974c5b840838485fd423bed1ab643cb0f8bddd8e71533602f06cdeb7bff82098ef5870b8f96b2f3046418753800a","signer_key":"970955695494cf0fb3109671e673ecaeb0a161e834861a325b97b0656e3c9cd1"},"prev_hash":"2e8b5bd7d4ae94d7ffe1706f6a32bfe16d3c879061eaa656e946119508c7bc14","hash":"8018d5a9f9a625f4da8a202b57b91e0adc10d0f576079ebe7e8ec8915153eb57"} +{"v":2,"seq":5,"ts":"2026-04-15T12:00:02Z","session_id":"conformance-session","type":"action_receipt","transport":"receipt_session","summary":"receipt: allow unclassified receipt_session","detail":{"version":1,"action_record":{"version":1,"action_id":"g1-session-close-rotated","action_type":"unclassified","timestamp":"2026-04-15T12:00:02Z","principal":"org:conformance-test","actor":"agent:conformance-runner","delegation_chain":["test-policy-v1","test-grant"],"target":"receipt-session:close","side_effect_class":"external_write","reversibility":"compensatable","policy_hash":"sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","verdict":"allow","transport":"receipt_session","layer":"session_control","chain_prev_hash":"c2b0cb2155d42d9e16d2c7c330335a024a388041c643a651ba613ccd93cf7905","chain_seq":2,"run_nonce":"11223344556677889900aabbccddeeff","session_control":{"kind":"session_close","close":{"run_nonce":"11223344556677889900aabbccddeeff","open_nonce":"open-nonce-g1-rotated","final_seq":2,"root_hash":"c2b0cb2155d42d9e16d2c7c330335a024a388041c643a651ba613ccd93cf7905","receipt_count":3,"close_reason":"rotated-normal","fsync_errors_gated":7,"durability_blocks":11}}},"signature":"ed25519:11c445c40187d5c955eaeb2d4f1dd2ebe365e43092bfe042994c94b4897e847abd667c64cc288d20b423bb1e9fe4a10d404f658822b11faedc3b9457d7e0e805","signer_key":"970955695494cf0fb3109671e673ecaeb0a161e834861a325b97b0656e3c9cd1"},"prev_hash":"8018d5a9f9a625f4da8a202b57b91e0adc10d0f576079ebe7e8ec8915153eb57","hash":"fef8494530ada50f774a5cbf9a8e8e65fd7371c27195bc301ad346d8bffcbe9d"} diff --git a/tests/conformance/g1-rotated-twice-valid.jsonl b/tests/conformance/g1-rotated-twice-valid.jsonl new file mode 100644 index 0000000..58ce57e --- /dev/null +++ b/tests/conformance/g1-rotated-twice-valid.jsonl @@ -0,0 +1,9 @@ +{"v":2,"seq":0,"ts":"2026-04-15T12:00:00Z","session_id":"conformance-session","type":"action_receipt","transport":"receipt_session","summary":"receipt: allow unclassified receipt_session","detail":{"version":1,"action_record":{"version":1,"action_id":"g1-session-open","action_type":"unclassified","timestamp":"2026-04-15T12:00:00Z","principal":"org:conformance-test","actor":"agent:conformance-runner","delegation_chain":["test-policy-v1","test-grant"],"target":"receipt-session:open","side_effect_class":"external_write","reversibility":"compensatable","policy_hash":"sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","verdict":"allow","transport":"receipt_session","layer":"session_control","chain_prev_hash":"g1:819d66c67d157d04575db8660d145e19f9b8572f9f0a1ae0514d1dc4a2140ac8","chain_seq":0,"run_nonce":"0123456789abcdef0123456789abcdef","session_control":{"kind":"session_open","open":{"run_nonce":"0123456789abcdef0123456789abcdef","open_nonce":"open-nonce-g1","recorder_session":"conformance-session","policy_hash":"sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","signer_key_epoch":"epoch-2026-04","heartbeat_seconds":30,"chain_open_seq":0,"genesis_hash":"g1:819d66c67d157d04575db8660d145e19f9b8572f9f0a1ae0514d1dc4a2140ac8","genesis_anchor_head":"anchor-head-0001","genesis_anchor_log":"anchor-log-0001","posture_capsule_sha256":"sha256:1111111111111111111111111111111111111111111111111111111111111111","posture_signer_key_id":"posture-key-1","containment_nonce":"containment-nonce-0001","contained_uid":"966"}}},"signature":"ed25519:8a7344d1bdfc7f2b6c89153f88977233d5b1176e504af01f4b29e9e27061efedcc2695b9f0aad071b47c67aace89b0f5671a1d10f3152242f4de10ad7ff3ac00","signer_key":"4655a7e605c12ebb00a46037881c33c5bca5eb74b45a02e8e7261a7ff5a21678"},"prev_hash":"genesis","hash":"e363e532f3fb9330af063e02c4c11bfc8c293752dd95fa77ca071a5959b01b8a"} +{"v":2,"seq":1,"ts":"2026-04-15T12:00:01Z","session_id":"conformance-session","type":"action_receipt","transport":"https","summary":"receipt: allow write https","detail":{"version":1,"action_record":{"version":1,"action_id":"g1-decision-intent","action_type":"write","timestamp":"2026-04-15T12:00:01Z","principal":"org:conformance-test","actor":"agent:conformance-runner","delegation_chain":["test-policy-v1","test-grant"],"target":"https://api.example.com/conformance","intent":"write_customer_record","side_effect_class":"external_write","reversibility":"compensatable","policy_hash":"sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","verdict":"allow","decision_phase":"intent","transport":"https","method":"POST","chain_prev_hash":"9f9cd7c940cdddede621366d0f441880822ad17631d2dd3266da0391863b60df","chain_seq":1,"run_nonce":"0123456789abcdef0123456789abcdef"},"signature":"ed25519:c910ee12729f54ac035ca9c0ee60ddb8a4de782e8c979f895a9f51085718a1825b4c77bb6fe0b1a157ad528fb4c7ebd896ac9b1e892071658ea2a6cb17501d0c","signer_key":"4655a7e605c12ebb00a46037881c33c5bca5eb74b45a02e8e7261a7ff5a21678"},"prev_hash":"e363e532f3fb9330af063e02c4c11bfc8c293752dd95fa77ca071a5959b01b8a","hash":"5c74af0f8e1467bc3f4efc38f2a1fa18256d7b56b9f17e1c428358c3087c1caf"} +{"v":2,"seq":2,"ts":"2026-04-15T12:00:02Z","session_id":"conformance-session","type":"action_receipt","transport":"https","summary":"receipt: allow write https","detail":{"version":1,"action_record":{"version":1,"action_id":"g1-decision-outcome","action_type":"write","timestamp":"2026-04-15T12:00:02Z","principal":"org:conformance-test","actor":"agent:conformance-runner","delegation_chain":["test-policy-v1","test-grant"],"target":"https://api.example.com/conformance","intent":"write_customer_record","side_effect_class":"external_write","reversibility":"compensatable","policy_hash":"sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","verdict":"allow","decision_phase":"outcome","transport":"https","method":"POST","chain_prev_hash":"1f05da57e1dd4a25b954aafb764f1bbd3c998dba1c80b6c6eaaac9e2691cb6ad","chain_seq":2,"run_nonce":"0123456789abcdef0123456789abcdef"},"signature":"ed25519:b78a9fba2662844733bfd372e021f9a36e285f0bc5760a4cfaa907bcfc95877c2a9ece9a291706c9d06e700906e49dcb99cf389374a95887e061169942b8330f","signer_key":"4655a7e605c12ebb00a46037881c33c5bca5eb74b45a02e8e7261a7ff5a21678"},"prev_hash":"5c74af0f8e1467bc3f4efc38f2a1fa18256d7b56b9f17e1c428358c3087c1caf","hash":"0db94ab95333b7c9f560431bf94dd007d34d05b2e1ada58a488f3192352c8ada"} +{"v":2,"seq":3,"ts":"2026-04-15T12:00:00Z","session_id":"conformance-session","type":"action_receipt","transport":"receipt_session","summary":"receipt: allow unclassified receipt_session","detail":{"version":1,"action_record":{"version":1,"action_id":"g1-session-open-rotated","action_type":"unclassified","timestamp":"2026-04-15T12:00:00Z","principal":"org:conformance-test","actor":"agent:conformance-runner","delegation_chain":["test-policy-v1","test-grant"],"target":"receipt-session:open","side_effect_class":"external_write","reversibility":"compensatable","policy_hash":"sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","verdict":"allow","transport":"receipt_session","layer":"session_control","chain_prev_hash":"4f2e18befefd0e43f1522e5d5d095adaed5459c80329145d7bc0d6dfd60a11eb","chain_seq":0,"run_nonce":"11223344556677889900aabbccddeeff","key_transition":{"prior_signer_key":"4655a7e605c12ebb00a46037881c33c5bca5eb74b45a02e8e7261a7ff5a21678","prior_chain_seq":2,"prior_chain_hash":"4f2e18befefd0e43f1522e5d5d095adaed5459c80329145d7bc0d6dfd60a11eb"},"session_control":{"kind":"session_open","open":{"run_nonce":"11223344556677889900aabbccddeeff","open_nonce":"open-nonce-g1-rotated","recorder_session":"conformance-session","policy_hash":"sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","signer_key_epoch":"epoch-2026-04-rotated","heartbeat_seconds":60,"chain_open_seq":0,"prior_chain_head":"4f2e18befefd0e43f1522e5d5d095adaed5459c80329145d7bc0d6dfd60a11eb","prior_chain_seq":2}}},"signature":"ed25519:79dba7773c3bfa1739002128ecfc87dfa3375a71387bb32d76bb7b354f4c071fc8d2daed3907f05c7f29c02c60bfb6a6e6a3020957512c7cf53a46633c144b09","signer_key":"970955695494cf0fb3109671e673ecaeb0a161e834861a325b97b0656e3c9cd1"},"prev_hash":"0db94ab95333b7c9f560431bf94dd007d34d05b2e1ada58a488f3192352c8ada","hash":"2e8b5bd7d4ae94d7ffe1706f6a32bfe16d3c879061eaa656e946119508c7bc14"} +{"v":2,"seq":4,"ts":"2026-04-15T12:00:01Z","session_id":"conformance-session","type":"action_receipt","transport":"receipt_session","summary":"receipt: allow unclassified receipt_session","detail":{"version":1,"action_record":{"version":1,"action_id":"g1-session-heartbeat-rotated","action_type":"unclassified","timestamp":"2026-04-15T12:00:01Z","principal":"org:conformance-test","actor":"agent:conformance-runner","delegation_chain":["test-policy-v1","test-grant"],"target":"receipt-session:heartbeat","side_effect_class":"external_write","reversibility":"compensatable","policy_hash":"sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","verdict":"allow","transport":"receipt_session","layer":"session_control","chain_prev_hash":"b2154084d6d927d6aa5e11922143efe73bb777bb64e3ddca5014a64ec562f0fb","chain_seq":1,"run_nonce":"11223344556677889900aabbccddeeff","session_control":{"kind":"heartbeat","heartbeat":{"run_nonce":"11223344556677889900aabbccddeeff","open_nonce":"open-nonce-g1-rotated","beat":1,"chain_head":"b2154084d6d927d6aa5e11922143efe73bb777bb64e3ddca5014a64ec562f0fb","chain_seq_head":0,"heartbeat_time":"2026-04-15T12:00:04Z","fsync_errors_gated":6,"durability_blocks":10}}},"signature":"ed25519:011ef28ccb308454305da8ae01ecf247af5d974c5b840838485fd423bed1ab643cb0f8bddd8e71533602f06cdeb7bff82098ef5870b8f96b2f3046418753800a","signer_key":"970955695494cf0fb3109671e673ecaeb0a161e834861a325b97b0656e3c9cd1"},"prev_hash":"2e8b5bd7d4ae94d7ffe1706f6a32bfe16d3c879061eaa656e946119508c7bc14","hash":"8018d5a9f9a625f4da8a202b57b91e0adc10d0f576079ebe7e8ec8915153eb57"} +{"v":2,"seq":5,"ts":"2026-04-15T12:00:02Z","session_id":"conformance-session","type":"action_receipt","transport":"receipt_session","summary":"receipt: allow unclassified receipt_session","detail":{"version":1,"action_record":{"version":1,"action_id":"g1-session-close-rotated","action_type":"unclassified","timestamp":"2026-04-15T12:00:02Z","principal":"org:conformance-test","actor":"agent:conformance-runner","delegation_chain":["test-policy-v1","test-grant"],"target":"receipt-session:close","side_effect_class":"external_write","reversibility":"compensatable","policy_hash":"sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","verdict":"allow","transport":"receipt_session","layer":"session_control","chain_prev_hash":"c2b0cb2155d42d9e16d2c7c330335a024a388041c643a651ba613ccd93cf7905","chain_seq":2,"run_nonce":"11223344556677889900aabbccddeeff","session_control":{"kind":"session_close","close":{"run_nonce":"11223344556677889900aabbccddeeff","open_nonce":"open-nonce-g1-rotated","final_seq":2,"root_hash":"c2b0cb2155d42d9e16d2c7c330335a024a388041c643a651ba613ccd93cf7905","receipt_count":3,"close_reason":"rotated-normal","fsync_errors_gated":7,"durability_blocks":11}}},"signature":"ed25519:11c445c40187d5c955eaeb2d4f1dd2ebe365e43092bfe042994c94b4897e847abd667c64cc288d20b423bb1e9fe4a10d404f658822b11faedc3b9457d7e0e805","signer_key":"970955695494cf0fb3109671e673ecaeb0a161e834861a325b97b0656e3c9cd1"},"prev_hash":"8018d5a9f9a625f4da8a202b57b91e0adc10d0f576079ebe7e8ec8915153eb57","hash":"fef8494530ada50f774a5cbf9a8e8e65fd7371c27195bc301ad346d8bffcbe9d"} +{"v":2,"seq":6,"ts":"2026-04-15T12:00:00Z","session_id":"conformance-session","type":"action_receipt","transport":"receipt_session","summary":"receipt: allow unclassified receipt_session","detail":{"version":1,"action_record":{"version":1,"action_id":"g1-session-open-rotated-twice","action_type":"unclassified","timestamp":"2026-04-15T12:00:00Z","principal":"org:conformance-test","actor":"agent:conformance-runner","delegation_chain":["test-policy-v1","test-grant"],"target":"receipt-session:open","side_effect_class":"external_write","reversibility":"compensatable","policy_hash":"sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","verdict":"allow","transport":"receipt_session","layer":"session_control","chain_prev_hash":"f41965657ef61c3f7fb79cd850fd8d80b4ab3d6752ccaf26675ab1c05a6ac066","chain_seq":0,"run_nonce":"ffeeddccbbaa00998877665544332211","key_transition":{"prior_signer_key":"970955695494cf0fb3109671e673ecaeb0a161e834861a325b97b0656e3c9cd1","prior_chain_seq":2,"prior_chain_hash":"f41965657ef61c3f7fb79cd850fd8d80b4ab3d6752ccaf26675ab1c05a6ac066"},"session_control":{"kind":"session_open","open":{"run_nonce":"ffeeddccbbaa00998877665544332211","open_nonce":"open-nonce-g1-rotated-twice","recorder_session":"conformance-session","policy_hash":"sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","signer_key_epoch":"epoch-2026-04-rotated-twice","heartbeat_seconds":60,"chain_open_seq":0,"prior_chain_head":"f41965657ef61c3f7fb79cd850fd8d80b4ab3d6752ccaf26675ab1c05a6ac066","prior_chain_seq":2}}},"signature":"ed25519:d227e6812929e66210101dcd8efaa8ed9a4642ced47f7a4d806b76f2e873a0f2baccb606a250742d5cc5b174a3cc9f6e26c5e6be76516e883309415fc9695d0c","signer_key":"54a17337d815b3685aa6cda7fd77950a293b4a1be84aa8a3aff964576827e5be"},"prev_hash":"fef8494530ada50f774a5cbf9a8e8e65fd7371c27195bc301ad346d8bffcbe9d","hash":"f8629d3ab4f8ff2662ef017c66356794d846a68a5c9b4cd3a07e87755c8d144b"} +{"v":2,"seq":7,"ts":"2026-04-15T12:00:01Z","session_id":"conformance-session","type":"action_receipt","transport":"receipt_session","summary":"receipt: allow unclassified receipt_session","detail":{"version":1,"action_record":{"version":1,"action_id":"g1-session-heartbeat-rotated-twice","action_type":"unclassified","timestamp":"2026-04-15T12:00:01Z","principal":"org:conformance-test","actor":"agent:conformance-runner","delegation_chain":["test-policy-v1","test-grant"],"target":"receipt-session:heartbeat","side_effect_class":"external_write","reversibility":"compensatable","policy_hash":"sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","verdict":"allow","transport":"receipt_session","layer":"session_control","chain_prev_hash":"8584851b3361f2ddc49eedf1c2efbaff2913cd91e6faa478cf6646de0d482839","chain_seq":1,"run_nonce":"ffeeddccbbaa00998877665544332211","session_control":{"kind":"heartbeat","heartbeat":{"run_nonce":"ffeeddccbbaa00998877665544332211","open_nonce":"open-nonce-g1-rotated-twice","beat":1,"chain_head":"8584851b3361f2ddc49eedf1c2efbaff2913cd91e6faa478cf6646de0d482839","chain_seq_head":0,"heartbeat_time":"2026-04-15T12:00:04Z","fsync_errors_gated":6,"durability_blocks":10}}},"signature":"ed25519:8ababbba579c76a8285933590b5fba2db2a6ff2b5ad76ff8b0341323aaa411d723d7fd42e2bb1a80ba6b01e31c9624e7e5a875c4ae5a990b00f5481a42d45b04","signer_key":"54a17337d815b3685aa6cda7fd77950a293b4a1be84aa8a3aff964576827e5be"},"prev_hash":"f8629d3ab4f8ff2662ef017c66356794d846a68a5c9b4cd3a07e87755c8d144b","hash":"e99c2aeacb59b18d57ce6288c3381a522fb2ae70ae433940948eb9bf9818e26c"} +{"v":2,"seq":8,"ts":"2026-04-15T12:00:02Z","session_id":"conformance-session","type":"action_receipt","transport":"receipt_session","summary":"receipt: allow unclassified receipt_session","detail":{"version":1,"action_record":{"version":1,"action_id":"g1-session-close-rotated-twice","action_type":"unclassified","timestamp":"2026-04-15T12:00:02Z","principal":"org:conformance-test","actor":"agent:conformance-runner","delegation_chain":["test-policy-v1","test-grant"],"target":"receipt-session:close","side_effect_class":"external_write","reversibility":"compensatable","policy_hash":"sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","verdict":"allow","transport":"receipt_session","layer":"session_control","chain_prev_hash":"f4313e1b1a72bca692e5ee67271b82ff06b6b9d996bb8be1da2c73bfdd37969a","chain_seq":2,"run_nonce":"ffeeddccbbaa00998877665544332211","session_control":{"kind":"session_close","close":{"run_nonce":"ffeeddccbbaa00998877665544332211","open_nonce":"open-nonce-g1-rotated-twice","final_seq":2,"root_hash":"f4313e1b1a72bca692e5ee67271b82ff06b6b9d996bb8be1da2c73bfdd37969a","receipt_count":3,"close_reason":"rotated-twice-normal","fsync_errors_gated":7,"durability_blocks":11}}},"signature":"ed25519:6eec8371de70bea0697cb761755055838166fcb2e48744cb64da4ef2f9d7df220077eb2ca51b70fe0fafd4769bcc6b34d8cd49aa479e3cd48ec53dda40e02003","signer_key":"54a17337d815b3685aa6cda7fd77950a293b4a1be84aa8a3aff964576827e5be"},"prev_hash":"e99c2aeacb59b18d57ce6288c3381a522fb2ae70ae433940948eb9bf9818e26c","hash":"aadabf84ffec601fa5f20ddfaba17f339d7529baf11a2b4e14e3888e8bb95b8e"} diff --git a/tests/conformance/g1-rotation-endorsement-2.json b/tests/conformance/g1-rotation-endorsement-2.json new file mode 100644 index 0000000..a130363 --- /dev/null +++ b/tests/conformance/g1-rotation-endorsement-2.json @@ -0,0 +1,10 @@ +{ + "version": 1, + "session_id": "conformance-session", + "prior_signer_key": "970955695494cf0fb3109671e673ecaeb0a161e834861a325b97b0656e3c9cd1", + "prior_final_seq": 2, + "prior_tail_hash": "f41965657ef61c3f7fb79cd850fd8d80b4ab3d6752ccaf26675ab1c05a6ac066", + "new_signer_key": "54a17337d815b3685aa6cda7fd77950a293b4a1be84aa8a3aff964576827e5be", + "rotated_at": "2026-04-15T12:00:20Z", + "endorsement": "ed25519:a8eeadfb827bf2fb7efe897b6403670802a9345bcb50db3d0f2bc0630ee4b759f3cf9102c458457f4b98c76ee875e83336b0b7630e7cfbee41f24262c74c0800" +} diff --git a/tests/conformance/g1-rotation-endorsement.json b/tests/conformance/g1-rotation-endorsement.json new file mode 100644 index 0000000..9067df5 --- /dev/null +++ b/tests/conformance/g1-rotation-endorsement.json @@ -0,0 +1,10 @@ +{ + "version": 1, + "session_id": "conformance-session", + "prior_signer_key": "4655a7e605c12ebb00a46037881c33c5bca5eb74b45a02e8e7261a7ff5a21678", + "prior_final_seq": 2, + "prior_tail_hash": "4f2e18befefd0e43f1522e5d5d095adaed5459c80329145d7bc0d6dfd60a11eb", + "new_signer_key": "970955695494cf0fb3109671e673ecaeb0a161e834861a325b97b0656e3c9cd1", + "rotated_at": "2026-04-15T12:00:10Z", + "endorsement": "ed25519:bd79a34ace4753f61983ffaa31d6d44bced226578445010ddc19b0a736e93809ba09135a1f6ce33db1c2bb8786553ef87bd6d9d7642084a460f3161a75709a05" +} diff --git a/tests/test_conformance.py b/tests/test_conformance.py index 40dc6b6..3bb272d 100644 --- a/tests/test_conformance.py +++ b/tests/test_conformance.py @@ -132,6 +132,127 @@ def test_broken_chain_individual_signatures_valid(test_key_hex): assert result.valid, f"receipt {i} sig invalid: {result.error}" +def test_rotated_chain_verifies_from_one_root_plus_endorsement(test_key_hex): + endorsement = pipelock_verify.load_rotation_endorsement( + CONFORMANCE_DIR / "g1-rotation-endorsement.json" + ) + result = pipelock_verify.verify_chain( + CONFORMANCE_DIR / "g1-rotated-close-count-valid.jsonl", + public_key_hex=test_key_hex, + session_id="conformance-session", + rotation_endorsements=[endorsement], + ) + assert result.valid, result.error + assert result.receipt_count == 6 + assert result.final_seq == 2 + + +def test_twice_rotated_chain_verifies_from_one_root_plus_both_endorsements( + test_key_hex, +): + endorsements = [ + pipelock_verify.load_rotation_endorsement(CONFORMANCE_DIR / "g1-rotation-endorsement.json"), + pipelock_verify.load_rotation_endorsement( + CONFORMANCE_DIR / "g1-rotation-endorsement-2.json" + ), + ] + result = pipelock_verify.verify_chain( + CONFORMANCE_DIR / "g1-rotated-twice-valid.jsonl", + public_key_hex=test_key_hex, + session_id="conformance-session", + rotation_endorsements=endorsements, + ) + assert result.valid, result.error + assert result.receipt_count == 9 + + +def test_rotation_endorsement_trust_fails_closed(test_key_hex): + path = CONFORMANCE_DIR / "g1-rotated-close-count-valid.jsonl" + endorsement = pipelock_verify.load_rotation_endorsement( + CONFORMANCE_DIR / "g1-rotation-endorsement.json" + ) + + missing = pipelock_verify.verify_chain( + path, + public_key_hex=test_key_hex, + session_id="conformance-session", + ) + assert not missing.valid + assert "does not match receipt boundary" in (missing.error or "") + + altered = { + **vars(endorsement), + "prior_tail_hash": "0" * 64, + } + with pytest.raises( + pipelock_verify.InvalidReceiptError, + match="signature verification failed", + ): + pipelock_verify.verify_rotation_endorsement(altered) + with pytest.raises( + pipelock_verify.InvalidReceiptError, + match="canonical UTC RFC3339Nano", + ): + pipelock_verify.verify_rotation_endorsement( + { + **vars(endorsement), + "rotated_at": "2026-02-30T12:00:00Z", + } + ) + + duplicate = pipelock_verify.verify_chain( + path, + public_key_hex=test_key_hex, + session_id="conformance-session", + rotation_endorsements=[endorsement, endorsement], + ) + assert not duplicate.valid + assert "multiple rotation endorsements" in (duplicate.error or "") + + second = pipelock_verify.load_rotation_endorsement( + CONFORMANCE_DIR / "g1-rotation-endorsement-2.json" + ) + replayed = pipelock_verify.verify_chain( + path, + public_key_hex=test_key_hex, + session_id="conformance-session", + rotation_endorsements=[endorsement, second], + ) + assert not replayed.valid + assert "unused rotation endorsement" in (replayed.error or "") + + cross_session = pipelock_verify.verify_chain( + path, + public_key_hex=test_key_hex, + session_id="other-session", + rotation_endorsements=[endorsement], + ) + assert not cross_session.valid + assert "signed recorder session" in (cross_session.error or "") + + +def test_rotation_endorsement_file_rejects_duplicate_unknown_and_trailing_fields( + tmp_path, +): + source = (CONFORMANCE_DIR / "g1-rotation-endorsement.json").read_text().strip() + cases = [ + ( + source.replace('"version": 1,', '"version": 1, "version": 1,'), + "duplicate object key", + ), + ( + source.replace("\n}", ',\n "trusted": true\n}'), + "unknown field trusted", + ), + (f"{source}\n{{}}", "unmarshal rotation endorsement"), + ] + for index, (body, error) in enumerate(cases): + path = tmp_path / f"bad-{index}.json" + path.write_text(body) + with pytest.raises(pipelock_verify.InvalidReceiptError, match=error): + pipelock_verify.load_rotation_endorsement(path) + + def test_v3_2_0_live_recorder_chain_verifies_with_pinned_key(): """A real v3.2.0 recorder log must verify end-to-end. From 15ccb80b9ac7a8fd836fa94418ef60cd64d5836e Mon Sep 17 00:00:00 2001 From: luckyPipewrench Date: Thu, 30 Jul 2026 17:11:44 -0400 Subject: [PATCH 2/5] chore: refresh patched dependency floors --- pyproject.toml | 8 +-- requirements/ci.txt | 105 +++++++++++++++++++-------------------- requirements/fuzz.txt | 97 ++++++++++++++++++------------------ requirements/pip.in | 2 +- requirements/pip.txt | 4 ++ requirements/release.txt | 103 +++++++++++++++++++------------------- 6 files changed, 157 insertions(+), 162 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index bf6680b..1553924 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools>=82.0.1", "wheel"] +requires = ["setuptools>=83.0.0", "wheel"] build-backend = "setuptools.build_meta" [project] @@ -36,12 +36,12 @@ classifiers = [ "Topic :: Software Development :: Libraries :: Python Modules", ] dependencies = [ - "cryptography>=48.0.0", + "cryptography>=48.0.1", ] [project.optional-dependencies] dev = [ - "pytest>=8.4.2", + "pytest>=9.0.3", "pytest-cov>=7.1.0", "ruff>=0.15.12", "mypy>=1.19.1", @@ -49,7 +49,7 @@ dev = [ release = [ "build>=1.4.4", "twine>=6.2.0", - "setuptools>=82.0.1", + "setuptools>=83.0.0", "wheel", ] diff --git a/requirements/ci.txt b/requirements/ci.txt index 12a21e3..637eabb 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -1,5 +1,5 @@ # This file was autogenerated by uv via the following command: -# uv pip compile --python-version 3.9.2 --generate-hashes --extra dev --output-file requirements/ci.txt pyproject.toml +# uv pip compile --python-version 3.10 --generate-hashes --extra dev --output-file requirements/ci.txt pyproject.toml cffi==2.0.0 \ --hash=sha256:00bdf7acc5f795150faa6957054fbbca2439db2f775ce831222b66f192f03beb \ --hash=sha256:07b271772c100085dd28b74fa0cd81c8fb1a3ba18b21e03d7c27f3436a10606b \ @@ -192,56 +192,53 @@ coverage==7.10.7 \ --hash=sha256:fc04cc7a3db33664e0c2d10eb8990ff6b3536f6842c9590ae8da4c614b9ed05a \ --hash=sha256:fff7b9c3f19957020cac546c70025331113d2e61537f6e2441bc7657913de7d3 # via pytest-cov -cryptography==48.0.0 \ - --hash=sha256:0890f502ddf7d9c6426129c3f49f5c0a39278ed7cd6322c8755ffca6ee675a13 \ - --hash=sha256:0c558d2cdffd8f4bbb30fc7134c74d2ca9a476f830bb053074498fbc86f41ed6 \ - --hash=sha256:16cd65b9330583e4619939b3a3843eec1e6e789744bb01e7c7e2e62e33c239c8 \ - --hash=sha256:18349bbc56f4743c8b12dc32e2bccb2cf83ee8b69a3bba74ef8ae857e26b3d25 \ - --hash=sha256:1e2d54c8be6152856a36f0882ab231e70f8ec7f14e93cf87db8a2ed056bf160c \ - --hash=sha256:22a5cb272895dce158b2cacdfdc3debd299019659f42947dbdac6f32d68fe832 \ - --hash=sha256:27241b1dc9962e056062a8eef1991d02c3a24569c95975bd2322a8a52c6e5e12 \ - --hash=sha256:2b4d59804e8408e2fea7d1fbaf218e5ec984325221db76e6a241a9abd6cdd95c \ - --hash=sha256:2eb992bbd4661238c5a397594c83f5b4dc2bc5b848c365c8f991b6780efcc5c7 \ - --hash=sha256:369a6348999f94bbd53435c894377b20ab95f25a9065c283570e70150d8abc3c \ - --hash=sha256:3cb07a3ed6431663cd321ea8a000a1314c74211f823e4177fefa2255e057d1ec \ - --hash=sha256:40ba1f85eaa6959837b1d51c9767e230e14612eea4ef110ee8854ada22da1bf5 \ - --hash=sha256:4defde8685ae324a9eb9d818717e93b4638ef67070ac9bc15b8ca85f63048355 \ - --hash=sha256:55b7718303bf06a5753dcdccf2f3945cf18ad7bffde41b61226e4db31ab89a9c \ - --hash=sha256:561215ea3879cb1cbbf272867e2efda62476f240fb58c64de6b393ae19246741 \ - --hash=sha256:58d00498e8933e4a194f3076aee1b4a97dfec1a6da444535755822fe5d8b0b86 \ - --hash=sha256:59baa2cb386c4f0b9905bd6eb4c2a79a69a128408fd31d32ca4d7102d4156321 \ - --hash=sha256:5a5ed8fde7a1d09376ca0b40e68cd59c69fe23b1f9768bd5824f54681626032a \ - --hash=sha256:5b012212e08b8dd5edc78ef54da83dd9892fd9105323b3993eff6bea65dc21d7 \ - --hash=sha256:5c3932f4436d1cccb036cb0eaef46e6e2db91035166f1ad6505c3c9d5a635920 \ - --hash=sha256:614d0949f4790582d2cc25553abd09dd723025f0c0e7c67376a1d77196743d6e \ - --hash=sha256:76341972e1eff8b4bea859f09c0d3e64b96ce931b084f9b9b7db8ef364c30eff \ - --hash=sha256:77a2ccbbe917f6710e05ba9adaa25fb5075620bf3ea6fb751997875aff4ae4bd \ - --hash=sha256:7995ef305d7165c3f11ae07f2517e5a4f1d5c18da1376a0a9ed496336b69e5f3 \ - --hash=sha256:7ce4bfae76319a532a2dc68f82cc32f5676ee792a983187dac07183690e5c66f \ - --hash=sha256:7e8eac43dfca5c4cccc6dad9a80504436fca53bb9bc3100a2386d730fbe6b602 \ - --hash=sha256:84cf79f0dc8b36ac5da873481716e87aef31fcfa0444f9e1d8b4b2cece142855 \ - --hash=sha256:8c7378637d7d88016fa6791c159f698b3d3eed28ebf844ac36b9dc04a14dae18 \ - --hash=sha256:8cd666227ef7af430aa5914a9910e0ddd703e75f039cef0825cd0da71b6b711a \ - --hash=sha256:906cbf0670286c6e0044156bc7d4af9cbb0ef6db9f73e52c3ec56ba6bdde5336 \ - --hash=sha256:9071196d81abc88b3516ac8cdfad32e2b66dd4a5393a8e68a961e9161ddc6239 \ - --hash=sha256:9249e3cd978541d665967ac2cb2787fd6a62bddf1e75b3e347a594d7dacf4f74 \ - --hash=sha256:984a20b0f62a26f48a3396c72e4bc34c66e356d356bf370053066b3b6d54634a \ - --hash=sha256:9be5aafa5736574f8f15f262adc81b2a9869e2cfe9014d52a44633905b40d52c \ - --hash=sha256:9c459db21422be75e2809370b829a87eb37f74cd785fc4aa9ea1e5f43b47cda4 \ - --hash=sha256:9ccdac7d40688ecb5a3b4a604b8a88c8002e3442d6c60aead1db2a89a041560c \ - --hash=sha256:a0e692c683f4df67815a2d258b324e66f4738bd7a96a218c826dce4f4bd05d8f \ - --hash=sha256:a5da777e32ffed6f85a7b2b3f7c5cbc88c146bfcd0a1d7baf5fcc6c52ee35dd4 \ - --hash=sha256:a64697c641c7b1b2178e573cbc31c7c6684cd56883a478d75143dbb7118036db \ - --hash=sha256:ad64688338ed4bc1a6618076ba75fd7194a5f1797ac60b47afe926285adb3166 \ - --hash=sha256:bd72e68b06bb1e96913f97dd4901119bc17f39d4586a5adf2d3e47bc2b9d58b5 \ - --hash=sha256:c17dfe85494deaeddc5ce251aebd1d60bbe6afc8b62071bb0b469431a000124f \ - --hash=sha256:c18684a7f0cc9a3cb60328f496b8e3372def7c5d2df39ac267878b05565aaaae \ - --hash=sha256:cc90c0b39b2e3c65ef52c804b72e3c58f8a04ab2a1871272798e5f9572c17d20 \ - --hash=sha256:db63bf618e5dea46c07de12e900fe1cdd2541e6dc9dbae772a70b7d4d4765f6a \ - --hash=sha256:ea8990436d914540a40ab24b6a77c0969695ed52f4a4874c5137ccf7045a7057 \ - --hash=sha256:ecde28a596bead48b0cfd2a1b4416c3d43074c2d785e3a398d7ec1fc4d0f7fbb \ - --hash=sha256:f5333311663ea94f75dd408665686aaf426563556bb5283554a3539177e03b8c \ - --hash=sha256:fdfef35d751d510fcef5252703621574364fec16418c4a1e5e1055248401054b +cryptography==49.0.0 \ + --hash=sha256:026ac7423e6fa66872d3bf889be5974507da3944f866f704fa200eadacd00001 \ + --hash=sha256:07cab27cc7b7e0fd28e5e26bb9eeedde5c135c868b46de4a27845abe94af6122 \ + --hash=sha256:084ef1af862eb07ec46d25f68689f2102a9fc0e05ce7b80f14f5fe51e4eef0f6 \ + --hash=sha256:0b82e28ee398a386f0807bba7884d30f25218855690f45115831bcce5d90822c \ + --hash=sha256:0e959b578856a3924bc0cbb710fc12c387b9412a951389f3ca61704a9e25f325 \ + --hash=sha256:0f21641cf4b30fca7aee061ced0ec7ad7b073518088b7c9969a297c0ae796c69 \ + --hash=sha256:196ecd6a36e4e9aa10270393bb98d8df88fccee0bf1e5128b91ae4eb4375896d \ + --hash=sha256:2400ef9c9e2299a25614eb1dea3db54a69b1349efd043bfac9c67630d136df36 \ + --hash=sha256:28d8b15e6275f12c8a207dc309dfa957903c927d08d0cc937ee3f63f200693cc \ + --hash=sha256:2afe9051da7ae7bd5905da5a949280c7d2bb75682e188f650a9d0f2756b834c6 \ + --hash=sha256:2eda353d8a27bcbcaa4cbed18994a74ab4d19a2ca897db188ea269ab9b71419b \ + --hash=sha256:32703d93296f5c1f4b53349ad3a250c2cae0fdecd3a3dd5d47e616d8d616af27 \ + --hash=sha256:33cd0565932807baddb67b96dbee92f2c374b5c89dee09fd74079aeb8c8dba61 \ + --hash=sha256:35b151772baff2c74cba7fa290ceaff4c3b11c0c881eb93eb5dbc05a7cfbba18 \ + --hash=sha256:36d1709f992593689b45bda411498d62c6e365f2ca00b84657d4dadd24de16db \ + --hash=sha256:42b0684e0e40cf26122427802486f6d93aea593612603a94fbf260c7eb1e9c1b \ + --hash=sha256:4ae387c9cb68ea569ca17e490d66d8142b81c3cc814bf179974b7d146e490bbb \ + --hash=sha256:53ecee2e23f7169b6117e99fc8a944e5e50f79e69758a83b52a00cb98ab2b2d2 \ + --hash=sha256:66ec79c3904820572d7e987abdf304281f141d37ad9a489b8e97066e7b9b6459 \ + --hash=sha256:67e1d20ad9ef3a563c59ef22e7a8a0b8210bd26604369ea4a30a7c66aefe504e \ + --hash=sha256:6f2debedf9ca60cf1d5bd466475638af5130f89965605cd818484d19987d3a21 \ + --hash=sha256:6fc361c34fb6aac015ce19435876635e5c6d21db31998b0920f675f131e043b8 \ + --hash=sha256:73a205dce83953d131a4aa1e0fd917a2fd1c5b1eef251e9d7152efefcbf5caf7 \ + --hash=sha256:7abcee80084cda3f7691f3eb1ce480d8df49cec637b429aa35986c1de71738aa \ + --hash=sha256:8c25ceb16df5b9435f3f6a9829204985b0e0cbee3b48aacd432c7d2c850b44d9 \ + --hash=sha256:966fe0e9c67490071f14c0d2b1cb2dfb3023c5ce39457343931415f08382f2db \ + --hash=sha256:9e82dcc8e56052715fb18b2429e3bca4823b1629136a2084fc45a9a5cecb9b64 \ + --hash=sha256:b20133d204d2bb56ba047642199603876c872026ca53e79c35b83772ab2cc505 \ + --hash=sha256:b39efa323140595abd3ecca8529d321ae50f55f3aa3ba9cc81ea56a6011953d5 \ + --hash=sha256:b47db11c2c3525083296069b98ac5221907455e989ae0c2e3008bde851921615 \ + --hash=sha256:b87e65d263b3e5d3bb92a57e2a6638e2f31110fa7aa890c7b2dbba42248d0a3f \ + --hash=sha256:b970c6da94d5bb18629db453d14f2a1300f6bf59b61e9b82377931ef95504866 \ + --hash=sha256:be9fcb48a55f023493482827d4f459bd263cc20efde64f204b97c123201850c6 \ + --hash=sha256:c2bc30226390d60ea19d9f82b19db005fe0452154a23c1c410c12ea801e43561 \ + --hash=sha256:c83782480a4a9da4d0feb51950131ba32e12e70813848b3343f6e18c28a66838 \ + --hash=sha256:cbc77da8c523d5abd028635ba850a6966fcee2c82e2bf65a41d1d8afe0f98be9 \ + --hash=sha256:ccac2bfebc306b862133e3bb71f3f6ee8bb525240089b2d952e4144b3a6d5da7 \ + --hash=sha256:d0527ce944105f257f605a827d6ebead966c752038b6e8656abb9c5edee6fc68 \ + --hash=sha256:d8ecde755e2e91bf773fc94e8c9d730cd7f2007004cb492263a794ec3899a1c8 \ + --hash=sha256:e3fb64c420688e5319ae25113a354015abbd8dffbfbc41781a1ea66fc7622ac3 \ + --hash=sha256:e5dfc1e64de5677cec922ffa8da89c546d0415bf6efdf081842e5d44c84e1f0e \ + --hash=sha256:ec5e529fb80935c94fe7b729f9972b50e351a0e6b50aa294fd5cabb109fcc29a \ + --hash=sha256:f37d847238971164fdbc68ade6f6574aecc9c0af714190e2083429ff68f4ce9d \ + --hash=sha256:f78ff2c9ed8dc2d036b0f4d640e22522213d047c1b14e61205a7e55c80a494d4 \ + --hash=sha256:f89660a348f4f78a92366240a61404e337586ef7f5909a2fef59ca88ef505493 \ + --hash=sha256:fc1e275c2f1d97b1a6450b8b0ea3ebfa6e087a611c2b26cb2404d48588abab7b # via pipelock-verify (pyproject.toml) exceptiongroup==1.3.1 \ --hash=sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219 \ @@ -409,9 +406,9 @@ pygments==2.20.0 \ --hash=sha256:6757cd03768053ff99f3039c1a36d6c0aa0b263438fcab17520b30a303a82b5f \ --hash=sha256:81a9e26dd42fd28a23a2d169d86d7ac03b46e2f8b59ed4698fb4785f946d0176 # via pytest -pytest==8.4.2 \ - --hash=sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01 \ - --hash=sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79 +pytest==9.1.1 \ + --hash=sha256:1088fbde8f2b49d95a549a195707afa7a76a3ce9bcadc26b6d71f0ffda5fe313 \ + --hash=sha256:37a86b45efb9a47a61a36449063e8e18d0cab3161329fc099eb21783169c4f0c # via # pipelock-verify (pyproject.toml) # pytest-cov diff --git a/requirements/fuzz.txt b/requirements/fuzz.txt index 7ed6bdf..814e0ab 100644 --- a/requirements/fuzz.txt +++ b/requirements/fuzz.txt @@ -92,56 +92,53 @@ cffi==2.0.0 \ --hash=sha256:fc7de24befaeae77ba923797c7c87834c73648a05a4bde34b3b7e5588973a453 \ --hash=sha256:fe562eb1a64e67dd297ccc4f5addea2501664954f2692b69a76449ec7913ecbf # via cryptography -cryptography==48.0.0 \ - --hash=sha256:0890f502ddf7d9c6426129c3f49f5c0a39278ed7cd6322c8755ffca6ee675a13 \ - --hash=sha256:0c558d2cdffd8f4bbb30fc7134c74d2ca9a476f830bb053074498fbc86f41ed6 \ - --hash=sha256:16cd65b9330583e4619939b3a3843eec1e6e789744bb01e7c7e2e62e33c239c8 \ - --hash=sha256:18349bbc56f4743c8b12dc32e2bccb2cf83ee8b69a3bba74ef8ae857e26b3d25 \ - --hash=sha256:1e2d54c8be6152856a36f0882ab231e70f8ec7f14e93cf87db8a2ed056bf160c \ - --hash=sha256:22a5cb272895dce158b2cacdfdc3debd299019659f42947dbdac6f32d68fe832 \ - --hash=sha256:27241b1dc9962e056062a8eef1991d02c3a24569c95975bd2322a8a52c6e5e12 \ - --hash=sha256:2b4d59804e8408e2fea7d1fbaf218e5ec984325221db76e6a241a9abd6cdd95c \ - --hash=sha256:2eb992bbd4661238c5a397594c83f5b4dc2bc5b848c365c8f991b6780efcc5c7 \ - --hash=sha256:369a6348999f94bbd53435c894377b20ab95f25a9065c283570e70150d8abc3c \ - --hash=sha256:3cb07a3ed6431663cd321ea8a000a1314c74211f823e4177fefa2255e057d1ec \ - --hash=sha256:40ba1f85eaa6959837b1d51c9767e230e14612eea4ef110ee8854ada22da1bf5 \ - --hash=sha256:4defde8685ae324a9eb9d818717e93b4638ef67070ac9bc15b8ca85f63048355 \ - --hash=sha256:55b7718303bf06a5753dcdccf2f3945cf18ad7bffde41b61226e4db31ab89a9c \ - --hash=sha256:561215ea3879cb1cbbf272867e2efda62476f240fb58c64de6b393ae19246741 \ - --hash=sha256:58d00498e8933e4a194f3076aee1b4a97dfec1a6da444535755822fe5d8b0b86 \ - --hash=sha256:59baa2cb386c4f0b9905bd6eb4c2a79a69a128408fd31d32ca4d7102d4156321 \ - --hash=sha256:5a5ed8fde7a1d09376ca0b40e68cd59c69fe23b1f9768bd5824f54681626032a \ - --hash=sha256:5b012212e08b8dd5edc78ef54da83dd9892fd9105323b3993eff6bea65dc21d7 \ - --hash=sha256:5c3932f4436d1cccb036cb0eaef46e6e2db91035166f1ad6505c3c9d5a635920 \ - --hash=sha256:614d0949f4790582d2cc25553abd09dd723025f0c0e7c67376a1d77196743d6e \ - --hash=sha256:76341972e1eff8b4bea859f09c0d3e64b96ce931b084f9b9b7db8ef364c30eff \ - --hash=sha256:77a2ccbbe917f6710e05ba9adaa25fb5075620bf3ea6fb751997875aff4ae4bd \ - --hash=sha256:7995ef305d7165c3f11ae07f2517e5a4f1d5c18da1376a0a9ed496336b69e5f3 \ - --hash=sha256:7ce4bfae76319a532a2dc68f82cc32f5676ee792a983187dac07183690e5c66f \ - --hash=sha256:7e8eac43dfca5c4cccc6dad9a80504436fca53bb9bc3100a2386d730fbe6b602 \ - --hash=sha256:84cf79f0dc8b36ac5da873481716e87aef31fcfa0444f9e1d8b4b2cece142855 \ - --hash=sha256:8c7378637d7d88016fa6791c159f698b3d3eed28ebf844ac36b9dc04a14dae18 \ - --hash=sha256:8cd666227ef7af430aa5914a9910e0ddd703e75f039cef0825cd0da71b6b711a \ - --hash=sha256:906cbf0670286c6e0044156bc7d4af9cbb0ef6db9f73e52c3ec56ba6bdde5336 \ - --hash=sha256:9071196d81abc88b3516ac8cdfad32e2b66dd4a5393a8e68a961e9161ddc6239 \ - --hash=sha256:9249e3cd978541d665967ac2cb2787fd6a62bddf1e75b3e347a594d7dacf4f74 \ - --hash=sha256:984a20b0f62a26f48a3396c72e4bc34c66e356d356bf370053066b3b6d54634a \ - --hash=sha256:9be5aafa5736574f8f15f262adc81b2a9869e2cfe9014d52a44633905b40d52c \ - --hash=sha256:9c459db21422be75e2809370b829a87eb37f74cd785fc4aa9ea1e5f43b47cda4 \ - --hash=sha256:9ccdac7d40688ecb5a3b4a604b8a88c8002e3442d6c60aead1db2a89a041560c \ - --hash=sha256:a0e692c683f4df67815a2d258b324e66f4738bd7a96a218c826dce4f4bd05d8f \ - --hash=sha256:a5da777e32ffed6f85a7b2b3f7c5cbc88c146bfcd0a1d7baf5fcc6c52ee35dd4 \ - --hash=sha256:a64697c641c7b1b2178e573cbc31c7c6684cd56883a478d75143dbb7118036db \ - --hash=sha256:ad64688338ed4bc1a6618076ba75fd7194a5f1797ac60b47afe926285adb3166 \ - --hash=sha256:bd72e68b06bb1e96913f97dd4901119bc17f39d4586a5adf2d3e47bc2b9d58b5 \ - --hash=sha256:c17dfe85494deaeddc5ce251aebd1d60bbe6afc8b62071bb0b469431a000124f \ - --hash=sha256:c18684a7f0cc9a3cb60328f496b8e3372def7c5d2df39ac267878b05565aaaae \ - --hash=sha256:cc90c0b39b2e3c65ef52c804b72e3c58f8a04ab2a1871272798e5f9572c17d20 \ - --hash=sha256:db63bf618e5dea46c07de12e900fe1cdd2541e6dc9dbae772a70b7d4d4765f6a \ - --hash=sha256:ea8990436d914540a40ab24b6a77c0969695ed52f4a4874c5137ccf7045a7057 \ - --hash=sha256:ecde28a596bead48b0cfd2a1b4416c3d43074c2d785e3a398d7ec1fc4d0f7fbb \ - --hash=sha256:f5333311663ea94f75dd408665686aaf426563556bb5283554a3539177e03b8c \ - --hash=sha256:fdfef35d751d510fcef5252703621574364fec16418c4a1e5e1055248401054b +cryptography==49.0.0 \ + --hash=sha256:026ac7423e6fa66872d3bf889be5974507da3944f866f704fa200eadacd00001 \ + --hash=sha256:07cab27cc7b7e0fd28e5e26bb9eeedde5c135c868b46de4a27845abe94af6122 \ + --hash=sha256:084ef1af862eb07ec46d25f68689f2102a9fc0e05ce7b80f14f5fe51e4eef0f6 \ + --hash=sha256:0b82e28ee398a386f0807bba7884d30f25218855690f45115831bcce5d90822c \ + --hash=sha256:0e959b578856a3924bc0cbb710fc12c387b9412a951389f3ca61704a9e25f325 \ + --hash=sha256:0f21641cf4b30fca7aee061ced0ec7ad7b073518088b7c9969a297c0ae796c69 \ + --hash=sha256:196ecd6a36e4e9aa10270393bb98d8df88fccee0bf1e5128b91ae4eb4375896d \ + --hash=sha256:2400ef9c9e2299a25614eb1dea3db54a69b1349efd043bfac9c67630d136df36 \ + --hash=sha256:28d8b15e6275f12c8a207dc309dfa957903c927d08d0cc937ee3f63f200693cc \ + --hash=sha256:2afe9051da7ae7bd5905da5a949280c7d2bb75682e188f650a9d0f2756b834c6 \ + --hash=sha256:2eda353d8a27bcbcaa4cbed18994a74ab4d19a2ca897db188ea269ab9b71419b \ + --hash=sha256:32703d93296f5c1f4b53349ad3a250c2cae0fdecd3a3dd5d47e616d8d616af27 \ + --hash=sha256:33cd0565932807baddb67b96dbee92f2c374b5c89dee09fd74079aeb8c8dba61 \ + --hash=sha256:35b151772baff2c74cba7fa290ceaff4c3b11c0c881eb93eb5dbc05a7cfbba18 \ + --hash=sha256:36d1709f992593689b45bda411498d62c6e365f2ca00b84657d4dadd24de16db \ + --hash=sha256:42b0684e0e40cf26122427802486f6d93aea593612603a94fbf260c7eb1e9c1b \ + --hash=sha256:4ae387c9cb68ea569ca17e490d66d8142b81c3cc814bf179974b7d146e490bbb \ + --hash=sha256:53ecee2e23f7169b6117e99fc8a944e5e50f79e69758a83b52a00cb98ab2b2d2 \ + --hash=sha256:66ec79c3904820572d7e987abdf304281f141d37ad9a489b8e97066e7b9b6459 \ + --hash=sha256:67e1d20ad9ef3a563c59ef22e7a8a0b8210bd26604369ea4a30a7c66aefe504e \ + --hash=sha256:6f2debedf9ca60cf1d5bd466475638af5130f89965605cd818484d19987d3a21 \ + --hash=sha256:6fc361c34fb6aac015ce19435876635e5c6d21db31998b0920f675f131e043b8 \ + --hash=sha256:73a205dce83953d131a4aa1e0fd917a2fd1c5b1eef251e9d7152efefcbf5caf7 \ + --hash=sha256:7abcee80084cda3f7691f3eb1ce480d8df49cec637b429aa35986c1de71738aa \ + --hash=sha256:8c25ceb16df5b9435f3f6a9829204985b0e0cbee3b48aacd432c7d2c850b44d9 \ + --hash=sha256:966fe0e9c67490071f14c0d2b1cb2dfb3023c5ce39457343931415f08382f2db \ + --hash=sha256:9e82dcc8e56052715fb18b2429e3bca4823b1629136a2084fc45a9a5cecb9b64 \ + --hash=sha256:b20133d204d2bb56ba047642199603876c872026ca53e79c35b83772ab2cc505 \ + --hash=sha256:b39efa323140595abd3ecca8529d321ae50f55f3aa3ba9cc81ea56a6011953d5 \ + --hash=sha256:b47db11c2c3525083296069b98ac5221907455e989ae0c2e3008bde851921615 \ + --hash=sha256:b87e65d263b3e5d3bb92a57e2a6638e2f31110fa7aa890c7b2dbba42248d0a3f \ + --hash=sha256:b970c6da94d5bb18629db453d14f2a1300f6bf59b61e9b82377931ef95504866 \ + --hash=sha256:be9fcb48a55f023493482827d4f459bd263cc20efde64f204b97c123201850c6 \ + --hash=sha256:c2bc30226390d60ea19d9f82b19db005fe0452154a23c1c410c12ea801e43561 \ + --hash=sha256:c83782480a4a9da4d0feb51950131ba32e12e70813848b3343f6e18c28a66838 \ + --hash=sha256:cbc77da8c523d5abd028635ba850a6966fcee2c82e2bf65a41d1d8afe0f98be9 \ + --hash=sha256:ccac2bfebc306b862133e3bb71f3f6ee8bb525240089b2d952e4144b3a6d5da7 \ + --hash=sha256:d0527ce944105f257f605a827d6ebead966c752038b6e8656abb9c5edee6fc68 \ + --hash=sha256:d8ecde755e2e91bf773fc94e8c9d730cd7f2007004cb492263a794ec3899a1c8 \ + --hash=sha256:e3fb64c420688e5319ae25113a354015abbd8dffbfbc41781a1ea66fc7622ac3 \ + --hash=sha256:e5dfc1e64de5677cec922ffa8da89c546d0415bf6efdf081842e5d44c84e1f0e \ + --hash=sha256:ec5e529fb80935c94fe7b729f9972b50e351a0e6b50aa294fd5cabb109fcc29a \ + --hash=sha256:f37d847238971164fdbc68ade6f6574aecc9c0af714190e2083429ff68f4ce9d \ + --hash=sha256:f78ff2c9ed8dc2d036b0f4d640e22522213d047c1b14e61205a7e55c80a494d4 \ + --hash=sha256:f89660a348f4f78a92366240a61404e337586ef7f5909a2fef59ca88ef505493 \ + --hash=sha256:fc1e275c2f1d97b1a6450b8b0ea3ebfa6e087a611c2b26cb2404d48588abab7b # via pipelock-verify (pyproject.toml) pycparser==3.0 \ --hash=sha256:600f49d217304a5902ac3c37e1281c9fe94e4d0489de643a9504c5cdfdfc6b29 \ diff --git a/requirements/pip.in b/requirements/pip.in index e517787..657e215 100644 --- a/requirements/pip.in +++ b/requirements/pip.in @@ -1 +1 @@ -pip==26.1 +pip==26.1.2 diff --git a/requirements/pip.txt b/requirements/pip.txt index e1145be..22e6145 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -1,2 +1,6 @@ # This file was autogenerated by uv via the following command: # uv pip compile --python-version 3.12 --generate-hashes --output-file requirements/pip.txt requirements/pip.in +pip==26.1.2 \ + --hash=sha256:382ff9f685ee3bc25864f820aa50505825f10f5458ffff07e30a6d96e5715cab \ + --hash=sha256:f49cd134c61cf2fd75e0ce2676db03e4054504a5a4986d00f8299ae632dc4605 + # via -r requirements/pip.in diff --git a/requirements/release.txt b/requirements/release.txt index 3ecf456..95b0c4b 100644 --- a/requirements/release.txt +++ b/requirements/release.txt @@ -225,56 +225,53 @@ charset-normalizer==3.4.7 \ --hash=sha256:fbccdc05410c9ee21bbf16a35f4c1d16123dcdeb8a1d38f33654fa21d0234f79 \ --hash=sha256:fea24543955a6a729c45a73fe90e08c743f0b3334bbf3201e6c4bc1b0c7fa464 # via requests -cryptography==48.0.0 \ - --hash=sha256:0890f502ddf7d9c6426129c3f49f5c0a39278ed7cd6322c8755ffca6ee675a13 \ - --hash=sha256:0c558d2cdffd8f4bbb30fc7134c74d2ca9a476f830bb053074498fbc86f41ed6 \ - --hash=sha256:16cd65b9330583e4619939b3a3843eec1e6e789744bb01e7c7e2e62e33c239c8 \ - --hash=sha256:18349bbc56f4743c8b12dc32e2bccb2cf83ee8b69a3bba74ef8ae857e26b3d25 \ - --hash=sha256:1e2d54c8be6152856a36f0882ab231e70f8ec7f14e93cf87db8a2ed056bf160c \ - --hash=sha256:22a5cb272895dce158b2cacdfdc3debd299019659f42947dbdac6f32d68fe832 \ - --hash=sha256:27241b1dc9962e056062a8eef1991d02c3a24569c95975bd2322a8a52c6e5e12 \ - --hash=sha256:2b4d59804e8408e2fea7d1fbaf218e5ec984325221db76e6a241a9abd6cdd95c \ - --hash=sha256:2eb992bbd4661238c5a397594c83f5b4dc2bc5b848c365c8f991b6780efcc5c7 \ - --hash=sha256:369a6348999f94bbd53435c894377b20ab95f25a9065c283570e70150d8abc3c \ - --hash=sha256:3cb07a3ed6431663cd321ea8a000a1314c74211f823e4177fefa2255e057d1ec \ - --hash=sha256:40ba1f85eaa6959837b1d51c9767e230e14612eea4ef110ee8854ada22da1bf5 \ - --hash=sha256:4defde8685ae324a9eb9d818717e93b4638ef67070ac9bc15b8ca85f63048355 \ - --hash=sha256:55b7718303bf06a5753dcdccf2f3945cf18ad7bffde41b61226e4db31ab89a9c \ - --hash=sha256:561215ea3879cb1cbbf272867e2efda62476f240fb58c64de6b393ae19246741 \ - --hash=sha256:58d00498e8933e4a194f3076aee1b4a97dfec1a6da444535755822fe5d8b0b86 \ - --hash=sha256:59baa2cb386c4f0b9905bd6eb4c2a79a69a128408fd31d32ca4d7102d4156321 \ - --hash=sha256:5a5ed8fde7a1d09376ca0b40e68cd59c69fe23b1f9768bd5824f54681626032a \ - --hash=sha256:5b012212e08b8dd5edc78ef54da83dd9892fd9105323b3993eff6bea65dc21d7 \ - --hash=sha256:5c3932f4436d1cccb036cb0eaef46e6e2db91035166f1ad6505c3c9d5a635920 \ - --hash=sha256:614d0949f4790582d2cc25553abd09dd723025f0c0e7c67376a1d77196743d6e \ - --hash=sha256:76341972e1eff8b4bea859f09c0d3e64b96ce931b084f9b9b7db8ef364c30eff \ - --hash=sha256:77a2ccbbe917f6710e05ba9adaa25fb5075620bf3ea6fb751997875aff4ae4bd \ - --hash=sha256:7995ef305d7165c3f11ae07f2517e5a4f1d5c18da1376a0a9ed496336b69e5f3 \ - --hash=sha256:7ce4bfae76319a532a2dc68f82cc32f5676ee792a983187dac07183690e5c66f \ - --hash=sha256:7e8eac43dfca5c4cccc6dad9a80504436fca53bb9bc3100a2386d730fbe6b602 \ - --hash=sha256:84cf79f0dc8b36ac5da873481716e87aef31fcfa0444f9e1d8b4b2cece142855 \ - --hash=sha256:8c7378637d7d88016fa6791c159f698b3d3eed28ebf844ac36b9dc04a14dae18 \ - --hash=sha256:8cd666227ef7af430aa5914a9910e0ddd703e75f039cef0825cd0da71b6b711a \ - --hash=sha256:906cbf0670286c6e0044156bc7d4af9cbb0ef6db9f73e52c3ec56ba6bdde5336 \ - --hash=sha256:9071196d81abc88b3516ac8cdfad32e2b66dd4a5393a8e68a961e9161ddc6239 \ - --hash=sha256:9249e3cd978541d665967ac2cb2787fd6a62bddf1e75b3e347a594d7dacf4f74 \ - --hash=sha256:984a20b0f62a26f48a3396c72e4bc34c66e356d356bf370053066b3b6d54634a \ - --hash=sha256:9be5aafa5736574f8f15f262adc81b2a9869e2cfe9014d52a44633905b40d52c \ - --hash=sha256:9c459db21422be75e2809370b829a87eb37f74cd785fc4aa9ea1e5f43b47cda4 \ - --hash=sha256:9ccdac7d40688ecb5a3b4a604b8a88c8002e3442d6c60aead1db2a89a041560c \ - --hash=sha256:a0e692c683f4df67815a2d258b324e66f4738bd7a96a218c826dce4f4bd05d8f \ - --hash=sha256:a5da777e32ffed6f85a7b2b3f7c5cbc88c146bfcd0a1d7baf5fcc6c52ee35dd4 \ - --hash=sha256:a64697c641c7b1b2178e573cbc31c7c6684cd56883a478d75143dbb7118036db \ - --hash=sha256:ad64688338ed4bc1a6618076ba75fd7194a5f1797ac60b47afe926285adb3166 \ - --hash=sha256:bd72e68b06bb1e96913f97dd4901119bc17f39d4586a5adf2d3e47bc2b9d58b5 \ - --hash=sha256:c17dfe85494deaeddc5ce251aebd1d60bbe6afc8b62071bb0b469431a000124f \ - --hash=sha256:c18684a7f0cc9a3cb60328f496b8e3372def7c5d2df39ac267878b05565aaaae \ - --hash=sha256:cc90c0b39b2e3c65ef52c804b72e3c58f8a04ab2a1871272798e5f9572c17d20 \ - --hash=sha256:db63bf618e5dea46c07de12e900fe1cdd2541e6dc9dbae772a70b7d4d4765f6a \ - --hash=sha256:ea8990436d914540a40ab24b6a77c0969695ed52f4a4874c5137ccf7045a7057 \ - --hash=sha256:ecde28a596bead48b0cfd2a1b4416c3d43074c2d785e3a398d7ec1fc4d0f7fbb \ - --hash=sha256:f5333311663ea94f75dd408665686aaf426563556bb5283554a3539177e03b8c \ - --hash=sha256:fdfef35d751d510fcef5252703621574364fec16418c4a1e5e1055248401054b +cryptography==49.0.0 \ + --hash=sha256:026ac7423e6fa66872d3bf889be5974507da3944f866f704fa200eadacd00001 \ + --hash=sha256:07cab27cc7b7e0fd28e5e26bb9eeedde5c135c868b46de4a27845abe94af6122 \ + --hash=sha256:084ef1af862eb07ec46d25f68689f2102a9fc0e05ce7b80f14f5fe51e4eef0f6 \ + --hash=sha256:0b82e28ee398a386f0807bba7884d30f25218855690f45115831bcce5d90822c \ + --hash=sha256:0e959b578856a3924bc0cbb710fc12c387b9412a951389f3ca61704a9e25f325 \ + --hash=sha256:0f21641cf4b30fca7aee061ced0ec7ad7b073518088b7c9969a297c0ae796c69 \ + --hash=sha256:196ecd6a36e4e9aa10270393bb98d8df88fccee0bf1e5128b91ae4eb4375896d \ + --hash=sha256:2400ef9c9e2299a25614eb1dea3db54a69b1349efd043bfac9c67630d136df36 \ + --hash=sha256:28d8b15e6275f12c8a207dc309dfa957903c927d08d0cc937ee3f63f200693cc \ + --hash=sha256:2afe9051da7ae7bd5905da5a949280c7d2bb75682e188f650a9d0f2756b834c6 \ + --hash=sha256:2eda353d8a27bcbcaa4cbed18994a74ab4d19a2ca897db188ea269ab9b71419b \ + --hash=sha256:32703d93296f5c1f4b53349ad3a250c2cae0fdecd3a3dd5d47e616d8d616af27 \ + --hash=sha256:33cd0565932807baddb67b96dbee92f2c374b5c89dee09fd74079aeb8c8dba61 \ + --hash=sha256:35b151772baff2c74cba7fa290ceaff4c3b11c0c881eb93eb5dbc05a7cfbba18 \ + --hash=sha256:36d1709f992593689b45bda411498d62c6e365f2ca00b84657d4dadd24de16db \ + --hash=sha256:42b0684e0e40cf26122427802486f6d93aea593612603a94fbf260c7eb1e9c1b \ + --hash=sha256:4ae387c9cb68ea569ca17e490d66d8142b81c3cc814bf179974b7d146e490bbb \ + --hash=sha256:53ecee2e23f7169b6117e99fc8a944e5e50f79e69758a83b52a00cb98ab2b2d2 \ + --hash=sha256:66ec79c3904820572d7e987abdf304281f141d37ad9a489b8e97066e7b9b6459 \ + --hash=sha256:67e1d20ad9ef3a563c59ef22e7a8a0b8210bd26604369ea4a30a7c66aefe504e \ + --hash=sha256:6f2debedf9ca60cf1d5bd466475638af5130f89965605cd818484d19987d3a21 \ + --hash=sha256:6fc361c34fb6aac015ce19435876635e5c6d21db31998b0920f675f131e043b8 \ + --hash=sha256:73a205dce83953d131a4aa1e0fd917a2fd1c5b1eef251e9d7152efefcbf5caf7 \ + --hash=sha256:7abcee80084cda3f7691f3eb1ce480d8df49cec637b429aa35986c1de71738aa \ + --hash=sha256:8c25ceb16df5b9435f3f6a9829204985b0e0cbee3b48aacd432c7d2c850b44d9 \ + --hash=sha256:966fe0e9c67490071f14c0d2b1cb2dfb3023c5ce39457343931415f08382f2db \ + --hash=sha256:9e82dcc8e56052715fb18b2429e3bca4823b1629136a2084fc45a9a5cecb9b64 \ + --hash=sha256:b20133d204d2bb56ba047642199603876c872026ca53e79c35b83772ab2cc505 \ + --hash=sha256:b39efa323140595abd3ecca8529d321ae50f55f3aa3ba9cc81ea56a6011953d5 \ + --hash=sha256:b47db11c2c3525083296069b98ac5221907455e989ae0c2e3008bde851921615 \ + --hash=sha256:b87e65d263b3e5d3bb92a57e2a6638e2f31110fa7aa890c7b2dbba42248d0a3f \ + --hash=sha256:b970c6da94d5bb18629db453d14f2a1300f6bf59b61e9b82377931ef95504866 \ + --hash=sha256:be9fcb48a55f023493482827d4f459bd263cc20efde64f204b97c123201850c6 \ + --hash=sha256:c2bc30226390d60ea19d9f82b19db005fe0452154a23c1c410c12ea801e43561 \ + --hash=sha256:c83782480a4a9da4d0feb51950131ba32e12e70813848b3343f6e18c28a66838 \ + --hash=sha256:cbc77da8c523d5abd028635ba850a6966fcee2c82e2bf65a41d1d8afe0f98be9 \ + --hash=sha256:ccac2bfebc306b862133e3bb71f3f6ee8bb525240089b2d952e4144b3a6d5da7 \ + --hash=sha256:d0527ce944105f257f605a827d6ebead966c752038b6e8656abb9c5edee6fc68 \ + --hash=sha256:d8ecde755e2e91bf773fc94e8c9d730cd7f2007004cb492263a794ec3899a1c8 \ + --hash=sha256:e3fb64c420688e5319ae25113a354015abbd8dffbfbc41781a1ea66fc7622ac3 \ + --hash=sha256:e5dfc1e64de5677cec922ffa8da89c546d0415bf6efdf081842e5d44c84e1f0e \ + --hash=sha256:ec5e529fb80935c94fe7b729f9972b50e351a0e6b50aa294fd5cabb109fcc29a \ + --hash=sha256:f37d847238971164fdbc68ade6f6574aecc9c0af714190e2083429ff68f4ce9d \ + --hash=sha256:f78ff2c9ed8dc2d036b0f4d640e22522213d047c1b14e61205a7e55c80a494d4 \ + --hash=sha256:f89660a348f4f78a92366240a61404e337586ef7f5909a2fef59ca88ef505493 \ + --hash=sha256:fc1e275c2f1d97b1a6450b8b0ea3ebfa6e087a611c2b26cb2404d48588abab7b # via # pipelock-verify (pyproject.toml) # secretstorage @@ -402,9 +399,9 @@ secretstorage==3.5.0 \ --hash=sha256:0ce65888c0725fcb2c5bc0fdb8e5438eece02c523557ea40ce0703c266248137 \ --hash=sha256:f04b8e4689cbce351744d5537bf6b1329c6fc68f91fa666f60a380edddcd11be # via keyring -setuptools==82.0.1 \ - --hash=sha256:7d872682c5d01cfde07da7bccc7b65469d3dca203318515ada1de5eda35efbf9 \ - --hash=sha256:a59e362652f08dcd477c78bb6e7bd9d80a7995bc73ce773050228a348ce2e5bb +setuptools==83.0.0 \ + --hash=sha256:025bccbbf0fa05b6192bc64ae1e7b16e001fd6d6d4d5de03c97b1c1ade523bef \ + --hash=sha256:29b23c360f22f414dc7336bb39178cc7bcbf6021ed2733cde173f09dba19abb3 # via pipelock-verify (pyproject.toml) twine==6.2.0 \ --hash=sha256:418ebf08ccda9a8caaebe414433b0ba5e25eb5e4a927667122fbe8f829f985d8 \ From 0c593bf400725261ec23303f817cf0d72015524a Mon Sep 17 00:00:00 2001 From: luckyPipewrench Date: Thu, 30 Jul 2026 17:18:51 -0400 Subject: [PATCH 3/5] fix: fail closed on rotation trust boundaries --- README.md | 4 ++++ pipelock_verify/__main__.py | 4 ++-- pipelock_verify/_rotation.py | 13 ++++++++----- pipelock_verify/_verify.py | 17 ++++++++++++++--- tests/test_conformance.py | 24 ++++++++++++++++++++++++ tests/test_regressions.py | 13 +++++++++++++ 6 files changed, 65 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 00c563a..d182737 100644 --- a/README.md +++ b/README.md @@ -100,6 +100,10 @@ prior sequence, tail hash, recorder session, and successor key. Missing, altered, duplicate, replayed, cross-session, and unused endorsements fail closed. +`session_id` must match `recorder_session` in every signed `session_open`, and +the root segment must contain one. A chain without that signed session binding +cannot be verified with endorsements. + ### CLI ```bash diff --git a/pipelock_verify/__main__.py b/pipelock_verify/__main__.py index b1dc6bb..e5752b7 100644 --- a/pipelock_verify/__main__.py +++ b/pipelock_verify/__main__.py @@ -107,7 +107,7 @@ def main(argv: Sequence[str] | None = None) -> int: parser.add_argument( "--rotation-endorsement", action="append", - default=[], + default=None, type=Path, metavar="FILE", help="old-key-signed rotation endorsement; repeat for each rotation boundary", @@ -131,7 +131,7 @@ def main(argv: Sequence[str] | None = None) -> int: try: endorsements = [ load_rotation_endorsement(endorsement_path) - for endorsement_path in args.rotation_endorsement + for endorsement_path in (args.rotation_endorsement or []) ] except (InvalidReceiptError, UnicodeDecodeError) as exc: print(f"CHAIN BROKEN: {path}") diff --git a/pipelock_verify/_rotation.py b/pipelock_verify/_rotation.py index 6215bf2..06ba411 100644 --- a/pipelock_verify/_rotation.py +++ b/pipelock_verify/_rotation.py @@ -9,7 +9,7 @@ from pathlib import Path from typing import Any -from cryptography.exceptions import InvalidSignature +from cryptography.exceptions import InvalidSignature, UnsupportedAlgorithm from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PublicKey from ._common import InvalidReceiptError, _is_valid_rfc3339, loads_no_duplicate_keys @@ -197,9 +197,11 @@ def verify_rotation_endorsement( raise InvalidReceiptError("invalid endorsement signature") digest = hashlib.sha256(_DOMAIN + _canonical_bytes(endorsement)).digest() try: - Ed25519PublicKey.from_public_bytes(bytes.fromhex(endorsement.prior_signer_key)).verify( - signature, digest - ) + public_key = Ed25519PublicKey.from_public_bytes(bytes.fromhex(endorsement.prior_signer_key)) + except (ValueError, UnsupportedAlgorithm) as exc: + raise InvalidReceiptError("rotation endorsement signer key is invalid") from exc + try: + public_key.verify(signature, digest) except InvalidSignature as exc: raise InvalidReceiptError("rotation endorsement signature verification failed") from exc return endorsement @@ -209,7 +211,8 @@ def load_rotation_endorsement(path: str | Path) -> RotationEndorsement: """Read and verify one bounded endorsement file.""" file = Path(path) try: - data = file.read_bytes() + with file.open("rb") as handle: + data = handle.read(_MAX_BYTES + 1) except OSError as exc: raise InvalidReceiptError(f"read rotation endorsement: {exc}") from exc return verify_rotation_endorsement(data) diff --git a/pipelock_verify/_verify.py b/pipelock_verify/_verify.py index 485d79d..729c2c6 100644 --- a/pipelock_verify/_verify.py +++ b/pipelock_verify/_verify.py @@ -1109,7 +1109,6 @@ def _verify_chain_list( # When no key is pinned, lock to the first receipt's signer_key so an # attacker can't splice receipts from a second signer into the chain. expected_key = str(public_key_hex or receipts[0].get("signer_key", "")).lower() - root_key = expected_key.lower() prev_hash: str | None = None prior_segment_seq: int | None = None @@ -1125,6 +1124,12 @@ def _verify_chain_list( ar = receipt.get("action_record") or {} seq = ar.get("chain_seq", i) marker = ar.get("key_transition") + if not isinstance(seq, int) or isinstance(seq, bool) or seq < 0 or seq > _UINT64_MAX: + return ChainResult( + valid=False, + broken_at_seq=i, + error=f"seq {i}: signature: chain_seq must be a uint64", + ) if i == 0: if marker is not None: @@ -1136,7 +1141,13 @@ def _verify_chain_list( f"{seq}: chain starts at a key_transition segment without the prior segment" ), ) - segment_base_seq = seq + if seq != 0: + return ChainResult( + valid=False, + broken_at_seq=seq, + error=f"seq {seq}: root receipt segment must start at chain_seq 0", + ) + segment_base_seq = 0 elif marker is not None: if seq != 0: return ChainResult( @@ -1206,7 +1217,7 @@ def _verify_chain_list( ) if matches: used_endorsements.add(matches[0]) - if successor != root_key and not matches: + if not matches: return ChainResult( valid=False, broken_at_seq=seq, diff --git a/tests/test_conformance.py b/tests/test_conformance.py index 3bb272d..71cb45e 100644 --- a/tests/test_conformance.py +++ b/tests/test_conformance.py @@ -12,8 +12,10 @@ from pathlib import Path import pytest +from cryptography.exceptions import UnsupportedAlgorithm import pipelock_verify +import pipelock_verify._rotation as rotation_module CONFORMANCE_DIR = Path(__file__).parent / "conformance" FIXTURE_DIR = Path(__file__).parent / "fixtures" @@ -231,6 +233,23 @@ def test_rotation_endorsement_trust_fails_closed(test_key_hex): assert "signed recorder session" in (cross_session.error or "") +@pytest.mark.parametrize("failure", [ValueError("bad key"), UnsupportedAlgorithm("unsupported")]) +def test_rotation_endorsement_wraps_signer_key_load_failures(monkeypatch, failure): + endorsement = json.loads((CONFORMANCE_DIR / "g1-rotation-endorsement.json").read_text()) + + class FailingPublicKey: + @staticmethod + def from_public_bytes(_key): + raise failure + + monkeypatch.setattr(rotation_module, "Ed25519PublicKey", FailingPublicKey) + with pytest.raises( + pipelock_verify.InvalidReceiptError, + match="rotation endorsement signer key is invalid", + ): + pipelock_verify.verify_rotation_endorsement(endorsement) + + def test_rotation_endorsement_file_rejects_duplicate_unknown_and_trailing_fields( tmp_path, ): @@ -252,6 +271,11 @@ def test_rotation_endorsement_file_rejects_duplicate_unknown_and_trailing_fields with pytest.raises(pipelock_verify.InvalidReceiptError, match=error): pipelock_verify.load_rotation_endorsement(path) + oversized = tmp_path / "oversized.json" + oversized.write_bytes(b"{" + b" " * (64 * 1024)) + with pytest.raises(pipelock_verify.InvalidReceiptError, match="exceeds 65536 bytes"): + pipelock_verify.load_rotation_endorsement(oversized) + def test_v3_2_0_live_recorder_chain_verifies_with_pinned_key(): """A real v3.2.0 recorder log must verify end-to-end. diff --git a/tests/test_regressions.py b/tests/test_regressions.py index cdc9c07..0c5bdd1 100644 --- a/tests/test_regressions.py +++ b/tests/test_regressions.py @@ -404,6 +404,19 @@ def test_verify_chain_rejects_negative_chain_seq_even_with_valid_signature(tmp_p assert "chain_seq must be a uint64" in (result.error or "") +def test_verify_chain_rejects_truncated_legacy_root_segment(tmp_path): + ar = _valid_action_record() + ar["action_id"] = "truncated-root-segment" + ar["chain_seq"] = 7 + receipt = _sign_action_record(ar) + + result = pipelock_verify.verify_chain(_write_signed_chain(tmp_path, receipt)) + + assert not result.valid + assert result.broken_at_seq == 7 + assert "root receipt segment must start at chain_seq 0" in (result.error or "") + + @pytest.mark.parametrize( ("session_control", "want"), [ From 91a5a4663ef2f07a5a2c9ddb13a69018e474f26b Mon Sep 17 00:00:00 2001 From: luckyPipewrench Date: Thu, 30 Jul 2026 17:42:23 -0400 Subject: [PATCH 4/5] fix: reject noncanonical rotation endorsements --- pipelock_verify/_rotation.py | 17 ++++++++----- tests/test_conformance.py | 46 ++++++++++++++++++++++++++++++++++++ tests/test_regressions.py | 1 + 3 files changed, 58 insertions(+), 6 deletions(-) diff --git a/pipelock_verify/_rotation.py b/pipelock_verify/_rotation.py index 06ba411..6a2b8b0 100644 --- a/pipelock_verify/_rotation.py +++ b/pipelock_verify/_rotation.py @@ -31,6 +31,7 @@ } ) _LOWER_HEX_32 = re.compile(r"^[0-9a-f]{64}$") +_ED25519_SIGNATURE = re.compile(r"^ed25519:[0-9a-fA-F]{128}$") _CANONICAL_UTC = re.compile( r"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}" r"(?:\.[0-9]{0,8}[1-9])?Z$" @@ -87,6 +88,8 @@ def _require_hex(value: Any, field: str) -> str: def _decode(value: dict[str, Any]) -> RotationEndorsement: + if any(not isinstance(name, str) for name in value): + raise InvalidReceiptError("rotation endorsement field names must be strings") unknown = set(value) - _FIELDS if unknown: raise InvalidReceiptError( @@ -98,7 +101,7 @@ def _decode(value: dict[str, Any]) -> RotationEndorsement: f"rotation endorsement is missing required field {sorted(missing)[0]}" ) version = value["version"] - if isinstance(version, bool) or version != _VERSION: + if isinstance(version, bool) or not isinstance(version, int) or version != _VERSION: raise InvalidReceiptError(f"unsupported rotation endorsement version {version!r}") prior_final_seq = value["prior_final_seq"] if ( @@ -172,7 +175,11 @@ def verify_rotation_endorsement( except (UnicodeDecodeError, json.JSONDecodeError) as exc: raise InvalidReceiptError(f"unmarshal rotation endorsement: {exc}") from exc elif isinstance(source, str): - if len(source.encode()) > _MAX_BYTES: + try: + source_size = len(source.encode()) + except UnicodeEncodeError as exc: + raise InvalidReceiptError(f"unmarshal rotation endorsement: {exc}") from exc + if source_size > _MAX_BYTES: raise InvalidReceiptError(f"rotation endorsement exceeds {_MAX_BYTES} bytes") try: parsed = loads_no_duplicate_keys(source) @@ -185,10 +192,8 @@ def verify_rotation_endorsement( if not isinstance(parsed, dict): raise InvalidReceiptError("rotation endorsement must be a JSON object") endorsement = _decode(parsed) - if not endorsement.endorsement.startswith(_SIGNATURE_PREFIX): - raise InvalidReceiptError( - f"invalid endorsement signature format: missing {_SIGNATURE_PREFIX} prefix" - ) + if _ED25519_SIGNATURE.fullmatch(endorsement.endorsement) is None: + raise InvalidReceiptError("invalid endorsement signature") try: signature = bytes.fromhex(endorsement.endorsement[len(_SIGNATURE_PREFIX) :]) except ValueError as exc: diff --git a/tests/test_conformance.py b/tests/test_conformance.py index 71cb45e..97e5adb 100644 --- a/tests/test_conformance.py +++ b/tests/test_conformance.py @@ -10,6 +10,7 @@ import json from pathlib import Path +from typing import Any import pytest from cryptography.exceptions import UnsupportedAlgorithm @@ -277,6 +278,51 @@ def test_rotation_endorsement_file_rejects_duplicate_unknown_and_trailing_fields pipelock_verify.load_rotation_endorsement(oversized) +@pytest.mark.parametrize("version", ["1.0", "1e0", '"1"']) +def test_rotation_endorsement_rejects_non_integer_version_encodings(version): + source = (CONFORMANCE_DIR / "g1-rotation-endorsement.json").read_text() + malformed = source.replace('"version": 1,', f'"version": {version},', 1) + + with pytest.raises( + pipelock_verify.InvalidReceiptError, + match="unsupported rotation endorsement version", + ): + pipelock_verify.verify_rotation_endorsement(malformed) + + +def test_rotation_endorsement_rejects_whitespace_in_signature_hex(): + endorsement = json.loads((CONFORMANCE_DIR / "g1-rotation-endorsement.json").read_text()) + signature = endorsement["endorsement"] + endorsement["endorsement"] = f"{signature[:20]} {signature[20:]}" + + with pytest.raises( + pipelock_verify.InvalidReceiptError, + match="invalid endorsement signature", + ): + pipelock_verify.verify_rotation_endorsement(endorsement) + + +def test_rotation_endorsement_wraps_malformed_public_inputs(): + endorsement: dict[Any, Any] = json.loads( + (CONFORMANCE_DIR / "g1-rotation-endorsement.json").read_text() + ) + endorsement["unexpected"] = True + endorsement[1] = True + with pytest.raises( + pipelock_verify.InvalidReceiptError, + match="field names must be strings", + ): + pipelock_verify.verify_rotation_endorsement(endorsement) + + source = (CONFORMANCE_DIR / "g1-rotation-endorsement.json").read_text() + malformed = source.replace("conformance-session", "conformance-\ud800session") + with pytest.raises( + pipelock_verify.InvalidReceiptError, + match="unmarshal rotation endorsement", + ): + pipelock_verify.verify_rotation_endorsement(malformed) + + def test_v3_2_0_live_recorder_chain_verifies_with_pinned_key(): """A real v3.2.0 recorder log must verify end-to-end. diff --git a/tests/test_regressions.py b/tests/test_regressions.py index 0c5bdd1..487bb89 100644 --- a/tests/test_regressions.py +++ b/tests/test_regressions.py @@ -793,6 +793,7 @@ def test_verify_chain_rejects_session_close_with_wrong_root_hash(tmp_path): ({"prior_signer_key": 123}, "key_transition prior_signer_key must be a string"), ({"prior_chain_hash": 123}, "key_transition prior_chain_hash must be a string"), ({"prior_chain_seq": -1}, "key_transition prior_chain_seq must be a uint64"), + ({"prior_chain_seq": 1.0}, "key_transition prior_chain_seq must be a uint64"), ({"prior_chain_seq": True}, "key_transition prior_chain_seq must be a uint64"), ("not-an-object", "key_transition must be an object"), ], From 590d5b1a3bd101a922259bdb3deec6e92849e83b Mon Sep 17 00:00:00 2001 From: luckyPipewrench Date: Thu, 30 Jul 2026 17:49:55 -0400 Subject: [PATCH 5/5] fix: reject malformed rotation chain records --- pipelock_verify/_verify.py | 30 ++++++++++++++++++++---------- tests/test_conformance.py | 28 ++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 10 deletions(-) diff --git a/pipelock_verify/_verify.py b/pipelock_verify/_verify.py index 729c2c6..e1bd874 100644 --- a/pipelock_verify/_verify.py +++ b/pipelock_verify/_verify.py @@ -1065,6 +1065,17 @@ def _verify_chain_list( ), ) + action_records: list[dict[str, Any]] = [] + for i, receipt in enumerate(receipts): + action_record = receipt.get("action_record") + if not isinstance(action_record, dict): + return ChainResult( + valid=False, + broken_at_seq=i, + error=f"seq {i}: missing or invalid action_record", + ) + action_records.append(action_record) + if rotation_endorsements: if public_key_hex is None or not public_key_hex.strip(): return ChainResult( @@ -1079,14 +1090,14 @@ def _verify_chain_list( first_boundary = next( ( index - for index, receipt in enumerate(receipts[1:], start=1) - if (receipt.get("action_record") or {}).get("key_transition") is not None + for index, action_record in enumerate(action_records[1:], start=1) + if action_record.get("key_transition") is not None ), len(receipts), ) root_open_found = False - for index, receipt in enumerate(receipts): - open_payload = _session_control_open(receipt.get("action_record") or {}) + for index, action_record in enumerate(action_records): + open_payload = _session_control_open(action_record) if open_payload is None: continue recorder_session = open_payload.get("recorder_session", "") @@ -1121,7 +1132,7 @@ def _verify_chain_list( segment_receipt_count = 0 used_endorsements: set[int] = set() for i, receipt in enumerate(receipts): - ar = receipt.get("action_record") or {} + ar = action_records[i] seq = ar.get("chain_seq", i) marker = ar.get("key_transition") if not isinstance(seq, int) or isinstance(seq, bool) or seq < 0 or seq > _UINT64_MAX: @@ -1197,8 +1208,7 @@ def _verify_chain_list( ), ) successor = str(receipt.get("signer_key", "")).lower() - prior_receipt = receipts[i - 1] - prior_ar = prior_receipt.get("action_record") or {} + prior_ar = action_records[i - 1] matches = [ endorsement_index for endorsement_index, endorsement in enumerate(rotation_endorsements) @@ -1278,7 +1288,7 @@ def _verify_chain_list( ar, open_payload, prev_hash, - receipts[i - 1].get("action_record", {}).get("chain_seq", i - 1), + action_records[i - 1].get("chain_seq", i - 1), ) if restart_error is not None: return ChainResult( @@ -1320,8 +1330,8 @@ def _verify_chain_list( error="unused rotation endorsement does not match a required boundary", ) - first_ar = receipts[0].get("action_record") or {} - last_ar = receipts[-1].get("action_record") or {} + first_ar = action_records[0] + last_ar = action_records[-1] return ChainResult( valid=True, receipt_count=len(receipts), diff --git a/tests/test_conformance.py b/tests/test_conformance.py index 97e5adb..8d5caa4 100644 --- a/tests/test_conformance.py +++ b/tests/test_conformance.py @@ -323,6 +323,34 @@ def test_rotation_endorsement_wraps_malformed_public_inputs(): pipelock_verify.verify_rotation_endorsement(malformed) +def test_rotation_chain_rejects_non_object_action_record(tmp_path, test_key_hex): + path = tmp_path / "malformed-action-record.jsonl" + path.write_text( + json.dumps( + { + "version": 1, + "action_record": ["not", "an", "object"], + "signature": f"ed25519:{'0' * 128}", + "signer_key": test_key_hex, + } + ) + ) + endorsement = pipelock_verify.load_rotation_endorsement( + CONFORMANCE_DIR / "g1-rotation-endorsement.json" + ) + + result = pipelock_verify.verify_chain( + path, + public_key_hex=test_key_hex, + session_id="conformance-session", + rotation_endorsements=[endorsement], + ) + + assert not result.valid + assert result.broken_at_seq == 0 + assert "missing or invalid action_record" in (result.error or "") + + def test_v3_2_0_live_recorder_chain_verifies_with_pinned_key(): """A real v3.2.0 recorder log must verify end-to-end.