Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@cx-diogo-rocha
Copy link
Contributor

@cx-diogo-rocha cx-diogo-rocha commented Oct 3, 2025

Closes #

Proposed Changes

  • Fully moved rules from gitleaks to our own, to package ruledefine
  • Validations that previously occurred, for every rule, every time 2ms ran, now run in unit tests
  • Created new rule struct, replacing our previous rule struct that wrapped gitleaks Rule.
  • The new Rule struct has all fields that are in practice used by gitleaks Rules; fields which are not used by default rules of gitleaks were not included.
  • Added new fields to results:
    • severity - for now High as default for every rule. Rules that can perform validation on their results (eg, github-pat) will bump the severity to Critical if the secret is Valid; and lower the severity to Medium if the secret is Invalid
    • ruleCategory - used to classify and groups rules
    • baseRuleID- a uuid4 that identifies a rule. It will be used in the future to identify a rule even if its ruleID changes.

The purpose of these changes is to allow us to have more control over the rules, in preparation for:

  1. Allowing users to create their own rules in the open source tool. In the future the user will be able to define more fields than simply the regex (currently supported with --regex flag)
  2. Allowing query editing in Checkmarx One.

Changes to rules

  • clojars-api-token - reintroduced entropy to 2, like it is in gitleaks
  • github-app-token - reintroduced entropy to 3, like it is in gitleaks
  • plaid-client-id - updated entropy from 3 to 3.5, like it is in gitleaks
  • vault-service-token - updated regex according to latest version of gitleaks; reintroduced entropy to 3.5, like it is in gitleaks

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-diogo-rocha cx-diogo-rocha requested a review from a team as a code owner October 3, 2025 10:59
@github-actions
Copy link

github-actions bot commented Oct 3, 2025

kics-logo

KICS version: v1.7.13

Category Results
HIGH HIGH 0
MEDIUM MEDIUM 0
LOW LOW 0
INFO INFO 0
TRACE TRACE 0
TOTAL TOTAL 0
Metric Values
Files scanned placeholder 13
Files parsed placeholder 13
Files failed to scan placeholder 0
Total executed queries placeholder 53
Queries failed to execute placeholder 0
Execution time placeholder 1

@github-actions
Copy link

github-actions bot commented Oct 3, 2025

Logo
Checkmarx One – Scan Summary & Details1a4faa63-cb86-4c8f-b212-af5a85e5ddc1

Great job! No new security vulnerabilities introduced in this pull request

@cx-diogo-rocha cx-diogo-rocha changed the title Ast 113275 move rules from gitleaks feat: move gitleaks rules to 2ms Oct 3, 2025
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.

2 participants