Documentation
¶
Index ¶
- Constants
- func GetResultID(result scan.Result) string
- func HasSeverity(resultSeverity severity.Severity, defaultSeverity string) bool
- func LoadPoliciesData(policyPath []string) ([]string, error)
- type Loader
- type Policies
- func (p *Policies) Applicable(resourceKind string) (bool, string, error)
- func (p *Policies) Eval(ctx context.Context, resource client.Object, inputs ...[]byte) (scan.Results, error)
- func (p *Policies) ExternalPoliciesApplicable(resourceKind string) (bool, error)
- func (p *Policies) GetDefaultSeverity() string
- func (p *Policies) Hash(kind string) (string, error)
- func (p *Policies) InitScanner() error
- func (p *Policies) Libraries() map[string]string
- func (p *Policies) Load() error
- func (p *Policies) ModulesByKind(kind string) (map[string]string, error)
- func (p *Policies) PoliciesByKind(kind string) (map[string]string, error)
- func (p *Policies) SupportedKind(resource client.Object, rbacDEnable bool) (bool, error)
Constants ¶
View Source
const (
PoliciesNotFoundError = "failed to load rego policies from [externalPolicies]: stat externalPolicies: file does not exist"
)
Variables ¶
This section is empty.
Functions ¶
func GetResultID ¶ added in v0.27.0
GetResultID return the result id found in aliases (legacy) otherwise use ID
func HasSeverity ¶ added in v0.27.0
HasSeverity checks if the result severity is in the default severity
func LoadPoliciesData ¶ added in v0.19.0
Types ¶
type Loader ¶ added in v0.19.0
func NewPolicyLoader ¶ added in v0.19.0
type Policies ¶
type Policies struct {
// contains filtered or unexported fields
}
func NewPolicies ¶
func (*Policies) Applicable ¶
Applicable check if policies exist either built in or via policies configmap
func (*Policies) Eval ¶
func (p *Policies) Eval(ctx context.Context, resource client.Object, inputs ...[]byte) (scan.Results, error)
Eval evaluates Rego policies with Kubernetes resource client.Object as input.
func (*Policies) ExternalPoliciesApplicable ¶ added in v0.11.0
func (*Policies) GetDefaultSeverity ¶ added in v0.27.0
GetDefaultSeverity returns the default severity from ConfigAuditConfig
func (*Policies) InitScanner ¶ added in v0.24.1
func (*Policies) ModulesByKind ¶
func (*Policies) PoliciesByKind ¶
Click to show internal directories.
Click to hide internal directories.