{"id":13647465,"url":"https://github.com/in-toto/in-toto","last_synced_at":"2025-05-13T20:10:38.975Z","repository":{"id":11631157,"uuid":"59531400","full_name":"in-toto/in-toto","owner":"in-toto","description":"in-toto is a framework to protect supply chain integrity.","archived":false,"fork":false,"pushed_at":"2025-05-06T08:27:57.000Z","size":3213,"stargazers_count":921,"open_issues_count":48,"forks_count":143,"subscribers_count":36,"default_branch":"develop","last_synced_at":"2025-05-06T09:30:51.206Z","etag":null,"topics":["new-york-university","secure-systems-lab","security","supply-chain"],"latest_commit_sha":null,"homepage":"https://in-toto.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/in-toto.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.bib","codeowners":null,"security":"SECURITY.md","support":null,"governance":"GOVERNANCE.md","roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-05-24T01:46:38.000Z","updated_at":"2025-05-06T08:27:54.000Z","dependencies_parsed_at":"2023-10-03T07:49:16.393Z","dependency_job_id":"f2c76331-68d0-4590-8251-09d55c3dac1c","html_url":"https://github.com/in-toto/in-toto","commit_stats":{"total_commits":1491,"total_committers":40,"mean_commits":37.275,"dds":"0.49362843729040917","last_synced_commit":"fe5ec9a4fc6eefeae9df2ab424ffeedce190c16d"},"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/in-toto%2Fin-toto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/in-toto%2Fin-toto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/in-toto%2Fin-toto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/in-toto%2Fin-toto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/in-toto","download_url":"https://codeload.github.com/in-toto/in-toto/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254020608,"owners_count":22000753,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["new-york-university","secure-systems-lab","security","supply-chain"],"created_at":"2024-08-02T01:03:34.909Z","updated_at":"2025-05-13T20:10:38.953Z","avatar_url":"https://github.com/in-toto.png","language":"Python","funding_links":[],"categories":["Artifact Metadata","Repositories","Artifact signing and attestation","Python","Image Lifecycle","Supply Chain Compliance","Security \u0026 Compliance"],"sub_categories":["Threat modelling","Supply Chain"],"readme":"# in-toto ![Build](https://github.com/in-toto/in-toto/workflows/Run%20in-toto%20tests%20and%20linter/badge.svg) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1523/badge)](https://bestpractices.coreinfrastructure.org/projects/1523) [![Documentation Status](https://readthedocs.org/projects/in-toto/badge/?version=latest)](https://in-toto.readthedocs.io/en/latest/?badge=latest)\n\nin-toto provides a framework to protect the integrity of the software supply chain. It does so by verifying that each task in the chain is carried out as planned, by authorized personnel only, and that the product is not tampered with in transit.\n\nin-toto requires a **project owner** to create a **layout**. A layout lists the sequence of **steps** of the software supply chain, and the **functionaries** authorized to perform these steps.\nWhen a functionary performs a step in-toto gathers information about the used command and the related files and stores it in a **link** metadata file. As a consequence link files provide the required evidence to establish a continuous chain that can be validated against the steps defined in the layout.\n\nThe layout, signed by the project owners, together with the links, signed by the designated functionaries, are released as part of the final product, and can be validated manually or via automated tooling in, e.g. a package manager.\n\n\n## Getting Started\n\n### Installation\n\nin-toto is available on [PyPI](https://pypi.org/project/in-toto/) and can be\ninstalled via [`pip`](https://pypi.org/project/pip/). See\n[in-toto.readthedocs.io](https://in-toto.readthedocs.io/en/latest/installing.html)\nto learn about system dependencies and installation alternatives and\nrecommendations.\n\n```shell\npip install in-toto\n```\n### Create layout, run supply chain steps and verify final product\n\n#### Layout\n\nThe in-toto software supply chain layout consists of the following parts:\n - **expiration date**\n - **readme** (an optional description of the supply chain)\n - **functionary keys** (public keys, used to verify link metadata signatures)\n - **signatures** (one or more layout signatures created with the project owner key(s))\n - **software supply chain steps**\n   correspond to steps carried out by a functionary as part of the software supply chain. The steps defined in the layout list the functionaries who are authorized to carry out the step (by key id). Steps require a unique name to associate them (upon verification) with link metadata that is created when a functionary carries out the step using the `in-toto` tools. Additionally, steps must have material and product rules which define the files a step is supposed to operate on. Material and product rules are described in the section below.\n - **inspections** define commands to be run during the verification process and can also list material and product rules.\n\nTake a look at the [demo layout creation example](https://in-toto.readthedocs.io/en/latest/layout-creation-example.html)\nfor further information on how to create an in-toto layout.\n\n\n\n#### Artifact Rules\nA software supply chain usually operates on a set of files, such as source code, executables, packages, or the like. in-toto calls these files artifacts. A material is an artifact that will be used when a step or inspection is carried out. Likewise, a product is an artifact that results from carrying out a step.\n\nThe in-toto layout provides a simple rule language to authorize or enforce the artifacts of a step and to chain them together. This adds the following guarantees for any given step or inspection:\n- Only artifacts **authorized** by the project owner are created, modified or deleted,\n- each defined creation, modification or deletion is **enforced**, and also\n- restricted to the scope of its definition, which **chains** subsequent steps and inspections together.\n\nNote that it is up to you to properly secure your supply chain, by authorizing, enforcing and chaining materials and products using any and usually multiple of the following rules:\n- `CREATE \u003cpattern\u003e`\n- `DELETE \u003cpattern\u003e`\n- `MODIFY \u003cpattern\u003e`\n- `ALLOW \u003cpattern\u003e`\n- `DISALLOW \u003cpattern\u003e`\n- `REQUIRE \u003cfile\u003e`\n- `MATCH \u003cpattern\u003e [IN \u003csource-path-prefix\u003e] WITH (MATERIALS|PRODUCTS) [IN \u003cdestination-path-prefix\u003e] FROM \u003cstep\u003e`\n\n*Rule arguments specified as `\u003cpattern\u003e` allow for Unix shell-style wildcards as implemented by Python's [`fnmatch`](https://docs.python.org/3/library/fnmatch.html).*\n\nin-toto's Artifact Rules, by default, allow artifacts to exist if they are not explicitly disallowed. As such, a `DISALLOW *` invocation is recommended as the final rule for most step definitions. To learn more about the different rule types, their guarantees and how they are applied, take a look at the [Artifact Rules](https://github.com/in-toto/docs/blob/master/in-toto-spec.md#433-artifact-rules) section of the in-toto specification.\n\n#### Carrying out software supply chain steps\n\n##### in-toto-run\n`in-toto-run` is used to execute a step in the software supply chain. This can\nbe anything relevant to the project such as tagging a release with `git`,\nrunning a test, or building a binary. The relevant step name and command are\npassed as arguments, along with materials, which are files required for that\nstep's command to execute, and products which are files expected as a result\nof the execution of that command. These, and other relevant details\npertaining to the step are stored in a link file, which is signed using the\nfunctionary's key.\n\nIf materials are not passed to the command, the link file generated just\ndoesn't record them. Similarly, if the execution of a command via\n`in-toto-run` doesn't result in any products, they're not recorded in the link\nfile. Any files that are modified or used in any way during the execution of\nthe command are not recorded in the link file unless explicitly passed as\nartifacts. Conversely, any materials or products passed to the command are\nrecorded in the link file even if they're not part of the execution\nof the command.\n\nSee [this simple usage example from the demo application\nfor more details](https://github.com/in-toto/demo).\nFor a detailed list of all the command line arguments, run `in-toto-run --help`\nor look at the [online\ndocumentation](https://in-toto.readthedocs.io/en/latest/command-line-tools/in-toto-run.html).\n\n##### in-toto-record\n`in-toto-record` works similar to `in-toto-run` but can be used for\nmulti-part software supply chain steps, i.e. steps that are not carried out\nby a single command. Use `in-toto-record start ...` to create a\npreliminary link file that only records the *materials*, then run the\ncommands of that step or edit files manually and finally use\n`in-toto-record stop ...` to record the *products* and generate the actual\nlink metadata file. For a detailed list of all command line arguments and their usage,\nrun `in-toto-record start --help` or `in-toto-record stop --help`, or look at\nthe [online\ndocumentation](https://in-toto.readthedocs.io/en/latest/command-line-tools/in-toto-record.html).\n\n#### Release final product\n\nIn order to verify the final product with in-toto, the verifier must have access to the layout, the `*.link` files,\nand the project owner's public key(s).\n\n#### Verification\nUse `in-toto-verify` on the final product to verify that\n- the layout was signed with the project owner's private key(s),\n- has not expired,\n- each step was performed and signed by the authorized functionary,\n- the functionaries used the commands, they were supposed to use,\n- materials and products of each step were in place as defined by the rules, and\n- run the defined inspections\n\nFor a detailed list of all command line arguments and their usage, run\n`in-toto-verify --help` or look at the\n[online\ndocumentation](https://in-toto.readthedocs.io/en/latest/command-line-tools/in-toto-verify.html).\n\n#### Signatures\n`in-toto-sign` is a metadata signature helper tool to add, replace, and\nverify signatures within in-toto Link or Layout metadata, with options to:\n- replace (default) or add signature(s), with layout metadata able to be\nsigned by multiple keys at once while link metadata can only be signed by one key at a time\n- write signed metadata to a specified path (if no output path is specified,\nlayout metadata is written to the path of the input file while link metadata\nis written to `\u003cname\u003e.\u003ckeyid prefix\u003e.link`)\n- verify signatures\n\nThis tool serves well to re-sign test and demo data. For example, it can be used\nif metadata formats or signing routines change.\n\nFor a detailed list of all command line arguments and their usage, run\n`in-toto-sign --help` or look at the\n[online\ndocumentation](https://in-toto.readthedocs.io/en/latest/command-line-tools/in-toto-sign.html).\n\n\n## in-toto demo\nYou can try in-toto by running the [demo application](https://github.com/in-toto/demo).\nThe demo basically outlines three users viz., Alice (project owner), Bob (functionary) and Carl (functionary) and how in-toto helps to specify a project layout and verify that the layout has been followed in a correct manner.\n\n## Specification\nYou can read more about how in-toto works by taking a look at the\n[specification](https://github.com/in-toto/docs/blob/master/in-toto-spec.md).\n\n\n## Security Issues and Bugs\nSee [SECURITY.md](SECURITY.md).\n\n\n## Governance and Contributing\n\n For information about in-toto's governance and contributing guidelines, see \n [GOVERNANCE.md](GOVERNANCE.md) and [CONTRIBUTING.md](doc/source/CONTRIBUTING.md).\n\n## Acknowledgments\nThis project is managed by Prof. Santiago Torres-Arias at Purdue University.\nIt is worked on by many folks in academia and industry, including members of\nthe [Secure Systems Lab](https://ssl.engineering.nyu.edu/) at NYU and the\n[NJIT Cybersecurity Research Center](https://centers.njit.edu/cybersecurity).\n\nThis research was supported by the Defense Advanced Research Projects Agency\n(DARPA), the Air Force Research Laboratory (AFRL), and the US National Science\nFoundation (NSF). Any opinions, findings, and conclusions or recommendations\nexpressed in this material are those of the authors and do not necessarily\nreflect the views of DARPA, AFRL, and NSF. The United States Government is\nauthorized to reproduce and distribute reprints notwithstanding any copyright\nnotice herein.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fin-toto%2Fin-toto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fin-toto%2Fin-toto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fin-toto%2Fin-toto/lists"}