Documentation ¶
Index ¶
- Constants
- 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 (r *Policies) GetResultID(result scan.Result) string
- func (r *Policies) HasSeverity(resultSeverity severity.Severity) bool
- func (p *Policies) Hash(kind string) (string, error)
- func (p *Policies) Libraries() map[string]string
- func (p *Policies) ModulePolicyByKind(kind string) ([]string, 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 = "no policies found"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Policies ¶
type Policies struct {
// contains filtered or unexported fields
}
func NewPolicies ¶
func NewPolicies(data map[string]string, cac configauditreport.ConfigAuditConfig, log logr.Logger, serverVersion string) *Policies
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) GetResultID ¶ added in v0.2.0
GetResultID return the result id found in aliases (legacy) otherwise use AvdID
func (*Policies) HasSeverity ¶ added in v0.12.0
func (*Policies) ModulePolicyByKind ¶ added in v0.0.7
func (*Policies) ModulesByKind ¶
func (*Policies) PoliciesByKind ¶
Click to show internal directories.
Click to hide internal directories.