Repository navigation
Conversation
ybelMekk
force-pushed
the
feat/cve-team-filter
branch
from
October 29, 2026 10:09
37982fc to
ea6bfdc
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The count-only workload shortcut ignores viewerIsMember, returning global counts even for viewers with no teams instead of applying membership filtering.
1 open issue
1 file not reviewed
internal/graph/gengql/vulnerability.generated.go: Generated file
What changed in this PR
Adds viewer-membership filtering to CVE workload queries, allowing developers to limit affected workloads to their teams.
Changes:
- Adds the optional
viewerIsMemberfilter to the GraphQL schema and Go model. - Intersects viewer teams with supplied team slugs and returns an empty connection when no teams match.
- Updates generated GraphQL code and adds domain-level filtering tests.
| File | Description |
|---|---|
internal/vulnerability/queries.go |
Resolves viewer team scope and handles empty matches. |
internal/vulnerability/models.go |
Adds the membership filter field. |
internal/vulnerability/cve_workloads_test.go |
Tests membership filtering, intersections, and empty results. |
internal/graph/schema/vulnerability.graphqls |
Exposes and documents viewerIsMember. |
internal/graph/gengql/vulnerability.generated.go |
Decodes the new filter input. |
internal/graph/gengql/root_.generated.go |
Updates the embedded GraphQL schema. |
Review effort: Balanced
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The membership filter can return team workloads to non-members through unrelated team-scoped roles and rejects valid explicit-null input.
2 open issues
1 resolved since last review
1 file not reviewed
internal/graph/gengql/vulnerability.generated.go: Generated file
Review effort: Balanced
ybelMekk
force-pushed
the
feat/cve-team-filter
branch
from
November 1, 2026 18:17
793b972 to
9c32df4
Compare
ybelMekk
force-pushed
the
feat/cve-team-filter
branch
from
November 3, 2026 13:01
9c32df4 to
22e89a1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Legger til
CVEWorkloadsFilter.viewerIsMemberfor å filtrere berørte workloads til team brukeren er medlem av. Kombinert medteamSlugsreturneres bare brukerens team blant de oppgitte.