Skip to content

[INS-470] Add Tly detector to defaults.go, gate it behind feat flag and update its verification logic#5006

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

[INS-470] Add Tly detector to defaults.go, gate it behind feat flag and update its verification logic#5006
MuneebUllahKhan222 wants to merge 2 commits into
mainfrom
tly-detector

Conversation

@MuneebUllahKhan222
Copy link
Copy Markdown
Contributor

@MuneebUllahKhan222 MuneebUllahKhan222 commented Jun 2, 2026

Description:

This PR adds the Tly detector to defaults.go and gates it behind the appropriate feature flag.

Additionally, the PR updates the detector’s verification logic to align with the latest implementation changes.

Corpora Test

The detector appear in the list but on the lower side.
image

Checklist:

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

Note

Low Risk
Adds a gated third-party API detector and changes verification HTTP behavior only for TLy; no auth or core scan pipeline changes.

Overview
This PR enables the TLy URL-shortener API key detector in the default engine and wires it behind a new TlyDetectorEnabled feature flag (on by default in OSS main, same pattern as Pinecone/Cloudinary/GitLab OAuth).

The tly scanner is refactored to dedupe matched keys, verify via GET https://api.t.ly/api/v1/link/list with a Bearer token (replacing the old query-token stats URL), record verification errors on results, and handle HTTP status codes explicitly. Integration tests switch from pretty to go-cmp with ignored verification/metadata fields.

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

@MuneebUllahKhan222 MuneebUllahKhan222 requested a review from a team June 2, 2026 09:26
@MuneebUllahKhan222 MuneebUllahKhan222 requested review from a team as code owners June 2, 2026 09:26
@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.

@MuneebUllahKhan222 MuneebUllahKhan222 changed the title Add Tly detectors to defaults.go, gate it behind feat flag and update its verification logic [INS-470] Add Tly detectors to defaults.go, gate it behind feat flag and update its verification logic Jun 2, 2026
@MuneebUllahKhan222 MuneebUllahKhan222 changed the title [INS-470] Add Tly detectors to defaults.go, gate it behind feat flag and update its verification logic [INS-470] Add Tly detector to defaults.go, gate it behind feat flag and update its verification logic Jun 2, 2026
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.

1 participant