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

[Vulnerabilities dashboards] Add global vulnerabilities dashboards #5896

Merged
merged 22 commits into from
Nov 3, 2023

Conversation

Machi3mfl
Copy link
Member

@Machi3mfl Machi3mfl commented Sep 18, 2023

Description

This PR, adds the following features:

  1. New global vulnerabilities dashboard
  2. Replace the inventory panel

Closes #5763

Test

  1. Generate random data for the vulnerabilities module ([Update dashboards] Global vulnerabilities dashboards #5763 (comment))
  2. Go to Modules -> Vulnerabilities and test following
Test Result
Check that the dashboard tab looks like the reference in the comment (#5896 (comment)).
Check that the inventory tab looks like the reference in the comment (#5896 (comment)).
Use search bar input to filter any word and check if the dashboard shows the corresponding results.
Select an option from one of the recommended filters and check that the corresponding filter is added and the dashboard changes according to the applied filter.
Add a filter through interaction with a visualization and check that the dashboard updates.
Add a filter on search bar and the dashboard changes according to the applied filter.
Use search bar input to filter any word and check if the table shows the corresponding results.
Use the input and type an incorrect word to check if the no results message is shown.
Use the add filters button, select any filter and check if the table shows the corresponding results.
Use the page and rows per page selector, and check if is working as expected.
Use the data grid toolbar controls functionality (columns selector, density, sort fields, full screen).
Use export formatted control (export table to CSV button).
Use the header columns controls (column visibility, column sorting, column position).
Click on the inspect document button and check the flyout functionality, the details must show the row clicked on the table.

Check List

  • All tests pass
    • yarn test:jest
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

@Machi3mfl Machi3mfl requested a review from a team as a code owner September 18, 2023 16:05
@Machi3mfl Machi3mfl linked an issue Sep 18, 2023 that may be closed by this pull request
33 tasks
@Machi3mfl Machi3mfl changed the title [Vulnerabilities dashboards] Global vulnerabilities dashboard [Vulnerabilities dashboards] Global vulnerabilities dashboards Sep 27, 2023
jbiset and others added 12 commits September 29, 2023 15:09
…boards (#5947)

* Add useDashboardConfiguration and unit test hook

* Changed how the initial hook configuration is set
* Add search bar hooks

* Rename searchbar hook

* Add unit test to use search bar configuration hook

* Fix some unit test titles

* Remove console.log

* Solve requested changes

* Fix request changes and hook filename
…rch bar by default (#5970)

Remove agent id filter in searchbar
* Add data grid hook

* Add doc viewer component and hook

* Add ui utils components

* Add new vuls inventory component

* Add vuls inventory in module rendering

* Add full height container

* Add inventory table columns

* Remove columns fields filter by keyword type
…d plugins (#5966)

* Add useDashboardConfiguration and unit test hook

* Changed how the initial hook configuration is set

* Create dashboard using embedded visualizations by value.

* [Vulnerabilities dashboards] Add search bar services (#5960)

* Add search bar hooks

* Rename searchbar hook

* Add unit test to use search bar configuration hook

* Fix some unit test titles

* Remove console.log

* Solve requested changes

* Fix request changes and hook filename

* [Vulnerabilities dashboards] Fix wrong agent.id filters loaded in search bar by default (#5970)

Remove agent id filter in searchbar

* Recommended filters are added and communication problems between the dashboard and the searchbar are solved

* Update Vulnerability detector dashboard filters visualization and VULNERABILITIES_INDEX_PATTERN_ID constant

* Change KPI dashboard and fix bad request

* Separates filter panels from dashboard panels

* Add Accumulation of the most detected vulnerabilities visualization and change

---------

Co-authored-by: Maximiliano Ibarra <[email protected]>
@Machi3mfl Machi3mfl changed the base branch from 4.7.0 to 4.8.0 November 1, 2023 20:12
@Machi3mfl
Copy link
Member Author

Inventory tab

Screenshot 2023-11-01 at 17 09 25

Test cases

  • Use search bar input to filter any word and check if the table shows the corresponding results
Screenshot 2023-11-01 at 16 58 17
  • Use the input and type an incorrect word to check if the no results message is shown
Screenshot 2023-11-01 at 17 01 22
  • Use the add filters button, select any filter and check if the table shows the corresponding results
Screenshot 2023-11-01 at 16 59 54
  • Use the page and rows per page selector, and check if is working as expected
Screenshot 2023-11-01 at 17 03 11 Screenshot 2023-11-01 at 17 03 48
  • Use the data grid toolbar controls functionality (columns selector, density, sort fields, full screen)
Screenshot 2023-11-01 at 17 06 17
  • Use export formatted control (export table to CSV button)
Screenshot 2023-11-01 at 17 07 42
  • Use the header columns controls (column visibility, column sorting, column position)
Screenshot 2023-11-01 at 17 08 14
  • Click on the inspect document button and check the flyout functionality, the details must show the row clicked on the table.
Screenshot 2023-11-01 at 17 10 08

@Machi3mfl Machi3mfl changed the title [Vulnerabilities dashboards] Global vulnerabilities dashboards [Vulnerabilities dashboards] Add global vulnerabilities dashboards Nov 2, 2023
Copy link
Contributor

github-actions bot commented Nov 2, 2023

Code coverage (Jest) % values
Statements 11.77% ( 4095 / 34780 )
Branches 7.98% ( 1870 / 23429 )
Functions 11.26% ( 937 / 8320 )
Lines 11.95% ( 3981 / 33301 )

@lucianogorza lucianogorza self-requested a review November 2, 2023 14:15
@lucianogorza
Copy link
Contributor

lucianogorza commented Nov 2, 2023

CR 🟢

TEST 🟢

Test Result
Check that the dashboard tab looks like the reference in the comment (#5896 (comment)). 🟢
Check that the inventory tab looks like the reference in the comment (#5896 (comment)). 🟢
Use search bar input to filter any word and check if the dashboard shows the corresponding results. 🟢
Select an option from one of the recommended filters and check that the corresponding filter is added and the dashboard changes according to the applied filter. 🟢
Add a filter through interaction with a visualization and check that the dashboard updates. 🟡
Add a filter on search bar and the dashboard changes according to the applied filter. 🟢
Use search bar input to filter any word and check if the table shows the corresponding results. 🟢
Use the input and type an incorrect word to check if the no results message is shown. 🟢
Use the add filters button, select any filter and check if the table shows the corresponding results. 🟢
Use the page and rows per page selector, and check if is working as expected. 🟡
Use the data grid toolbar controls functionality (columns selector, density, sort fields, column visibility, full screen). 🟡
Use export formatted control (export table to CSV button). 🟢
Click on the inspect document button and check the flyout functionality, the details must show the row clicked on the table. 🟢

Details

🟢 Check that the dashboard tab looks like the reference in the comment

Chrome 🟢

Light mode

image

Dark mode

image

🟢 Check that the inventory tab looks like the reference in the comment

Chrome 🟢

Light mode

image

Dark mode

image

🟢 Use search bar input to filter any word and check if the dashboard shows the corresponding results

Chrome 🟢

image

🟢 Select an option from one of the recommended filters and check that the corresponding filter is added and the dashboard changes according to the applied filter

Chrome 🟢

image
image

🟡 Add a filter through interaction with a visualization and check that the dashboard updates

Chrome 🟡

When the user clicks on the The most vulnerable endpoints dashboard, the filter agent.id: agent19 appears repeated in the modal. Then the filter is applied correctly.

image
image
image

🟢 Add a filter on search bar and the dashboard changes according to the applied filter

Chrome 🟢

image

🟢 Use search bar input to filter any word and check if the table shows the corresponding results

Chrome 🟢

image

🟢 Use the input and type an incorrect word to check if the no results message is shown

Chrome 🟢

image

🟢 Use the add filters button, select any filter and check if the table shows the corresponding results

Chrome 🟢

image

image

🟡 Use the page and rows per page selector, and check if is working as expected

Chrome 🟡

Pagination 🟡

image

image

Error message:

search_phase_execution_exception: [illegal_argument_exception] Reason: Result window is too large, from + size must be less than or equal to: [10000] but was [14940]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting.

Rows per page 🟢

image
image

🟡 Use the data grid toolbar controls functionality (columns selector, density, sort fields, column visibility, full screen)

Chrome 🟡

Columns selector 🟢

image
image

Density 🟢

image
image

Sort fields 🟡

image
image

When drag the sort fields the background turns to red
image

Column visibility 🟢

image
image

Full screen 🟢

image

🟢 Use export formatted control (export table to CSV button)

Chrome 🟢

image
image

🟢 Click on the inspect document button and check the flyout functionality, the details must show the row clicked on the table

Chrome 🟢

image

@jbiset
Copy link
Member

jbiset commented Nov 2, 2023

Dashboard Tab

Light mode

vulnerabilities_dashboard_1

vulnerabilities_dashboard_2

Dark mode

vulnerabilities_dashboard_1_dark

vulnerabilities_dashboard_2_dark

Copy link
Member

@jbiset jbiset left a comment

Choose a reason for hiding this comment

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

CR: 🟢

TEST

Test Result
Check that the dashboard tab looks like the reference in the comment (#5896 (comment)). 🟢
Check that the inventory tab looks like the reference in the comment (#5896 (comment)). 🟢
Use search bar input to filter any word and check if the dashboard shows the corresponding results. 🟢
Select an option from one of the recommended filters and check that the corresponding filter is added and the dashboard changes according to the applied filter. 🟢
Add a filter through interaction with a visualization and check that the dashboard updates. 🟡
Add a filter on search bar and the dashboard changes according to the applied filter. 🟢
Use search bar input to filter any word and check if the table shows the corresponding results. 🟢
Use the input and type an incorrect word to check if the no results message is shown. 🟢
Use the add filters button, select any filter and check if the table shows the corresponding results. 🟢
Use the page and rows per page selector, and check if is working as expected. 🟡
Use the data grid toolbar controls functionality (columns selector, density, sort fields, full screen). 🟡
Use export formatted control (export table to CSV button). 🟡
Use the header columns controls (column visibility, column sorting, column position). 🟢
Click on the inspect document button and check the flyout functionality, the details must show the row clicked on the table. 🟢

DETAILS

🟢 Check that the dashboard tab looks like the reference in the comment (https://pull/5896#issuecomment-1790919849).

00_dashboard_tab_1

00_dashboard_tab_2

🟢 Check that the inventory tab looks like the reference in the comment (https://pull/5896#issuecomment-1789606985)

01_inventory_tab

🟢 Use search bar input to filter any word and check if the dashboard shows the corresponding results.

02_dashboard_tab_search_word

🟢 Select an option from one of the recommended filters and check that the corresponding filter is added and the dashboard changes according to the applied filter.

03_dashboard_tab_recommended_filter

🟡 Add a filter through interaction with a visualization and check that the dashboard updates

04_dashboard_tab_visualization_interaction_1

04_dashboard_tab_visualization_interaction_2

04_dashboard_tab_visualization_interaction_3

🟢 Add a filter on search bar and the dashboard changes according to the applied filter

05_dashboard_tab_filter_searchbar_1

05_dashboard_tab_filter_searchbar_2

🟢 Use search bar input to filter any word and check if the table shows the corresponding results

07_inventory_tab_search_word

🟢 Use the input and type an incorrect word to check if the no results message is shown

08_inventory_tab_search_no_match

🟢 Use the add filters button, select any filter and check if the table shows the corresponding results.

09_inventory_tab_filter_searchbar_1

09_inventory_tab_filter_searchbar_2

🟡 Use the page and rows per page selector, and check if is working as expected

10_inventory_tab_pagination_1

10_inventory_tab_pagination_2

10_inventory_tab_pagination_3

10_inventory_tab_pagination_4_A

10_inventory_tab_pagination_4_B

NOTE: Bad request when from + size is not less than or equal to 10000
Related documentation: https://opensearch.org/docs/latest/im-plugin/index-settings/#dynamic-index-settings

🟡 Use the data grid toolbar controls functionality (columns selector, density, sort fields, full screen) and Use the header columns controls (column visibility, column sorting, column position).

🟢 Columns selector

11_inventory_tab_column_selector_1

11_inventory_tab_column_selector_2

🟢 Density

12_inventory_tab_density_1

12_inventory_tab_density_2

12_inventory_tab_density_3

🟡 Sort fields

13_inventory_tab_sort_fields_1

13_inventory_tab_sort_fields_2

13_inventory_tab_sort_fields_3

NOTE: When dragging the sort fields the background turns red but then they swap correctly

🟢 Full screen

14_inventory_tab_full_screen

🟢 Column visibility

15_inventory_tab_column_visibility_1

15_inventory_tab_column_visibility_2

🟡 Use export formatted control (export table to CSV button).

16_inventory_tab_export_formated_button_1

16_inventory_tab_export_formated_button_1_A

16_inventory_tab_export_formated_button_2

NOTE: Same error as in pagination

🟢 Click on the inspect document button and check the flyout functionality, the details must show the row clicked on the table

17_inventory_tab_flyout

@asteriscos asteriscos merged commit 0744482 into 4.8.0 Nov 3, 2023
2 checks passed
@asteriscos asteriscos deleted the feat/5763-global-vulnerabilities-dashboard branch November 3, 2023 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Update dashboards] Global vulnerabilities dashboards
4 participants