interplane.Get Omega
Read in your language

aien-sovereign-core-mv

AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination.

Brought by drakestapleton

branch main Branches Tags History

aien-sovereign-core-mv / scripts / verify-release-assets.sh

44 lines · 2476 bytes Raw Blame History
1#!/usr/bin/env bash
2# SPDX-License-Identifier: Apache-2.0
3# Copyright 2026 Drake Stapleton (AIEN / aien-dev)
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17# Verify a release asset directory: SHA256SUMS.txt exists, carries a valid signature from the allowed
18# signer, lists every sovereign-* archive, and every listed file matches its digest.
19# scripts/verify-release-assets.sh <dir> <allowed_signers>
20# Fails (exit 1) on a missing or invalid signature, a signer not in the file, a listed file that is missing
21# or differs, and an archive that the signed list does not cover.
22set -euo pipefail
23d="${1:?asset directory}"; signers="${2:?allowed_signers file}"
24die() { echo "release assets: $*" >&2; exit 1; }
25[[ -f "$d/SHA256SUMS.txt" ]] || die "SHA256SUMS.txt is missing"
26[[ -f "$d/SHA256SUMS.txt.sig" ]] || die "SHA256SUMS.txt.sig is missing: refusing an unsigned release"
27[[ -s "$signers" ]] || die "allowed signers file $signers is missing or empty"
28grep -qvE '^[[:space:]]*(#|$)' "$signers" || die "no key is pinned in $signers (PLACEHOLDER until the key ceremony, docs/release/KEY_CEREMONY.md): refusing"
29ssh-keygen -Y verify -f "$signers" -I aien-release -n aien-release -s "$d/SHA256SUMS.txt.sig" < "$d/SHA256SUMS.txt" >/dev/null 2>&1 \
30 || die "SHA256SUMS.txt signature is NOT valid for $signers"
31n=0
32while read -r want name; do
33 name="${name#\*}"; [[ -n "$name" ]] || continue
34 [[ -f "$d/$name" ]] || die "listed file $name is missing"
35 have="$(cd "$d" && { sha256sum "$name" 2>/dev/null || shasum -a 256 "$name"; } | cut -d' ' -f1)"
36 [[ "$have" == "$want" ]] || die "$name does not match the signed checksum"
37 n=$((n+1))
38done < "$d/SHA256SUMS.txt"
39[[ "$n" -gt 0 ]] || die "SHA256SUMS.txt lists nothing"
40for a in "$d"/sovereign-*; do
41 [[ -e "$a" ]] || continue
42 grep -qE "^[0-9a-f]{64} \*?$(basename "$a")\$" "$d/SHA256SUMS.txt" || die "$(basename "$a") is not covered by the signed checksums"
43done
44echo "release assets verified ($n files)"