# project / sanitized cloud investigation
AZURE POLICY · ARM · RBAC · CLOUD GOVERNANCE
When an active Azure policy fails to prevent a bad deployment
I investigated an unexplained test environment, reconstructed its creation through Azure Resource Manager records, and identified the governance gap that allowed it: a naming policy configured to report violations instead of blocking them.
00 / INVESTIGATION BRIEF
A legitimate role assignment met an incomplete preventive control.
A junior intern received temporary Contributor access to create a test environment. The environment appeared late Friday without conforming to the organization's governance standard. My task on Monday was to determine what existed, reconstruct how it arrived, and explain why policy did not stop it.
Live, multi-user training tenant scoped to the Mad Hat Labs subscription.
Observation only; no resources, role assignments, or policies were modified.
Resource metadata, deployment history, compliance state, and assignment parameters.
Separate authorized capability from the governance control expected to constrain it.
01 / INVESTIGATION PATH
Move from anomaly to creation record to control behavior.
- 01Identify the naming outlier
I compared the subscription's resource groups against the documented prefix, workload, environment, region, and instance pattern. One resource group broke the pattern and became the investigation scope.
- 02Inspect the resource and tags
The group contained one test resource. Its metadata connected it to the temporary deployment, providing ownership context without explaining why governance allowed it.
- 03Trace the ARM deployment
The Deployments blade preserved the successful provisioning event, configuration context, and timeline needed to reconstruct how the resource appeared.
- 04Confirm policy detection
The Policies blade showed that Azure had evaluated the environment and recorded a compliance violation. The control could see the problem.
- 05Inspect the assignment effect
The policy assignment's parameter value was
Audit. That explained the outcome: Azure logged the violation but did not reject the request.
02 / SANITIZED EVIDENCE
The evidence supports each transition in the investigation.
The screenshots retain the portal context needed to evaluate my reasoning while removing lab answers and shared-environment identifiers. The complete methodology and image set are preserved in the GitHub case study.
03 / ROOT CAUSE
The policy was present, active, and operating exactly as configured.
The control gap was not the absence of a naming policy. It was the mismatch between the organization's preventive expectation and the assignment's detective behavior. Temporary Contributor access increased the importance of that distinction.
The role permitted provisioning and no preventive policy rejected the request.
Compliance evaluation showed the naming requirement could identify the bad state.
Audit effectAudit records non-compliance and allows the request to continue.
Deny after validationDeny rejects a matching non-compliant request, subject to tested scope and documented exemptions.
An assigned control is not necessarily an enforced control. The effect parameter is part of the security outcome.
04 / FINDINGS AND ACTIONS
Correct the control without creating a new operational failure.
A resource group existed outside the approved naming convention.
Tags and ARM history connected the resource to a successful temporary deployment.
The naming policy reported the violation but did not prevent it.
The reviewed evidence did not demonstrate malicious activity or identity compromise.
- 01Validate intent, then enforce
Confirm whether audit-only operation is intentional. Test existing workloads and exemptions before changing the effect to
Deny. - 02Constrain temporary Contributor access
Limit scope and duration, require an accountable owner, and remove the assignment automatically when authorized work ends.
- 03Make compliant deployment the default
Use approved templates or pipelines that enforce naming and required ownership, environment, and expiration metadata.
05 / LESSONS
The surprising part was not that policy failed—it did not fail.
I initially had to reconcile an active policy with a successful bad deployment. Inspecting the assignment parameters shifted the question from “does a policy exist?” to “what behavior does this policy actually enforce?”
- Policy presence is not prevention.Assignment, scope, parameters, exemptions, and effect all determine the resulting control.
- Metadata accelerates triage.Naming patterns and tags make unexplained resources easier to identify and attribute at scale.
- ARM records begin the timeline.Deployment history provides the creation event and context needed for correlation with other telemetry.
- Authorized access still needs guardrails.Legitimate Contributor access can create risk when preventive controls are incomplete.
- Change timing is a control consideration.Nonessential late-Friday deployments need explicit review, monitoring, ownership, and support coverage.
06 / FULL EVIDENCE LAYER
Read the complete investigation on GitHub.
The repository version contains the step-by-step write-up, sanitized screenshots, findings, recommendations, and publication boundary used for this case study.
Open GitHub case study ↗