Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/provenance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# =============================================================================
# SLSA L1 — Provenance Attestation (OWASP A03: Supply Chain)
# Generates signed provenance for build artifacts
# =============================================================================

name: SLSA Provenance Attestation

on:
push:
branches: [main, develop]

permissions:
contents: read
id-token: write # Required for OIDC signing
attestations: write

jobs:
provenance:
name: Generate Provenance Attestation
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install build tools
run: python -m pip install --upgrade pip build

- name: Build package
run: python -m build

- name: Attest build provenance
uses: actions/attest-build-provenance@v2
with:
subject-path: dist/*

- name: Upload provenance artifact
uses: actions/upload-artifact@v4
with:
name: provenance
path: .attestation/
retention-days: 90
33 changes: 33 additions & 0 deletions .github/workflows/verify-provenance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# =============================================================================
# SLSA L1 — Verify Provenance Attestation (OWASP A03: Supply Chain)
# Verifies that build artifacts have valid provenance
# =============================================================================

name: Verify Provenance

on:
pull_request:
branches: [main, develop]

permissions:
contents: read
attestations: read
id-token: write

jobs:
verify:
name: Verify Source Provenance
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Verify attestation
run: |
# List attestations for this commit
BASE_SHA=$(git rev-parse origin/${{ github.base_ref }})
gh attestation verify "$BASE_SHA" \
--owner ${{ github.repository_owner }} \
--predicate-type https://slsa.dev/provenance/v1
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading