wazuh / wazuh-dashboard-plugins

Plugins for Wazuh Dashboard
https://wazuh.com/
GNU General Public License v2.0
427 stars 176 forks source link

[Vulnerabilities dashboard] Research about vulnerabilities dashboard context/scope #5800

Closed Machi3mfl closed 12 months ago

Machi3mfl commented 1 year ago

Description

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

Related to epic #5763

Machi3mfl commented 1 year ago

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:

Details card:

Vuls table:

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

Disadvantages

Machi3mfl commented 1 year ago

Next vulnerabilities dashboard scope

image

UI components