Skip to content

Vulnerability Detector: Compared vendor with official vendors#6611

Merged
chemamartinez merged 7 commits intomasterfrom
6435-comparison-packages-different-vendor
Nov 18, 2020
Merged

Vulnerability Detector: Compared vendor with official vendors#6611
chemamartinez merged 7 commits intomasterfrom
6435-comparison-packages-different-vendor

Conversation

@danimegar
Copy link
Copy Markdown
Contributor

Related issue
#6435

Description

I have created a function that compares the package's vendor with the official vendors from de OVAL feeds. If the vendor does not match with any of them, the package is discarded.

Tests

  • Compilation without warnings in every supported platform
    • Linux
  • Source installation
  • Source upgrade
  • Memory tests for Linux
    • Scan-build report
    • Valgrind
  • The data flow works as expected (agent-manager)
  • Added unit tests

@danimegar danimegar force-pushed the 6435-comparison-packages-different-vendor branch from a9b246e to b81be5c Compare November 16, 2020 17:01
Comment thread src/unit_tests/wazuh_modules/vulnerability_detector/test_wm_vuln_detector.c Outdated
Comment thread src/unit_tests/wazuh_modules/vulnerability_detector/test_wm_vuln_detector.c Outdated
Comment thread src/unit_tests/wazuh_modules/vulnerability_detector/test_wm_vuln_detector.c Outdated
Comment thread src/wazuh_modules/vulnerability_detector/wm_vuln_detector.c Outdated

// We discard the package if its vendor is a external vendor.
if (agents_it->dist == FEED_REDHAT && vendor && wm_vuldet_compare_vendors(vendor)) {
continue;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Include a debug2 message here to know the package has been discarded, including the vendor

Copy link
Copy Markdown
Contributor

@chemamartinez chemamartinez left a comment

Choose a reason for hiding this comment

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

LGTM

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.

2 participants