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

Add live set (filter/query) to ReportRecipe #3769

Merged
merged 39 commits into from
Nov 7, 2024

Conversation

madelondohmen
Copy link
Contributor

@madelondohmen madelondohmen commented Oct 30, 2024

Changes

This PR makes it possible to continue in the report recipe flow with the selected filters (as a query), instead of selecting OOI's manually from the table.

Issue link

Closes ...

Demo

The schedule:

The edit report page shows that the input_recipe now contains a "query" instead of "input_oois"

After adding a new Hostname (L2), the generated report contained 3 objects instead of 2:

QA notes

Please add some information for QA on how to test the newly created code.


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.

@madelondohmen madelondohmen self-assigned this Oct 30, 2024
@madelondohmen madelondohmen marked this pull request as ready for review October 30, 2024 13:40
@madelondohmen madelondohmen requested a review from a team as a code owner October 30, 2024 13:40
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.

Tiny remarks/ suggestions

rocky/reports/runner/report_runner.py Outdated Show resolved Hide resolved
rocky/reports/runner/report_runner.py Outdated Show resolved Hide resolved
rocky/reports/views/base.py Outdated Show resolved Hide resolved
rocky/reports/views/base.py Show resolved Hide resolved
@madelondohmen madelondohmen mentioned this pull request Nov 1, 2024
9 tasks
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.

Looks good to me, but there's just one test that's broken. But should be ready for testing

@stephanie0x00
Copy link
Contributor

Checklist for QA:

  • I have checked out this branch, and successfully ran a fresh make reset.
  • I confirmed that there are no unintended functional regressions in this branch:
    • I have managed to pass the onboarding flow
    • Objects and Findings are created properly
    • Tasks are created and completed properly
  • I confirmed that the PR's advertised feature or hotfix works as intended.
  • I checked the logs for errors and/or warnings and made issues where necessary

What works:

Seems to work. Created a live filter and scheduled a report, removed the objects from the object list to check if the report contained less objects on the next run. Added a new object to see if it was picked up.

What doesn't work:

n/a

Bug or feature?:

  • The only improvement for a new PR would be to make editing report recipes more user friendly, as you currently have to edit the JSON.

Copy link

sonarcloud bot commented Nov 7, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
56.9% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@underdarknl underdarknl merged commit e482bbc into main Nov 7, 2024
22 of 23 checks passed
@underdarknl underdarknl deleted the feature/report-recipe-query branch November 7, 2024 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants