Skip to content

feat: vulnerability label filter - #587

Open
ybelMekk wants to merge 7 commits into
mainfrom
feat/vulnerability-label-filter
Open

ybelMekk wants to merge 7 commits into
mainfrom
feat/vulnerability-label-filter

Conversation

@ybelMekk

Copy link
Copy Markdown
Contributor

No description provided.

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

Valid singleton-object label filters are silently discarded, causing requests to return unfiltered summaries.

1 open issue
1 file not reviewed
  • internal/graph/gengql/vulnerability.generated.go: Generated file
What changed in this PR

Adds user-label filtering to team workload vulnerability summaries, passing filters to v13s while preserving pagination and ordering.

Changes:

  • Extends the GraphQL filter and validates labels; explicitly rejects labels on the team aggregate.
  • Adds fake-client filtering, labeled fixtures, and unit and integration coverage.
  • Adopts shared label policy and updates dependencies and telemetry imports.
File Description
internal/​vulnerability/​queries.go Validates and forwards label filters; rejects aggregate filtering.
internal/​vulnerability/​queries_test.go Tests upstream delegation and invalid labels.
internal/​vulnerability/​models.go Adds labels to the team summary filter.
internal/​vulnerability/​fake/​v13s.go Filters fake summaries before pagination.
internal/​vulnerability/​fake/​v13s_test.go Tests label matching and filtered pagination.
internal/​vulnerability/​fake/​fakedata.go Includes workload labels in fake data.
internal/​graph/​vulnerability_filter_test.go Tests filter scope and aggregate rejection.
internal/​graph/​schema/​vulnerability.graphqls Exposes and documents label filtering.
internal/​graph/​pubsub.go Updates telemetry semantic conventions.
internal/​graph/​model/​labels.go Uses shared platform-label policy and updated validation.
internal/​graph/​model/​labels_test.go Removes local hidden-label policy tests.
internal/​graph/​gengql/​vulnerability.generated.go Adds generated label-filter decoding.
internal/​graph/​gengql/​root_.generated.go Updates the embedded GraphQL schema.
internal/​cmd/​api/​metrics.go Updates telemetry semantic conventions.
internal/​cmd/​api/​http.go Updates telemetry semantic conventions.
integration_tests/​vulnerabilities.lua Adds GraphQL label-filter integration coverage.
integration_tests/​k8s_resources/​vulnerability/​dev/​slug-1/​app.yaml Adds labels to the workload fixture.
go.sum Updates dependency checksums.
go.mod Updates v13s and supporting dependencies.

Review effort: Balanced

Comment thread internal/vulnerability/models.go Resolved
@ybelMekk
ybelMekk force-pushed the feat/vulnerability-label-filter branch from 00ab730 to f38d7a7 Compare October 27, 2026 08:20
@ybelMekk
ybelMekk requested a balanced review from Copilot October 27, 2026 08:20

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

Broad dependency upgrades and shared label-policy changes warrant human review and CI validation beyond the available static evidence.

No open issues 🎉

1 resolved since last review
1 file not reviewed
  • internal/graph/gengql/vulnerability.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

Broad dependency upgrades and the shared label-classification change warrant human validation beyond the targeted filtering coverage.

No open issues 🎉

1 file not reviewed
  • internal/graph/gengql/vulnerability.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.

🟢 Approval recommended

The supplied changes include focused regression coverage, and the remaining API-consistency feedback is non-blocking.

1 open issue
3 files not reviewed
  • cmd/gen_complexity/main.go: Generated file
  • internal/graph/gengql/complexity.go: Generated file
  • internal/graph/gengql/teams.generated.go: Generated file

Review effort: Balanced

@ybelMekk
ybelMekk force-pushed the feat/vulnerability-label-filter branch from 85b655d to a0dcc3d Compare October 27, 2026 11:45
@ybelMekk
ybelMekk requested a balanced review from Copilot October 27, 2026 11:46

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

Broad dependency and telemetry upgrades require compatibility validation through CI and human review beyond the supplied static evidence.

No open issues 🎉

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

Review effort: Balanced

@ybelMekk
ybelMekk marked this pull request as ready for review October 28, 2026 08:37
@ybelMekk
ybelMekk requested a review from a team as a code owner October 28, 2026 08:38
@ybelMekk
ybelMekk force-pushed the feat/vulnerability-label-filter branch from a0dcc3d to f084e33 Compare October 28, 2026 08:38
@ybelMekk
ybelMekk force-pushed the feat/vulnerability-label-filter branch from f084e33 to 2de6a64 Compare October 29, 2026 09:04
@ybelMekk
ybelMekk requested review from thokra-nav and a balanced review from Copilot October 29, 2026 09:06

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.

🟢 Approved

There are no active review issues for the user-label filtering change.

No open issues 🎉

2 files not reviewed
  • cmd/gen_complexity/main.go: Generated file
  • internal/graph/gengql/vulnerability.generated.go: Generated file

Review effort: Balanced

@ybelMekk
ybelMekk force-pushed the feat/vulnerability-label-filter branch from 2de6a64 to 7ac1ad6 Compare October 29, 2026 10:49
@ybelMekk
ybelMekk force-pushed the feat/vulnerability-label-filter branch from 7ac1ad6 to b872952 Compare November 1, 2026 18:17
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