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

Duplicated vulnerabilities when changing agent manager #22867

Closed
juliamagan opened this issue Apr 10, 2024 · 3 comments · Fixed by #23096
Closed

Duplicated vulnerabilities when changing agent manager #22867

juliamagan opened this issue Apr 10, 2024 · 3 comments · Fixed by #23096
Assignees
Labels
level/task type/bug Something isn't working

Comments

@juliamagan
Copy link
Member

Wazuh version Component Install type Install method Platform
4.8.0-beta5 Vulnerability Detection and Cluster Manager Packages Ubuntu Jammy

Description

During the tests performed at #22828, one of the tests to be performed was Change agents' manager and install a vulnerable package. In this test it could be seen that when changing the agent manager, the vulnerabilities were duplicated, indicating the same vulnerabilities for the agent from two managers.

Agent ID Vulnerabilities with the original manager Vulnerabilities after the change
001 001_vulns_before.json 001_vulns_after.json
002 002_vulns_before.json 002_vulns_after.json

After installing the vulnerable package we can see that the vulnerabilities expected by the package are only reported once.

Steps to reproduce

  • Deploy a Wazuh cluster and two agents.
  • Enable vulnerability detector in the managers.
  • Register the agents to each manager host.
  • Wait until feeds are updated.
  • Wait until first scan is performed.
  • Check the reported vulnerabilities.
  • Check that the agents are scanned and the vulnerable packages are detected.
  • Change the manager of the agents.
  • Wait until the next scan is performed.
  • Check the reported vulnerabilities.
  • Install a vulnerable package in both agents.
  • Wait until the next scan is performed.
  • Check that the vulnerable package is detected in both agents
@Dwordcito
Copy link
Member

The main part of this issue will be resolved by #23058

For the core team, we expect two things:

@pereyra-m
Copy link
Member

pereyra-m commented Apr 22, 2024

@Dwordcito CC @sebasfalcone

Now the branch has the requested changes implemented.

It was confirmed that indexes are created with the required names (by default and custom).

2024-04-22_18-06

@Dwordcito
Copy link
Member

Dwordcito commented Apr 23, 2024

https://github.com/wazuh/wazuh/tree/fix/22867-duplicated-indexed-vulnerabilities its the branch with the desired changes to test the #23058 development @Selutario

@Dwordcito Dwordcito linked a pull request May 3, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task type/bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants