-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: added exception management #165
Conversation
MarkdownDescription: "List of vulnerability MRNs to set exceptions for.", | ||
ElementType: types.StringType, | ||
Optional: true, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how come everything is optional? what happens if users add an empty resourse?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not see how we are supposed to make them Required. I therefore added some new validations to help the user decide when to set which attribute
- `action` (String) The action to perform. Default is `SNOOZE`. Other options are `ENABLE`, `DISABLE`, `OUT_OF_SCOPE`. | ||
- `check_mrns` (List of String) List of check MRNs to set exceptions for. If set, `vulnerability_mrns` must not be set. | ||
- `justification` (String) Description why the exception is required. | ||
- `scope_mrn` (String) The MRN of the scope (either asset mrn or space mrn). | ||
- `valid_until` (String) The timestamp until the exception is valid. | ||
- `vulnerability_mrns` (List of String) List of vulnerability MRNs to set exceptions for. If set, `check_mrns` must not be set. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
action is optional since SNOOZE is default
check_mrns conflicts with vulnerability_mrns and can therefore not be Required
justification is optional since it is simply not needed
scope_mrn is optional since it either can be declared here or the provider scope can be used
valid_until is optional since it can only be used by action SNOOZE
needs a rebase |
@mati007thm Can you please rebase the PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: Matthias Theuermann <[email protected]>
Signed-off-by: Matthias Theuermann <[email protected]>
Signed-off-by: Matthias Theuermann <[email protected]>
Signed-off-by: Martin Buchleitner <[email protected]>
Signed-off-by: Matthias Theuermann <[email protected]>
Signed-off-by: Matthias Theuermann <[email protected]>
Signed-off-by: Matthias Theuermann <[email protected]>
Signed-off-by: Matthias Theuermann <[email protected]>
Signed-off-by: Matthias Theuermann <[email protected]>
Signed-off-by: Matthias Theuermann <[email protected]>
Signed-off-by: Matthias Theuermann <[email protected]>
Signed-off-by: Matthias Theuermann <[email protected]>
2b243b8
to
584558a
Compare
@chris-rock, @afiune rebased the branch |
fixes #159