Skip to content

Conversation

@aviadlevy
Copy link
Collaborator

@aviadlevy aviadlevy commented Nov 11, 2025

Description

Update gitleaks conf to the latest version of configuration.
This will update the built in version of the library with the latest version (at the moment of opening the PR) of gitleaks configurations

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test improvements

Changes Made

  • Update gitleaks.toml configuration
  • Add comprehensive test suite for gitleaks config validation
  • Update ahocorasick_regex_match.py to handle gitleaks patterns correctly

Testing

  • All existing tests pass
  • Added new tests for the changes
  • Tested manually (describe below)

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code where necessary
  • I have added/updated docstrings for all functions and classes
  • I have added type annotations to all functions and classes
  • My changes generate no new linting errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Note

Upgrades the built-in gitleaks.toml, enhances regex compilation for Go-style patterns, adds comprehensive config/detection tests, and updates CI/tooling with version bump.

  • Security/Config:
    • Update maskerlogger/config/gitleaks.toml to latest upstream with expanded rules, allowlists, and stopwords.
  • Engine:
    • Improve RegexMatcher in maskerlogger/ahocorasick_regex_match.py with safe_compile to handle Go-style tokens (e.g., \z) and centralized case-insensitive compilation.
  • Tests:
    • Add tests/test_gitleaks_config.py validating config load, required fields, regex compilation, Aho-Corasick init, and detection of common secrets (GitHub PAT, AWS, Slack, Stripe, OpenAI, JWT, private keys, generic keys).
  • CI/Tooling:
    • Use Codecov token via ${{ secrets.CODECOV_TOKEN }} in .github/workflows/run-tests.yml.
    • Tweak .pre-commit-config.yaml (exclude secret-detection test; add mypy/poetry hooks).
    • Bump version to 1.1.0b1 in pyproject.toml and update dev tooling settings.

Written by Cursor Bugbot for commit 76c7a18. This will update automatically on new commits. Configure here.

- Update gitleaks.toml configuration
- Add comprehensive test suite for gitleaks config validation
- Update ahocorasick_regex_match.py to handle gitleaks patterns correctly
@codecov-commenter
Copy link

codecov-commenter commented Nov 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@93f6d13). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #21   +/-   ##
=======================================
  Coverage        ?   91.82%           
=======================================
  Files           ?        4           
  Lines           ?      159           
  Branches        ?        0           
=======================================
  Hits            ?      146           
  Misses          ?       13           
  Partials        ?        0           
Flag Coverage Δ
unittests 91.82% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on December 6

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@oxnick oxnick self-assigned this Nov 12, 2025
Copy link
Collaborator

@oxnick oxnick left a comment

Choose a reason for hiding this comment

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

Great, look at the cursor comments

- Update safe_compile to correctly handle bad escapes like \\z and preserve valid Python regex anchors like \\A and \\Z.
@aviadlevy aviadlevy merged commit cb158aa into oxsecurity:main Nov 12, 2025
8 checks passed
@aviadlevy aviadlevy deleted the update-gitleaks-conf branch November 12, 2025 13:03
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