diff --git a/policyhandler/handlepullpolicies.go b/policyhandler/handlepullpolicies.go index 858ea5d9..ddceff4b 100644 --- a/policyhandler/handlepullpolicies.go +++ b/policyhandler/handlepullpolicies.go @@ -2,6 +2,7 @@ package policyhandler import ( "fmt" + "strings" "github.com/armosec/kubescape/cautils" "github.com/armosec/kubescape/cautils/armotypes" @@ -24,6 +25,9 @@ func (policyHandler *PolicyHandler) GetPoliciesFromBackend(notification *opapoli exceptionPolicies = append(exceptionPolicies, recExceptionPolicies...) } } else if err != nil { + if strings.Contains(err.Error(), "unsupported protocol scheme") { + err = fmt.Errorf("failed to download from GitHub release, try running with `--use-default` flag") + } return nil, nil, fmt.Errorf("kind: %v, name: %s, error: %s", rule.Kind, rule.Name, err.Error()) }