Skip to content

Conversation

@festeveira
Copy link

@festeveira festeveira commented Nov 15, 2025

Description

This PR fixes an issue in the logic that determines when to add LabelReusedReport label to a scan job PodSpec. Previously, the code only checked whether the number of reused reports was greater than 0. This caused issues when the workload was composed of several images and at least one of the images had a corresponding ClusterSbomReport; if one of the remaining images did not have a corresponding ClusterSbomReport, the label was being wrongly added, causing sbom reports to not written to the kubernetes API.

The label's existence is later checked here.

I have tested this change in my environment and it seemed to fix the related issue.

Related issues

Checklist

  • I've read the guidelines for contributing to this repository.
  • I've added tests that prove my fix is effective or that my feature works.
  • I've updated the documentation with the relevant information (if needed).
  • I've added usage information (if the PR introduces new options)
  • I've included a "before" and "after" example to the description (if the PR is a user interface change).

…ner images size when adding LabelReusedReport = "true"

Signed-off-by: festeveira <f.esteveira@hotmail.com>
@festeveira festeveira requested a review from simar7 as a code owner November 15, 2025 18:39
@github-actions github-actions bot added the bug label Nov 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No sbom generation for containers being analyzed by jobs where at least one image has a ClusterSbomReport

1 participant