Skip to content

Commit

Permalink
adding warning mesage for slsa attestor
Browse files Browse the repository at this point in the history
Signed-off-by: chaosinthecrd <[email protected]>
  • Loading branch information
ChaosInTheCRD committed Apr 10, 2024
1 parent f6b9f69 commit bb842ee
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions attestation/slsa/slsa.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (
"github.com/in-toto/go-witness/attestation/oci"
"github.com/in-toto/go-witness/attestation/product"
"github.com/in-toto/go-witness/cryptoutil"
"github.com/in-toto/go-witness/log"
"github.com/in-toto/go-witness/registry"
"golang.org/x/exp/maps"
"google.golang.org/protobuf/types/known/structpb"
Expand Down Expand Up @@ -210,6 +211,11 @@ func (p *Provenance) Attest(ctx *attestation.AttestationContext) error {
}
}

// NOTE: We want to warn users that they can use the github and gitlab attestors to enrich their provenance
if p.PbProvenance.RunDetails.Builder.Id == DefaultBuilderId {
log.Warn("No build system attestor invoked. Consider using github or gitlab attestors (if appropriate) to enrich your SLSA provenance")
}

var err error
p.PbProvenance.BuildDefinition.InternalParameters, err = structpb.NewStruct(internalParameters)
if err != nil {
Expand Down

0 comments on commit bb842ee

Please sign in to comment.