Skip to content

Renamed AnypointOAuth2 detector's AnalysisInfo keys to make it consistent with its Analyzer#4906

Merged
MuneebUllahKhan222 merged 2 commits intotrufflesecurity:mainfrom
MuneebUllahKhan222:INS-459
Apr 22, 2026
Merged

Renamed AnypointOAuth2 detector's AnalysisInfo keys to make it consistent with its Analyzer#4906
MuneebUllahKhan222 merged 2 commits intotrufflesecurity:mainfrom
MuneebUllahKhan222:INS-459

Conversation

@MuneebUllahKhan222
Copy link
Copy Markdown
Contributor

@MuneebUllahKhan222 MuneebUllahKhan222 commented Apr 22, 2026

Description:

This PR fixes a mismatch between the AnypointOAuth2 detector and its corresponding analyzer.

Previously, the detector populated credential fields as id and secret, while the analyzer expects them to be provided as client_id and client_secret. This inconsistency caused the analyzer to fail when processing detected credentials.

Checklist:

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

Note

Low Risk
Small, localized changes to detector result metadata; no changes to matching/verification behavior beyond adding extra output fields.

Overview
Fixes verified-result metadata emitted by the AnypointOAuth2 detector by renaming AnalysisInfo keys from id/secret to client_id/client_secret so downstream analyzers receive the expected fields.

Also updates the Coinbase detector to (a) populate AnalysisInfo with key_name and key on successful verification and (b) includes a minor formatting fix in isValidECPrivateKey.

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

@MuneebUllahKhan222 MuneebUllahKhan222 requested a review from a team April 22, 2026 07:24
@MuneebUllahKhan222 MuneebUllahKhan222 requested a review from a team as a code owner April 22, 2026 07:24
@shahzadhaider1
Copy link
Copy Markdown
Contributor

While we are at it, could we also populate the AnalysisInfo in the following detector:

  1. pkg/detectors/coinbase/coinbase.go

@bryanbeverly bryanbeverly changed the title Renamed AnypointOAuth2 detector's AnalysisInfo keys to make it consistent with it's Analyzer Renamed AnypointOAuth2 detector's AnalysisInfo keys to make it consistent with its Analyzer Apr 22, 2026
Comment thread pkg/detectors/coinbase/coinbase.go
Copy link
Copy Markdown

@unsmith unsmith left a comment

Choose a reason for hiding this comment

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

Approved on behalf of product-eng.

@MuneebUllahKhan222 MuneebUllahKhan222 merged commit 5474feb into trufflesecurity:main Apr 22, 2026
15 checks passed
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