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

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

Draft
wants to merge 53 commits into
base: master
Choose a base branch
from

Commits on Sep 14, 2023

  1. Add basic oval types

    HoussemNasri committed Sep 14, 2023
    Configuration menu
    Copy the full SHA
    3706544 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    10f1ff4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f879c19 View commit details
    Browse the repository at this point in the history
  4. Implement the OVAL parser

    - 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.
    HoussemNasri committed Sep 14, 2023
    Configuration menu
    Copy the full SHA
    fdc3fd3 View commit details
    Browse the repository at this point in the history
  5. Create OVALLookupHelper

    - A utility class to access OVAL resources (tests, objects and states) by id and quickly
    HoussemNasri committed Sep 14, 2023
    Configuration menu
    Copy the full SHA
    21143b6 View commit details
    Browse the repository at this point in the history

Commits on Sep 15, 2023

  1. Define database schema

    HoussemNasri committed Sep 15, 2023
    Configuration menu
    Copy the full SHA
    3517c70 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e3f67fd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    23a0985 View commit details
    Browse the repository at this point in the history
  4. Implement a CPE parser

    - Used to parse CPEs found in OVAL files.
    HoussemNasri committed Sep 15, 2023
    Configuration menu
    Copy the full SHA
    2b1d0e5 View commit details
    Browse the repository at this point in the history
  5. Create CpeBuilder

    - 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.
    HoussemNasri committed Sep 15, 2023
    Configuration menu
    Copy the full SHA
    ab5cec0 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ca856f6 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3460042 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    cec42da View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    a773f4d View commit details
    Browse the repository at this point in the history
  10. Add cpe column to Server

    - 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.
    HoussemNasri committed Sep 15, 2023
    Configuration menu
    Copy the full SHA
    38b6ff5 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    a74eb4f View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    b564bba View commit details
    Browse the repository at this point in the history
  13. Update minion's CPE upon package refresh

    - 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.
    HoussemNasri committed Sep 15, 2023
    Configuration menu
    Copy the full SHA
    8c2de76 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    1b9637d View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    c61beaa View commit details
    Browse the repository at this point in the history
  16. Define more patch statuses

    - Added AFFECTED_PARTIAL_PATCH_APPLICABLE and AFFECTED_PARTIAL_PATCH_APPLICABLE
    - Also renamed 'AFFECTED_PATCH_APPLICABLE' to 'AFFECTED_FULL_PATCH_APPLICABLE'
    HoussemNasri committed Sep 15, 2023
    Configuration menu
    Copy the full SHA
    b4e9e34 View commit details
    Browse the repository at this point in the history
  17. Restructure CVEAuditManager to be able to audit one system at a time

    - This way when we can't audit a system with OVAL we can fall back to the old code.
    HoussemNasri committed Sep 15, 2023
    Configuration menu
    Copy the full SHA
    d661e52 View commit details
    Browse the repository at this point in the history
  18. Create a lighter version of PackageListItem called ShallowSystemPackage

    - Because we don't need all the information contained in PackageListItem for CVE auditing.
    HoussemNasri committed Sep 15, 2023
    Configuration menu
    Copy the full SHA
    6a28268 View commit details
    Browse the repository at this point in the history
  19. Implement OVAL-based CVE auditing in CVEAuditManagerOVAL

    - 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.
    HoussemNasri committed Sep 15, 2023
    Configuration menu
    Copy the full SHA
    d4b508b View commit details
    Browse the repository at this point in the history
  20. Create OVALCleaner

    HoussemNasri committed Sep 15, 2023
    Configuration menu
    Copy the full SHA
    64d2af4 View commit details
    Browse the repository at this point in the history
  21. Test CVEAuditManagerOVAL

    HoussemNasri committed Sep 15, 2023
    Configuration menu
    Copy the full SHA
    011b7d6 View commit details
    Browse the repository at this point in the history
  22. Redirect calls from CVEAuditManager to CVEAuditManagerOVAL

    - Now, CVEAuditManager is only used by CVEAuditManagerOVAL and CVEAuditManagerTest
    HoussemNasri committed Sep 15, 2023
    Configuration menu
    Copy the full SHA
    458c85d View commit details
    Browse the repository at this point in the history
  23. Update patch statuses in the frontend to prevent mapping error

    - Also, updated the icons and colors of some patch statuses labels
    HoussemNasri committed Sep 15, 2023
    Configuration menu
    Copy the full SHA
    9eceed5 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    9a384da View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    f2ea10c View commit details
    Browse the repository at this point in the history
  26. Cleanup logging

    HoussemNasri committed Sep 15, 2023
    Configuration menu
    Copy the full SHA
    4673838 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    9bfcfee View commit details
    Browse the repository at this point in the history
  28. Fix failing tests

    HoussemNasri committed Sep 15, 2023
    Configuration menu
    Copy the full SHA
    aca2884 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    c209eb8 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    a3998d8 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    dff12f5 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    5677c69 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    b7d28bd View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    26d0420 View commit details
    Browse the repository at this point in the history
  35. Delete createLeap15_4_Package() in tests

    - Because we can tell the OS of server from the CPE.
    HoussemNasri committed Sep 15, 2023
    Configuration menu
    Copy the full SHA
    6412461 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    973a535 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    ff1f32d View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    4dd840e View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    463466a View commit details
    Browse the repository at this point in the history
  40. Checkstyle

    HoussemNasri committed Sep 15, 2023
    Configuration menu
    Copy the full SHA
    0bf1c1a View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2023

  1. add todo

    HoussemNasri committed Sep 16, 2023
    Configuration menu
    Copy the full SHA
    2a9b455 View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2023

  1. Distinguish between zero-day vulnerabilities and vulnerabilities with…

    …out a patch in synced channels
    HoussemNasri committed Sep 17, 2023
    Configuration menu
    Copy the full SHA
    3bc3e81 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1e7b017 View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2023

  1. Introduce a query to retrieve the list of packages affected by a spec…

    …ific CVE for each system
    HoussemNasri committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    1e0d12c View commit details
    Browse the repository at this point in the history
  2. Add CVEAuditHandler#listAffectedSystems

    - Created an RPC API endpoint to retrieve systems impacted by a CVE, including the corresponding affected packages.
    HoussemNasri committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    5c9603a View commit details
    Browse the repository at this point in the history
  3. Implement listAffectedSystemsByCve

    - For each CVE, it returns the list of affected systems and their corresponding affected packages.
    HoussemNasri committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    97abdbd View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    37ee1a6 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4f5a7f4 View commit details
    Browse the repository at this point in the history