Skip to content

feat: add Gitleaks config and CI workflow#22

Open
stevefulme1 wants to merge 1 commit intoredhat-cop:mainfrom
stevefulme1:feat/gitleaks-configuration
Open

feat: add Gitleaks config and CI workflow#22
stevefulme1 wants to merge 1 commit intoredhat-cop:mainfrom
stevefulme1:feat/gitleaks-configuration

Conversation

@stevefulme1
Copy link
Copy Markdown

Summary

  • Adds .gitleaks.toml with default rules extended by custom Ansible-specific credential detection patterns (OpenShift API keys, Automation Hub tokens, container registry passwords)
  • Configures allowlists for placeholder values (changeme), Jinja2 template variables ({{ }}), Ansible Vault references, example domains, and YAML comments
  • Adds path-based allowlists for defaults/main.yml and inventory.yml where variable declarations use block scalar indicators
  • Adds .github/workflows/gitleaks.yml GitHub Actions workflow to run Gitleaks on pushes to main and all PRs
  • Complements the existing Gitleaks pre-commit hook in .pre-commit-config.yaml

Related

  • Resolves: MFG-376

Test plan

  • Verify gitleaks detect --config .gitleaks.toml --no-git reports no false positives on the current codebase
  • Verify the GitHub Actions workflow triggers on PR creation
  • Test that a commit containing a real secret (e.g., a test API key) is detected and flagged
  • Confirm pre-commit hook still works with the new config file

🤖 Generated with Claude Code

Adds .gitleaks.toml with custom rules for Ansible-specific credential
patterns (OpenShift API keys, Automation Hub tokens, container registry
passwords) and allowlists for placeholder values and Jinja2 templates.
Adds a GitHub Actions workflow to run Gitleaks on pushes and PRs.

Resolves: MFG-376

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant