Skip to content
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

Merged
merged 14 commits into from
Dec 16, 2024
Merged

Conversation

mati007thm
Copy link
Contributor

@mati007thm mati007thm commented Dec 2, 2024

fixes #159

@chris-rock chris-rock requested review from afiune and removed request for afiune December 4, 2024 13:13
@mati007thm mati007thm marked this pull request as ready for review December 6, 2024 09:50
MarkdownDescription: "List of vulnerability MRNs to set exceptions for.",
ElementType: types.StringType,
Optional: true,
},
Copy link
Contributor

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?

Copy link
Contributor Author

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

Comment on lines +50 to +55
- `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.
Copy link
Contributor Author

@mati007thm mati007thm Dec 13, 2024

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

@afiune
Copy link
Contributor

afiune commented Dec 14, 2024

needs a rebase

@chris-rock
Copy link
Member

@mati007thm Can you please rebase the PR?

Copy link
Contributor

@afiune afiune left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mati007thm and others added 13 commits December 16, 2024 08:19
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]>
@mati007thm
Copy link
Contributor Author

@chris-rock, @afiune rebased the branch

@afiune afiune merged commit d5dd44d into mondoohq:main Dec 16, 2024
8 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Exception Handling
4 participants