forked from tektoncd/chains
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add top-level build config to External Parameters (tektoncd#863)
In the [build type design](https://docs.google.com/document/d/1ewqtPXyg_y3MmU6Tc6l1X8nfzjt0AJHlP6VOnFsGNpQ/edit#heading=h.8hw7rf805u8r), we decided the add the complete runSpec to externalParameters and the resolved top-level task/pipeline yaml to resolved dependencies. This has caused some friction in alignment between the Slsa specification, builders and verifiers. According to the [SLSA spec](https://slsa.dev/provenance/v1#provenance), the external parameters should capture the inputs to the build interface. In the case where the build config is located remotely (e.g. in version control), one of the key ingredients that must be validated is the repo from where the build config was fetched. This information is available in the runSpec under pipelineRef or the taskRef however, that syntax is very specific to Tekton which makes it very challenging for generic verifiers (that validate provenances from several CI/CD systems) to identify without making the verification policy understand the Tekton API. To make matters worse, the repo uri is not necessarily embedded in the [resolver parameters](https://github.com/tektoncd/pipeline/blob/main/pkg/resolution/resolver/git/params.go). This means that depending on the parameters, verifiers need to add logic to extract the URI for verification. In Tekton Chains, we have this information completely resolved and accessible. However, we add this to the resolved dependencies section of the provenance. **Note** that this will also make it synchronous with the suggested [migration path from SLSA v0.2 to v1.0](https://slsa.dev/provenance/v1#migrating-from-02) where it says that the externalParameters should also contain the old invocation.ConfigSource. This PR surfaces this information in `externalParameters` section of the SLSA 1.0 predicate and addresses issue tektoncd#846.
- Loading branch information
1 parent
e97260e
commit 5230749
Showing
4 changed files
with
87 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters