Skip to content

Eksponer pakketype-facets for image-sårbarheter - #622

Merged
ybelMekk merged 7 commits into
mainfrom
feat/image-package-types
Nov 13, 2026
Merged

ybelMekk merged 7 commits into
mainfrom
feat/image-package-types

Conversation

@ybelMekk

@ybelMekk ybelMekk commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Eksponerer vulnerabilities.facets.packageTypes med StringFacetItem (value og count), i tråd med eksisterende facet-mønster. Facets dekker alle sider og respekterer gjeldende filtre. Samme image-connection brukes av apper og Jobs; paginering og sortering er uendret. Ingen summary-endringer.

@thokra-nav

Copy link
Copy Markdown
Member

Kan vi gjøre dette på samme måte som andre steder ved hjelp av facets?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

OpenTelemetry logging compatibility remains unresolved without full API build/startup validation, and rollout of the still-open nais/v13s#544 must be confirmed before deploying API metadata to avoid silently empty packageTypes.

No open issues 🎉

2 files not reviewed
  • internal/graph/gengql/vulnerability.generated.go: Generated file
  • internal/graph/gengql/workloads.generated.go: Generated file
What changed in this PR

Exposes registered package types per image through Nais API’s GraphQL interface so Console can offer dynamic filter choices. Existing pagination, sorting, package-type filtering, and vulnerability summaries are preserved.

Changes:

  • Add packageTypes to ImageVulnerabilityConnection and pass through v13s metadata.
  • Extend the fake client and tests to preserve package choices across filtering and pagination.
  • Regenerate GraphQL bindings and update the v13s dependency and related modules.
File Description
internal/​vulnerability/​queries.go Return package types alongside the paginated findings.
internal/​vulnerability/​queries_test.go Verify upstream package types reach the connection.
internal/​vulnerability/​models.go Extend the connection model with package types.
internal/​vulnerability/​fake/​v13s.go Collect sorted, distinct types before filtering and pagination.
internal/​vulnerability/​fake/​v13s_test.go Verify package choices remain complete across filtered pages.
internal/​graph/​vulnerability.resolvers.go Return the extended domain connection type.
internal/​graph/​schema/​vulnerability.graphqls Define and document the non-null packageTypes list.
internal/​graph/​gengql/​workloads.generated.go Update generated resolver signatures and connection binding.
internal/​graph/​gengql/​vulnerability.generated.go Generate serialization for the extended connection.
internal/​graph/​gengql/​root_.generated.go Register the field in schema, dispatch, and complexity handling.
go.sum Refresh checksums for updated dependencies.
go.mod Select the v13s revision exposing package types and update related dependencies.

Review effort: Balanced

@ybelMekk

Copy link
Copy Markdown
Contributor Author

Kan vi gjøre dette på samme måte som andre steder ved hjelp av facets?

Riktig, det visste jeg ikke, sjekker det opp :)

@ybelMekk ybelMekk changed the title Eksponer registrerte pakketyper per image Eksponer pakketype-facets for image-sårbarheter Nov 13, 2026
@ybelMekk
ybelMekk force-pushed the feat/image-package-types branch from 4f6a75f to 9a5099a Compare November 13, 2026 08:04
@ybelMekk
ybelMekk requested a balanced review from Copilot November 13, 2026 08:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new public ImageVulnerabilityFacets type lacks a GraphQL description explaining that its counts cover all matching findings independently of pagination; add that documentation and regenerate the bindings.

1 open issue
2 files not reviewed
  • internal/graph/gengql/vulnerability.generated.go: Generated file
  • internal/graph/gengql/workloads.generated.go: Generated file

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human confirmation of the backend rollout for the still-open, blocked nais/v13s#544 is needed before this auto-deploying API merges, because fake-backed tests cannot verify production compatibility or deployment ordering.

No open issues 🎉

1 resolved since last review
2 files not reviewed
  • internal/graph/gengql/vulnerability.generated.go: Generated file
  • internal/graph/gengql/workloads.generated.go: Generated file

Review effort: Balanced

@ybelMekk
ybelMekk marked this pull request as ready for review November 13, 2026 09:17
@ybelMekk
ybelMekk requested a review from a team as a code owner November 13, 2026 09:17
@ybelMekk

Copy link
Copy Markdown
Contributor Author

@thokra-nav nå er vulnz facets kompatibel 👍🏾

@ybelMekk
ybelMekk force-pushed the feat/image-package-types branch from 9c21f8b to 99babf4 Compare November 13, 2026 10:06
@ybelMekk
ybelMekk force-pushed the feat/image-package-types branch from 99babf4 to 5ea629f Compare November 13, 2026 13:22
@ybelMekk
ybelMekk merged commit c5fdd94 into main Nov 13, 2026
10 checks passed
@ybelMekk
ybelMekk deleted the feat/image-package-types branch November 13, 2026 13:34
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.

3 participants