Skip to content

Commit

Permalink
security: Use bundled GitHub provenance attestation mechanism
Browse files Browse the repository at this point in the history
  • Loading branch information
clemlesne committed Nov 13, 2024
1 parent 515db8d commit ff76145
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ jobs:
- sast-semgrep
runs-on: ubuntu-22.04
permissions:
# Allow to write to GitHub Packages
attestations: write
id-token: write
packages: write
steps:
- name: Checkout
Expand All @@ -116,7 +117,7 @@ jobs:
with:
version: v${{ env.BUILDX_VERSION }}

- name: Login to registry - GitHub
- name: Login to registry
uses: docker/[email protected]
with:
registry: ${{ env.CONTAINER_REGISTRY_GHCR }}
Expand All @@ -141,6 +142,7 @@ jobs:
org.opencontainers.image.vendor=${{ github.actor }}
- name: Build/push container
id: build
uses: docker/[email protected]
with:
build-args: |
Expand All @@ -151,11 +153,17 @@ jobs:
file: cicd/Dockerfile
labels: ${{ steps.meta.outputs.labels }}
platforms: ${{ env.CONTAINER_PLATFORMS }}
provenance: true
push: true
sbom: true
tags: ${{ steps.meta.outputs.tags }}

- name: Generate attestations
uses: actions/[email protected]
with:
push-to-registry: true
subject-digest: ${{ steps.build.outputs.digest }}
subject-name: ${{ env.CONTAINER_REGISTRY_GHCR }}/${{ env.CONTAINER_NAME }}

create-release:
name: Create release
needs:
Expand Down

0 comments on commit ff76145

Please sign in to comment.