Skip to content

Enhance pre-commit configuration to include secret scanning and branch protection - #131

Merged
Ajimaru merged 1 commit into
devfrom
chore/hooks-followup
Dec 2, 2026
Merged

Ajimaru merged 1 commit into
devfrom
chore/hooks-followup

Conversation

@Ajimaru

@Ajimaru Ajimaru commented Dec 2, 2026

Copy link
Copy Markdown
Owner

Pull Request

  • What does this change do?

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:

  • Added several new pre-commit hooks to .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 the gitleaks secret scanning hook.
  • Included additional hooks for GitHub Actions linting (actionlint), JSON schema validation (check-jsonschema), Dependabot config checking, and Python project validation (validate-pyproject).

Secret scanning configuration:

  • Introduced a .gitleaks.toml configuration 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:

  • Updated the CI workflow in .github/workflows/ci.yml to skip local-only pre-commit hooks (branch guard and secret scan) during CI runs, since push protection is already enforced by GitHub.

Documentation updates:

  • Revised CONTRIBUTING.md to inform contributors about the new secret scanning and branch protection hooks, clarifying that these checks now run on every commit and in CI.

Checklist

  • Public-facing text is in English
  • Tests pass (pytest)
  • Lint/formatting passes (pre-commit run --all-files)
  • Docs updated (if needed)
  • Workflow changes (if any) keep least-privilege permissions: and avoid pull_request_target unless strictly necessary

@Ajimaru Ajimaru self-assigned this Dec 2, 2026
@Ajimaru Ajimaru added the ci CI, build or workflow changes label Dec 2, 2026
@coderabbitai

coderabbitai Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f5acf64f-a89f-48ef-b428-90285d2fc26d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@Ajimaru

Ajimaru commented Dec 2, 2026 •

Copy link
Copy Markdown
Owner Author

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@codacy-production

codacy-production Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Coverage ∅ diff coverage · +0.00% coverage variation

Metric Results
Coverage variation ✅ +0.00% coverage variation (-1.00%)
Diff coverage ✅ ∅ diff coverage

View coverage diff in Codacy

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

codecov Bot commented Dec 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Ajimaru
Ajimaru merged commit 6a5db09 into dev Dec 2, 2026
27 checks passed
@Ajimaru
Ajimaru deleted the chore/hooks-followup branch December 2, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI, build or workflow changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant