Module 23 · DevSecOps & Application Security · Lesson 68 of 75
Security tools in the CI/CD pipeline
SAST, SCA, secrets scanning, infrastructure-as-code and container scanning, and DAST: what each finds, where it runs, and how to stop them drowning developers in noise.
In this lesson · about 45 minutes
- Match each type of security scanner to what it finds
- Place scanners at the right stages of a pipeline
- Run secrets, SAST, dependency and image scans and read the results
The scanners
| Type | Looks at | Finds | Examples |
|---|---|---|---|
| Secrets scanning | Code and git history | Keys, passwords, tokens | Gitleaks, TruffleHog, GitHub secret scanning |
| SAST (static) | Source code, not running | Injection, unsafe functions, hard-coded crypto keys | Semgrep, CodeQL, SonarQube, Bandit (Python) |
| SCA (software composition) | Dependencies | Known CVEs in libraries, licence issues | Dependabot, OWASP Dependency-Check, Snyk, npm audit, pip-audit |
| IaC scanning | Terraform, CloudFormation, Kubernetes YAML | Public buckets, open security groups, privileged pods | Checkov, tfsec/Trivy, KICS |
| Container scanning | Images | Vulnerable OS packages, running as root | Trivy, Grype, Docker Scout |
| DAST (dynamic) | The running app | XSS, misconfigured headers, auth issues | OWASP ZAP, Burp Suite Enterprise, Nuclei |
| IAST / RASP | Instrumented running app | Flaws seen from inside at test or run time | Agent-based commercial tools |
Where they run
- Pre-commit on the developer's laptop: secrets scanning (catch the key before it ever reaches git).
- Pull request: SAST, SCA, IaC scan; results shown as review comments.
- Build: container scan of the image; generate an SBOM; sign the artefact.
- Staging: DAST against the deployed app.
- Production: continuous dependency alerts, runtime protection, monitoring.
Making it work for people
- Break the build only on high-confidence, high-severity findings (a live secret, a critical CVE with a fix available). Report the rest.
- Tune rules and suppress false positives with a reason; noisy tools get ignored.
- Show the fix, not just the problem (Dependabot opens the upgrade PR for you).
- Track metrics: mean time to remediate, open criticals per team.
- Security champions in each team spread knowledge faster than a central team can.
If a secret is committed
Removing it from the latest commit is not enough: it is still in git history and may already be copied. Revoke and rotate the secret first, then clean history if needed, and check logs for use of the leaked key.
Try it · watch it run
Watch a pipeline catch problems
Switch on one or more problems (a pasted key, SQL injection, an old library, a public bucket, an old base image, missing headers), run the pipeline, and see which gate catches each one and what the fix is.
Put problems in the code
1. Secret scan
Gitleaks
2. SAST
Semgrep
3. Dependencies
npm audit / Trivy fs
4. IaC scan
Checkov
5. Build + image scan
Trivy image
6. DAST on staging
OWASP ZAP
Push to run the pipeline.
Hands-on lab (simulated terminal)
Lab: scan a project before it ships
The shop-api repository is about to be released. Run the same checks the pipeline will. Output is simulated; the key is fake.
Step 1 of 5. Type each command and press Enter. Nothing runs on your computer.
1. Scan the repository and its git history for secrets with Gitleaks.
Check your understanding0 of 4 correct
Quiz score: 0 of 4
Written by Noviq Academy in its own words. All labs are simulations: no real systems are touched, and every name, address, password and hash is made up. The offensive techniques taught here are for defending systems and for authorised testing only; never scan, access or test a system without the owner's written permission. Tool and product names belong to their owners, and command output may differ slightly from yours. Read-aloud uses your device's built-in voices.