Skip to content

Conversation

kashifkhan0771
Copy link
Contributor

@kashifkhan0771 kashifkhan0771 commented Aug 13, 2025

Description:

This PR fixes the CurrentsAPI detector:

  • The original regex was too broad due to the use of \S. It has been optimized to use [A-Za-z0-9_-], as CurrentsAPI tokens only contain alphanumeric characters, underscores, and hyphens.
  • After generating and testing 25+ tokens, I found that they can start or end with - or _, so the word boundary (\b) had to be removed.
  • The verification logic has been separated for clarity, and status code handling has been improved.

Checklist:

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

@kashifkhan0771 kashifkhan0771 requested a review from a team as a code owner August 13, 2025 07:15
@amanfcp amanfcp merged commit 134a599 into trufflesecurity:main Aug 13, 2025
13 checks passed
@kashifkhan0771 kashifkhan0771 deleted the update/oss-56-currentsapi branch August 15, 2025 05:17
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.

3 participants