Skip to content

Add SLSA generic generator workflow#3713

Closed
hmahide9-sudo wants to merge 1 commit into
github:mainfrom
hmahide9-sudo:main
Closed

Add SLSA generic generator workflow#3713
hmahide9-sudo wants to merge 1 commit into
github:mainfrom
hmahide9-sudo:main

Conversation

@hmahide9-sudo

@hmahide9-sudo hmahide9-sudo commented Jul 22, 2026

Copy link
Copy Markdown

This workflow generates SLSA provenance files for projects, satisfying level 3 requirements. It includes steps for building artifacts and generating provenance subjects.

  • Have you followed the contributing guidelines?
  • Have you explained what your changes do, and why they add value to the Guides?

Please note: we will close your PR without comment if you do not check the boxes above and provide ALL requested information.


This workflow generates SLSA provenance files for projects, satisfying level 3 requirements. It includes steps for building artifacts and generating provenance subjects.
@hmahide9-sudo
hmahide9-sudo requested a review from a team as a code owner July 22, 2026 21:33
Comment on lines +21 to +57
runs-on: ubuntu-latest
outputs:
digests: ${{ steps.hash.outputs.digests }}

steps:
- uses: actions/checkout@v4

# ========================================================
#
# Step 1: Build your artifacts.
#
# ========================================================
- name: Build artifacts
run: |
# These are some amazing artifacts.
echo "artifact1" > artifact1
echo "artifact2" > artifact2

# ========================================================
#
# Step 2: Add a step to generate the provenance subjects
# as shown below. Update the sha256 sum arguments
# to include all binaries that you generate
# provenance for.
#
# ========================================================
- name: Generate subject for provenance
id: hash
run: |
set -euo pipefail

# List the artifacts the provenance will refer to.
files=$(ls artifact*)
# Generate the subjects (base64 encoded).
echo "hashes=$(sha256sum $files | base64 -w0)" >> "${GITHUB_OUTPUT}"

provenance:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants