Skip to content

[Detector]-Detector for tableau personal access token #4261

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

SyedAliHamad
Copy link

@SyedAliHamad SyedAliHamad commented Jun 24, 2025

Description:

This PR adds new detector for Tableau Personal Access Tokens

Checklist:

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

@CLAassistant
Copy link

CLAassistant commented Jun 24, 2025

CLA assistant check
All committers have signed the CLA.

@SyedAliHamad SyedAliHamad marked this pull request as ready for review June 25, 2025 13:38
@SyedAliHamad SyedAliHamad requested review from a team as code owners June 25, 2025 13:38
Copy link
Contributor

@shahzadhaider1 shahzadhaider1 left a comment

Choose a reason for hiding this comment

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

Great job on putting together your first detector!
Added some feedback.

Comment on lines 35 to 37
// Pattern for Personal Access Token Names - Updated to handle JSON
tokenNamePat = regexp.MustCompile(`(?i)\b(?:personal[_-]?access[_-]?token[_-]?name|pat[_-]?name|token[_-]?name|access[_-]?token[_-]?name|api[_-]?token[_-]?name)[_\s]*[:=]\s*["\']?([a-zA-Z0-9_-]{3,50})["\']?`)
quotedTokenNamePat = regexp.MustCompile(`(?i)["'](?:personal[_-]?access[_-]?token[_-]?name|pat[_-]?name|token[_-]?name|access[_-]?token[_-]?name|api[_-]?token[_-]?name)["']\s*:\s*["']([a-zA-Z0-9_-]{3,50})["']`)
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's discuss this

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