Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pkg/config/_fixtures/filters/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ notes: |
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Ut ut ante id ligula molestie varius. Duis efficitur eros
quis turpis accumsan, nec scelerisque libero euismod.
authors:
- rabbitstack
- skynova
1 change: 1 addition & 0 deletions pkg/config/filters.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ type FilterConfig struct {
Notes string `json:"notes" yaml:"notes"`
MinEngineVersion string `json:"min-engine-version" yaml:"min-engine-version"`
Enabled *bool `json:"enabled" yaml:"enabled"`
Authors []string `json:"authors" yaml:"authors"`
}

// FilterAction wraps all possible filter actions.
Expand Down
1 change: 1 addition & 0 deletions pkg/config/filters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ func TestLoadRulesFromPaths(t *testing.T) {
assert.NotNil(t, f1.Action)
assert.Contains(t, f1.References, "ref2")
assert.NotEmpty(t, f1.Notes)
assert.Len(t, f1.Authors, 2)

acts, err := f1.DecodeActions()
require.NoError(t, err)
Expand Down
1 change: 1 addition & 0 deletions pkg/config/schema_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,7 @@ var rulesSchema = `
},
"tags": {"type": "array", "items": [{"type": "string", "minLength": 1}]},
"references": {"type": "array", "items": [{"type": "string", "minLength": 1}]},
"authors": {"type": "array", "items": [{"type": "string", "minLength": 1}]},
"action": {
"type": "array",
"items": {
Expand Down