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 dashboard] Research about vulnerabilities dashboard context/scope #5800

Closed
Machi3mfl opened this issue Aug 22, 2023 · 2 comments
Assignees
Labels
level/task Task issue type/research Spikes, researchs, PoCs

Comments

@Machi3mfl
Copy link
Member

Machi3mfl commented Aug 22, 2023

Description

Make a research about the vulnerability module domain and define the scope.
Register the scope and the related domain about the new dashboard.

  • Add all the necessary documentation to understand the vulnerability module and dashboard

Related to epic #5763

@Machi3mfl Machi3mfl added the level/subtask Subtask issue label Aug 22, 2023
@jbiset jbiset self-assigned this Aug 23, 2023
@Machi3mfl Machi3mfl self-assigned this Aug 23, 2023
@jbiset jbiset assigned jbiset and Machi3mfl and unassigned Machi3mfl and jbiset Aug 23, 2023
@Machi3mfl
Copy link
Member Author

Machi3mfl commented Aug 23, 2023

Current vulnerabilities module behavior

Right now, all the data retrieve to show in the vuls module become from wazuh api endpoints like:

The current behavior only supports the data from an agent, don't have the way to get global information and make general metrics.

Vulnerabilities Inventory

Captura de pantalla 2023-08-23 a la(s) 11 19 41

UI Components used

The inventory view use the following UI elements to show the module data:

Severity chart:

  • Data from: /vulnerability/000/summary/severity endpoint
  • Component: VisualizationBasicWidget donut chart

Details card:

  • Data from: /vulnerability/000/summary/severity,/vulnerability/000/last_scan endpoints
  • Component: Custom card

Summary chart:

  • Data from: /vulnerability/000/summary/ (can be filtered by vul property like "name", "cve", etc)
  • Component: VisualizationBasicWidgetSelector

Vuls table:

  • Data from: /vulnerability/000 endpoint
  • Component: TableWzAPI

Note
All the api calls are being requested by de wz-request file and apiReq method and is rendered by the VisualizationBasicWidget from /common/charts/visualizations/ implementation , customs cards and TableWzAPI component from wazuh-kibana-app/plugins/main/public/components/agents/vuls/inventory.tsx

wz-request

apiRequest method

This methods calls to the /api/request endpoint generated in the plugin server-side and works like a layer between the wazuh plugin and the wazuh api.
The server side layer is implemented on /server/controllers/wazuh-api.ts

Workflow

sequenceDiagram;

Note left of UI (client-side): UI Component needs data to render!
UI (client-side)->>Plugin API (server-side): make a call to fetching data
Note left of Plugin API (server-side): the plugin server-side works like a middleware(layer) between plugin a wazuh api
Plugin API (server-side)->>Wazuh Server API: authorize call and make a request to the wazuh API
Wazuh Server API->>Plugin API (server-side): response with the data requested
Plugin API (server-side)--> UI (client-side): retrieve the information requtested

Loading

Disadvantages

  • Strong coupling between UI and plugin server-side:
    If in the future we decide to change the data source.
    For instance: Change the source between wazuh api to a index. In the current solution we need to refactor all the implementation.
  • Interfaces not defined:
    The non-definition of interfaces makes switching implementations more expensive. We cannot change the implementation without spending a lot of time in develop it

@Machi3mfl
Copy link
Member Author

Next vulnerabilities dashboard scope

image

UI components

  • Search bar and Filters
    • Data source: new vulnerabilities index
  • Visualizations/Charts
    • OSD visualizations (OSD vis plugin)
    • Custom visualizations (by code)
  • Metrics (statistics)
  • Data table

@chantal-kelm chantal-kelm self-assigned this Aug 24, 2023
@gdiazlo gdiazlo added type/research Spikes, researchs, PoCs level/task Task issue and removed level/subtask Subtask issue labels Aug 28, 2023
@wazuhci wazuhci moved this to In progress in Release 4.8.0 Aug 28, 2023
@wazuhci wazuhci moved this from In progress to Done in Release 4.8.0 Aug 31, 2023
@Machi3mfl Machi3mfl changed the title [Vulnerabilities Dashboard] Research about vulnerabilities dashboard context/scope [Vulnerabilities dashboard] Research about vulnerabilities dashboard context/scope Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue type/research Spikes, researchs, PoCs
Projects
No open projects
Archived in project
Development

No branches or pull requests

4 participants