You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`action` (String) The action to perform. Default is `SNOOZE`. Other options are `ENABLE`, `DISABLE`, and `OUT_OF_SCOPE`.
50
+
-`action` (String) The action to perform. Default is `RISK_ACCEPTED`. Other valid values are `WORKAROUND`, `FALSE_POSITIVE`, `ENABLE`, `DISABLE`, `OUT_OF_SCOPE`and `SNOOZE`.
51
51
-`check_mrns` (List of String) List of check MRNs to set exceptions for. If set, `vulnerability_mrns` must not be set.
52
52
-`justification` (String) Description why the exception is required.
53
53
-`scope_mrn` (String) The MRN of the scope (either asset mrn or space mrn).
// ValidUntilValidator ensures the "valid_until" attribute is only set when "action" is "SNOOZE".
93
-
typeValidUntilValidatorstruct{}
93
+
// ValidUntilActionValidator ensures the "valid_until" attribute is only set when "action" is "SNOOZE", "RISK_ACCEPTED", "WORKAROUND" or "FALSE_POSITIVE".
94
+
typeValidUntilActionValidatorstruct{}
95
+
96
+
// NewValidUntilActionValidator is a convenience function for creating an instance of the validator.
return"'valid_until' can only be set if 'action' is set to 'SNOOZE', 'RISK_ACCEPTED', 'WORKAROUND' or 'FALSE_POSITIVE'."
128
+
}
129
+
130
+
// ValidUntilPresentValidator ensures the "valid_until" attribute is only set when "action" is "SNOOZE", "RISK_ACCEPTED", "WORKAROUND" or "FALSE_POSITIVE".
131
+
typeValidUntilPresentValidatorstruct{}
132
+
133
+
// NewValidUntilPresentValidator is a convenience function for creating an instance of the validator.
stringvalidator.RegexMatches(regexp.MustCompile(`[1-9][0-9][0-9]{2}-([0][1-9]|[1][0-2])-([1-2][0-9]|[0][1-9]|[3][0-1])`), "Date must be in the format 'YYYY-MM-DD'"),
145
-
NewValidUntilValidator(),
185
+
NewValidUntilActionValidator(),
186
+
NewValidUntilPresentValidator(),
146
187
},
147
188
},
148
189
"justification": schema.StringAttribute{
149
190
MarkdownDescription: "Description why the exception is required.",
150
191
Optional: true,
151
192
},
152
193
"action": schema.StringAttribute{
153
-
MarkdownDescription: "The action to perform. Default is `SNOOZE`. Other options are `ENABLE`, `DISABLE`, and `OUT_OF_SCOPE`.",
194
+
MarkdownDescription: "The action to perform. Default is `RISK_ACCEPTED`. Other valid values are `WORKAROUND`, `FALSE_POSITIVE`, `ENABLE`, `DISABLE`, `OUT_OF_SCOPE` and `SNOOZE`.",
0 commit comments