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(ui): bulk remove vulnerabilities #127

Closed
wants to merge 9 commits into from

Conversation

0b3ud
Copy link
Contributor

@0b3ud 0b3ud commented Jul 14, 2024

This PR is answering feat(ui): #43

Reading this issue I was able to split this feature in two tasks :

  • Selecting all vulnerabilities in vulnerability page
  • Bulk deleting selected vulnerabilities

Selecting all vulnerabilities in vulnerability page :

  1. Edited template in web/templates/base/_items/vulnerability_tab_content.html :
  • Added input called select_all_checkbox
    image
    image

  • Added a class .vulnerability_checkbox to vulnerability check box to be able to change their status with JS via Listener
    Template : web/templates/base/_items/vulnerabilities.html
    image

  • Added a JS listener to select_all_checkbox that triggers a click on .vulnerability_checkbox items
    File : web/static/web/custom/custom.js
    image


  1. Bulk deleting selected vulnerabilities :
  • Added a button for bulk deleting in template
    File : web/templates/base/_items/vulnerability_tab_content.html
    image
    image

  • Added a JS listener that gets selected vulnerabilities formats Id and send them to API (reused a piece of code)
    File : web/static/web/custom/custom.js
    image

Results :

  • I've tested both function using the results of a scan I did on a metasploitable machine 💯
  • Selecting all seems to work 👍
  • Bulk deletion seems to work 👍

I would appreciate it if you can do some tests on your side and notify me if there are any bugs

@0b3ud 0b3ud added the enhancement New feature or request label Jul 14, 2024
@psyray
Copy link
Contributor

psyray commented Jul 14, 2024

Thanks I will test this ASAP

@psyray psyray changed the base branch from master to release/2.1.0 July 14, 2024 21:43
@psyray psyray changed the base branch from release/2.1.0 to master July 14, 2024 21:44
@AnonymousWP AnonymousWP changed the title feat(ui): Bulk remove vulnerabilities #43 feat(ui): bulk remove vulnerabilities #43 Jul 15, 2024
@AnonymousWP AnonymousWP linked an issue Jul 15, 2024 that may be closed by this pull request
1 task
@AnonymousWP AnonymousWP changed the title feat(ui): bulk remove vulnerabilities #43 feat(ui): bulk remove vulnerabilities Jul 15, 2024
@AnonymousWP
Copy link
Member

The destination branch should be 2.1.0 I believe.

@0b3ud 0b3ud closed this Jul 15, 2024
@0b3ud 0b3ud deleted the bulk_delete_vulns branch July 15, 2024 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(ui): Bulk remove vulnerabilities
3 participants