Skip to content

Commit

Permalink
adding progress
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaosInTheCRD committed Dec 11, 2023
1 parent b11e25f commit 7d197ae
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions attestation/maven/maven.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ import (
"github.com/testifysec/go-witness/attestation"
"github.com/testifysec/go-witness/cryptoutil"
"github.com/testifysec/go-witness/log"
"github.com/testifysec/go-witness/registry"
)

const (
Name = "maven"
Type = "https://witness.dev/attestations/maven/v0.1"
RunType = attestation.PreMaterialRunType
Name = "maven"
Type = "https://witness.dev/attestations/maven/v0.1"
RunType = attestation.PreMaterialRunType
defaultPomPath = "pom.xml"
)

// This is a hacky way to create a compile time error in case the attestor
Expand All @@ -42,7 +44,22 @@ var (
func init() {
attestation.RegisterAttestation(Name, Type, RunType, func() attestation.Attestor {
return New()
})
},
registry.StringConfigOption(
"include-glob",
fmt.Sprintf("The path to the Project Object Model (POM) XML file used for task being attested (default \"%s\").", defaultPomPath),
defaultPomPath,
func(a attestation.Attestor, includeGlob string) (attestation.Attestor, error) {
prodAttestor, ok := a.(*Attestor)
if !ok {
return a, fmt.Errorf("unexpected attestor type: %T is not a product attestor", a)
}

WithIncludeGlob(includeGlob)(prodAttestor)
return prodAttestor, nil
},
),
)
}

type Attestor struct {
Expand Down

0 comments on commit 7d197ae

Please sign in to comment.