PoC: A checksum file for CI components
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary - Why is this PoC needed?
Feature issue: #461075
A checksum file for the CI component tree used by a project in its CI config could give us many benefits, including improved security, performance, and possible features like a visualized dependency tree.
However, it is a complex feature and we need to figure out how to implement in a way that is effective and simple for users.
What does this PoC involve
The PoC is completed when we have consensus on how to develop the following items:
- How will the checksum file be created?
- Option 1: When running a pipeline that uses
include:componentin a project that has checksums enabled and no checksum file, use the dependency tree of components gathered during the execution of theincludeto build a checksum file and save it in the project's repository - Option 2: When a project has checksums enabled and no checksum file, fail pipelines until a checksum file is present. Provide a way to generate a checksum file using the dependency tree of components gathered during the execution of
include:componentand make an MR with the file - What should we name the file? Possibilities:
ci_checksum.lock,.gitlab_ci.lock, ...? - Where will the file live? Proposal: In the repository root
- Option 1: When running a pipeline that uses
- What will the structure of the checksum file be?
- Proposal: Use the sha of each CI component to identify it in the checksum file. We may need to store the version also to know when users want to update the checksum file
- Proposal: Use the structure of a
Gemfile.lockfor inspiration
- How will the checksum file be updated?
- Option 1: Automatically whenever a pipeline is run and a component version is used that doesn't match a version in the checksum file
- Option 2: Fail pipelines until the checksum file is updated using a feature we provide that makes an MR with the changes
- Demonstrate that components are fetched using the sha in a checksum file instead of the version in the
.gitlab-ci.yml
Timebox Expectations
A few weeks for development. A few weeks for discussion and iteration.
Expected Outcomes
Edited by 🤖 GitLab Bot 🤖