Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: rename fields #3132

Merged
merged 1 commit into from
Sep 27, 2024
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
14 changes: 7 additions & 7 deletions pkg/installpackage/checksum.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ func (is *Installer) dlAndExtractChecksum(ctx context.Context, logE *logrus.Entr
ghVerifier: is.ghVerifier,
},
&cosignVerifier{
cosignDisabled: is.cosignDisabled,
cosign: pkgInfo.Checksum.GetCosign(),
pkg: pkg,
installer: is.cosignInstaller,
verifier: is.cosign,
runtime: is.runtime,
asset: assetName,
disabled: is.cosignDisabled,
cosign: pkgInfo.Checksum.GetCosign(),
pkg: pkg,
installer: is.cosignInstaller,
verifier: is.cosign,
runtime: is.runtime,
asset: assetName,
},
&minisignVerifier{
pkg: pkg,
Expand Down
28 changes: 14 additions & 14 deletions pkg/installpackage/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,22 +101,22 @@ func (is *Installer) download(ctx context.Context, logE *logrus.Entry, param *Do
ghVerifier: is.ghVerifier,
},
&cosignVerifier{
cosignDisabled: is.cosignDisabled,
pkg: ppkg,
cosign: pkgInfo.Cosign,
installer: is.cosignInstaller,
verifier: is.cosign,
runtime: is.runtime,
asset: param.Asset,
disabled: is.cosignDisabled,
pkg: ppkg,
cosign: pkgInfo.Cosign,
installer: is.cosignInstaller,
verifier: is.cosign,
runtime: is.runtime,
asset: param.Asset,
},
&slsaVerifier{
slsaDisabled: is.slsaDisabled,
pkg: ppkg,
provenance: pkgInfo.SLSAProvenance,
installer: is.slsaVerifierInstaller,
verifier: is.slsaVerifier,
runtime: is.runtime,
asset: param.Asset,
disabled: is.slsaDisabled,
pkg: ppkg,
provenance: pkgInfo.SLSAProvenance,
installer: is.slsaVerifierInstaller,
verifier: is.slsaVerifier,
runtime: is.runtime,
asset: param.Asset,
},
&minisignVerifier{
pkg: ppkg,
Expand Down
16 changes: 8 additions & 8 deletions pkg/installpackage/verify_cosign.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ import (
)

type cosignVerifier struct {
cosignDisabled bool
pkg *config.Package
cosign *registry.Cosign
installer *DedicatedInstaller
verifier CosignVerifier
runtime *runtime.Runtime
asset string
disabled bool
pkg *config.Package
cosign *registry.Cosign
installer *DedicatedInstaller
verifier CosignVerifier
runtime *runtime.Runtime
asset string
}

func (c *cosignVerifier) Enabled(logE *logrus.Entry) (bool, error) {
if c.cosignDisabled {
if c.disabled {
logE.Debug("cosign is disabled")
return false, nil
}
Expand Down
16 changes: 8 additions & 8 deletions pkg/installpackage/verify_slsa.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ import (
)

type slsaVerifier struct {
slsaDisabled bool
pkg *config.Package
provenance *registry.SLSAProvenance
installer *DedicatedInstaller
verifier SLSAVerifier
runtime *runtime.Runtime
asset string
disabled bool
pkg *config.Package
provenance *registry.SLSAProvenance
installer *DedicatedInstaller
verifier SLSAVerifier
runtime *runtime.Runtime
asset string
}

func (s *slsaVerifier) Enabled(logE *logrus.Entry) (bool, error) {
if s.slsaDisabled {
if s.disabled {
logE.Debug("slsa verification is disabled")
return false, nil
}
Expand Down