Skip to content

Add pre-commit config for repo hygiene and secret detection - #79

Open
Harshaada wants to merge 1 commit into
redhat-data-and-ai:mainfrom
Harshaada:hgaikwad-template-mcp
Open

Add pre-commit config for repo hygiene and secret detection#79
Harshaada wants to merge 1 commit into
redhat-data-and-ai:mainfrom
Harshaada:hgaikwad-template-mcp

Conversation

@Harshaada

Copy link
Copy Markdown

Description

Updated .pre-commit-config.yaml with gitleaks for secret detection.
Updated CONTRIBUTING.md with steps to install and enable pre-commit locally.

Related Issues

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • CI/CD or infrastructure change
  • Dependency update

Checklist

  • My code follows the project's coding standards (Ruff, MyPy, pydocstyle)
  • I have added tests that prove my fix is effective or my feature works
  • All new and existing tests pass (make test)
  • Pre-commit hooks pass (make pre-commit)
  • Code coverage remains >= 80% (make coverage)
  • I have updated documentation where necessary
  • I have updated CHANGELOG.md (if applicable)
  • My PR title follows Conventional Commits format

Testing

Screenshots / Logs

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5e2e38c9-53dd-48ba-a9f7-a2e4209160fb

📥 Commits

Reviewing files that changed from the base of the PR and between 286b9e7 and 0130706.

📒 Files selected for processing (3)
  • .pre-commit-config.yaml
  • CONTRIBUTING.md
  • README.md

📝 Walkthrough

Summary by CodeRabbit

  • Security

    • Added automated detection for private keys and secrets before code is committed.
    • Added guidance for enabling repository secret scanning and push protection.
  • Documentation

    • Updated setup and Quick Start instructions with the new security checks and recommended practices.

Walkthrough

The repository updates pre-commit hooks, enables detect-private-key and Gitleaks, and documents local and GitHub secret-scanning requirements.

Changes

Secret scanning setup

Layer / File(s) Summary
Configure secret-scanning checks
.pre-commit-config.yaml, CONTRIBUTING.md, README.md
The pre-commit configuration upgrades pre-commit-hooks, enables detect-private-key, and adds Gitleaks. Setup documentation identifies these checks and GitHub Secret Scanning and Push Protection requirements.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the pre-commit configuration and secret-detection changes.
Description check ✅ Passed The description accurately covers the Gitleaks configuration and local pre-commit setup documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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