What does it mean to decompose a compliance control into automated checks?
answer
- intent sentence versus testable fact
- count the conjunctions
- enabled, retained, immutable, still delivering
- one control, several independent failures
- configuration versus behaviour
basics
~20 sDecomposition turns one control sentence into the separate facts a machine can test. "Audit logging enabled and retained 365 days" becomes distinct checks: a log destination exists, retention is at least 365, tamper-evidence is on, delivery still succeeds.
solid answer
~50 sA control is a sentence about intent, written to be read by a human. A check is a program that returns pass or fail on a specific fact. Decomposition is the work of reading the sentence and listing every assertion it makes, then deciding which of those assertions a machine can evaluate. Take "audit logging is enabled and retained for 365 days on every production account". That is at least four separate assertions: a log destination exists and is switched on; its retention value is 365 days or more; the records cannot be edited or deleted early; and delivery is actually still working right now. Each is a different query against a different field, and each can fail independently. Writing one check called `audit_logging_enabled` looks like coverage but only tests the first assertion, so a trail that exists and has been silently failing delivery for a month still shows green.
go deeper
Be ready to take a control sentence you are handed and read it out as a list of separate assertions, saying which field each one would look at. Naming four for an audit-logging control is the expected answer.
An interviewer expects you to separate configuration facts from behavioural ones and to explain why a freshness query is needed alongside a settings read. Know why compound checks make remediation harder.
Show that you drive the ambiguity out of the sentence with the control owner before writing anything, and that you record which assertions your checks do not cover rather than letting the dashboard imply full coverage.
Own the position that decomposition output is a documented interpretation of the control, not a script. Be able to argue why writing the interpretation down is what makes the automation defensible when the framework or the auditor changes.
## Two different kinds of statement A **control** is a sentence in an audit framework or an internal policy. It is deliberately written in intent language so that it survives changes in technology: it says what must be true, not how you prove it. A **check** is the opposite: a small program that reads a specific field of a specific system and returns pass or fail with an identifier for the thing it examined. Compliance-as-code lives in the gap between those two, and **control decomposition** is the act of crossing it. The reason interviewers open here is that most candidates skip the step. Handed a control, they immediately start writing a rule, and the rule ends up testing the one fact that was easiest to query rather than the assertions the sentence actually makes. ## Worked example: audit-log retention Take a control that reads, in full: *"Audit logging is enabled for every production account and the records are retained for at least 365 days in a form that cannot be altered."* Read it as a list of assertions rather than as a sentence: 1. **A log destination exists and is switched on** for each account in scope. 2. **Its configured retention is at least 365 days** — a number comparison, not a boolean. 3. **The records cannot be altered or deleted early** — an immutability or integrity-validation setting, plus the permissions that would allow an early delete. 4. **Delivery is still succeeding** — the configuration can be perfect while the destination has become unwritable, in which case nothing has been retained since it broke. Four assertions, four independent failure modes, four different fields on (probably) three different objects. Notice how uneven they are: (2) is a trivially machine-readable integer; (4) is a liveness property that needs a freshness query — "an event newer than N hours exists at the destination" — not a configuration read; (3) is partly a setting and partly a statement about who holds a permission. ## Why one control is rarely one check Three structural reasons: - **Conjunctions.** Control sentences are full of *and*, *including*, and *in a form that*. Every conjunction is usually a separate assertion, and a compound check that ANDs them together loses the ability to tell you which half failed — which is exactly what the person remediating needs. - **Different surfaces.** The assertions of one control frequently land on different systems: a cloud configuration export, an identity-provider export, a ticket record, an HR system. There is no single query that spans them. - **Configuration versus behaviour.** "Enabled" is a configuration fact; "retained" is an outcome that only holds if the pipeline kept working. Static configuration checks are cheap and behavioural checks are not, so teams write the cheap one and quietly claim the expensive one. ## The three honest outcomes of a decomposition When you finish listing the assertions, each one lands in one of three buckets, and saying which is part of the deliverable: - **Machine-checkable now** — there is a field you can read and a rule you can write. - **Evidence only** — you cannot decide pass or fail automatically, but you can collect a dated record that a human judges. Approval trails and training completion records look like this. - **Not yours to check** — the assertion is satisfied by a provider under a shared-responsibility split, and the correct artefact is a citation to that boundary rather than a rule you invent. A control can also decompose to **zero** machine checks. That is a legitimate result, not a failure of imagination. ## Arguing about what the sentence says Decomposition is a conversation with the control owner, not a solo reading exercise. Words like *production*, *appropriate*, *timely* and *privileged* are load-bearing and undefined; someone has to pin them down before a rule can exist, and the pinned-down version has to be written next to the control so the auditor sees the same interpretation you encoded. "Production" meaning "anything tagged env=prod" is a decision with consequences, and it belongs in the record. ## How this is graded in an interview A strong answer names assertions rather than tools, distinguishes configuration from behaviour, and admits which assertions the check does not cover. A weak answer describes a single rule and calls the control covered. The tell is whether the candidate can say what their check would still pass through.
- Your single check reads the audit-log configuration and passes. What can still be wrong?Configuration is not outcome. The destination may have become unwritable, so delivery has been failing and nothing has been retained since it broke; retention may be set to a value below the required one; the records may be deletable by an ordinary role. A configuration read proves someone set a field, not that logs exist to be produced at audit time.
- Why write four small checks instead of one that ANDs the conditions together?Because the fail message has to be actionable. A compound check tells you the control failed; four checks tell you which account, which field, and who fixes it. Independent checks also let you report partial coverage honestly and retire one assertion without touching the others.
- Who decides what an ambiguous word like "production" means in the control?The control owner decides, and you write the decision down beside the check. Your job is to force the ambiguity into a definition a rule can evaluate — an explicit tag, an account list, an inventory attribute — and to record that interpretation so the auditor is judging the same reading you automated.
A control is a job description; the checks are the interview questions. One sentence about "maintains accurate records" turns into several concrete things you actually test.
saying these in an interview costs you the question
- Treats one control as automatically one rule
- Checks configuration only and calls the outcome proven
- Assumes every control has a machine-checkable form
- Leaves words like production and timely undefined
- ANDs every assertion into one opaque pass or fail