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

Set default findingtype risk in model instead of in bit #3562

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

noamblitz
Copy link
Contributor

@noamblitz noamblitz commented Sep 19, 2024

Changes

Set default findingtype risk in model instead of in bit

Demo

No functional changes

QA notes

Turn of kat-finding-types boefje
Create Hostname with L1
See that finding types appear
Make sure that they are "Pending"
Make sure that no reports are broken with these FindingTypes

Also check with migrations: do the same as above in main and then switch to this branch and "make" again. Rerun bits. Everything should still work

Code Checklist

  • All the commits in this PR are properly PGP-signed and verified.
  • This PR only contains functionality relevant to the issue.
  • I have written unit tests for the changes or fixes I made.
  • I have checked the documentation and made changes where necessary.
  • I have performed a self-review of my code and refactored it to the best of my abilities.
  • Tickets have been created for newly discovered issues.
  • For any non-trivial functionality, I have added integration and/or end-to-end tests.
  • I have informed others of any required .env changes files if required and changed the .env-dist accordingly.
  • I have included comments in the code to elaborate on what is not self-evident from the code itself, including references to issues and discussions online, or implicit behavior of an interface.

Checklist for code reviewers:

Copy-paste the checklist from the docs/source/templates folder into your comment.


Checklist for QA:

Copy-paste the checklist from the docs/source/templates folder into your comment.

@noamblitz noamblitz requested a review from a team as a code owner September 19, 2024 08:59
@originalsouth originalsouth added octopoes Issues related to octopoes tech-debt labels Sep 19, 2024
@underdarknl
Copy link
Contributor

Hmm, can we still store an 'unknown' severity for findings that we could not hydrate / have no information due to an embargo?
We opted to communicate findings with an unknown severity as being 'critical' due to the nature of embargoed findings. If we change the default to 0.0, they wont be communicated as critical anymore I'd guess?

@noamblitz
Copy link
Contributor Author

Before, the default was unset and immediately after creation, the bit would set it to 0.0. In the time between creating the finding and setting the value to 0.0, the finding would be invisible (this would be very very short/ unnoticeable). This behavior is now better.

After a while, the boefje would try to find the score, if it didn't succeed, it would set the value to 10.0. This behavior is unchanged.

Copy link
Contributor

@ammar92 ammar92 left a comment

Choose a reason for hiding this comment

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

Just one question to confirm. Looks good otherwise

octopoes/octopoes/models/ooi/findings.py Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
octopoes Issues related to octopoes tech-debt
Projects
Status: QA review / functional testing
Development

Successfully merging this pull request may close these issues.

4 participants