@@ -12,63 +12,63 @@ import (
1212
1313// SecurityDetectionRuleRequest represents a security detection rule creation/update request
1414type SecurityDetectionRuleRequest struct {
15- Name string `json:"name"`
16- Description string `json:"description"`
17- Type string `json:"type"`
18- Query * string `json:"query,omitempty"`
19- Language * string `json:"language,omitempty"`
20- Index []string `json:"index,omitempty"`
21- Severity string `json:"severity"`
22- Risk int `json:"risk_score"`
23- Enabled bool `json:"enabled"`
24- Tags []string `json:"tags,omitempty"`
25- From string `json:"from"`
26- To string `json:"to"`
27- Interval string `json:"interval"`
28- Meta * map [string ]any `json:"meta,omitempty"`
29- Author []string `json:"author,omitempty"`
30- License * string `json:"license,omitempty"`
31- RuleNameOverride * string `json:"rule_name_override,omitempty"`
32- TimestampOverride * string `json:"timestamp_override,omitempty"`
33- Note * string `json:"note,omitempty"`
34- References []string `json:"references,omitempty"`
35- FalsePositives []string `json:"false_positives,omitempty"`
36- ExceptionsList []any `json:"exceptions_list,omitempty"`
37- Version int `json:"version"`
38- MaxSignals int `json:"max_signals"`
15+ Name string `json:"name"`
16+ Description string `json:"description"`
17+ Type string `json:"type"`
18+ Query * string `json:"query,omitempty"`
19+ Language * string `json:"language,omitempty"`
20+ Index []string `json:"index,omitempty"`
21+ Severity string `json:"severity"`
22+ Risk int `json:"risk_score"`
23+ Enabled bool `json:"enabled"`
24+ Tags []string `json:"tags,omitempty"`
25+ From string `json:"from"`
26+ To string `json:"to"`
27+ Interval string `json:"interval"`
28+ Meta * map [string ]any `json:"meta,omitempty"`
29+ Author []string `json:"author,omitempty"`
30+ License * string `json:"license,omitempty"`
31+ RuleNameOverride * string `json:"rule_name_override,omitempty"`
32+ TimestampOverride * string `json:"timestamp_override,omitempty"`
33+ Note * string `json:"note,omitempty"`
34+ References []string `json:"references,omitempty"`
35+ FalsePositives []string `json:"false_positives,omitempty"`
36+ ExceptionsList []any `json:"exceptions_list,omitempty"`
37+ Version int `json:"version"`
38+ MaxSignals int `json:"max_signals"`
3939}
4040
4141// SecurityDetectionRuleResponse represents the API response for a security detection rule
4242type SecurityDetectionRuleResponse struct {
43- ID string `json:"id"`
44- Name string `json:"name"`
45- Description string `json:"description"`
46- Type string `json:"type"`
47- Query * string `json:"query,omitempty"`
48- Language * string `json:"language,omitempty"`
49- Index []string `json:"index,omitempty"`
50- Severity string `json:"severity"`
51- Risk int `json:"risk_score"`
52- Enabled bool `json:"enabled"`
53- Tags []string `json:"tags,omitempty"`
54- From string `json:"from"`
55- To string `json:"to"`
56- Interval string `json:"interval"`
57- Meta * map [string ]any `json:"meta,omitempty"`
58- Author []string `json:"author,omitempty"`
59- License * string `json:"license,omitempty"`
60- RuleNameOverride * string `json:"rule_name_override,omitempty"`
61- TimestampOverride * string `json:"timestamp_override,omitempty"`
62- Note * string `json:"note,omitempty"`
63- References []string `json:"references,omitempty"`
64- FalsePositives []string `json:"false_positives,omitempty"`
65- ExceptionsList []any `json:"exceptions_list,omitempty"`
66- Version int `json:"version"`
67- MaxSignals int `json:"max_signals"`
68- CreatedAt string `json:"created_at"`
69- CreatedBy string `json:"created_by"`
70- UpdatedAt string `json:"updated_at"`
71- UpdatedBy string `json:"updated_by"`
43+ ID string `json:"id"`
44+ Name string `json:"name"`
45+ Description string `json:"description"`
46+ Type string `json:"type"`
47+ Query * string `json:"query,omitempty"`
48+ Language * string `json:"language,omitempty"`
49+ Index []string `json:"index,omitempty"`
50+ Severity string `json:"severity"`
51+ Risk int `json:"risk_score"`
52+ Enabled bool `json:"enabled"`
53+ Tags []string `json:"tags,omitempty"`
54+ From string `json:"from"`
55+ To string `json:"to"`
56+ Interval string `json:"interval"`
57+ Meta * map [string ]any `json:"meta,omitempty"`
58+ Author []string `json:"author,omitempty"`
59+ License * string `json:"license,omitempty"`
60+ RuleNameOverride * string `json:"rule_name_override,omitempty"`
61+ TimestampOverride * string `json:"timestamp_override,omitempty"`
62+ Note * string `json:"note,omitempty"`
63+ References []string `json:"references,omitempty"`
64+ FalsePositives []string `json:"false_positives,omitempty"`
65+ ExceptionsList []any `json:"exceptions_list,omitempty"`
66+ Version int `json:"version"`
67+ MaxSignals int `json:"max_signals"`
68+ CreatedAt string `json:"created_at"`
69+ CreatedBy string `json:"created_by"`
70+ UpdatedAt string `json:"updated_at"`
71+ UpdatedBy string `json:"updated_by"`
7272}
7373
7474// CreateSecurityDetectionRule creates a new security detection rule
@@ -228,4 +228,4 @@ func DeleteSecurityDetectionRule(ctx context.Context, client *clients.ApiClient,
228228 }
229229
230230 return diags
231- }
231+ }
0 commit comments