Skip to content
This repository was archived by the owner on Sep 23, 2025. It is now read-only.

Commit 2c06b75

Browse files
committed
Use cached trusted root
Signed-off-by: Cody Soyland <[email protected]>
1 parent 9ae61a3 commit 2c06b75

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/webhook/validator.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import (
4141
"github.com/sigstore/policy-controller/pkg/apis/config"
4242
policyduckv1beta1 "github.com/sigstore/policy-controller/pkg/apis/duck/v1beta1"
4343
policycontrollerconfig "github.com/sigstore/policy-controller/pkg/config"
44+
pctuf "github.com/sigstore/policy-controller/pkg/tuf"
4445
webhookcip "github.com/sigstore/policy-controller/pkg/webhook/clusterimagepolicy"
4546
"github.com/sigstore/policy-controller/pkg/webhook/registryauth"
4647
rekor "github.com/sigstore/rekor/pkg/client"
@@ -1378,7 +1379,7 @@ func checkOptsFromAuthority(ctx context.Context, authority webhookcip.Authority,
13781379
}
13791380
} else {
13801381
var err error
1381-
ret.TrustedMaterial, err = root.FetchTrustedRoot()
1382+
ret.TrustedMaterial, err = pctuf.GetTrustedRoot(ctx)
13821383
if err != nil {
13831384
return nil, fmt.Errorf("failed to fetch trusted root: %w", err)
13841385
}

0 commit comments

Comments
 (0)