Skip to content

Conversation

@prakash100198
Copy link
Contributor

@prakash100198 prakash100198 commented Jan 5, 2026

Details:

  • Replaced GetVulnerabilitiesWithFixedVersionByFilters with GetVulnerabilityRawData for a more generic approach.
  • Removed unused GetVulnerabilitiesWithFixedVersionByFilters method and related SQL logic.
  • Simplified vulnerability processing by removing deduplication logic in ImageScanService.

Description

Fixes https://github.com/devtron-labs/sprint-tasks/issues/2766

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR requires documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have tested it for all user roles.
  • I have added all the required unit/api test cases.

Does this PR introduce a user-facing change?


Summary by Bito

  • Refactors the vulnerability query implementation by replacing the specific method `GetVulnerabilitiesWithFixedVersionByFilters` with a more generic method `GetVulnerabilityRawData`, which may introduce risks related to vulnerability detection accuracy.
  • Removes the unused method and its associated SQL logic, streamlining the codebase.
  • Simplifies the vulnerability processing logic in `ImageScanService` by eliminating unnecessary deduplication steps.
  • Overall, this pull request touches on the vulnerability query implementation, SQL logic, and processing logic, and appears to introduce risks related to vulnerability detection.

**Details**:
- Replaced `GetVulnerabilitiesWithFixedVersionByFilters` with `GetVulnerabilityRawData` for a more generic approach.
- Removed unused `GetVulnerabilitiesWithFixedVersionByFilters` method and related SQL logic.
- Simplified vulnerability processing by removing deduplication logic in `ImageScanService`.
…with a single query

**Details**:
- Added `FindScannedDeployInfoWithFilters` to `ImageScanDeployInfoRepository` for streamlined data retrieval.
- Introduced `FetchScannedDeployInfoWithFilters` in `ImageScanService` for improved performance.
- Replaced multi-step filtering logic in `ImageScanRestHandler` with optimized query implementation.
- Enhanced RBAC handling and super-admin-specific optimizations.
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 5, 2026

@prakash100198 prakash100198 merged commit 27f3a75 into main Jan 5, 2026
12 checks passed
@prakash100198 prakash100198 deleted the optimize-vul-summary-oss branch January 5, 2026 11:28
@bito-code-review
Copy link

Bito Automatic Review Skipped – PR Already Merged

Bito scheduled an automatic review for this pull request, but the review was skipped because this PR was merged before the review could be run.
No action is needed if you didn't intend to review it. To get a review, you can type /review in a comment and save it

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.

3 participants