Bind installed releases to signed artifact receipts
This commit is contained in:
@@ -105,6 +105,31 @@ def parse_args(argv: list[str] | None = None) -> argparse.Namespace:
|
||||
type=Path,
|
||||
default=META_ROOT / "docs" / "installed-composition-evidence.schema.json",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--installer-receipt",
|
||||
type=Path,
|
||||
help="Signed installer receipt binding installed payloads to this catalog.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--installer-receipt-schema",
|
||||
type=Path,
|
||||
default=META_ROOT / "docs" / "installer-receipt.schema.json",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--installer-authority-keyring",
|
||||
type=Path,
|
||||
help=(
|
||||
"Independently provisioned, role-scoped trust root for installer "
|
||||
"receipt signatures."
|
||||
),
|
||||
)
|
||||
parser.add_argument(
|
||||
"--installer-authority-keyring-schema",
|
||||
type=Path,
|
||||
default=META_ROOT
|
||||
/ "docs"
|
||||
/ "installer-receipt-authority-keyring.schema.json",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--boundary-evidence",
|
||||
type=Path,
|
||||
@@ -165,6 +190,18 @@ def main(argv: list[str] | None = None) -> int:
|
||||
raise SystemExit(
|
||||
"--boundary-evidence and --boundary-authority-keyring are required together"
|
||||
)
|
||||
if (args.installer_receipt is None) != (
|
||||
args.installer_authority_keyring is None
|
||||
):
|
||||
raise SystemExit(
|
||||
"--installer-receipt and --installer-authority-keyring are required together"
|
||||
)
|
||||
if args.installer_receipt is not None and (
|
||||
args.installed_evidence is None and args.collect_installed_evidence is None
|
||||
):
|
||||
raise SystemExit(
|
||||
"--installer-receipt requires --installed-evidence or --collect-installed-evidence"
|
||||
)
|
||||
if args.boundary_evidence is not None and (
|
||||
args.installed_evidence is None and args.collect_installed_evidence is None
|
||||
):
|
||||
@@ -286,6 +323,32 @@ def main(argv: list[str] | None = None) -> int:
|
||||
max_bytes=MAX_EVIDENCE_INPUT_BYTES,
|
||||
)
|
||||
|
||||
installer_receipt = None
|
||||
installer_receipt_schema = None
|
||||
installer_authority_keyring = None
|
||||
installer_authority_keyring_schema = None
|
||||
if args.installer_receipt is not None:
|
||||
installer_receipt = read_object(
|
||||
args.installer_receipt,
|
||||
label="installer receipt",
|
||||
max_bytes=MAX_EVIDENCE_INPUT_BYTES,
|
||||
)
|
||||
installer_receipt_schema = read_object(
|
||||
args.installer_receipt_schema,
|
||||
label="installer receipt schema",
|
||||
max_bytes=MAX_EVIDENCE_INPUT_BYTES,
|
||||
)
|
||||
installer_authority_keyring = read_object(
|
||||
args.installer_authority_keyring,
|
||||
label="installer authority keyring",
|
||||
max_bytes=MAX_EVIDENCE_INPUT_BYTES,
|
||||
)
|
||||
installer_authority_keyring_schema = read_object(
|
||||
args.installer_authority_keyring_schema,
|
||||
label="installer authority keyring schema",
|
||||
max_bytes=MAX_EVIDENCE_INPUT_BYTES,
|
||||
)
|
||||
|
||||
verification_time = parse_datetime(args.verification_time)
|
||||
report = review_capability_fit(
|
||||
assessment=assessment,
|
||||
@@ -298,6 +361,10 @@ def main(argv: list[str] | None = None) -> int:
|
||||
else args.workspace_root.resolve(),
|
||||
installed_evidence=installed_evidence,
|
||||
installed_evidence_schema=installed_evidence_schema,
|
||||
installer_receipt=installer_receipt,
|
||||
installer_receipt_schema=installer_receipt_schema,
|
||||
installer_authority_keyring=installer_authority_keyring,
|
||||
installer_authority_keyring_schema=installer_authority_keyring_schema,
|
||||
boundary_evidence=boundary_evidence,
|
||||
boundary_evidence_schema=boundary_evidence_schema,
|
||||
boundary_authority_keyring=boundary_authority_keyring,
|
||||
|
||||
Reference in New Issue
Block a user