Skip to content

AST-177825 Update Gitlab-Pat-Routable regex - #402

Merged
cx-lior-poterman merged 3 commits into
masterfrom
AST-177825
Nov 12, 2026
Merged

cx-lior-poterman merged 3 commits into
masterfrom
AST-177825

Conversation

@cx-goncalo-lemos

@cx-goncalo-lemos cx-goncalo-lemos commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Closes #

Proposed Changes
Update Gitlab-Pat-Routable regex for new Gitlab token format
Add GitlabPatRoutable to validation function

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.

Add GitlabPatRoutable to validation function
@cx-goncalo-lemos
cx-goncalo-lemos requested a review from a team November 11, 2026 11:23

@cx-artur-ribeiro cx-artur-ribeiro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @cx-goncalo-lemos,
Can you please add tests for the new gitlabPatRoutable regex please? Follow the same structure as already existent query tests please.

Additionally, you will need to make a new release for 2ms and update microengines-2ms repo in both 2ms_version.txt and go.mod. We can take this ofline as it is not related to this repo, but for the changes to be present on the client's side, this is also needed.

Regarding the failing pipelines, we already have a PR that needs to be merged before this PR: #401. After that, you should be able to check the pipelines for any security or unit tests related failures, and fix them accordingly if needed.

@stepsecurity-app

Copy link
Copy Markdown
Contributor

Security Policy Alert: Secret Policy Violation

This workflow run has been blocked by StepSecurity's secrets policy because it accesses secrets and the workflow file differs from the default branch.

Secret references detected:

  • secrets.AST_RND_SCANS_BASE_URI at line 22
  • secrets.AST_RND_SCANS_TENANT at line 23
  • secrets.AST_RND_SCANS_CLIENT_ID at line 24
  • secrets.AST_RND_SCANS_CLIENT_SECRET at line 25

To approve this workflow, please add the workflows-approved label to this PR.

Note: The label must be added by someone other than the PR author (cx-goncalo-lemos) or automation bots to ensure proper security review.

After the label is added, you can re-run the blocked workflow to proceed.

This workflow will be automatically approved once merged into the default branch.

For more information, see StepSecurity's Secret Exfiltration Policy documentation.

@github-actions

Copy link
Copy Markdown

⚠️ Potential secret(s) detected (unverified)

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

Secret Type Status Commit File Path View
Gitlab ⚠️ unverified cd64c60f1f engine/rules/ruledefine/gitlab_pat_routable_test.go 🔎 View secret
Gitlab ⚠️ unverified cd64c60f1f engine/rules/ruledefine/gitlab_pat_routable_test.go 🔎 View secret
Gitlab ⚠️ unverified cd64c60f1f engine/rules/ruledefine/gitlab_pat_routable_test.go 🔎 View secret
Gitlab ⚠️ unverified cd64c60f1f engine/rules/ruledefine/gitlab_pat_routable_test.go 🔎 View secret
Gitlab ⚠️ unverified cd64c60f1f engine/rules/ruledefine/gitlab_pat_routable_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.

@cx-lior-poterman
cx-lior-poterman merged commit 2f18bad into master Nov 12, 2026
3 of 15 checks passed
@cx-lior-poterman
cx-lior-poterman deleted the AST-177825 branch November 12, 2026 16:49
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