Split out detector types into separate proto file in order to narrow CODEOWNERS scope#4871
Open
casey-tran wants to merge 3 commits intomainfrom
Open
Split out detector types into separate proto file in order to narrow CODEOWNERS scope#4871casey-tran wants to merge 3 commits intomainfrom
casey-tran wants to merge 3 commits intomainfrom
Conversation
…detector types reflect that change
… the top in order to filter properly
Contributor
shahzadhaider1
left a comment
There was a problem hiding this comment.
Looks good. But I think there might be some stale references created by this. For example: hack/docs/Adding_Detectors_external.md
Contributor
Author
Thanks for the catch Shahzad. I went ahead and updated the docs. |
shahzadhaider1
approved these changes
Apr 7, 2026
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.
Description:
We want to move the detector types out of the Scanning team purview. So I split off detector types into its own proto file (so that file detector_type.proto can be owned by the Integrations team), regenerated the pb files with "make protos", and made the detector files use the new generated detector_type.pb.go. Included the new detector_type.proto file in CODEOWNERS and made CODEOWNERS categories that contain larger teams be towards the top so that more fine grained ownership is filtered properly.
Checklist:
make test-community)?make lintthis requires golangci-lint)?Note
Medium Risk
Wide mechanical refactor across many detectors/config paths; risk is mainly build/runtime incompatibilities if any code still depends on the old
detectorspb.DetectorTypedefinitions or enum numbering.Overview
Splits detector type definitions into a dedicated proto.
DetectorTypeis moved intoproto/detector_type.proto(with regenerated Go bindings underpkg/pb/detector_typepb).Updates references and ownership. Call sites across config, custom detectors, and many detector implementations/tests are switched from
detectorspb.DetectorTypetodetector_typepb.DetectorType, internal docs are updated to point at the new proto, andCODEOWNERSis reordered/adjusted to assignproto/detector_type.protospecifically to Integrations while keeping broaderproto/ownership shared.Reviewed by Cursor Bugbot for commit 389fc55. Bugbot is set up for automated code reviews on this repo. Configure here.