Skip to content

Commit

Permalink
πŸ‘ syft sbom πŸ‘
Browse files Browse the repository at this point in the history
  • Loading branch information
eformat committed May 31, 2023
1 parent a4f6f2a commit 51570d8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/build_container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ jobs:
# Provenance SBOM and attestation
- name: Generate SBOM
uses: anchore/sbom-action@v0
id: syft
with:
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAGS }}
registry-username: ${{ secrets.QUAY_USER }}
Expand All @@ -96,7 +97,7 @@ jobs:

- name: Attach SBOM to image
run: |
cosign attach sbom --sbom pet-battle-api.sbom \
cosign attach sbom --sbom ${{ steps.syft.output-file }} \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAGS }}
env:
COSIGN_PASSWORD: ""
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,3 +281,17 @@ To verify an image:
curl --progress-bar -o cosign.pub https://raw.githubusercontent.com/petbattle/pet-battle-api/master/cosign.pub
cosign verify --key cosign.pub quay.io/petbattle/pet-battle-api:latest
```

SBOM generated using [syft](https://github.com/anchore/syft).

Verify signed SBOM:

```bash
cosign verify --key cosign.pub --attachment sbom quay.io/petbattle/pet-battle-api:latest
```

Verify SBOM attestation:

```bash
cosign verify-attestation --key cosign.pub quay.io/petbattle/pet-battle-api:latest
```

0 comments on commit 51570d8

Please sign in to comment.