Conversation
Signed-off-by: Brian DeHamer <bdehamer@github.com>
Signed-off-by: Brian DeHamer <bdehamer@github.com>
da2fc43 to
5b2d167
Compare
There was a problem hiding this comment.
Pull request overview
This PR consolidates three separate attestation actions (actions/attest, actions/attest-build-provenance, and actions/attest-sbom) into a single unified action with automatic mode detection. The action now supports three distinct modes: Build Provenance (default), SBOM, and Custom attestations.
Changes:
- Added automatic attestation type detection with three modes: provenance (default when no predicate inputs), SBOM (when
sbom-pathis provided), and custom (when predicate inputs are provided) - Made
predicate-typeinput optional since it's no longer required for provenance/SBOM modes - Implemented subject deduplication for checksum-based subjects to handle duplicate entries
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/detect.ts | New file implementing attestation type detection and input validation logic |
| src/provenance.ts | New file wrapping SLSA provenance predicate generation from @actions/attest |
| src/sbom.ts | New file for parsing SPDX/CycloneDX SBOMs and generating predicates |
| src/main.ts | Integrated detection logic and type-based predicate generation |
| src/subject.ts | Added deduplication by name and digest for checksum-based subjects |
| src/index.ts | Added sbomPath input parameter |
| action.yml | Updated input descriptions, made predicate-type optional, added sbom-path |
| package.json | Added --minify and --source-map flags to build command |
| README.md | Updated documentation with new attestation modes and usage examples |
| tests/*.test.ts | Comprehensive test coverage for new functionality |
| dist/* | Updated generated distribution files |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I've got examples of running the new consolidated action in the various modes here: |
ajbeattie
left a comment
There was a problem hiding this comment.
Nice! This looks great to me - just one question and a small nit suggestion! Thanks for the very clear description and doc updates 💯
Co-authored-by: Austin Beattie <ajbeattie@github.com>
Signed-off-by: Brian DeHamer <bdehamer@github.com>
Consolidate Attestation Actions
This PR consolidates the functionality of three attestation actions into
actions/attest:actions/attest(custom attestations)actions/attest-build-provenance(SLSA provenance)actions/attest-sbom(SPDX/CycloneDX SBOM)Overview
The action now supports three modes with automatic detection:
sbom-pathor predicate inputssbom-pathis providedpredicate-type/predicate/predicate-pathprovidedChanges
New Features:
sbom-pathinput for SBOM attestationsNew Files:
src/detect.ts- Attestation type detection and input validationsrc/provenance.ts- SLSA provenance predicate generationsrc/sbom.ts- SBOM parsing (SPDX/CycloneDX) and predicate generation__tests__/detect.test.ts,__tests__/provenance.test.ts,__tests__/sbom.test.ts,__tests__/attest.test.tsModified Files:
action.yml- Addedsbom-pathinput, madepredicate-typeoptionalsrc/main.ts- Integrated detection and predicate generation by typesrc/subject.ts- Added deduplication for checksums-based subjectsREADME.md- Documented three modes with examplesUsage Examples
Build Provenance (default):
SBOM:
Custom:
Testing
Rendered README