Skip to content

[INS-469] Added Rev detectors to defaults.go and gated it behind feature flag#5005

Open
MuneebUllahKhan222 wants to merge 2 commits into
mainfrom
rev-detector
Open

[INS-469] Added Rev detectors to defaults.go and gated it behind feature flag#5005
MuneebUllahKhan222 wants to merge 2 commits into
mainfrom
rev-detector

Conversation

@MuneebUllahKhan222
Copy link
Copy Markdown
Contributor

@MuneebUllahKhan222 MuneebUllahKhan222 commented Jun 2, 2026

Description:

This PR adds the existing Rev detector to defaults.go and ensures it is gated behind the appropriate feature flag.

Additionally, the PR updates the assertions in the existing integration tests to account for the changes made to the detector.Result struct.

Corpora Test:

The detector doesn't appear in the list.
image

Checklist:

  • Tests passing (make test-community)?
  • Lint passing (make lint this requires golangci-lint)?

Note

Medium Risk
Turning on a new default detector increases scan surface and live Rev API verification traffic; behavior is mitigated by a feature flag but enabled by default in OSS builds.

Overview
This PR enables the existing Rev API credential detector in the default engine detector list and wires it through the same feature-flag pattern used for Pinecone, Cloudinary, and GitLab OAuth (RevDetectorEnabled, default on in OSS main).

The Rev scanner now records both user and client key parts in SecretParts for multi-part credentials. Rev integration tests were updated to compare results with go-cmp, ignoring newer detector.Result fields that would otherwise make assertions brittle. go.sum grew with many new transitive module checksum lines (lockfile-only).

Note: defaults_test still lists DetectorType_Rev under intentionally excluded types until the test list is updated to match registration—worth confirming that test expectations are aligned with this change.

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

@MuneebUllahKhan222 MuneebUllahKhan222 requested a review from a team June 2, 2026 07:34
@MuneebUllahKhan222 MuneebUllahKhan222 requested review from a team as code owners June 2, 2026 07:34
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

Corpora Test Results

No detector regex or keyword changes in this PR. Bench skipped.

Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7a56052. Configure here.

Comment thread pkg/detectors/rev/rev_integration_test.go Outdated
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