Skip to content

feat: add repository secret scanning and pre-commit protection - #1065

Merged
ayomideadeniran merged 1 commit into
StellarDevHub:mainfrom
doctorlight0:feat/secret-scanning-precommit
Aug 3, 2026
Merged

feat: add repository secret scanning and pre-commit protection#1065
ayomideadeniran merged 1 commit into
StellarDevHub:mainfrom
doctorlight0:feat/secret-scanning-precommit

Conversation

@doctorlight0

Copy link
Copy Markdown
Contributor

Description

🚀 Feature Overview

Reduce the chance of API keys, wallet secrets, tokens, and private configuration entering version control by adding Gitleaks-based secret scanning to CI and a local pre-commit hook.

Changes

CI (`.github/workflows/secret-scan.yml`)

  • New Secret Scanning workflow using gitleaks/gitleaks-action@v2
  • Runs on every push and pull request to main/master
  • Fails the workflow when a potential secret is detected

Configuration (`.gitleaks.toml`)

  • Allowlists CHANGE_THIS_* placeholder values, test-* CI env vars
  • Excludes test fixture files, snapshots, and generated output directories
  • Prevents noisy failures on known non-secret patterns

Local Pre-commit (`.pre-commit-config.yaml`)

  • Gitleaks hook with the same configuration used in CI
  • Installation: pip install pre-commit && pre-commit install

Policy (`docs/governance/SECRET_SCANNING_POLICY.md`)

  • Secret rotation instructions by type (API key, DB password, JWT, wallet key, webhook secret)
  • Git history remediation steps using git filter-repo
  • Allowlist governance rules (narrowly scoped, documented, reviewable)
  • CI log auditing guidance

Acceptance Criteria Met

  • CI fails on credible secrets introduced in a pull request
  • Known non-secret placeholders do not create noisy failures
  • Contributors can run the same scan locally via pre-commit
  • Policy explains rotation and history-remediation steps
  • No real credentials are committed while implementing the workflow

Related Issues

Closes #893

- Add gitleaks GitHub Actions workflow for push and PR scanning
- Create .gitleaks.toml with allowlist for CHANGE_THIS_* placeholders
  and test fixtures to prevent noisy failures
- Add .pre-commit-config.yaml for local gitleaks hook
- Create secret scanning policy with rotation and history-remediation steps

Closes StellarDevHub#893
@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

@doctorlight0 is attempting to deploy a commit to the Ayomide Adeniran's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 30, 2026

Copy link
Copy Markdown

@doctorlight0 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@ayomideadeniran

Copy link
Copy Markdown
Contributor

pr under review

@ayomideadeniran
ayomideadeniran merged commit 09baac2 into StellarDevHub:main Aug 3, 2026
1 check failed
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.

[Security] Add repository secret scanning and pre-commit protection

2 participants