# in-toto

**in-toto** 是一个框架，由一份规范与若干参考实现组成，通过密码学手段记录每一步由谁执行、使用了哪些输入与输出，并验证执行过程是否符合事先定义的计划，从而保护软件供应链的完整性。<sup>[1](https://github.com/in-toto/in-toto)</sup><sup> • </sup><sup>[2](https://github.com/in-toto/specification/blob/master/in-toto-spec.md)</sup> 其名称源自拉丁语短语 *in toto*，意为“全部”或“完全”，体现了该框架的目标：覆盖从项目启动到最终用户安装的整条供应链。<sup>[3](https://www.usenix.org/conference/usenixsecurity19/presentation/torres-arias)</sup> 该项目于2015年在纽约大学安全系统实验室创建，是[云原生计算基金会](https://www.edgepedia.org/zh/cloud-native-computing-foundation)（CNCF）的毕业项目。<sup>[4](https://www.cncf.io/blog/2022/03/10/supply-chain-security-project-in-toto-moves-to-the-cncf-incubator/)</sup><sup> • </sup><sup>[5](https://www.cncf.io/projects/in-toto/)</sup>

| 关键事实 | 详情 |
|---|---|
| 功能 | 验证软件供应链的每一步均按计划、仅由授权人员执行，且工件在各步骤之间未被篡改<sup>[1](https://github.com/in-toto/in-toto)</sup> |
| 核心元数据 | 一份签名的**布局**，声明各步骤及授权执行者；以及签名的**链接**元数据，记录每位执行者实际做了什么<sup>[1](https://github.com/in-toto/in-toto)</sup> |
| 角色 | 项目所有者（定义布局）、执行者（执行步骤并签署链接）、客户端（验证最终产品）<sup>[2](https://github.com/in-toto/specification/blob/master/in-toto-spec.md)</sup> |
| 起源 | 2015年由纽约大学坦登工程学院安全系统实验室创建<sup>[4](https://www.cncf.io/blog/2022/03/10/supply-chain-security-project-in-toto-moves-to-the-cncf-incubator/)</sup> |
| CNCF 状态 | 2019年8月14日接纳；2022年3月10日进入孵化阶段；2025年2月10日毕业<sup>[5](https://www.cncf.io/projects/in-toto/)</sup> |
| 规范 | 版本1.0.0，日期为2023年6月2日<sup>[2](https://github.com/in-toto/specification/blob/master/in-toto-spec.md)</sup> |
| 生态覆盖 | SLSA 来源信息是一种 in-toto 谓词类型；GitHub 工件证明发出 in-toto 格式的声明；Sigstore 的 Cosign 可生成并验证 in-toto 证明<sup>[6](https://rywalker.com/research/in-toto)</sup><sup> • </sup><sup>[7](https://docs.sigstore.dev/about/faq/)</sup> |

## 动机

软件供应链是编写、测试、打包和分发软件时所执行的一系列步骤，其中对项目进行变换的步骤（如编译）或验证其状态的步骤（如代码检查）串联在一起，最终产出成品。<sup>[2](https://github.com/in-toto/specification/blob/master/in-toto-spec.md)</sup> 攻击者若控制了此链条中的某一步骤，便可篡改产品，例如在源代码中植入后门，或在最终软件包中包含存在漏洞的库，从而一次性影响大量用户。<sup>[2](https://github.com/in-toto/specification/blob/master/in-toto-spec.md)</sup>

规范作者指出，保护“最后一英里”的框架（如软件更新器）可能为产品提供完整性和身份验证，但产品在到达更新仓库时可能已被攻破。<sup>[2](https://github.com/in-toto/specification/blob/master/in-toto-spec.md)</sup> in-toto 的设计目标是通过透明地展示执行了哪些步骤、由谁执行、以何种顺序执行，来确保从启动到最终用户安装全过程的完整性。<sup>[8](https://in-toto.io)</sup>

## 工作原理

**布局与链接。** 项目所有者编写一份布局：这是一份签名的文档，列出供应链的各步骤、授权执行每一步骤的执行者（以公钥标识）、过期日期，以及每一步骤的预期输入与输出。<sup>[1](https://github.com/in-toto/in-toto)</sup><sup> • </sup><sup>[2](https://github.com/in-toto/specification/blob/master/in-toto-spec.md)</sup> 当执行者执行某一步骤时，in-toto 收集所用命令及相关文件的信息，并将其存储在一个由该执行者签名的链接元数据文件中。<sup>[1](https://github.com/in-toto/in-toto)</sup> 布局与链接集合共同将相邻步骤的输入与输出连接起来，使得步骤之间的篡改无法不被发现。<sup>[9](https://www.usenix.org/system/files/sec19-torres-arias.pdf)</sup>

**工件与规则。** in-toto 将供应链所操作的文件（如源代码、可执行文件或软件包）称为工件。材料是执行步骤或检查时所使用的工件；产品是由此产生的工件。<sup>[1](https://github.com/in-toto/in-toto)</sup> 一种规则语言通过规则类型来授权并强制执行工件流动，规则类型包括 `CREATE`、`DELETE`、`MODIFY`、`ALLOW`、`DISALLOW`、`REQUIRE` 和 `MATCH`，其中 `MATCH` 将某一步骤的工件与先前步骤的工件链接起来。<sup>[1](https://github.com/in-toto/in-toto)</sup> 默认情况下，除非明确禁止，工件是被允许的，因此建议在大多数步骤定义中将 `DISALLOW *` 规则作为最终规则。<sup>[1](https://github.com/in-toto/in-toto)</sup>

**验证。** 由项目所有者签名的布局和由执行者签名的链接随最终产品一同发布，可手动验证，也可由包管理器等自动化工具验证。<sup>[1](https://github.com/in-toto/in-toto)</sup> 参考实现的验证过程按顺序执行十项活动：验证布局签名与过期日期、替换占位符、加载链接并根据布局中的密钥验证链接签名、递归进入子布局、检查阈值工件约束、处理产品与材料规则，最后在客户端执行检查命令。<sup>[10](https://in-toto.readthedocs.io/en/latest/api.html)</sup> 检查是在验证过程中本身运行的命令，也可附带材料与产品规则。<sup>[1](https://github.com/in-toto/in-toto)</sup>

## 角色与信任模型

规范定义了三种角色。<sup>[2](https://github.com/in-toto/specification/blob/master/in-toto-spec.md)</sup> 项目所有者定义布局，包括每一步骤的要求以及可为该步骤签署证据的公钥。执行者执行步骤并提供链接元数据作为证据，以用于签名的公钥作为唯一标识；执行者可通过子布局将步骤委托给第三方，并在该子集内承担项目所有者角色。客户端根据布局与链接验证最终产品。<sup>[2](https://github.com/in-toto/specification/blob/master/in-toto-spec.md)</sup>

规范明确说明了该框架不覆盖的范围。它不能防止执行者在按设计执行供应链时无意引入漏洞，也不判断或阻止不安全的布局，例如跳过代码审查并在不受信任的服务器上构建的布局；集成 in-toto 的工具可独立做出此类判断。<sup>[2](https://github.com/in-toto/specification/blob/master/in-toto-spec.md)</sup> in-toto 本身也不能防止攻击者重放较旧但尚未过期的布局，规范建议使用更新框架（TUF）来安全地引导供应链。<sup>[2](https://github.com/in-toto/specification/blob/master/in-toto-spec.md)</sup> in-toto 链条所证明的是工件产生的过程——运行了哪些步骤、由谁执行、使用了哪些输入与输出；它不证明输入的属性，也不证明输出是正确的。<sup>[11](https://docs.openvet.org/landscape/in-toto/)</sup>

## 历史与治理

该项目于2015年由纽约大学坦登工程学院安全系统实验室创建，合作方包括[新泽西理工学院](https://www.edgepedia.org/zh/new-jersey-institute-of-technology)网络安全研究中心，部分资金来自美国国家科学基金会、DARPA 和[空军研究实验室](https://www.edgepedia.org/zh/air-force-research-laboratory)。<sup>[4](https://www.cncf.io/blog/2022/03/10/supply-chain-security-project-in-toto-moves-to-the-cncf-incubator/)</sup><sup> • </sup><sup>[12](https://in-toto.github.io/)</sup> 圣地亚哥·托雷斯-阿里亚斯（Santiago Torres-Arias）当时是纽约大学坦登学院的学生，在实验室主任贾斯汀·卡波斯（Justin Cappos）指导下创建了该项目；托雷斯-阿里亚斯后来共同领导了 Sigstore 项目，该项目的常见问题解答将两项工作描述为互补关系。<sup>[6](https://rywalker.com/research/in-toto)</sup><sup> • </sup><sup>[7](https://docs.sigstore.dev/about/faq/)</sup> 该框架的学术描述以“in-toto：为比特与字节提供从农场到餐桌的保障”为题发表于 USENIX Security 2019。<sup>[3](https://www.usenix.org/conference/usenixsecurity19/presentation/torres-arias)</sup>

规范于2016年9月19日达到版本0.1，2017年4月11日达到版本0.9；版本1.0.0于2023年6月2日发布。<sup>[2](https://github.com/in-toto/specification/blob/master/in-toto-spec.md)</sup> in-toto 于2019年8月14日进入 CNCF 沙箱，2022年3月10日进入孵化阶段，2025年2月10日进入毕业成熟阶段；CNCF 于2025年4月23日公开宣布其毕业。<sup>[5](https://www.cncf.io/projects/in-toto/)</sup><sup> • </sup><sup>[13](https://www.cncf.io/announcements/2025/04/23/cncf-announces-graduation-of-in-toto-security-framework-enhancing-software-supply-chain-integrity-across-industries/)</sup>

## 生态系统与采用

该框架的影响力主要通过其元数据格式发挥。in-toto 证明框架——一种在原始布局与链接模型之上分层的通用签名声明加谓词格式——是更广泛生态所标准化的对象：SLSA 来源信息是一种 in-toto 谓词类型，GitHub 工件证明发出 in-toto 格式的声明。<sup>[6](https://rywalker.com/research/in-toto)</sup> SLSA 项目本身指出，一些采用者曾感到意外，因为 in-toto 不仅是一种证明格式，还定义了使用 SLSA 来源信息之外的证明的验证工作流。<sup>[14](https://slsa.dev/blog/2023/05/in-toto-and-slsa)</sup>

有文档记录的集成包括 GitLab、Grafeas 元数据 API、GUAC（可摄取 SLSA 及其他 in-toto ITE-6 证明）、一个 Jenkins 插件、rebuilderd（在重建可复现时记录链接）、Sigstore、Tekton Chains，以及 TestifySec 的 Witness 和 Archivista。<sup>[15](https://in-toto.io/ecosystem/integrations/)</sup> Sigstore 的无密钥签名可签署 in-toto 元数据，正如 Cosign 的 SLSA 来源信息生成所展示的那样，Rekor 可存储 in-toto 证明。<sup>[15](https://in-toto.io/ecosystem/integrations/)</sup><sup> • </sup><sup>[7](https://docs.sigstore.dev/about/faq/)</sup>

**采用模式。** 采用集中在格式而非完整框架上。基于布局的完整端到端验证——in-toto 最初的承诺——需要预先定义供应链布局和执行者，目前仍相对少见；即便是毕业公告中的采用者，也将 Witness 和 Archivista 描述为减少开发者阻力的关键，这承认了原始 in-toto 难以推广。<sup>[6](https://rywalker.com/research/in-toto)</sup> 参考 Python 实现可通过 PyPI 以 `pip install in-toto` 获取，GitHub 星标数接近1,000，两次小版本发布之间相隔两年（v3.0.0 于2024年5月，v3.1.0 于2026年5月）。<sup>[1](https://github.com/in-toto/in-toto)</sup><sup> • </sup><sup>[6](https://rywalker.com/research/in-toto)</sup> 在 CNCF 2026年第一季度的技术雷达中，in-toto 在所评估项目中的成熟度评分排名最后，55%的受访者给出4星或5星，14%给出5星。<sup>[16](https://www.cncf.io/wp-content/uploads/2026/03/Q1-2026-CNCF-Technology-Radar-Report.pdf)</sup>

## References

1. [in-toto/in-toto GitHub repository](https://github.com/in-toto/in-toto)
2. [in-toto Specification, version 1.0.0, June 2, 2023](https://github.com/in-toto/specification/blob/master/in-toto-spec.md)
3. [in-toto: Providing farm-to-table guarantees for bits and bytes, USENIX Security 2019](https://www.usenix.org/conference/usenixsecurity19/presentation/torres-arias)
4. [Supply chain security project in-toto moves to the CNCF Incubator, CNCF Blog, March 10, 2022](https://www.cncf.io/blog/2022/03/10/supply-chain-security-project-in-toto-moves-to-the-cncf-incubator/)
5. [in-toto project page, CNCF](https://www.cncf.io/projects/in-toto/)
6. [in-toto, Ry Walker Research](https://rywalker.com/research/in-toto)
7. [Frequently asked questions, Sigstore documentation](https://docs.sigstore.dev/about/faq/)
8. [in-toto project website](https://in-toto.io)
9. [in-toto USENIX Security 2019 paper (PDF)](https://www.usenix.org/system/files/sec19-torres-arias.pdf)
10. [in-toto Python API documentation, version 3.0.0](https://in-toto.readthedocs.io/en/latest/api.html)
11. [in-toto · openvet docs](https://docs.openvet.org/landscape/in-toto/)
12. [in-toto project site (archived version)](https://in-toto.github.io/)
13. [CNCF Announces Graduation of in-toto Security Framework, April 23, 2025](https://www.cncf.io/announcements/2025/04/23/cncf-announces-graduation-of-in-toto-security-framework-enhancing-software-supply-chain-integrity-across-industries/)
14. [in-toto and SLSA, SLSA blog, May 2023](https://slsa.dev/blog/2023/05/in-toto-and-slsa)
15. [Integrations, in-toto.io](https://in-toto.io/ecosystem/integrations/)
16. [CNCF Technology Radar, Q1 2026 (PDF)](https://www.cncf.io/wp-content/uploads/2026/03/Q1-2026-CNCF-Technology-Radar-Report.pdf)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Software engineering and development process

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/in-toto

English original: https://www.edgepedia.org/in-toto
