Documentation ¶
Index ¶
- Constants
- func RegisterRuleType(ruleType RuleType)
- type Manager
- func (m *Manager) CreateTarBall(path string) error
- func (m *Manager) DetectPolicy() error
- func (m *Manager) LoadRules() error
- func (m *Manager) PrepareRules(dest string) error
- func (m *Manager) Register(cmd *cobra.Command)
- func (m *Manager) RuleCount() (count int)
- func (m *Manager) TestRules() (TestMetrics, error)
- func (m *Manager) ValidateRules() (ValidateMetrics, error)
- type PassFail
- type Rule
- type RuleType
- type Target
- type TestMetrics
- type ValidateMetrics
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func RegisterRuleType ¶ added in v0.5.23
func RegisterRuleType(ruleType RuleType)
Types ¶
type Manager ¶
func (*Manager) CreateTarBall ¶
func (*Manager) DetectPolicy ¶ added in v0.5.23
Finds and loads rules in a directory. The directory may be any directory in the policies tree. Only rules underneath the directory will be loaded. Policy directories have the following layout:
policies/ policies/<rule-tyoe> policies/<rule-type>/<rule> (must contain metadata.yaml) policies/<rule-type>/<rule>/<target>
<target> is optional depending on <rule-type>.
func (*Manager) PrepareRules ¶
func (*Manager) TestRules ¶
func (m *Manager) TestRules() (TestMetrics, error)
func (*Manager) ValidateRules ¶
func (m *Manager) ValidateRules() (ValidateMetrics, error)
type RuleType ¶
type RuleType interface { GetName() string GetCode() string PrepareRules(m *Manager, rules []*Rule, dest string) error ValidateRules(m *Manager, rules []*Rule) error GetTestRunner(m *Manager, target Target) tools.Single FindRuleResult(findings assessments.Findings, id string) PassFail }
func GetRuleType ¶ added in v0.5.23
type TestMetrics ¶ added in v0.5.23
type ValidateMetrics ¶ added in v0.5.23
type ValidateMetrics struct {
Count int
}
Click to show internal directories.
Click to hide internal directories.