Compliance Automation and Tooling Questions
Using technology to make compliance continuous rather than point-in-time. Covers GRC platforms and control libraries (build versus buy, one control set mapped to many regulations, requirement-to-evidence traceability, risk roll-ups), compliance-as-code and policy-as-code checks mapped to framework controls (including testing, versioning and retiring the rules, and turning local legal and privacy obligations such as retention and masking into machine-checkable tests), continuous control monitoring and drift alerts, automated evidence collection and tamper-evident evidence pipelines for auditors, automated compliance and privacy reporting with traceable lineage (including regulatory SLA tracking such as DSAR deadlines), and wiring compliance checks into engineering pipelines without slowing teams. Focuses on what to automate first, how to map controls to machine-checkable tests, where to place checks, and the limits of automation. Does not cover designing or testing the controls themselves, the content of individual frameworks, hands-on security mechanics such as secrets, IAM, scanning or logging pipelines, or conducting the audit.
You are advising a team that must show continuous compliance for its cloud workloads, and the budget allows checks at only some points: before deploy, against the live cloud configuration, or from runtime and log signals. How would you decide where to place checks, what blind spots and false positives each placement brings, and how would you combine them?
Sample Answer
Direct answer
If the budget allows one placement, I would start with checks against the live cloud configuration, because it shows what actually exists and is the strongest evidence of continuous compliance. I would add pre-deploy checks next, driven by the same rules, because they stop problems cheaply, and use runtime and log signals only for the controls the other two cannot see. The three placements are not alternatives to rank; they answer different questions.
The three placements
Read the first row of the table first: each placement answers a different question, and the rows below it say where that placement is blind. Infrastructure-as-code means describing cloud resources in files (Terraform is a common tool) that a pipeline applies, instead of clicking in a console.
| Pre-deploy (infrastructure-as-code and pipeline) | Live cloud configuration | Runtime and log signals | |
|---|---|---|---|
| Question answered | Would this change break a rule? | Is this resource compliant right now? | Is the control actually working or being bypassed? |
| Strength | Cheapest fix, blocks before exposure, developer feedback in minutes | Ground truth for every resource, including out-of-band changes (made outside the pipeline, such as a console click) | Sees behaviour: real access, unusual admin activity |
| Blind spots | Anything created outside the pipeline, drift after deploy (a live setting changing away from what the code said), settings only known at runtime | Short window between change and next scan, no view of behaviour | Slow, noisy, needs good logs, silent about quiet misconfigurations |
| Typical false positives | Rule sees code, not the effective result (for example flags a bucket ACL (access control list) that an account-level public access block, a single AWS switch for the whole account that overrides public settings on its buckets, already overrides) | Tolerated exceptions, resources mid-deployment, ephemeral (short-lived, temporary) test accounts | Legitimate admin work and batch jobs that look like attacks |
| Preferred when | Most infrastructure goes through code and review | Evidence for auditors, mixed or legacy estates | Controls about behaviour: who used access, detection coverage |
Deciding where to put the first check
- What share of infrastructure is created through code? Suppose 400 of 500 buckets come from code (80%). Pre-deploy checks can then see 400 of them and miss the other 100, which only a live scan reaches; the higher the share, the more of the problem pre-deploy catches.
- Is there drift or manual change today? If yes, live configuration is mandatory, since pre-deploy cannot see it.
- Is the control about configuration or behaviour? Encryption and public exposure are configuration; "admins only use MFA" and "detections fire" are behavioural.
- What does the auditor accept as evidence? Live state with timestamps is the easiest to defend.
Combining them with one rule set
Write each rule once, tag it with the control it supports, and run it at two points. Disagreement is signal: a pass at deploy and a fail live means drift or an out-of-band change, so reconcile results by control and resource. Reserve runtime signals for a short list (privileged access use, detection of the control being disabled).
Worked example: a public storage bucket
- Pre-deploy: the plan shows
aws_s3_bucket_acl.sitewithacl = "public-read". A rule likeACL 'public-read' makes the bucket publicly readablefails the pipeline step, so the merge is blocked (or passes it with a note if the account-level block applies). - Live: a console user flips another bucket public at 3pm. The AWS Config rule
S3_BUCKET_PUBLIC_READ_PROHIBITED(it checks Block Public Access, the bucket policy and the ACL) re-evaluates on the configuration change and marks that bucket NON_COMPLIANT within minutes; a periodic scan would catch it at the next run. - Runtime: the bucket's access logs show GET requests where the requester field is
-(an unauthenticated request) with operationREST.GET.OBJECT, which turns a misconfiguration into a possible incident.
What would change the call
Mostly code-driven shop with strong review: pre-deploy first. Heavy regulatory detection requirement: raise runtime priority. Very small team: a managed live-posture service (a cloud or vendor product, such as AWS Security Hub or Microsoft Defender for Cloud, that runs configuration checks against your live accounts for you) with a short rule list beats a custom stack.
A global enterprise wants one control library that maps to many regulations and frameworks, and regulations keep changing. How would you decide between buying a GRC platform and building your own, how would you structure the crosswalk so one change updates everything affected, and which systems would you integrate first?
Sample Answer
Direct answer
I would buy a GRC platform for the workflow, evidence collection and auditor-facing views, and build a thin layer of my own for what must stay portable: the unified control library and the crosswalk, stored as structured data I own and can export. Buy the commodity, own the model. That avoids a year of building ticket-and-workflow software while avoiding lock-in on the part that encodes the company's own control decisions.
Key terms
- GRC (governance, risk and compliance): software that holds controls, risks, policies, evidence and audit workflows.
- Crosswalk: a mapping that links one control to every framework requirement it satisfies.
- Unified control library: one set of company controls, each with one owner and one test, mapped to many frameworks, instead of separate control sets per framework.
- SOC 2: an auditor's report on whether a company's security controls work, issued under the American Institute of CPAs (AICPA) criteria. ISO 27001: the international standard for running an information security management system. NIST SP 800-53: a US government catalog of security controls, where IA-2(1) is the entry requiring multi-factor authentication (a second proof of identity beyond a password) for privileged accounts.
- Lock-in: being unable to leave a vendor without losing, or having to rebuild, your own data and decisions.
Buy versus build
| Factor | Leans buy | Leans build |
|---|---|---|
| Frameworks | Several common published ones (the SOC 2, ISO 27001 and NIST frameworks above) | Unusual or internal-only |
| Team | Small compliance team, few engineers to spare | Strong platform team, existing data stack |
| Integrations | Vendor has connectors for your systems | Mostly homegrown systems |
| Time to first audit | Soon | Flexible |
| Cost | License plus administration | Engineers plus maintenance forever |
| Lock-in | Can export controls and mappings | Full control |
Illustrative cost, same annual basis: buy is a 120k license plus half an administrator at 150k loaded (salary plus benefits and overhead), which is 75k, 195k per year; build is 1.5 engineers at 150k, 225k per year, before the cost of maintenance and not shipping product work. The numbers are invented for the comparison; the point is that costs are close, so capability and time decide. I would flip to build if the estate is mostly custom systems the vendor cannot connect to, or no vendor can model the company's frameworks.
Crosswalk structure so one change updates everything
Keep four linked layers, each versioned:
- Framework requirement: framework, version, clause id, text.
- Mapping (many to many: one requirement can map to several controls, and one control to several requirements): requirement to unified control, with strength (full or partial), reviewer and date.
- Unified control: statement, owner, test, systems in scope.
- Test and evidence: result, timestamp, artifact.
Filled in for one control (illustrative values), the four layers look like this:
| Layer | Row |
|---|---|
| Requirement | NIST SP 800-53 r5, IA-2(1), "multi-factor authentication for access to privileged accounts" |
| Requirement | ISO/IEC 27001:2022, Annex A 8.5, secure authentication |
| Requirement | SOC 2, CC6.1, logical access security |
| Mapping | IA-2(1) to CTL-MFA-ADMIN, full, reviewer j.doe, 2026-09-12 |
| Mapping | A.8.5 to CTL-MFA-ADMIN, full, reviewer j.doe, 2026-09-12 |
| Mapping | CC6.1 to CTL-MFA-ADMIN, partial (CC6.1 also needs other controls), reviewer j.doe, 2026-09-12 |
| Control | CTL-MFA-ADMIN, "All administrator accounts require MFA", owner iam-team, test admin_mfa_enforced, systems idp-prod |
| Test and evidence | 2026-10-03, pass, 0 of 41 admins without MFA, artifact a1f09c |
If a framework later renumbers A.8.5, only that requirement row and its mapping row change. The control, its test and the evidence history stay untouched.
Because requirements point at controls rather than at each other, changing one control's test updates every framework it supports. A new framework revision adds new requirement rows, and the diff immediately lists controls with unmapped new requirements. Where available, export in an open format; NIST's OSCAL (Open Security Controls Assessment Language) offers machine-readable catalogs, baselines and assessment data in XML, JSON and YAML.
Using automation to suggest mappings
A language model or text-similarity tool can propose candidate mappings. Store them as suggested, never approved. A person reviews each one; ambiguous requirements are marked partial and escalated to the control owner, counsel or the auditor, who decides what counts. Track the acceptance rate (the share of suggested mappings that reviewers approve), since a low rate means the suggestions are noise.
Which systems to integrate first
- Identity provider: access, MFA and joiner-leaver evidence supports many controls.
- Cloud account and asset inventory: defines scope and supplies configuration checks.
- Ticketing and change management: remediation and approval evidence.
- SIEM (security event log platform): logging and detection evidence, after the basics.
The reason is coverage per integration: identity and inventory feed the most controls for the least effort.
Worked example
Unified control "admins use multi-factor authentication" maps to NIST SP 800-53 IA-2(1) and to the matching SOC 2 (CC6.1) and ISO 27001 (Annex A 8.5) requirements, as the three mapping rows above show. One check against the identity provider updates all three.
Pitfall
Starting with per-framework control lists inside the tool, which recreates the duplication the unified library exists to remove.
Compliance reviews keep landing late in the release cycle for about 100 microservice teams, and engineering leadership wants compliance built into CI/CD without slowing teams down. How would you roll that out, how would you handle teams that need exceptions, and how would you know over time that compliance is not silently drifting?
Sample Answer
Direct answer
Late compliance reviews happen because compliance is a gate at the end instead of a property of the pipeline. I would move the common checks into CI/CD (continuous integration and continuous delivery, the automated build and release pipeline) as shared, versioned rules, introduce them in report-only mode so nobody is blocked while the rules are tuned, give teams a paved road (the easy default path: shared pipeline templates and Terraform modules, which are reusable infrastructure definitions, that already pass the rules), and make exceptions time-boxed and visible. I would prove there is no silent drift with continuous checks on live state, a count of teams that stop reporting, and a deliberately planted bad resource that must be flagged every day.
Rollout sequence
- Pick the first rules from evidence. Rank the findings from the last two quarters of late reviews and automate the most frequent ones first. Write each as: control objective (the outcome the rule protects, such as "storage is not publicly readable"), machine-checkable rule (a test a program can run, such as "no bucket may have a public-read ACL"), and the evidence the check emits (a record of what was tested and the result).
- Report-only pilot. Run the rules in five volunteer teams' pipelines and post results without failing builds. Measure false positives and fix the rules.
- Paved road. Adoption should mean bumping a template version, not writing checks. Teams on the paved road pass by construction.
- Waves. Illustratively 5, 15, 30 and 50 teams, which is 5, 20, 50 and 100 cumulative. A rule flips from warn to enforce for a wave once its false positives are resolved, with an announced date.
- Human review shrinks. The remaining review covers the things a machine cannot judge, such as a new data flow, instead of re-checking encryption flags.
Exceptions
- A request is a pull-request file naming the rule, resource, reason, compensating control (an alternative safeguard that reduces the same risk), an approver and an expiry date. The team's engineering lead can approve low severity. High severity needs security sign-off, so a team cannot approve its own high-risk exception.
- The expiry is enforced by the check itself: after the date the build fails again, with a warning beforehand.
- Publish the exception register. If many teams request an exception to the same rule, the rule is wrong, so fix the rule.
Knowing compliance is not silently drifting
- Live-state checks. Run the same rules on a schedule against what is actually deployed, since a pipeline pass says nothing about later console changes.
- Bypass check. Compare running resources to those the pipeline deployed.
- Silence detection. Alert when a service has produced no recent evidence record. A team that stops reporting is silent drift that a green dashboard can never show, because no failing check is ever produced.
- Canary. Keep a deliberately noncompliant resource in a test account. If the daily run does not flag it, the monitoring itself is broken.
- Trends. Track violations per service, exception age and time to fix, and review them with leadership monthly.
Worked example
A team's Terraform change adds a bucket with a public ACL (an access setting that lets anyone read it). The control objective is "storage is not publicly readable" and the rule fails any bucket whose ACL is public-read. CI posts a failing message such as:
FAIL s3-no-public-acl: aws_s3_bucket_acl.reports (acl = "public-read") in services/billing/storage.tf. Fix: set acl = "private" or use the shared bucket module. Need an exception? Add a file under compliance/exceptions/.
The same run emits an evidence record naming the rule, its version, the resource, the result and the time. The team repairs the change in the same pull request, so the issue never reaches a late review.
Trade-offs
Enforcing too early generates false positives and teams route around the checks. Enforcing too late keeps the late reviews. Warn-first with an announced enforce date is the compromise, and the paved road is what makes it cheap enough for 100 teams.
A client has a backlog of open SOC 2 Type II remediation items and a 12-month observation window starting in a few months. Which controls would you automate first, which would you deliberately leave manual, and how would you show sustained operation across the window without drowning the team?
Sample Answer
Direct answer
A SOC 2 Type II report (an auditor's opinion, under the American Institute of CPAs Trust Services Criteria, on whether controls operated effectively over a period; Type I only checks design at one date) rewards controls that run the same way every day and leave evidence as a by-product. So I would first close the remediation items that would fail inside the window, automate controls that are frequent, binary and machine-observable, and keep controls that need human judgment manual but on a light, calendared rhythm. Which evidence the auditor accepts is the auditor's decision, so I would agree evidence formats and sampling approach with them before the window opens.
Before the window opens (remediation acceleration)
- Triage the backlog by one question: would this item show up as an exception (a control not operating as described) during the window? Those come first.
- Fix root causes, not instances: one hardened infrastructure-as-code module fixes every future bucket, where 40 hand-fixed buckets fix 40.
- Freeze changes to control design about two weeks before the start, so the controls described to the auditor are the controls that run.
- Run a dry run: pull the evidence you would hand over and check it is complete.
Automate first
| Control area | Automate | Evidence kept over the window |
|---|---|---|
| Cloud configuration baseline (encryption, public access, logging) | Daily compliance check | One dated result per run: 365 runs in a 365-day window |
| Joiner/leaver access (people joining and leaving the company) | Offboarding triggered by the HR system through the identity provider; MFA enforced as a setting and checked | Full list of leavers with removal timestamps |
| Change management | Branch protection, required review, CI gates enforced by the platform | Pull-request metadata for every production change |
| Vulnerability remediation | SLA clock and report generated automatically | Open findings with age against SLA |
| Backups | Job success and failure alerting | Job logs for each run |
Deliberately manual
| Control | Why it stays manual |
|---|---|
| Quarterly user access review sign-off | A person must attest (sign a statement that they reviewed the list and agree it is right); automate the report preparation, never the attestation |
| Annual risk assessment | Judgment about likelihood and impact |
| Incident response tabletop (the response team talks through a made-up incident) | Tests people, not systems |
| Vendor risk reviews | Needs reading contracts and reports |
| Policy approval and management review (leadership periodically reviews control results and signs off) | Accountability sits with named executives |
Automating an attestation produces rubber-stamping, which is false assurance: the evidence exists but nobody decided anything. Also keep restore testing manual or semi-manual, because a backup job that succeeds does not prove a usable restore.
Sustained operation without drowning the team
- Manual touchpoints are calendared: monthly exception and drift review (12), quarterly access review (4), annual risk assessment (1), annual tabletop (1). That is 18 human events across the window for these four touchpoints, set up as recurring calendar invites with the evidence template attached. The other manual controls (vendor risk reviews, policy approval and management review, restore tests) run on their own calendared cadence on top of those 18, so agree that cadence with their owners up front rather than discovering it mid-window.
- Evidence collects itself into a store with timestamps. Keep the complete population (every leaver, every production change), not just the items you would pick, because the auditor chooses the sample from the population and a missing population list becomes a finding. Illustratively, if 40 people left during the window, the auditor might pick 10 of them and ask for each one's HR end date and the time their account was disabled; those 10 come from your list of 40. If your list holds only 31 names because the HR and identity records disagree, 9 leavers are unaccounted for, and that gap is a finding before any of the 10 is tested. If 1 of the 10 was disabled late, that is a 10% deviation rate in the sample, recorded as an exception with its fix.
- Alert on collector failure. A silent gap in evidence looks identical to a control that stopped working.
- When a control fails mid-window, log it, fix it, record the dated correction. The auditor decides how a noted exception affects the opinion; hiding it is far worse than showing a fast fix.
Trade-offs and what would change my call
Automation costs build time and creates a second thing to maintain, so a control that runs once a year is not worth automating. If the observation window is shorter than 12 months, there are fewer sample points and manual evidence becomes more affordable. If the auditor will not accept system-generated evidence for a control, I would keep a thin manual wrapper rather than argue.
Your product ships in ten countries with different consumer-protection and data laws, and teams keep adding markets. How would you turn those local legal requirements into automated checks in the delivery pipeline, decide which requirements still need a human approval, and keep the approach manageable as law changes and teams multiply?
Sample Answer
Direct answer
Build the obligation as data and the checks as code: counsel and the privacy or compliance team translate each local legal requirement into a plain-language control, engineers turn the objectively testable ones into pipeline checks tagged by market (consumer-protection law covers things like fair advertising, pricing display and refunds), and the judgement-heavy ones become a documented human approval. Adding a market then means adding a configuration file, not designing a new pipeline.
Step 1: A single obligation register
For each requirement keep: jurisdiction, source citation and effective date, the internal control statement in plain English, an owner, how it is tested (automated, manual or both) and the status. Lawyers interpret the law; engineers do not. You are translating counsel's interpretation into tests, and recording who decided.
Step 2: Sort every requirement into three tiers
| Tier | Example | Handling |
|---|---|---|
| Machine-checkable | No non-essential trackers fire before consent (EU ePrivacy Directive Article 5(3), the EU rule on cookies and similar trackers, requires prior informed consent for storing or accessing information on a user's device, with exceptions for strictly necessary use); data stored only in allowed regions; the market's privacy notice version exists | Automated check, blocks release |
| Presence checkable | A data protection impact assessment (DPIA, GDPR Article 35, which requires an assessment of the privacy risks before processing that is likely to be high risk) exists and is linked for a high-risk feature | Pipeline checks the artifact exists and is approved; a person judged its content |
| Judgement | Whether a consent screen is misleading, whether marketing copy meets local consumer-protection wording | Human approval from legal, recorded in the release |
Step 3: Structure for scale
- A core rule library (one definition per rule) plus a per-market manifest listing which rules apply and with which parameters (allowed regions, retention limits, notice locale).
- The pipeline reads the manifest of every market a release targets and runs only those rules. New market means a new manifest, plus new rules only where law differs.
- Every rule has fixture tests (small saved examples, one that must pass and one that must fail, which the rule is run against whenever it changes), so changing a rule is safe.
- A central platform team owns the engine; product teams self-serve through manifests. A shared template means 50 teams do not each build their own checks.
What the register and manifest look like
One register row, with illustrative values:
| Field | Value |
|---|---|
| ID | EU-CONSENT-01 |
| Jurisdiction and source | EU, ePrivacy Directive Article 5(3) (national law may add detail) |
| Control statement | No non-essential tracker loads before the user consents |
| Owner | Privacy counsel (interpretation), web platform team (check) |
| Test | Automated: load the staging site with no consent given and count requests to non-essential tracker domains; pass means 0 |
| Status | Active from the market's launch date; review date set |
One market manifest, a small configuration file the pipeline reads (values illustrative):
market: DE
rules:
- id: consent-before-tracking
params: { max_tracker_requests_before_consent: 0, banner_locale: de }
- id: data-region
params: { allowed_regions: [eu-central-1, eu-west-1] }
- id: privacy-notice-version
params: { locale: de, min_version: 4 }
- id: dpia-linked
params: { required_for: high_risk_features }
The rules themselves live once in the core library; the manifest only chooses them and sets their parameters. A fixture test for consent-before-tracking would hold two saved page loads: one that fires 0 tracker requests before consent (must pass) and one that fires 2 (must fail). Adding another market means copying a manifest and changing its values, and writing a new rule only where that market's law genuinely differs.
Step 4: Change in law
Counsel or a regulatory-monitoring service raises changes; each becomes a register entry with an effective date and an owner. Updated rules are versioned and switched on at the effective date, with a warning period where the check reports but does not block. Release gates evaluate rules in force on the release date.
Where automation stops
Interpretation, balancing tests (weighing the company's interest in using data against the individual's rights) and legal risk acceptance stay with counsel. The pipeline proves that required artifacts and technical conditions exist; it does not prove the law is satisfied. Keep human approval narrow: ask only for the tier-three items, so the gate is not a queue for everything.
Worked example
A team launches in a new EU market: the manifest enables four checks (consent-before-tracking, data-region, privacy-notice-version and dpia-linked). The first three pass. The dpia-linked check passes on presence, because a DPIA exists and is linked, but the feature uses a new data category the DPIA did not cover, so the register flags legal approval. The release proceeds when legal signs. Nothing was hand-built for this market.
Pitfalls
- Treating a green pipeline as legal clearance.
- Rules that only counsel can read; keep the plain-language statement next to each test.
- Stale rules after a law changes, which is why each rule carries a review date.
That is every published Compliance Automation and Tooling question for Solutions Architect so far. Browse the other topics in this category, or practice this one interactively.