Skip to content

Adobe ims v2 (#4)#4909

Open
anemonaaa13 wants to merge 6 commits intotrufflesecurity:mainfrom
anemonaaa13:main
Open

Adobe ims v2 (#4)#4909
anemonaaa13 wants to merge 6 commits intotrufflesecurity:mainfrom
anemonaaa13:main

Conversation

@anemonaaa13
Copy link
Copy Markdown

@anemonaaa13 anemonaaa13 commented Apr 22, 2026

Add a new detector for Adobe IMS (Identity Management System) OAuth2 tokens. Adobe IMS issues JWT-based access tokens and refresh tokens for user authentication across Adobe services. This detector identifies tokens by decoding the JWT payload and checking for the "as" field prefixed with "ims-" (e.g. ims-na1, ims-eu1). Verification is done via POST /ims/validate_token/v1.

Closes #4908

[x] Tests passing (make test-community)?
[x] Lint passing (make lint this requires golangci-lint)?


Note

Medium Risk
Adds a new JWT-based detector that performs optional live verification against Adobe IMS, introducing new outbound HTTP behavior and potential false positives/negatives despite input validation to reduce SSRF risk.

Overview
Adds a new AdobeIMS detector that scans for JWT-shaped strings, decodes the payload to identify Adobe IMS access/refresh tokens, and (optionally) verifies them via POST /ims/validate_token/v1 with region-derived base URLs guarded by a strict allowlist regex.

Registers the detector in the default detector list and extends DetectorType protobuf enums, with unit + integration tests covering matching behavior, request construction, and verification outcomes/timeouts.

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

@anemonaaa13 anemonaaa13 requested a review from a team April 22, 2026 11:26
@anemonaaa13 anemonaaa13 requested review from a team as code owners April 22, 2026 11:26
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 22, 2026

CLA assistant check
All committers have signed the CLA.

Comment thread pkg/detectors/adobeims/adobeims.go
Comment thread pkg/detectors/adobeims/adobeims_integration_test.go
@kashifkhan0771 kashifkhan0771 added the pkg/detectors PRs and Issues related to the `detectors` package label Apr 23, 2026
@anemonaaa13
Copy link
Copy Markdown
Author

@kashifkhan0771
Hello! Quick question - do you need me to resolve the conflicts right away, or is it fine to wait until you're ready to merge and I'll handle it then? Thanks!

@kashifkhan0771
Copy link
Copy Markdown
Contributor

@kashifkhan0771 Hello! Quick question - do you need me to resolve the conflicts right away, or is it fine to wait until you're ready to merge and I'll handle it then? Thanks!

Due to some recent incidents where certain detectors either failed or generated too many false positives, we’ve introduced stricter requirements before merging any new detector.

For now, please wait for approval before proceeding and then resolve any outstanding conflicts. If you have the time, you’re welcome to address them earlier as well. I'll add the review/prod-eng label so the prod-eng team can take a look, and I can also follow up internally to help move the review along.

Thank you for your submission and for helping make TruffleHog better!

@kashifkhan0771 kashifkhan0771 added the review/product-eng Team integrations reviewed, awaiting product-eng review label Apr 30, 2026
Copy link
Copy Markdown
Contributor

@kashifkhan0771 kashifkhan0771 left a comment

Choose a reason for hiding this comment

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

I’ve completed an initial review and left some feedback. Once you’ve addressed those comments, I’ll pass this along to the prod-eng team for further review. The rest of the code looks good to me.

Comment thread pkg/detectors/adobeims/adobeims.go Outdated
Comment thread pkg/detectors/adobeims/adobeims.go
Comment thread pkg/detectors/adobeims/adobeims.go Outdated
@anemonaaa13 anemonaaa13 requested a review from kashifkhan0771 May 5, 2026 15:45
@kashifkhan0771
Copy link
Copy Markdown
Contributor

You need to rebase the branch with latest main and generate protos again - that should fix the conflicts.

Comment thread pkg/detectors/adobeims/adobeims.go
anemonaaa13 and others added 4 commits May 5, 2026 19:21
* Add Adobe IMS detector for access and refresh tokens

Co-authored-by: Chivereanu Radu <37249331+Radu1999@users.noreply.github.com>
@anemonaaa13
Copy link
Copy Markdown
Author

@kashifkhan0771 Thank you for the review! Done — rebased on latest main and regenerated protos. Let me know if anything else needs changes!

Copy link
Copy Markdown

@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 64a7757. Configure here.

Comment thread pkg/detectors/adobeims/adobeims_integration_test.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg/detectors PRs and Issues related to the `detectors` package review/product-eng Team integrations reviewed, awaiting product-eng review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add detector for Adobe IMS OAuth2 tokens

3 participants