Source:
ocean/docs/security-scanning-migration.md| ✏️ Edit on GitHub
Security Scanning Migration Guide
This document outlines the migration from third-party security scanning tools to GitHub native security features.
Migration Overview
We've migrated from multiple third-party tools to GitHub's native security features:
Before
- Secret Scanning: Gitleaks, TruffleHog, detect-secrets
- Code Scanning: None
- Configuration: Multiple config files and custom workflows
After
- Secret Scanning: GitHub Secret Scanning (automatic)
- Code Scanning: GitHub CodeQL
- Configuration: Single workflow file
Changes Made
-
Removed Third-Party Tools:
- Deleted
.github/workflows/secret-scanning.yml - Deleted
.gitleaks.toml - Deleted
.secrets.baseline - Removed gitleaks from pre-commit hooks
- Deleted
-
Added GitHub Native Tools:
- Created
.github/workflows/security-scanning.ymlfor CodeQL - GitHub Secret Scanning is automatically enabled
- Created
-
Security Improvements:
- Removed hardcoded PostHog API key from source
- Moved
posthog-edge.tsto server-only location - Fixed environment variable usage (no VITE_ prefix for server-side)
GitHub Security Features
Secret Scanning
- Automatic: No workflow required
- Coverage: Scans all commits, PRs, and issues
- Alerts: Appear in Security tab
- Partners: Direct notification to service providers
Code Scanning (CodeQL)
- Languages: JavaScript/TypeScript
- Schedule: On push, PR, and weekly
- Queries: Security and quality checks
- Results: Appear in Security tab and PR checks
Required Repository Settings
Enable these in Settings → Security & analysis:
- ✅ Dependency graph
- ✅ Dependabot alerts
- ✅ Dependabot security updates
- ✅ Secret scanning
- ✅ Code scanning
Environment Variables
Update your environment to include:
POSTHOG_API_KEY- Server-side PostHog API key (not VITE_ prefixed)
Benefits
- Simplified: One tool instead of three
- Integrated: Native GitHub UI and alerts
- Maintained: No dependency updates needed
- Free: Included in GitHub plan
- Accurate: Fewer false positives
Notes
- The
.secrets-config.jsonfor rotation tracking is kept as it serves a different purpose security-check.ymlworkflow continues to monitor secret rotation- All security alerts now appear in the GitHub Security tab