Skip to content

Conversation

@jdobes
Copy link
Member

@jdobes jdobes commented Dec 4, 2025

…ble rows (since they are not in advisory=true category)

Secure Coding Practices Checklist GitHub Link

Secure Coding Checklist

  • Input Validation
  • Output Encoding
  • Authentication and Password Management
  • Session Management
  • Access Control
  • Cryptographic Practices
  • Error Handling and Logging
  • Data Protection
  • Communication Security
  • System Configuration
  • Database Security
  • File Management
  • Memory Management
  • General Coding Practices

Summary by Sourcery

Bug Fixes:

  • Stop associating advisory data with manually fixable rows that should not be in the advisories category.

…ble rows (since they are not in advisory=true category)
@jira-linking
Copy link

jira-linking bot commented Dec 4, 2025

Commits missing Jira IDs:
181ffbe

@sourcery-ai
Copy link

sourcery-ai bot commented Dec 4, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adjusts 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 advisories

sequenceDiagram
    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()
Loading

Flow diagram for handling advisories on manually fixable CVE rows

flowchart 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"]
Loading

File-Level Changes

Change Details Files
Stop attaching advisory information to manually fixable vulnerabilities in VMaaS evaluation results.
  • Change the argument passed for advisories when recording evaluation results for manually fixable rows from the CVE advisory list to None so no advisory is stored for them.
evaluator/logic.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a 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 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.
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.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@jdobes jdobes marked this pull request as draft December 4, 2025 13:10
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.

1 participant