feat(detectors): add Resend detector#5103
Open
mwoss wants to merge 1 commit into
Open
Conversation
Adds a TruffleHog detector for Resend (https://resend.com), an email API for transactional and marketing email. Key format: re_[1-9A-HJ-NP-Za-km-z]{8}_[1-9A-HJ-NP-Za-km-z]{24} (base58 alphabet, excluding the ambiguous characters 0, O, I, and l).
2f6e588 to
de1963f
Compare
Author
|
Closes #5107 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Hi Trufflehog team! I work at Resend (the email API this detector targets), submitting this on behalf of the team. Happy to be the point of contact for the key format and verification behavior, and I can provide sanctioned test credentials (
RESEND_API_KEY,RESEND_API_KEY_SENDING_ACCESS,RESEND_API_KEY_INACTIVE) for trufflehog-testing/detectors5 via any secure channel you prefer.Key format:
re_[1-9A-HJ-NP-Za-km-z]{8}_[1-9A-HJ-NP-Za-km-z]{24}(base58 alphabet, excluding the ambiguous characters 0, O, I, and l).Checklist:
make test-community)?make lintthis requires golangci-lint)?Note
Low Risk
Additive detector-only change following existing patterns; verification uses a read-only API call and does not alter core scan engine behavior.
Overview
Adds a Resend secret detector so scans can find leaked email API keys and optionally confirm they are still valid.
Keys matching
re_+ base58 segments are extracted with keyword prefilterre_. When verification is on, the scanner calls Resend’s read-onlyGET /api-keysendpoint: 200 marks full_access, 401 withrestricted_api_keymarks active sending_access, and other statuses leave the finding unverified. Verified hits include permission and a rotation_guide link in extra data.The new
DetectorType_Resend(1053) is wired into the default detector list. Unit tests cover regex/duplicates; integration tests (build tagdetectors) exercise live keys for full access, sending-only, and inactive keys plus timeout/error paths.Reviewed by Cursor Bugbot for commit 2f6e588. Bugbot is set up for automated code reviews on this repo. Configure here.