Harden signed feeds and RelWithDebInfo releases
Modular container CI / release-build (push) Has been cancelled

This commit is contained in:
faumaray committed 2026-08-01 18:02:55 +03:00
1 parent 5b2d27a1e8
commit 8ac39621fd
21 files changed
+243 -40

No files matched your search

+7 -3
View File
@@ -14,7 +14,9 @@ mkdir -p "$stage/bin" "$stage/lib"
install -m 0755 /bin/true "$stage/bin/echoiond"
install -m 0755 /bin/true "$stage/bin/echoion-updater"
install -m 0644 /bin/true "$stage/lib/Echoion.ts"
printf '%s\n' '{"schemaVersion":2,"version":"1.2.3"}' >"$stage/manifest.json"
printf '%s\n' \
'{"schemaVersion":2,"version":"1.2.3","buildType":"RelWithDebInfo"}' \
>"$stage/manifest.json"
cat >"$stage/install.sh" <<'INSTALL'
#!/bin/sh
set -eu
@@ -73,6 +75,7 @@ artifact = Path(sys.argv[2])
manifest = Path(sys.argv[3])
release = payload["releases"][0]
assert payload["schemaVersion"] == 1
assert payload["releases"][0]["buildType"] == "RelWithDebInfo"
assert payload["feedId"] == "echoion-test"
assert payload["sequence"] == 42
assert release["component"] == "runtime"
@@ -147,9 +150,10 @@ envelope = json.loads(Path(sys.argv[2]).read_text(encoding="utf-8"))
def decode(value: str) -> bytes:
return base64.urlsafe_b64decode(value + "=" * (-len(value) % 4))
assert envelope["schemaVersion"] == 1
assert envelope["schemaVersion"] == 3
assert envelope["keyId"] == "test-key"
assert decode(envelope["payload"]) == payload
assert envelope["document"] == json.loads(payload)
assert decode(envelope["signedPayload"]) == payload
Path(sys.argv[3]).write_bytes(decode(envelope["signature"]))
PY
openssl pkey -in "$private_key" -pubout -out "$public_key" >/dev/null 2>&1