Skip to content

[GSOC23] - D - Define RPC endpoints for listing the affected packages regarding a CVE#7570

Draft
HoussemNasri wants to merge 53 commits intouyuni-project:masterfrom
HoussemNasri:spacecmd-integration
Draft

[GSOC23] - D - Define RPC endpoints for listing the affected packages regarding a CVE#7570
HoussemNasri wants to merge 53 commits intouyuni-project:masterfrom
HoussemNasri:spacecmd-integration

Conversation

@HoussemNasri
Copy link
Contributor

@HoussemNasri HoussemNasri commented Sep 21, 2023

What does this PR change?

Scanning for a CVE from the web UI will give you whether your system is vulnerable or not along with patches to apply. But you don't know what packages need to be patched. This information is not important if Uyuni could apply the patch automatically, but if the patch is unavailable, you'll need to know what packages to patch manually. The goal of this pull request is to provide users with the list of packages to be patched regarding a particular CVE. All from Spacecmd.

GUI diff

No difference.

  • DONE

Documentation

Test coverage

  • No tests: add explanation

  • No tests: already covered

  • Unit tests were added

  • Cucumber tests were added

  • DONE

Links

  • DONE

Changelogs

Make sure the changelogs entries you are adding are compliant with https://github.com/uyuni-project/uyuni/wiki/Contributing#changelogs and https://github.com/uyuni-project/uyuni/wiki/Contributing#uyuni-projectuyuni-repository

If you don't need a changelog check, please mark this checkbox:

  • No changelog needed

If you uncheck the checkbox after the PR is created, you will need to re-run changelog_test (see below)

Re-run a test

If you need to re-run a test, please mark the related checkbox, it will be unchecked automatically once it has re-run:

  • Re-run test "changelog_test"
  • Re-run test "backend_unittests_pgsql"
  • Re-run test "java_pgsql_tests"
  • Re-run test "schema_migration_test_pgsql"
  • Re-run test "susemanager_unittests"
  • Re-run test "javascript_lint"
  • Re-run test "spacecmd_unittests"

- This is a temporary implementation based on JAXB API which consumes a lot of memory. I plan to rewrite it with StAX for better performance.
- A utility class to access OVAL resources (tests, objects and states) by id and quickly
- Used to parse CPEs found in OVAL files.
- Used to create CPE objects for testing and for when CPE is not available in OVAL, and we need to create or infer our own.
- OVAL files usually encode vulnerable operating systems information as a CPE (Common Platform Enumeration). Therefore, in order to accurately audit client systems we need to store their CPE.
- Kind of migration strategy for minions that are already registered. Instead of re-registering the minion, users could update their package list to get assigned a CPE.
- Added AFFECTED_PARTIAL_PATCH_APPLICABLE and AFFECTED_PARTIAL_PATCH_APPLICABLE
- Also renamed 'AFFECTED_PATCH_APPLICABLE' to 'AFFECTED_FULL_PATCH_APPLICABLE'
- This way when we can't audit a system with OVAL we can fall back to the old code.
- Because we don't need all the information contained in PackageListItem for CVE auditing.
- The idea here is decouple CVEAuditManager from the rest of the code by replacing all calls to CVEAuditManager to CVEAuditManagerOVAL, and make the CVEAuditManagerOVAL#doAuditSystem method fallback to CVEAuditManager#doAuditSystem when the system cannot be audited with OVAL (OVAL not synced or not supported by the system's OS). This way, in the future, when all distributions become supported for performing OVAL-based CVE auditing, we can just delete CVEAuditManager and its test class.

- CVEAuditManager contains also methods for managing CVE channels. For now, we can create the same methods in CVEAuditManagerOVAL and redirect them to their equivalent in CVEAuditManager. But in the future, when we don't need CVEAuditManager anymore, we can move them entirely to CVEAuditManagerOVAL or put them in their own class.

- The upside is that we can keep the tests for CVEAuditManager, which tests the channels-based algorithm, and we make the transition later when we don't need the channels algorithm anymore, easier. The downside is a lot of potential duplication in CVEAuditManagerOVAL tests given that need to maintain both channels and OVAL-based implementations.
- Now, CVEAuditManager is only used by CVEAuditManagerOVAL and CVEAuditManagerTest
- Also, updated the icons and colors of some patch statuses labels
@github-actions
Copy link
Contributor

github-actions bot commented Jun 4, 2024

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Jun 4, 2024
@rjmateus rjmateus removed the Stale label Jun 4, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2024

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Aug 4, 2024
@rjmateus rjmateus removed the Stale label Aug 5, 2024
@rjmateus
Copy link
Member

rjmateus commented Aug 5, 2024

do not close

@github-actions
Copy link
Contributor

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 8, 2025

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Jun 8, 2025
@rjmateus rjmateus removed the Stale label Jun 11, 2025
@github-actions
Copy link
Contributor

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Aug 11, 2025
@rjmateus rjmateus removed the Stale label Aug 11, 2025
@github-actions
Copy link
Contributor

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Oct 11, 2025
@parlt91 parlt91 removed the Stale label Oct 11, 2025
@github-actions
Copy link
Contributor

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Dec 11, 2025
@rjmateus rjmateus removed the Stale label Dec 11, 2025
@github-actions
Copy link
Contributor

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Feb 10, 2026
@github-actions
Copy link
Contributor

This PR was closed because it has been stalled for 10 days with no activity.

@github-actions github-actions bot closed this Feb 21, 2026
@nodeg nodeg reopened this Mar 5, 2026
@nodeg nodeg removed the Stale label Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants