验证你下载的内容
部署包通过 Business 渠道提供;此处未验证其发布状态。使用本地 chart 前,请按渠道说明验证包及其发布者。清单示例使用 Business 提供的
business-install.yaml。隔离环境安装需要 Enterprise。
Helm, Kubernetes operators, Terraform, appliance and FIPS/STIG images are Business deployment artifacts. The source paths below are in the Business distribution. Air-gapped installation requires Enterprise.
下一个版本是 0.4,其 GitHub 发行尚未发布。以下命令描述计划中的产物。发布前请从源码构建,发布后也应在使用前验证每个产物。观测到的发布状态记录在 docs/releases/0.4-install-surfaces.json。
控制平面(control plane)是一款安全产品,因此你拿到一个发布后首先应做的,就是 证明它确实是项目所发布的那一个。Olivares AI 的发布会随附你做加密验证所需的一切:对校验和的签名、一份 SLSA 来源证明,以及各一份对容器镜像做了证明的 SBOM(SPDX)和 OpenVEX 文档 — 全部 按 digest 引用,绝不按标签。
一个发布随附哪些内容
Section titled “一个发布随附哪些内容”| 产物 | 它是什么 |
|---|---|
checksums.txt(+ .sig、.pem) |
归档文件、软件包、安装脚本、release-commit.txt 和 release-build-context.json 的 SHA-256,附带 cosign 签名和证书 |
*_<os>_<arch>.tar.gz |
发布归档文件 |
olivares.spdx.sbom.json |
发布的 SBOM(SPDX),从容器镜像生成,并按 digest 对该镜像做证明 |
olivares.vex.openvex.json |
发布的 OpenVEX,按 digest 对容器镜像做证明 |
*.intoto.jsonl |
SLSA Build L3 来源证明 |
| 容器镜像 | 发布到 GHCR 和 Docker Hub,按 digest 验证并固定 |
| Helm chart 源码 | 从 ./business-chart 安装;其 OCI 发布未经验证(publication-unverified:从未从本仓库发布) |
26.10.1 及更早的发布改为随附每个归档文件的 SBOM 和 OpenVEX bundle(*.sbom.sigstore.json、*.vex.sigstore.json);之后的发布不再随附。
仓库提供了 scripts/verify-release.sh,它会运行完整链条:验证对 checksums.txt 的签名,重新计算每个产物的 SHA-256,然后验证 26.10.1 及更早发布中每个归档文件的 SBOM 和 OpenVEX bundle(之后的发布会将这两步报告为已跳过),以及 SLSA 来源证明。
# The verifier is in a source checkout of the release tag, not a release asset; running it# trusts the checkout. Without one, INSTALL.md shows the cosign + sha256sum commands.# Run it from the directory that holds the downloaded files.
# Default: keyless (Sigstore). Needs Rekor and Sigstore trusted-root material./path/to/olivares/scripts/verify-release.sh
# Pin the SLSA provenance to a specific source tag./path/to/olivares/scripts/verify-release.sh --source-tag 0.4
# Key-based: only for files signed with a private key you control.# Releases are signed keyless and do not publish a public key./path/to/olivares/scripts/verify-release.sh --key /path/to/your-cosign.pub--key 使用公钥而不是发布工作流的身份来验证签名,并忽略透明日志。它证明文件是用对应的私钥签名的,但不能证明这些文件由项目发布。请通过与待验证文件分离的渠道,从密钥所有者处获取该公钥。
--offline 只从 cosign 调用中去掉 Rekor 查询,并不会让验证无需网络。无密钥验证仍然需要 Sigstore 信任根材料,尚未缓存时由 cosign 获取;而且脚本没有 --trusted-root 选项。即使使用 --key,验证每个归档文件的 SBOM 和 OpenVEX bundle(26.10.1 及更早的发布)也需要信任根;SLSA 步骤运行 slsa-verifier 时不带任何离线选项。
它逐步检查什么
Section titled “它逐步检查什么”如果你更愿意自己运行这些检查,脚本所做的就是:
-
对校验和的签名 — 无密钥,对照项目的 GitHub Actions 身份和 OIDC issuer 进行验证:
终端窗口 cosign verify-blob \--certificate checksums.txt.pem \--signature checksums.txt.sig \--certificate-identity-regexp '^https://github\.com/olivaresai/olivares/\.github/workflows/release\.yml@refs/tags/[0-9]+\.[0-9]+$' \--certificate-oidc-issuer https://token.actions.githubusercontent.com \checksums.txt -
产物完整性 — 每个下载的产物都必须与
checksums.txt匹配:终端窗口 # checksums.txt lists all release artifacts; skip files you did not download.# Before use, ensure each downloaded artifact is listed and reports OK.# GNU sha256sum fails if no listed file is present or a checksum mismatches.sha256sum --check --ignore-missing checksums.txt -
SBOM(SPDX)证明 — 每个归档文件的 bundle,仅限 26.10.1 及更早的发布。之后的发布随附一份对容器镜像做了证明的 SBOM;参见下文“验证容器镜像”。
终端窗口 cosign verify-blob-attestation --type spdxjson \--bundle <artifact>.sbom.sigstore.json --new-bundle-format \--check-claims <artifact> -
OpenVEX 证明(项目基于可达性的漏洞声明)— 每个归档文件的 bundle,仅限 26.10.1 及更早的发布。之后的发布随附一份对容器镜像做了证明的 OpenVEX;参见下文“验证容器镜像”。
终端窗口 cosign verify-blob-attestation --type openvex \--bundle <artifact>.vex.sigstore.json --new-bundle-format \--check-claims <artifact> -
SLSA 来源证明:
终端窗口 slsa-verifier verify-artifact <artifact> \--provenance-path <artifact>.intoto.jsonl \--source-uri github.com/olivaresai/olivares
验证容器镜像
Section titled “验证容器镜像”对于已发布的镜像,解析其 digest 并对照 GitHub Actions 身份进行验证(此路径无密钥且需要网络)。spdxjson 和 openvex 证明即发布的 SBOM(olivares.spdx.sbom.json)和 OpenVEX(olivares.vex.openvex.json),按 digest 对镜像做了证明:
IMAGE=docker.io/olivaresai/olivaresDIGEST="$(crane digest "$IMAGE:<version>")"REF="$IMAGE@$DIGEST"
cosign verify "$REF" \ --certificate-identity-regexp '^https://github\.com/olivaresai/olivares/\.github/workflows/release\.yml@refs/tags/[0-9]+\.[0-9]+$' \ --certificate-oidc-issuer https://token.actions.githubusercontent.comcosign verify-attestation "$REF" --type spdxjson \ --certificate-identity-regexp '^https://github\.com/olivaresai/olivares/\.github/workflows/release\.yml@refs/tags/[0-9]+\.[0-9]+$' \ --certificate-oidc-issuer https://token.actions.githubusercontent.comcosign verify-attestation "$REF" --type openvex \ --certificate-identity-regexp '^https://github\.com/olivaresai/olivares/\.github/workflows/release\.yml@refs/tags/[0-9]+\.[0-9]+$' \ --certificate-oidc-issuer https://token.actions.githubusercontent.comslsa-verifier verify-image "$REF" \ --source-uri github.com/olivaresai/olivares --source-tag <version>始终 按 digest 部署镜像(@sha256:…),绝不按可变标签。
在气隙环境中
Section titled “在气隙环境中”气隙 bundle 由运维人员使用自己控制的 cosign 密钥构建,bundle 中包含对应的 cosign.pub。bundle 的脚本在不使用 Rekor 的情况下,用该密钥验证 Helm chart 和已保存的镜像;只有带有该密钥所做签名的镜像才能通过。从被验证的 bundle 本身读取的密钥不能认证该 bundle:在信任 bundle 之前,请将它与密钥所有者通过独立渠道交给你的副本进行比较。参阅
在气隙环境中安装。