Skip to content

Commit

Permalink
chore: address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
binbin-li committed Aug 30, 2024
1 parent 8e58648 commit eb1148c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/controllers/utils/verifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func SpecToVerifierConfig(raw []byte, verifierName, verifierType, artifactTypes
if err := json.Unmarshal(raw, &verifierConfig); err != nil {
errMsg := fmt.Sprintf("Unable to decode verifier parameters, Parameters.Raw: %s", string(raw))
logrus.Error(err, errMsg)
return vc.VerifierConfig{}, re.ErrorCodeConfigInvalid.WithError(err).WithDetail(errMsg).WithRemediation("Please revise verifier parameters and try again. Refer to verifier configuration: https://ratify.dev/docs/next/reference/custom%20resources/verifiers")
return vc.VerifierConfig{}, re.ErrorCodeConfigInvalid.WithError(err).WithDetail(errMsg).WithRemediation("Please revise verifier parameters and try again. Refer to verifier configuration: https://ratify.dev/docs/reference/custom%20resources/verifiers")
}
}
verifierConfig[types.Name] = verifierName
Expand Down
2 changes: 1 addition & 1 deletion pkg/verifier/notation/notation.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ func normalizeVerificationCertsStores(conf *NotationPluginVerifierConfig) error
}
}
if isCertStoresByType && isLegacyCertStore {
return re.ErrorCodeConfigInvalid.WithDetail("VerificationCertStores is misconfigured with both legacy and new format").WithRemediation("Please provide only one format for VerificationCertStores. Refer to Notation verifier configuration: https://ratify.dev/docs/next/plugins/verifier/notation#configuration")
return re.ErrorCodeConfigInvalid.WithDetail("VerificationCertStores is misconfigured with both legacy and new format").WithRemediation("Please provide only one format for VerificationCertStores. Refer to Notation verifier configuration: https://ratify.dev/docs/plugins/verifier/notation#configuration")
} else if !isCertStoresByType && isLegacyCertStore {
// normalize <store>:<certs> to ca:<store><certs> if no store type is provided
conf.VerificationCertStores = verificationCertStores{
Expand Down
2 changes: 1 addition & 1 deletion pkg/verifier/notation/truststore.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type trustStore struct {
func newTrustStore(certPaths []string, verificationCertStores verificationCertStores) (*trustStore, error) {
certStores, err := newCertStoreByType(verificationCertStores)
if err != nil {
return nil, re.ErrorCodeConfigInvalid.WithDetail("Failed to create trust store from verificationCertStores").WithError(err).WithRemediation("Please check the configuration of verificationCertStores. Refer to Notation verifier configuration: https://ratify.dev/docs/next/plugins/verifier/notation#configuration")
return nil, re.ErrorCodeConfigInvalid.WithDetail("Failed to create trust store from verificationCertStores").WithError(err).WithRemediation("Please check the configuration of verificationCertStores. Refer to Notation verifier configuration: https://ratify.dev/docs/plugins/verifier/notation#configuration")

Check warning on line 44 in pkg/verifier/notation/truststore.go

View check run for this annotation

Codecov / codecov/patch

pkg/verifier/notation/truststore.go#L44

Added line #L44 was not covered by tests
}
store := &trustStore{
certPaths: certPaths,
Expand Down

0 comments on commit eb1148c

Please sign in to comment.