Interview Prep/DevSecOps/DAST, runtime detection and compliance scans

During an investigation you cannot tell who read a production Secret: EKS audit logs show nothing for `get secrets`

AdvancedTroubleshootingDAST, runtime detection and compliance scans
Answer

Likely causes → The audit control-plane log type is not enabled on the cluster. On self-managed clusters, the audit policy may set level: None for Secrets or only log write verbs.

Diagnose →

aws eks describe-cluster --name prod --query 'cluster.logging.clusterLogging'
# self-managed: check --audit-policy-file rules for resources: ["secrets"]

Fix → Enable audit logging going forward:

aws eks update-cluster-config --name prod \
  --logging '{"clusterLogging":[{"types":["audit","authenticator"],"enabled":true}]}'

For self-managed clusters, log Secrets at Metadata level, never Request, which would write secret values into the logs. The past reads cannot be recovered, so assume the secret is exposed and rotate it.

Prevent → Make audit logging part of the cluster baseline, ship logs to a SIEM with retention that meets your compliance needs, and alert on unusual Secret list calls.

All DevSecOps questions Roadmap: Policy as code

More on DAST, runtime detection and compliance scans