Harden signed feeds and RelWithDebInfo releases
Modular container CI / release-build (push) Has been cancelled
Modular container CI / release-build (push) Has been cancelled
This commit is contained in:
21 files changed
+243
-40
No files matched your search
@@ -217,8 +217,11 @@ def main() -> None:
|
||||
not isinstance(manifest, dict)
|
||||
or manifest.get("schemaVersion") != 2
|
||||
or manifest.get("version") != arguments.version
|
||||
or manifest.get("buildType") != "RelWithDebInfo"
|
||||
):
|
||||
fail("release manifest schema/version does not match the feed")
|
||||
fail(
|
||||
"release manifest schema/version/build type does not match the feed"
|
||||
)
|
||||
|
||||
source_epoch = os.environ.get("SOURCE_DATE_EPOCH")
|
||||
if arguments.generated_at:
|
||||
@@ -263,6 +266,7 @@ def main() -> None:
|
||||
}
|
||||
if manifest_path is not None:
|
||||
release["releaseManifestSha256"] = digest(manifest_path)
|
||||
release["buildType"] = manifest["buildType"]
|
||||
|
||||
payload_document = {
|
||||
"schemaVersion": 1,
|
||||
@@ -306,9 +310,10 @@ def main() -> None:
|
||||
fail("output envelope would overwrite an input or payload file")
|
||||
signature = sign_payload(output_payload, private_key)
|
||||
envelope = {
|
||||
"schemaVersion": 1,
|
||||
"schemaVersion": 3,
|
||||
"keyId": arguments.key_id,
|
||||
"payload": urlsafe(payload),
|
||||
"document": payload_document,
|
||||
"signedPayload": urlsafe(payload),
|
||||
"signature": urlsafe(signature),
|
||||
}
|
||||
atomic_write(
|
||||
|
||||
Reference in new issue
Block a user