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

Handle VDT data missing in wazuhdb API #5014

Merged
merged 2 commits into from
Feb 29, 2024
Merged

Conversation

Deblintrake09
Copy link
Contributor

@Deblintrake09 Deblintrake09 commented Feb 23, 2024

Description

It was detected that JSON response for wazuhdb did not contain vulnerability detector data on the Cluster pipeline. This PR adds handling to that.

Testing performed

OS Package used
Ubuntu 22 4.8.0-beta1
Validation Jenkins Local OS Commit Notes
🟢 🚫 Bug detected on Jenkins only

@Deblintrake09 Deblintrake09 requested a review from Rebits February 23, 2024 12:43
@Deblintrake09 Deblintrake09 self-assigned this Feb 23, 2024
@Deblintrake09 Deblintrake09 linked an issue Feb 23, 2024 that may be closed by this pull request
1 task
Copy link
Member

@Rebits Rebits left a comment

Choose a reason for hiding this comment

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

Could this situation arise again in other daemon fields? If so, I recommend incorporating this logic for all other values as well.

@Deblintrake09 Deblintrake09 requested a review from Rebits February 23, 2024 14:07
Copy link
Member

@Rebits Rebits left a comment

Choose a reason for hiding this comment

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

LGTM

In the future, it's essential to refactor this logic, integrating error handling to prevent complete failure if any field isn't correctly gathered

@damarisg damarisg merged commit 4d41d94 into 4.8.0 Feb 29, 2024
2 of 4 checks passed
@damarisg damarisg deleted the fix/5006-handle-vdt-table-bug branch February 29, 2024 20:02
damarisg added a commit that referenced this pull request Mar 1, 2024
* fix: change files syntax artifacts_path

* fix: macOS restart agent handler

* feat: include macOS to VD E2E env by default

* fix: migrate E2E timeouts to waiters module

* docs: include 4949 changelog

* docs: include 4948 changelog

* fix: added pre-release and staging filebeat package url

* feat: added keystore function to conf module

* fix: change VD E2E configuration

* fix: typo in System modify files method

* fix: modify file in case of not providing os name in inv

* fix: typo in install package method

* add: added filebeat vars to roles.yaml

* fix: get variable system method

* fix: fix in main.yml

* fix: monitoring e2e method

* fix: vars removed from roles.yaml

* feat: migrate filebeat url logic to inventory schema

* fix: filebeat schema parameters

* refac: filebeat provisioning tasks

* refactor: delete duplicated check

* fix: remove verbose logging messages

* docs: updated changelog

* docs: updated changelog

* feat: gather alerts by agent through Indexer request

* add params to wazuh_statistics

* add api support to statistic.py

* move statistic headers to file

* refactor: bump version

* add wazuhdb header

* add missing headers

* add wazuhdb parsing

* change remoted parameter to remote

* fix target argument documentation

* fix: reduce time in test

* fix: fixed x-axis labels

* enhance documentation

* fix: error in indexer agent filter

* fix: adapt E2E Vuln tests to new indexer schema

* fix: improve error handling monitoring

* add port and ip for API

* add port and IP for API

* fix documentation

* fix(#21945): Upgrade wazuh db version

* replace use_api parameter for use_state_file

* fix file naming

* fix undo name change

* enhance wazuh-statistic docu

* add wait for complete_to_api endpoint

* remove unnecesary checks

* fix typo

* fix query typo

* fix: increase timeout and improve indexer request performance

* Update changelog

* fix: refactor monitoring

* Bump revision to 40713

* fix wazuhdb API parsing

* fix logger when monitoring starts

* update changelog.md

* docs: include agent to get_indexer_values

Co-authored-by: Julia Magan <juliamgnr@gmail.com>

* docs: remove regex from docstring

* style: move regexes to regex module

* docs: fix parse vulnerability docstring description

Co-authored-by: Julia Magan <juliamgnr@gmail.com>

* style: create default scan interval variable

Co-authored-by: Julia Magan <juliamgnr@gmail.com>

* style: rename ignore_error parameter

Co-authored-by: Julia Magan <juliamgnr@gmail.com>

* refac: removed unnused vuln detection functions

Co-authored-by: Julia Magan <juliamgnr@gmail.com>

* docs: include 5003 changelog

* docs: include 4959 changelog

* docs: fix changelog entry

* update: Increase revision (#5018)

* Update changelog (#5020)

* update: Update Changelog

* update: remove space on Changelog

* fix: dependency errors in VD tests

* fix: move check consistency function to VD module

* feat: bump version to 40714

* fix: change logging level in VD functions

* Handle VDT data missing in wazuhdb API  (#5014)

* handle vdt table data

* fix api status code handling

* update: Update CHANGELOG to 4.8.0 (#5054)

* update: Update revision to 4.8.0 (#5055)

* update: Fix typo to 4.8.0 (#5056)

---------

Co-authored-by: javier <javier.sanchez@wazuh.com>
Co-authored-by: David Jose Iglesias Lopez <davidj.iglesias@wazuh.com>
Co-authored-by: Víctor Rebollo Pérez <victorrebollop@gmail.com>
Co-authored-by: marcos <marcos.sanchez@wazuh.com>
Co-authored-by: Julia <juliamgnr@gmail.com>
Co-authored-by: Andres Carmelo Micalizzi Casali <amicalizzi2005@gmail.com>
Co-authored-by: Julia Magán <80041853+juliamagan@users.noreply.github.com>
Co-authored-by: Dwordcito <octa.tala@gmail.com>
Co-authored-by: Javier Castro <javier.castro@wazuh.com>
Co-authored-by: Raul Del Pozo Moreno <raul.delpozo@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.

Fix wazuhdb API data parsing bug
3 participants