Skip to content

[INS-320] Cloudinary detector#4747

Merged
MuneebUllahKhan222 merged 16 commits into
trufflesecurity:mainfrom
MuneebUllahKhan222:cloudinary-detector
Apr 30, 2026
Merged

[INS-320] Cloudinary detector#4747
MuneebUllahKhan222 merged 16 commits into
trufflesecurity:mainfrom
MuneebUllahKhan222:cloudinary-detector

Conversation

@MuneebUllahKhan222

@MuneebUllahKhan222 MuneebUllahKhan222 commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

Description:

This PR adds cloudinary detector. It detects cloudinary creds like cloud name, api key and api secret and verifies them.

Checklist:

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

Note

Medium Risk
Adds a new detector that performs outbound HTTP verification against Cloudinary’s API and constructs results by combining independently matched secret parts, which could affect scan performance and verification behavior if patterns over-match.

Overview
Adds a new Cloudinary detector that extracts cloud_name, api_key, and api_secret (including cloudinary://... URL-style creds), emits a combined RawV2 triple, and optionally verifies credentials via a Basic Auth call to Cloudinary’s usage endpoint.

Registers the detector in the default detector list and extends the DetectorType enum/proto to include Cloudinary, with unit + integration tests and a benchmark covering matching and verification outcomes.

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

@MuneebUllahKhan222 MuneebUllahKhan222 requested review from a team February 18, 2026 07:17
@MuneebUllahKhan222 MuneebUllahKhan222 requested review from a team as code owners February 18, 2026 07:17
@MuneebUllahKhan222 MuneebUllahKhan222 changed the title [INS-330] Cloudinary detector [INS-320] Cloudinary detector Feb 18, 2026
Comment thread pkg/detectors/cloudinary/cloudinary.go Outdated
Comment thread pkg/detectors/cloudinary/cloudinary.go
Comment thread pkg/detectors/cloudinary/cloudinary.go Outdated
Comment thread pkg/detectors/cloudinary/cloudinary.go Outdated
Comment thread pkg/detectors/cloudinary/cloudinary.go Outdated
Comment thread pkg/detectors/cloudinary/cloudinary.go
Comment thread pkg/engine/defaults/defaults.go

@amanfcp amanfcp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, just shared a concern which could lead to false negatives.

Comment thread pkg/detectors/cloudinary/cloudinary.go
Comment thread pkg/detectors/cloudinary/cloudinary.go Outdated
Comment thread pkg/detectors/cloudinary/cloudinary.go Outdated
Comment thread pkg/detectors/cloudinary/cloudinary.go Outdated

@rosecodym rosecodym left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤠 for a new detector. I've created a backlog ticket to separate this codeownership.

@shahzadhaider1 shahzadhaider1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

please resolve the conflicts

@MuneebUllahKhan222 MuneebUllahKhan222 requested a review from a team April 27, 2026 11:46

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

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

Reviewed by Cursor Bugbot for commit edbff82. Configure here.

Comment thread pkg/detectors/cloudinary/cloudinary.go
@MuneebUllahKhan222 MuneebUllahKhan222 merged commit 8a12e8e into trufflesecurity:main Apr 30, 2026
16 checks passed
MuneebUllahKhan222 added a commit that referenced this pull request May 29, 2026
* added cloudinary detector

* resolved linter issue

* improved regex

* added dector to defaults.go

* resolved comments

* Regen protos, Updated desc and ignore secret part in test
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.

4 participants