Skip to content

Split out detector types into separate proto file in order to narrow CODEOWNERS scope#4871

Open
casey-tran wants to merge 3 commits intomainfrom
take-detectors-out-of-scanning-team-purview-v2
Open

Split out detector types into separate proto file in order to narrow CODEOWNERS scope#4871
casey-tran wants to merge 3 commits intomainfrom
take-detectors-out-of-scanning-team-purview-v2

Conversation

@casey-tran
Copy link
Copy Markdown
Contributor

@casey-tran casey-tran commented Apr 7, 2026

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:

  • Tests passing (make test-community)?
  • Lint passing (make lint this 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.DetectorType definitions or enum numbering.

Overview
Splits detector type definitions into a dedicated proto. DetectorType is moved into proto/detector_type.proto (with regenerated Go bindings under pkg/pb/detector_typepb).

Updates references and ownership. Call sites across config, custom detectors, and many detector implementations/tests are switched from detectorspb.DetectorType to detector_typepb.DetectorType, internal docs are updated to point at the new proto, and CODEOWNERS is reordered/adjusted to assign proto/detector_type.proto specifically to Integrations while keeping broader proto/ ownership shared.

Reviewed by Cursor Bugbot for commit 389fc55. Bugbot is set up for automated code reviews on this repo. Configure here.

@casey-tran casey-tran requested a review from a team April 7, 2026 04:58
@casey-tran casey-tran requested review from a team as code owners April 7, 2026 04:58
Copy link
Copy Markdown
Contributor

@shahzadhaider1 shahzadhaider1 left a comment

Choose a reason for hiding this comment

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

Looks good. But I think there might be some stale references created by this. For example: hack/docs/Adding_Detectors_external.md

@casey-tran
Copy link
Copy Markdown
Contributor Author

Looks good. But I think there might be some stale references created by this. For example: hack/docs/Adding_Detectors_external.md

Thanks for the catch Shahzad. I went ahead and updated the docs.

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.

2 participants