Adding a security scan to one repo takes an afternoon. Adding it to twenty-plus repositories, and keeping them consistent, is a different problem. Copy-pasted YAML drifts within weeks. Here’s the approach that worked for rolling out SAST (Veracode), code quality (SonarQube) and dependency remediation.
One workflow, many callers
GitHub Actions reusable workflows let you define the pipeline once, in a central repo:
# org/ci-templates/.github/workflows/security.yml
on:
workflow_call:
inputs:
language: { type: string, required: true }
secrets:
SONAR_TOKEN: { required: true }
jobs:
sonar:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# ... build, test with coverage, scan
Each product repo just calls it:
jobs:
security:
uses: org/ci-templates/.github/workflows/security.yml@v1
with: { language: node }
secrets: inherit
Fixing or upgrading a scanner now means one pull request, then bumping the tag.
Roll out in two phases
Turning on a hard gate on day one blocks every team at once. Instead:
- Report-only. Run the scans, publish results, fail nothing. This gives you a baseline per repo.
- Gate on new issues. Fail builds only on new findings above a severity threshold, while the backlog gets worked down separately.
Work the backlog like product work
Dependency findings are mostly upgrades. Group them by fix, not by repo: one framework bump can close findings in ten places. Track them on a board with owners. Some fixes are real migrations (a bundler major, say) and deserve their own ticket and review.
Make it visible
- Post results to the team channel with a reusable notification workflow, so nobody has to go looking.
- Keep a simple scoreboard: findings open per repo, trend over time.
The technical setup was the easy part. Consistency, a gentle rollout and clear ownership are what made scanning stick.