Interview › Security & DevSecOps
What is compliance-as-code, and how do you continuously prove compliance? [Advanced]
Answer
Compliance-as-code means expressing compliance controls as automated policies, tests, evidence collection, and continuous monitoring instead of manual screenshots and periodic checks. It helps prove controls are enforced over time, not just documented once.
Technical explanation
Examples include IaC policies, Kubernetes admission policies, CIS benchmark checks, encryption checks, logging checks, and access-review automation.
Evidence should be machine-generated, timestamped, tied to control IDs, and stored in an auditable system.
Manual review still exists for risk acceptance and control design, but routine evidence should be automated.
Hands-on example
Hands-on: map SOC 2 control CC6.1 to automated checks: MFA enabled, admin roles reviewed, no public admin ports, CloudTrail on, production deploy approvals required. Export daily evidence from policy engines and store it with control ID, timestamp, result, and owner.
Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.
More Security & DevSecOps interview questions
- Why do you hash and salt passwords rather than encrypt them? [Advanced]
- What is the difference between encoding, encryption, and hashing? [Advanced]
- What is the difference between a WAF, an IDS, and an IPS? [Advanced]
- How do you prove to an auditor that security controls are enforced continuously, not just documented? [Advanced]
- How do you prevent privilege escalation in a Kubernetes cluster? [Advanced]
- What are Kubernetes Pod Security Standards (privileged, baseline, restricted)? [Advanced]
- What are Linux capabilities, and why drop them in containers? [Advanced]
- What is the difference between authentication and authorization? [Advanced]