Skip to content

feat(security): Add comprehensive secret detection system#214

Open
pseegaha wants to merge 5 commits intoMSDLLCpapers:mainfrom
pseegaha:CDW-1623
Open

feat(security): Add comprehensive secret detection system#214
pseegaha wants to merge 5 commits intoMSDLLCpapers:mainfrom
pseegaha:CDW-1623

Conversation

@pseegaha
Copy link
Copy Markdown
Collaborator

Implement multi-layer secret detection to prevent API keys and sensitive information from being committed to the repository.

Features:

  • Pre-commit hooks with detect-secrets, gitleaks, and detect-private-key
  • GitHub Actions workflow for CI/CD secret scanning with TruffleHog
  • Custom patterns for organization-specific secrets
  • Comprehensive documentation and quick reference guides
  • Automated setup scripts for Windows (PowerShell) and Linux/Mac (Bash)
  • .env.example template for developers

All acceptance criteria met:
✅ Automatically detect keys being committed
✅ Prevent committing of keys to repository
✅ Detect key commitments sooner (seconds vs hours/days)

Files: 9 added, 1 modified

Implement multi-layer secret detection to prevent API keys and sensitive
information from being committed to the repository.

Features:
- Pre-commit hooks with detect-secrets, gitleaks, and detect-private-key
- GitHub Actions workflow for CI/CD secret scanning with TruffleHog
- Custom patterns for organization-specific secrets
- Comprehensive documentation and quick reference guides
- Automated setup scripts for Windows (PowerShell) and Linux/Mac (Bash)
- .env.example template for developers

All acceptance criteria met:
✅ Automatically detect keys being committed
✅ Prevent committing of keys to repository
✅ Detect key commitments sooner (seconds vs hours/days)

Files: 9 added, 1 modified
pseegaha and others added 4 commits March 17, 2026 18:23
- Add license check to make Gitleaks conditional on GITLEAKS_LICENSE secret
- Skip Gitleaks with message if license not configured
- Replace interactive detect-secrets audit with baseline comparison
- Use detect-secrets scan --baseline to avoid EOFError
- Improve summary job failure condition formatting

Fixes workflow failures in CI/CD environment
The detect-secrets scan command does not support --baseline flag.
Use diff to compare new scan results with baseline file instead.
This avoids both the EOFError from interactive audit and the
invalid flag error.
Use jq to parse JSON and count actual secrets instead of diff.
This correctly identifies new secrets by comparing counts,
avoiding issues with metadata/timestamp differences in JSON files.
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