Skip to content

Conversation

@aviadlevy
Copy link
Collaborator

@aviadlevy aviadlevy commented Nov 5, 2025

See cursor summary


Note

Release 1.0.0 adds timeout-safe regex masking with Aho–Corasick prefiltering, stricter redact validation, Python 3.10+ packaging, expanded tests, and revamped CI/docs/repo templates.

  • Core/Library:
    • Add timeout-safe matching via TimeoutException and timeout() decorator; propagate handling in MaskerFormatter.
    • Improve regex matching: load TOML config robustly, compile safely, Aho–Corasick keyword prefilter, configurable timeout_seconds.
    • Validate redact (accepts int/str 0–100); adjust masking to partial-prefix replacement.
    • Export SKIP_MASK from maskerlogger.__init__; bump __version__ to 1.0.0.
    • Ensure JSON formatter returns string; refresh bundled config/gitleaks.toml.
  • Tests:
    • Add coverage-backed tests for masking, JSON output, timeout behavior, and redact validation (tests/*).
  • CI/CD:
    • Replace flake workflow with lint.yml, run-tests.yml (Py 3.10–3.13 + Codecov), quality.yml, and improved publish.yml (version-tag check).
    • Add Dependabot for GitHub Actions and pip.
  • Docs/Repo meta:
    • Update README.md (badges, usage, requirements); add CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md, issue templates, PR template.
    • Add .pre-commit-config.yaml; expand .gitignore.
  • Packaging/Config:
    • Migrate to PEP 621 pyproject.toml with Python >=3.10, pinned deps, and tooling configs (ruff, mypy, coverage); add poetry.lock.
    • Update examples to maskerlogger imports (examples/secrets_in_logs_example.py).

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

@codecov-commenter
Copy link

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@aviadlevy aviadlevy force-pushed the a-lot-of-updates branch 2 times, most recently from ff68b8e to 8f433d5 Compare November 5, 2025 13:14
@aviadlevy aviadlevy force-pushed the a-lot-of-updates branch 3 times, most recently from d2a4bc2 to 4d66206 Compare November 5, 2025 15:58
@aviadlevy aviadlevy marked this pull request as ready for review November 5, 2025 16:05
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 PR is being reviewed by Cursor Bugbot

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.

- Added .pre-commit-config.yaml for managing pre-commit hooks.
- Created poetry.lock to lock dependencies for the project.
- Updated pyproject.toml to include new authors, classifiers, and dependencies.
- Enhanced README with additional badges and improved formatting.
- Added CODE_OF_CONDUCT.md and CONTRIBUTING.md for community guidelines.
- Implemented GitHub workflows for linting, testing, and quality checks.
- Updated .gitignore to include IDE configuration files.
- Refactored code for consistency and improved readability.
- Updated the _mask_sensitive_data method in AbstractMaskedLogger to catch TimeoutException during regex matching.
- Added a new test to ensure that log messages are processed correctly even when a timeout occurs in the regex matching.
- Updated RegexMatcher to accept a customizable timeout value for regex matching operations.
- Modified AbstractMaskedLogger and its subclasses to pass the timeout value to RegexMatcher.
- Refactored the timeout decorator to support dynamic timeout values based on instance attributes.
@aviadlevy aviadlevy marked this pull request as draft November 5, 2025 16:35
- Changed Python version requirements in pyproject.toml and poetry.lock to >=3.10.
- Updated GitHub workflows to use Python 3.10 for testing and quality checks.
- Enhanced README to reflect the new Python version compatibility.
- Refactored type hints in the codebase to align with Python 3.10 features.
@aviadlevy aviadlevy marked this pull request as ready for review November 5, 2025 16:48
- Updated the MaskerFormatter to validate the redact parameter during initialization, ensuring it falls within the range of 0 to 100.
- Added unit tests to verify correct handling of valid and invalid redact values, including type conversion from strings to integers.
- Updated module references from `ox_formatter` to `maskerlogger` in examples and init files.
- Improved docstrings in `RegexMatcher` and `AbstractMaskedLogger` classes to clarify functionality and error handling.
- Enhanced error handling in `RegexMatcher` for configuration loading and regex compilation.
- Updated the `timeout` decorator to accept float values and added validation for positive timeout values.
Here's where the magic happens!
Our tool is built upon the powerful Gitleaks tool,
leveraging its default configuration to scan for sensitive data leaks in repositories.
You can find the default configuration [here](https://github.com/gitleaks/gitleaks/blob/master/config/gitleaks.toml)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a bit misleading because our conf is out of date

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll leave it as is for now and since this is only as reference

@aviadlevy aviadlevy changed the title Update project configuration and dependencies chore(release): 1.0.0 – add timeout-safe masking, Aho–Corasick prefilter, and modernize CI/docs Nov 6, 2025
@aviadlevy aviadlevy merged commit 7e2e589 into oxsecurity:main Nov 6, 2025
8 checks passed
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