-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Added detector for JFrog Artifactory Reference Tokens #4684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Added detector for JFrog Artifactory Reference Tokens #4684
Conversation
pkg/detectors/artifactoryreferencetoken/artifactoryreferencetoken.go
Outdated
Show resolved
Hide resolved
mustansir14
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this 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.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Summary
Adds a new detector for JFrog Artifactory Reference Tokens. Unlike JWT tokens (which start with
eyJ), reference tokens are base64-encoded strings with a predictable structure:When base64-encoded, this always produces a token starting with
cmVmdGtu.Detection
Regex pattern:
cmVmdGtu(8 chars): base64 encoding of "reftkn"Keyword:
cmVmdGtuVerification
Tokens are verified against the JFrog Access API:
This endpoint returns token metadata if valid. Available since Artifactory 7.53.1.
Response handling:
References
Checklist:
make test-community)?make lintthis requires golangci-lint)?