Skip to content

Commit

Permalink
rename all to .build.slsa
Browse files Browse the repository at this point in the history
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
  • Loading branch information
ramonpetgrave64 committed Aug 7, 2024
1 parent e10f792 commit c8a9a5f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/builder_generic_slsa3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ on:
type: string

provenance-name:
description: The artifact name of the signed provenance. The file must have the intoto.jsonl extension. Defaults to <filename>.intoto.jsonl for single artifact or multiple.intoto.jsonl for multiple artifacts.
required: false
description: The artifact name of the signed provenance. The file must have the build.slsa extension.
required: true
type: string

rekor-log-public:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/debug.generic-generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
uses: ./.github/workflows/builder_generic_slsa3.yml
with:
base64-subjects: "${{ needs.build.outputs.hashes }}"
provenance-name: my-debug-prov.intoto.jsonl
provenance-name: my-debug-prov.build.slsa
rekor-log-public: true

verify2:
Expand Down
8 changes: 6 additions & 2 deletions internal/builders/generic_generator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,14 @@ type Subject struct {
func main() {
base64Subjects := flag.String("base64-subjects", "", "a base64-encoded list of subjects")
base64SubjectsFile := flag.String("base64-subjects-file", "", "file with a base64-encoded list of subjects")
provenanceName := flag.String("provenance-name", "", "name of the provenance")
provenanceName := flag.String("provenance-name", "", "name of the provenance, including the .build.slsa suffix")
outputFile := flag.String("output-file", "", "outfile to write the SLSA layout to")
flag.Parse()

if !strings.HasSuffix(*provenanceName, ".build.slsa") {
log.Fatalf("provenance name must have the .build.slsa suffix: %s", *provenanceName)
}

var base64Content string
if *base64Subjects != "" {
base64Content = *base64Subjects
Expand All @@ -49,7 +53,7 @@ func main() {
}

attestation := Attestation{
Name: strings.TrimSuffix(*provenanceName, ".intoto.jsonl"),
Name: strings.TrimSuffix(*provenanceName, ".build.slsa"),
}
layout := SLSALayout{
Version: 1,
Expand Down

0 comments on commit c8a9a5f

Please sign in to comment.