Skip to content

AST-194372 stop Gitlab-Pat from reporting a truncated routable token - #405

Open
cx-goncalo-lemos wants to merge 1 commit into
masterfrom
AST-194372-gitlab-pat-rule
Open

cx-goncalo-lemos wants to merge 1 commit into
masterfrom
AST-194372-gitlab-pat-rule

Conversation

@cx-goncalo-lemos

Copy link
Copy Markdown
Contributor

Closes #

Proposed Changes

The Gitlab-Pat regex now consumes the full run of token characters (glpat-[\w-]{20}[\w-]*).
A rule allowlist (regexTarget: match) drops matches with more than 20 characters

This way I think we dont lose accuracy and keep the rules from overlaping

Checklist

  • I covered my changes with tests.
  • I Updated the documentation that is affected by my changes:
    • Change in the CLI arguments
    • Change in the configuration file

I submit this contribution under the Apache-2.0 license.

@cx-goncalo-lemos
cx-goncalo-lemos requested a review from a team November 19, 2026 12:01
@github-actions

Copy link
Copy Markdown

⚠️ Potential secret(s) detected (unverified)

@cx-goncalo-lemos — TruffleHog found 3 potential secret(s) in this PR (0 verified, 3 unverified).

Secret Type Status Commit File Path View
Gitlab ⚠️ unverified e262c3a020 engine/rules/ruledefine/gitlab_pat_test.go 🔎 View secret
Gitlab ⚠️ unverified e262c3a020 engine/rules/ruledefine/gitlab_pat_test.go 🔎 View secret
Gitlab ⚠️ unverified e262c3a020 engine/rules/ruledefine/gitlab_pat_test.go 🔎 View secret

🛠 Guidelines to remediate hardcoded secrets

To avoid such incidents in the future consider:

  • Following the best practices for managing and storing secrets, including API keys and other credentials.
  • Re-scan after cleanup before merging.

⚠️ These are unverified matches and do not block the merge — please review and confirm they are not real secrets.

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.

1 participant