Skip to content

SBOM status#410

Open
ybelMekk wants to merge 35 commits intomainfrom
sbom_status
Open

SBOM status#410
ybelMekk wants to merge 35 commits intomainfrom
sbom_status

Conversation

@ybelMekk
Copy link
Copy Markdown
Contributor

@ybelMekk ybelMekk commented Apr 28, 2026

This pull request introduces a new sbom field on the ContainerImage GraphQL type, replacing the previous hasSBOM boolean field with a richer object containing SBOM pipeline status and processing information. The changes also update the GraphQL schema, resolvers, and integration tests to support and verify this new structure. Additionally, there are several dependency upgrades across the codebase.

GraphQL API Improvements:

  • The ContainerImage GraphQL type now exposes a sbom field (of type ContainerImageSBOM) instead of the old hasSBOM boolean, providing detailed SBOM pipeline status and processing start time. The schema, resolvers, and complexity definitions are updated accordingly. (internal/graph/gengql/root_.generated.go, internal/graph/gengql/applications.generated.go, internal/graph/gengql/instancegroup.generated.go, internal/graph/gengql/jobs.generated.go) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]
  • The hasSBOM field on WorkloadVulnerabilitySummary is now deprecated in favor of accessing SBOM status via workload { image { sbom { status } } }. (internal/graph/gengql/root_.generated.go)

Testing Updates:

  • Integration tests are updated to check the new sbom field, including its status and processingStartedAt properties, instead of the old hasSBOM field. A new test verifies that the SBOM sub-type is correctly returned for workload vulnerability summaries. (integration_tests/vulnerabilities.lua) [1] [2] [3]

Dependency Upgrades:

  • Multiple dependencies are updated in go.mod, including cloud.google.com/go/bigquery, github.com/nais/v13s/pkg/api, go.opentelemetry.io/otel and related OpenTelemetry packages, as well as various Google, Go, and third-party libraries. (go.mod) [1] [2] [3] [4] [5] [6] [7] [8]

OpenTelemetry Version Update:

  • OpenTelemetry semantic conventions imports are updated to use v1.40.0. (internal/cmd/api/http.go, internal/cmd/api/metrics.go) [1] [2]

@ybelMekk ybelMekk requested a review from a team as a code owner April 28, 2026 12:57
ybelMekk and others added 28 commits April 28, 2026 14:58
* stale field to isSummaryStale and add summaryStaleTag
…staleness field in ContainerImage and WorkloadVulnerabilitySummary
…dAt in ContainerImage and WorkloadVulnerabilitySummary
add descritions

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
fix: update description

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
use default sbom status

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
fix: description

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…include WorkloadSbomSummary for improved SBOM handling
…aders struct for improved context management
- Rename ContainerImageSbom→ContainerImageSBOM, SbomStatus→SBOMStatus across resolvers
- Remove hasSbom field from ContainerImageSBOM; derive SBOM availability from status == READY
- Remove WorkloadSbomSummary type; consumers use workload { image { sbom { ... } } } instead
- Add hasSBOM @deprecated on WorkloadVulnerabilitySummary pointing to workload.image.sbom.status
- Keep summary: ImageVulnerabilitySummary! non-null; resolver returns empty struct when nil
- Implement Status and ProcessingStartedAt resolvers on ContainerImageSBOM (were panicking)
- Suppress SBOM issue when status is PROCESSING or UNSPECIFIED, only fire on NO_SBOM/FAILED
- Update integration tests to use sbom { status } instead of hasSBOM
@ybelMekk
Copy link
Copy Markdown
Contributor Author

sry, var ikke klar over at review forsvant når man renamet branch, men det burde jeg ha tenkt på...

Comment thread internal/graph/schema/vulnerability.graphqls
Comment thread internal/graph/schema/vulnerability.graphqls Outdated
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.

2 participants