Documentation
¶
Overview ¶
Package scan contains implementation and logic for running scans using pre-defined policies against specified targets.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("policy not found")
Functions ¶
func EvaluateMany ¶
EvaluateMany policies concurrently - // TODO: WEP
Types ¶
type Result ¶
Result - stores result of scan evaluation
func FindPolicyAndEvaluate ¶
FindPolicyAndEvaluate -
type Rule ¶
type Rule struct {
Level uint32 `json:"level"`
Message string `json:"message"`
RuleID string `json:"ruleID"`
RuleDefinition string `json:"ruleDef"`
}
Rule - type used to unmarshal Rego Policy violations[rule]
type Target ¶
type Target struct {
ResourceType string
Platform string
Item interface{}
// contains filtered or unexported fields
}
Target - struct represents the entity/element to be scanned/evaluated
func (*Target) AddSubGrouping ¶
AddSubGrouping - adds a sub group subgroups are used by some resources that require additional partition beyond platform --> resource Note that subgroups are placed between platform & resource during lookups, i.e platform --> [subgroups] --> resource or kubernetes --> app/v1 --> resource
Click to show internal directories.
Click to hide internal directories.