Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: laurentsimon <laurentsimon@google.com>
  • Loading branch information
laurentsimon committed Apr 19, 2023
1 parent 9c1b25e commit c25767a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
6 changes: 3 additions & 3 deletions verifiers/internal/gcb/provenance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ func Test_VerifyBuilder(t *testing.T) {
panic("outBuilderID is nil")
}

if err := outBuilderID.Matches(tt.builderID, false); err != nil {
if err := outBuilderID.MatchesLoose(tt.builderID, false); err != nil {
t.Errorf(fmt.Sprintf("matches failed: %v", err))
}
})
Expand Down Expand Up @@ -299,7 +299,7 @@ func Test_validateRecipeType(t *testing.T) {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()

builderID, err := utils.TrustedBuilderIDNew(tt.builderID)
builderID, err := utils.TrustedBuilderIDNew(tt.builderID, true)
if err != nil {
panic(fmt.Errorf("BuilderIDNew: %w", err))
}
Expand Down Expand Up @@ -489,7 +489,7 @@ func Test_VerifySourceURI(t *testing.T) {
panic(fmt.Errorf("setStatement: %w", err))
}

builderID, err := utils.TrustedBuilderIDNew(tt.builderID)
builderID, err := utils.TrustedBuilderIDNew(tt.builderID, true)
if err != nil {
panic(fmt.Errorf("BuilderIDNew: %w", err))
}
Expand Down
5 changes: 2 additions & 3 deletions verifiers/internal/gha/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ func Test_VerifyBuilderIdentity(t *testing.T) {
return
}

if err := id.Matches(tt.builderID, true); err != nil {
if err := id.MatchesLoose(tt.builderID, true); err != nil {
t.Errorf("matches failed:%v", err)
}
})
Expand Down Expand Up @@ -480,7 +480,7 @@ func Test_verifyTrustedBuilderID(t *testing.T) {
return
}
expectedID := "https://github.com/" + tt.path + "@" + tt.tag
if err := id.Matches(expectedID, true); err != nil {
if err := id.MatchesLoose(expectedID, true); err != nil {
t.Errorf("matches failed:%v", err)
}
})
Expand Down Expand Up @@ -607,7 +607,6 @@ func Test_verifyTrustedBuilderRef(t *testing.T) {
expected: serrors.ErrorInvalidRef,
},
{

name: "full semver for other repos",
callerRepo: "some/repo",
builderRef: "refs/tags/v1.2.3",
Expand Down
1 change: 0 additions & 1 deletion verifiers/internal/gha/npm.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
const (
publishAttestationV01 = "https://github.com/npm/attestation/tree/main/specs/publish/"
builderGitHubRunnerID = "https://github.com/actions/runner"
ossfNpmBuilderID = "https://github.com/slsa-framework/slsa-github-generator/.github/workflows/builder_nodejs_slsa3.yml"
)

var errrorInvalidAttestations = errors.New("invalid npm attestations")
Expand Down

0 comments on commit c25767a

Please sign in to comment.