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/5894 vulnerabilities dashboard create the dashboard tab using osd plugins #5966

Conversation

jbiset
Copy link
Member

@jbiset jbiset commented Sep 29, 2023

Description

Dashboard tab is created using OSD plugins. It uses embedded visualizations by value.
The vulnerabilities dashboard is made up of 3 internal dashboards because the filters need a wrapper for visual adjustments, while the KPIs (critical, high, medium and low severity alerts), the Open vs Close visualization and the rest of the visualizations have different configurations at the dashboard level.

Dependencies

Issues Resolved

Evidence

Light mode

Vulnerability_Detection_light_(part1)

Vulnerability_Detection_light_(part2)

Dark mode

Vulnerability_Detection_dark_(part1)

Vulnerability_Detection_dark_(part2)

Test

In order to test this dashboard, it is necessary to generate data from the new wazuh-states-vulnerabilities vulnerability index in the indexer.

Generation of vulnerability index data Having the environment up, use the random data generation script to generate the data as shown in the following image.

Create_index_1

NOTE: keep in mind that the indexer port (9200) has to be exposed in the container configuration.

Creation of the `wazuh-states-vulnerabilities` index Go to Dashboards Managements and create the corresponding `wazuh-states-vulnerabilities` index as shown in the following images:

Create_index_2

Create_index_3

NOTE: It is important to specify the Custom index pattern ID with wazuh-states-vulnerabilities so that a ramdom ID of the index is not automatically generated.

Mapping the index fields Go to Dev tools and insert the field mapping through a PUT, then do a GET of some field to test.

Create_index_4

Create_index_5

At this point it is necessary to do a DELETE as shown in the image and repeat again only the data generation but with a greater number of data.

Create_index_6

Create_index_7

Finally it is necessary to refresh the index in Dashboard Management

Create_index_8

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

@jbiset jbiset self-assigned this Sep 29, 2023
@jbiset jbiset linked an issue Sep 29, 2023 that may be closed by this pull request
3 tasks
Machi3mfl and others added 8 commits October 17, 2023 16:56
* 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
…894-vulnerabilities-dashboard-create-the-dashboard-tab-using-osd-plugins
@github-actions
Copy link
Contributor

Code coverage (Jest) % values
Statements 11.84% ( 4094 / 34568 )
Branches 8.01% ( 1868 / 23309 )
Functions 11.35% ( 939 / 8273 )
Lines 12.03% ( 3979 / 33068 )

@jbiset jbiset marked this pull request as ready for review October 25, 2023 14:06
@jbiset jbiset requested a review from a team as a code owner October 25, 2023 14:06
…894-vulnerabilities-dashboard-create-the-dashboard-tab-using-osd-plugins
@Machi3mfl Machi3mfl merged commit d78defc into feat/5763-global-vulnerabilities-dashboard Oct 25, 2023
1 of 2 checks passed
@Machi3mfl Machi3mfl deleted the feat/5894-vulnerabilities-dashboard-create-the-dashboard-tab-using-osd-plugins branch October 25, 2023 14:14
asteriscos pushed a commit that referenced this pull request Nov 3, 2023
…5896)

* Added plugins dependencies

* Add new inventories tabs scaffolding

* Refactor arquitecture

* Add searchbar folder

* Add useDashboardConfiguration hook for configuring vulnerability dashboards (#5947)

* Add useDashboardConfiguration and unit test hook

* Changed how the initial hook configuration is set

* [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

* Change new vulnerabilities inventory table (#6047)

* 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

* Feat/5894 vulnerabilities dashboard create the dashboard tab using osd 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 <6089438+Machi3mfl@users.noreply.github.com>

* Fix default filters on usesearchbar configuration

* [Vulnerabilities dashboards] Fix vulnerability dashboard filters (#6065)

Fix vulnerability dashboard filters

* Remove date picker from searchbar on vuls inventory tab

* Remove date picker from searchbar and open vs close visualization on vuls dashboard tab

* Change Accumulation of the most detected vulnerabilities chart

* Add data grid csv export

* Add error management and export csv calls pagination

* Remove unused hook

* Update CHANGELOG

* Fix CHANGELOG

* Remove explore agent in header

---------

Co-authored-by: Julio César Biset <43619595+jbiset@users.noreply.github.com>
Co-authored-by: jbiset <julio.biset@wazuh.com>
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.

[Vulnerabilities dashboard] Create the Dashboard tab using OSD plugins
2 participants