-
Notifications
You must be signed in to change notification settings - Fork 51
fix(evaluator): don't set (unapplicable) advisories for manually fixa… #2085
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
Draft
jdobes
wants to merge
1
commit into
RedHatInsights:master
Choose a base branch
from
jdobes:manually_fixable_polish
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ble rows (since they are not in advisory=true category)
|
Commits missing Jira IDs: |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdjusts the evaluator so that manually fixable CVE rows are no longer assigned advisory data, since they are not part of the advisory=true category. Sequence diagram for evaluator storing manually fixable CVE rows without advisoriessequenceDiagram
participant EvaluatorLogic
participant VmaasResultStore
EvaluatorLogic->>VmaasResultStore: save_cve_result(rh_account_id, system_id, cve_id, None, true, true, None)
VmaasResultStore-->>EvaluatorLogic: save_result_success()
Flow diagram for handling advisories on manually fixable CVE rowsflowchart TD
A["Start CVE evaluation"] --> B["Determine if CVE row is manually fixable"]
B -->|Yes| C["Prepare save_cve_result call with advisories set to None"]
B -->|No| D["Prepare save_cve_result call with advisories from cve_adv.advisories"]
C --> E["save_cve_result(rh_account_id, system_id, cve_id, None, true, true, None)"]
D --> F["save_cve_result(rh_account_id, system_id, cve_id, advisories, true, true, None)"]
E --> G["Persist CVE result"]
F --> G
G --> H["End CVE evaluation"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there - I've reviewed your changes - here's some feedback:
- Consider adding a short comment or clarifying variable name around passing
Noneinstead ofcve_adv.advisorieshere to make the special handling of manually fixable rows obvious to future readers. - This call site is using multiple positional booleans (
True, True); switching to keyword arguments would improve readability and reduce the risk of misordered flags when behavior like advisory handling changes.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider adding a short comment or clarifying variable name around passing `None` instead of `cve_adv.advisories` here to make the special handling of manually fixable rows obvious to future readers.
- This call site is using multiple positional booleans (`True, True`); switching to keyword arguments would improve readability and reduce the risk of misordered flags when behavior like advisory handling changes.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…ble rows (since they are not in advisory=true category)
Secure Coding Practices Checklist GitHub Link
Secure Coding Checklist
Summary by Sourcery
Bug Fixes: