Repository navigation
Enhance pre-commit configuration to include secret scanning and branch protection - #131
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Coverage variation | ✅ +0.00% coverage variation (-1.00%) |
| Diff coverage | ✅ ∅ diff coverage |
Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (9c277f9) 1848 1747 94.53% Head commit (62dac69) 1848 (+0) 1747 (+0) 94.53% (+0.00%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>
Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#131) 0 0 ∅ (not applicable) Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Pull Request
This pull request enhances the project's code quality and security checks by expanding and updating the pre-commit hook configuration, introducing secret scanning, and improving documentation. The main changes focus on adding new pre-commit hooks, integrating secret scanning with gitleaks, and updating CI and contributor documentation to reflect these improvements.
Pre-commit hook additions and improvements:
.pre-commit-config.yaml, including checks for large files, executable scripts, private keys, and branch protection to prevent direct commits to protected branches (main,dev,master,testing). Also integrated thegitleakssecret scanning hook.actionlint), JSON schema validation (check-jsonschema), Dependabot config checking, and Python project validation (validate-pyproject).Secret scanning configuration:
.gitleaks.tomlconfiguration file to define shared secret scanning settings, enable default rules, disable noisy generic rules, and allow certain patterns in third-party or vendor files.Continuous Integration (CI) enhancements:
.github/workflows/ci.ymlto skip local-only pre-commit hooks (branch guard and secret scan) during CI runs, since push protection is already enforced by GitHub.Documentation updates:
CONTRIBUTING.mdto inform contributors about the new secret scanning and branch protection hooks, clarifying that these checks now run on every commit and in CI.Checklist
pytest)pre-commit run --all-files)permissions:and avoidpull_request_targetunless strictly necessary