Lesson256 words
Security and compliance scanning strategy
Design a strategy for security and compliance scanning
Four scan types, four different questions:
| Scan | Asks | Typical tool |
|---|---|---|
| Dependency | Are our third-party components vulnerable? | Dependabot, dependency review |
| Code (SAST) | Does our own code contain vulnerable patterns? | CodeQL |
| Secret | Have credentials been committed? | Secret scanning + push protection |
| Licensing | Are we complying with dependency licences? | Dependency review, feed policy |
Where each belongs
Loading Diagram...
The two ends matter most:
- Push protection blocks a secret before it enters history. Detecting it afterwards means rotating the credential, because the commit is permanent even if you delete the branch.
- Continuous alerting catches vulnerabilities disclosed after your code stopped changing. A repository that has not been committed to for six months can become vulnerable overnight — which is why a "scan on commit only" strategy has a hole in it, and why a nightly scan needs
always: true.
Blocking versus reporting
Block on what is unambiguous and fixable — a committed secret, a known-critical vulnerability with a patched version available. Report on what needs judgement, or you train people to bypass the gate. A scanner that blocks the build on every medium-severity finding gets switched off within a month.
Primary sources