The InSpec CIS profile fails `PasswordAuthentication should be no` on the golden AMI, although the Ansible hardening role sets it in `/etc/ssh/sshd_config`
IntermediateTroubleshootingDAST, runtime detection and compliance scans
Answer
Likely causes → On recent Ubuntu, Debian and RHEL releases, sshd_config starts with Include /etc/ssh/sshd_config.d/*.conf, and sshd uses the first value it reads. A drop-in like 50-cloud-init.conf setting PasswordAuthentication yes wins over your line further down.
Diagnose →
sudo sshd -T | grep -i passwordauthentication # effective config
grep -ri passwordauthentication /etc/ssh/sshd_config.d/
Fix → Write your hardening as a drop-in that sorts first (for example /etc/ssh/sshd_config.d/00-hardening.conf), or remove the conflicting drop-in, then run sshd -t && systemctl reload ssh.
Prevent → Test with the effective config (sshd -T) in the image pipeline. InSpec's sshd_active_config resource checks the running state.
More on DAST, runtime detection and compliance scans
The ZAP baseline scan of your React SPA finishes in 40 seconds with only header warnings and no real findingsIntermediateThe authenticated ZAP full scan only ever tests the login page and `/logout`, and the report shows mostly `302` responsesIntermediate`zap-baseline.py` fails the pipeline with exit code 2 even though the report has no high-risk alertsBeginnerThe DAST job reports nothing, and its log shows mostly `403` and `429` responsesBeginnerAn active DAST scan against staging created 12,000 junk records and sent password-reset emails to real customer addresses copied from prodIntermediateNuclei runs in CI against staging and reports nothing for a known exposed `/.git/config`Beginner