Quick interview answer
Dependency scanning and secret scanning on every commit, SAST on PRs, and a ZAP baseline scan against a deployed environment nightly — fail on new high findings only.
Detailed explanation
Automate the cheap, high-signal checks first: dependency CVEs and committed secrets take minutes and catch real issues. ZAP's baseline scan is passive and safe to run against staging on a schedule, while an authenticated active scan needs coordination because it writes data. Gate on new findings rather than the absolute count, otherwise a legacy backlog makes the gate permanently red and it gets disabled. Never point an active scanner at production or a shared environment without written agreement.
1security:2 steps:3 - run: mvn -B org.owasp:dependency-check-maven:check -DfailBuildOnCVSS=74 - uses: gitleaks/gitleaks-action@v25 - name: ZAP baseline6 run: |7 docker run --rm -v "$PWD:/zap/wrk" ghcr.io/zaproxy/zaproxy:stable \8 zap-baseline.py -t https://staging.shop.example.com \9 -c zap-rules.conf -r zap-report.html || true10 - run: python3 ci/fail_on_new_findings.py zap-report.html baseline.jsonReal-world example
A nightly ZAP baseline caught a missing Content-Security-Policy header introduced by a CDN configuration change.
Interview tip
Say 'gate on new findings, not totals' and 'never active-scan production' — both are judgement signals.
