cyberark/secrets-provider-for-k8s

View on GitHub
pkg/secrets/pushtofile/secret_group.go

Summary

Maintainability
A
1 hr
Test Coverage
A
93%

Function newSecretGroup has 6 return statements (exceeds 4 allowed).
Open

func newSecretGroup(groupName string, annotations map[string]string, c Config) (*SecretGroup, []error) {
    groupSecrets := annotations[secretGroupPrefix+groupName]
    filePath := annotations[secretGroupFilePathPrefix+groupName]
    fileFormat := annotations[secretGroupFileFormatPrefix+groupName]

Severity: Major
Found in pkg/secrets/pushtofile/secret_group.go - About 40 mins to fix

    Function collectTemplate has 5 return statements (exceeds 4 allowed).
    Open

    func collectTemplate(groupName string, annotations map[string]string, c Config) (string, error) {
        annotationTemplate := annotations[secretGroupFileTemplatePrefix+groupName]
    
        configmapTemplate, err := readTemplateFromFile(groupName, annotations, c)
        if os.IsNotExist(err) {
    Severity: Major
    Found in pkg/secrets/pushtofile/secret_group.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status