Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Add SLSA Provenance feature - #94

Merged
Jeroen Knoops (JeroenKnoops) merged 2 commits into
mainfrom
add-slsa-provenance
Jan 26, 2022
Merged

Jeroen Knoops (JeroenKnoops) merged 2 commits into
mainfrom
add-slsa-provenance

Conversation

@JeroenKnoops

Copy link
Copy Markdown
Member

This PR will add an extra option to generate a provenance file.

Usage

Add input slsa-provenance: true to generate a provenance file.

Exampe workflow

- name: Build Docker Images
  id: docker
  uses: philips-software/docker-ci-scripts@v3.3.2
  with:
    dockerfile: .
    image-name: image-name-here
    tags: latest 0.1
    slsa-provenance: true
  env:
    DOCKER_USERNAME: ${{ github.actor }}
    DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
    DOCKER_REGISTRY: ghcr.io/organization-here
    GITHUB_ORGANIZATION: organization-here

The filename of the provenance file is given as an output. You can use that to upload the provenance file as artifact.

- name: Upload a Build Artifact
  uses: actions/upload-artifact@v2.3.1
  with:
    name: provenance
    path: ${{ steps.docker.outputs.slsa-provenance-file }}
    retention-days: 5

Cosign

We're going to use Cosign to attach the provenance file to the docker image later. There are already parts of this change in this PR. I want to release this feature together with the cosign change, but I like PRs for one specific thing only.
The Cosign installation part is not used, so I want to keep that in this PR.

Learn more

Learn more about provenance and Secure Software Supply Chain on:

Related issue

Part of #78

Part of #78

Signed-off-by: Jeroen Knoops <jeroen.knoops@philips.com>
Signed-off-by: Jeroen Knoops <jeroen.knoops@philips.com>

@Brend-Smits Brend Smits (Brend-Smits) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great and works great.
Can you please include "slsa-provenance" in the readme in the inputs section?

@JeroenKnoops

Copy link
Copy Markdown
Member Author

Looks great and works great. Can you please include "slsa-provenance" in the readme in the inputs section?

Will be done automatically after merged to develop.. the update documentation workflow is triggered on develop and main not on branches to avoid a lot of automated commits.

@JeroenKnoops
Jeroen Knoops (JeroenKnoops) deleted the add-slsa-provenance branch January 26, 2022 08:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants