Skip to content

Conversation

@Kelleretoro
Copy link

No description provided.

Copilot AI review requested due to automatic review settings November 23, 2025 15:58
Copilot finished reviewing on behalf of Kelleretoro November 23, 2025 15:59
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new GitHub Actions workflow for generating SLSA (Supply-chain Levels for Software Artifacts) provenance attestations at level 3. The workflow generates cryptographic hashes of build artifacts and creates a signed provenance file using the SLSA framework's generic generator.

Key changes:

  • Adds SLSA provenance generation workflow triggered on releases and manual dispatch
  • Implements a two-job pipeline: artifact building and provenance generation
  • Uses SLSA framework v1.4.0 for generating and uploading attestations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

build:
runs-on: ubuntu-latest
outputs:
digests: ${{ steps.hash.outputs.digests }}
Copy link

Copilot AI Nov 23, 2025

Choose a reason for hiding this comment

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

The output references 'digests' but the hash step (line 55) sets 'hashes' instead. Change 'digests' to 'hashes' to match the actual output variable name.

Copilot uses AI. Check for mistakes.
Comment on lines +53 to +55
files=$(ls artifact*)
# Generate the subjects (base64 encoded).
echo "hashes=$(sha256sum $files | base64 -w0)" >> "${GITHUB_OUTPUT}"
Copy link

Copilot AI Nov 23, 2025

Choose a reason for hiding this comment

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

Using 'ls' with glob patterns can fail if no files match and is not recommended in scripts. Use a shell glob directly or 'find' instead: 'files=(artifact*)' or quote the expansion when used.

Suggested change
files=$(ls artifact*)
# Generate the subjects (base64 encoded).
echo "hashes=$(sha256sum $files | base64 -w0)" >> "${GITHUB_OUTPUT}"
files=(artifact*)
# Generate the subjects (base64 encoded).
echo "hashes=$(sha256sum "${files[@]}" | base64 -w0)" >> "${GITHUB_OUTPUT}"

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

Copilot AI Nov 23, 2025

Choose a reason for hiding this comment

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

The output variable is named 'hashes' but line 23 and line 65 reference it as 'digests'. Either rename this to 'digests' for consistency, or update lines 23 and 65 to use 'hashes'.

Suggested change
echo "hashes=$(sha256sum $files | base64 -w0)" >> "${GITHUB_OUTPUT}"
echo "digests=$(sha256sum $files | base64 -w0)" >> "${GITHUB_OUTPUT}"

Copilot uses AI. Check for mistakes.
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.

1 participant