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

Vulnerability Detector: Compared vendor with official vendors #6611

Merged
merged 7 commits into from
Nov 18, 2020

Conversation

danimegar
Copy link
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
@@ -1897,6 +1904,11 @@ int wm_vuldet_linux_oval_vulnerabilities(sqlite3 *db, agent_software *agents_it,
version = src_version;
}

// 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
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
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