skip to content

Your whole policy ruleset was swapped for one that allows everything and sweeps stay green — how do you detect it?

level: seniorimportance: should knowfreq 50%

answer

  1. the control does not go dark, it goes green
  2. detection must come from outside the enforcer
  3. alert on absence, not only presence
  4. watch every write to the rule store
  5. a canary finding that must always appear

basics

~20 s

Not from the results — they look perfect. Detect it out of band: alert on every publish to the rule distribution point, reconcile the enforcer's reported ruleset digest against what was actually published, and keep a deliberately non-compliant canary whose finding must appear in every sweep.

solid answer

~50 s

Replacing the whole ruleset is the strongest position an attacker can take against a detective control, because it does not hide one violation — it manufactures positive evidence of compliance for everything, indefinitely. So the detection has to come from outside the enforcer. Three signals, in order of strength. First, publish-path monitoring: every write to the rule distribution point emits an event to a system the publisher cannot edit, and any publish that did not originate from the reviewed pipeline is an incident. Second, negative controls: one or two resources that are deliberately non-compliant, whose finding must appear in every sweep — the alert fires when the expected finding vanishes. Third, reconciliation of the digest the enforcer reports against the digest actually published. And remember the trap: whoever can replace the ruleset can usually also make the enforcer report the digest you expect.

go deeper

for a junior

Understand the core idea: if the rules are replaced with permissive ones, the reports look perfect, so the results themselves cannot tell you the control is working.

for a middle

Explain the entry points — write access to the rule store and the enforcer's source configuration — and why detection has to come from outside the enforcer's own reporting.

for a senior

Describe concrete out-of-band detections you have run: publish alerting, canary resources whose finding must always appear, digest reconciliation, and trending the rule inventory rather than only findings.

for a principal

Own the assurance argument: state plainly how many independently monitored systems would have to be compromised before a silent non-enforcement could persist unnoticed for a quarter.

## Why the whole-ruleset swap is the attack worth planning for Tampering with a single rule is narrow and comparatively noisy: the rule id is still in the inventory, its evaluation counts still move, and someone comparing rule text to the repository sees a diff. Replacing the entire ruleset with a permissive one is qualitatively different on three axes. - **Blanket.** Every control the enforcer carried is off at once, not just the one the attacker cares about. - **Persistent.** Nothing about it degrades. A permissive ruleset keeps working for as long as nobody compares what is loaded against what was published. - **Evidence-producing.** This is the nasty part. The control does not go dark; it goes *green*. It keeps generating clean runs that the organisation reads as assurance and may later hand to an auditor. The attacker has not merely evaded a control, they have conscripted it into vouching for them. ## The ways in The distribution point's write path is the obvious one: whoever can put objects there decides what every enforcer runs. Less obvious and usually less monitored is the **enforcer's source configuration**. Repointing the enforcer at a different location, or swapping the credential it fetches with, replaces the effective ruleset without a single write to the approved store, and change monitoring aimed only at the store never sees it. Treat the configuration that says *where rules come from* as part of the ruleset for review and alerting purposes. ## Why the enforcer's own telemetry is weak evidence The enforcer sits inside the boundary that was crossed. If an attacker can change what it loads, they can very often change what it says about what it loaded — self-reported digests, run metadata, log lines. This does not make the digest useless: it catches accidents, deployment drift and half-finished publishes, which are the common cases. It makes it insufficient as *adversarial* evidence, and the fix is corroboration from somewhere the attacker does not control. ## Three independent detections **1. Publish-path monitoring.** Emit an event on every write to the distribution point — who wrote, when, and what digest resulted — into a log the publishing identity cannot modify. Then define the expected pattern: publishes come only from the reviewed pipeline, only on merges, at a rate humans recognise. Anything else is an incident, not a ticket. This is the strongest signal because it fires at the moment of the change rather than waiting for a consequence. **2. Negative controls, or canaries.** Keep one or two long-lived resources that are deliberately non-compliant with the rule in question — an unencrypted volume in a sandbox account, sized and placed so it holds nothing real. Its finding must appear in every sweep. Alert on the *absence* of that finding. This is the only signal on this list that tests the whole path end to end: enumeration, rule loading, evaluation and reporting all had to work for the expected finding to appear. Design it carefully — document it so nobody helpfully fixes it, exclude it from any cleanup that would delete it, and tag it so it never pollutes real compliance metrics. **3. Digest reconciliation.** A job outside the enforcer compares the digest the enforcer reports it is running with the digest of the ruleset the publishing pipeline says it published. Cheap, catches the accidental and the half-competent, and is the one an attacker inside the enforcer can most easily fake — hence third. ## Shape signals you get almost free Even without any of the above, the *shape* of the output changes under a swap. The rule inventory shrinks or changes ids; per-rule evaluation counts collapse to zero; the total number of rules evaluated drops. Violation counts staying at zero is invisible, but rules-evaluated falling from ninety to four is not. Graph the inventory, not only the findings. ## The habit underneath all of it Alarm on absence, not only on presence. A control whose sole output is bad news is indistinguishable from a dead control during every period when things are fine — which is most of the time. Give every enforcer a heartbeat that states what it ran, over what scope, with which ruleset, and alert when the heartbeat changes shape or stops. That single discipline covers the swapped ruleset, the expired credential, the crashed scheduler and the silently narrowed scope with one mechanism.

  • Why is the enforcer's own report of its ruleset digest weak evidence here?
    It is produced inside the boundary the attacker already crossed. Whoever can replace the ruleset can usually alter what the enforcer says about it. The digest is good at catching accidents and deployment drift; treating it as adversarial proof requires corroboration from a system the attacker does not control.
  • How would you design the canary so it stays trustworthy?
    One or two long-lived, deliberately non-compliant resources holding nothing real, owned and documented so nobody helpfully fixes them, excluded from cleanup jobs, and tagged so they never distort real metrics. The alert is on the disappearance of their expected finding, not on their presence.
  • Besides publishing to the store, what else changes what the enforcer runs?
    Its source configuration. Repointing it at a different location, or changing the credential it fetches with, substitutes the ruleset without any write to the approved store. That configuration needs the same review and change alerting as the rules themselves, or you have monitored one of two doors.
  • What signal shows a swap even if nobody added canaries?
    The shape of the run. The list of rule ids evaluated, and the count of resources each rule evaluated, change sharply when the ruleset is replaced — even while violations stay at zero. Graphing rules-evaluated alongside findings makes an otherwise invisible event obvious.

A guard who has been handed a blank list checks every visitor diligently and admits them all, and his shift report is spotless.

saying these in an interview costs you the question

  • Trusts the enforcer's self-reported digest as adversarial proof
  • Watches only for violations, never for their absence
  • Assumes a long green streak means the control is alive
  • Monitors rule content but not the enforcer's source configuration
  • Believes a swapped ruleset would be noticed by developers

context