You must introduce DAST against a staging web app that shares a database with other teams. How do you do it safely?
IntermediateScenarioPipeline Security Scanning
Answer
Situation read → Active scans send attack payloads and can create junk data or lock accounts. Shared data makes the blast radius bigger.
What I'd do →
- Start with passive baseline mode:
docker run -t ghcr.io/zaproxy/zaproxy:stable zap-baseline.py -t https://staging.example.com -r report.html. - Get a dedicated test environment or isolated schema for active scans.
- Use test accounts with an authentication script; exclude logout and destructive URLs.
- Run active scans (
zap-full-scan.py) only in a window, with rate limits. - Feed results into the same triage queue as SAST.
Why → Passive scans find missing headers and cookie flags at no risk. Active scans need a safe sandbox.
Interview tip → Say you always get written approval and a scope before active scanning.
More on Pipeline Security Scanning
You are asked to add security to an existing CI pipeline. Where do SAST, SCA, secrets scanning and DAST each go?BeginnerGitleaks flags an AWS access key in a pull request. The developer says it is a test key. What do you do?BeginnerDevelopers fear security scans will slow the pipeline from 6 to 20 minutes. How do you roll them out?BeginnerA SAST tool reports 2,000 findings on a legacy repo the first time you run it. How do you introduce it without freezing delivery?IntermediateA developer insists a scanner finding is a false positive. What is your process?BeginnerSCA flags a critical CVE in a transitive dependency and no patched version exists. What are your options?Intermediate