Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions cmd/catalog/update_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,20 +192,15 @@ func verifyServerProvenance(
return fmt.Errorf("failed to convert for verification: %w", err)
}

v, err := verifier.New(imgMeta, authn.DefaultKeychain)
v, err := verifier.New(imgMeta.Provenance, authn.DefaultKeychain)
if err != nil {
return fmt.Errorf("failed to create verifier: %w", err)
}

isVerified, err := v.VerifyServer(imgMeta.Image, imgMeta)
if err != nil {
if err := v.VerifyServer(imgMeta.Image, imgMeta.Provenance); err != nil {
return fmt.Errorf("verification failed: %w", err)
}

if !isVerified {
return fmt.Errorf("no verified signatures found")
}

if verbose {
fmt.Println("Provenance verified successfully")
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/mark3labs/mcp-go v0.44.1
github.com/modelcontextprotocol/registry v1.4.1
github.com/spf13/cobra v1.10.2
github.com/stacklok/toolhive-core v0.0.7
github.com/stacklok/toolhive-core v0.0.9
github.com/stretchr/testify v1.11.1
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,8 @@ github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiT
github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=
github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stacklok/toolhive-core v0.0.7 h1:AW0dmSDOJjUCynlUQMXH+ODNeqPWRHf370gkvRdMO+E=
github.com/stacklok/toolhive-core v0.0.7/go.mod h1:LhtXDsHbj5CcNKBJDzPAA2Y4fmYAEVDFSGlGuLkAsK4=
github.com/stacklok/toolhive-core v0.0.9 h1:LSZBobSSuAkWhBhFpO5rBVlpp/cTxSI6m/rEyYFbjdY=
github.com/stacklok/toolhive-core v0.0.9/go.mod h1:LhtXDsHbj5CcNKBJDzPAA2Y4fmYAEVDFSGlGuLkAsK4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
Expand Down