prithvishenoy7/supply-chain-demo
GitHub: prithvishenoy7/supply-chain-demo
该项目演示了一条完整的云原生软件供应链安全流水线,涵盖 SBOM 生成、漏洞扫描、无密钥签名、SLSA 来源证明及 Kyverno 准入控制,确保每个交付产物均可验证、可追溯。
Stars: 0 | Forks: 0
# supply-chain-demo
端到端软件供应链安全 pipeline。本仓库产出的每一个 artifact 都是可验证的:其包含的内容(SBOM)、是否存在已知漏洞(Grype)、构建者及源码来源(Cosign keyless + SLSA provenance),以及在没有有效签名的情况下是否可以在 cluster 中运行(Kyverno)。
## Pipeline
| 阶段 | 工具 | 产出内容 |
|---|---|---|
| SBOM 生成 | Syft | `sbom.spdx.json` — 完整的依赖清单 |
| 漏洞扫描 | Grype | 针对 SBOM 的 CVE 报告;在遇到 Critical 时阻断 |
| 镜像签名 | Cosign (keyless) | 存储在 Sigstore transparency log 中的签名 |
| Provenance | slsa-github-generator | SLSA Build L3 attestation |
| Admission control | Kyverno | 未签名镜像在进入 cluster 时会被拒绝 |
## 自行验证镜像
从最近的 [pipeline 运行记录](https://github.com/prithvishenoy7/supply-chain-demo/actions/workflows/supply-chain.yml)中获取 digest,然后执行:
```
# 验证 Cosign 签名
cosign verify \
--certificate-identity="https://github.com/prithvishenoy7/supply-chain-demo/.github/workflows/supply-chain.yml@refs/heads/main" \
--certificate-oidc-issuer="https://token.actions.githubusercontent.com" \
ghcr.io/prithvishenoy7/supply-chain-demo@
# 验证 SLSA provenance attestation
cosign verify-attestation \
--type slsaprovenance \
--certificate-identity-regexp="https://github.com/slsa-framework/slsa-github-generator" \
--certificate-oidc-issuer="https://token.actions.githubusercontent.com" \
ghcr.io/prithvishenoy7/supply-chain-demo@
```
这两个命令都会生成 JSON 输出,用于确认 artifact 的身份、构建来源和 provenance 链。
## 本地策略执行
请参阅 [docs/local-setup.md](docs/local-setup.md) 获取分步指南,了解如何运行一个本地的 kind cluster,并通过 Kyverno 执行已签名镜像的 admission policy。
## 存在意义
本项目是在我从汽车产品网络安全(ISO 21434, UN R156 SBOM)转向云原生供应链安全工程时,作为个人作品集构建的 artifact。该 pipeline 将我在受监管的汽车领域中所使用的 artifact 完整性原则——在这些领域中,被篡改的固件更新会带来物理风险——应用到了标准的云原生交付工作流中。
标签:DevSecOps, SBOM, SLSA合规, 上游代理, 子域名突变, 文本排版, 硬件无关, 策略引擎, 网络安全挑战, 软件供应链安全, 远程方法调用, 镜像签名