canonical / ubuntu-pro-client

Ubuntu Pro Client for offerings from Canonical
https://canonical-ubuntu-pro-client.readthedocs-hosted.com/en/latest/
GNU General Public License v3.0
52 stars 73 forks source link

api: adding current status field to plan api #3065

Closed dheyay closed 4 months ago

dheyay commented 5 months ago

Why is this needed?

This PR adds a field displaying the current_status of the cve to show if a system is currently affected by a cve/usn before the fix plan is executed. The field is returned as a part of the plan api.

Test Steps

Checklist

Does this PR require extra reviews?

github-actions[bot] commented 5 months ago

Jira: This PR is not related to a Jira item. (The PR title does not include a SC-#### reference)

GitHub Issues: No GitHub issues are fixed by this PR. (No commits have Fixes: #### references)

Launchpad Bugs: No Launchpad bugs are fixed by this PR. (No commits have LP: #### references)

Documentation: The changes in this PR do not require documentation changes.

👍 this comment to confirm that this is correct.

dheyay commented 5 months ago

@orndorffgrant I agree, the current status would be more effective if not derived from the plan and can be set in the _generate_fix_plan function.

For the logic regarding FixStatus.SYSTEM_VULNERABLE_UNTIL_REBOOT, I think we can use the system.should_reboot() function along with the fixed packages to check for this?

dheyay commented 5 months ago

Updated @orndorffgrant, let me know if this works?

lucasmoura commented 5 months ago

@orndorffgrant I thinks this is a good idea

dheyay commented 5 months ago

Updated @orndorffgrant, will also update the documentation and create a PR for the same

orndorffgrant commented 4 months ago

Weird, my comment from my last review didn't post... I'll find it