Subchapter 8.20
references/subagent-review.mdMarkdown4 KBView on GitHub
Review generated IaC for security compliance and correctness. Follow the workflow below — each step specifies which reference to read and what to check.
{"skill": "azure-validate"}, {"skill": "azure-deploy"}, {"skill": "azure-prepare"}, or any other skill call. Use the procedures in THIS file only.az deployment commands — review is read-only analysis of generated files.| Field | Required |
|---|---|
All generated IaC file contents (every .bicep or .tf file) | YES |
prepare-plan.json — services (service types, SKUs), naming, deploymentVariables sections | YES |
scaffold-manifest.json.files[] list | YES |
prereq-output.json.warnings[] — all prereq warnings that require IaC fixes | YES |
Return JSON (≤1000 tokens):
{
"findings": [
{ "layer": "L1|L2|L3|L4", "file": "modules/app.bicep", "claim": "...", "rating": "VERIFIED|PLAUSIBLE|FLAGGED", "detail": "..." }
],
"summary": "N/N VERIFIED, N PLAUSIBLE, N FLAGGED"
}Read bicep-patterns-security.md and rbac-roles.md.
Do: Check every generated IaC file against ALL security checks defined in the reference file. The file contains the complete check table with FLAGGED conditions, edge cases, and Bicep code patterns. Do NOT guess checks from memory — use the reference file as the checklist.
Read self-review-checklist.md.
Do: First run the cross-module reference trace from the checklist’s § Cross-Module Reference Validation: parse every module call in main.bicep, read each target module’s param/output declarations and secrets[] entries, then verify every reference resolves (params passed match params declared, outputs referenced exist, every CA secretRef has a matching KV secret resource). Then run L2–L4:
main.bicep → modules/*.bicep, naming follows plan, Container Apps uses two-phase wiring, every files[] entry exists on disk, no azure.yaml, cross-module references all resolvenaming.resources[] exactly, API versions are real (verify via az bicep build), SKU names match plan, no invented resource typesadministratorLoginDo: Merge L1–L4 results into the findings JSON. Apply rating per self-review-checklist.md § Rating System: VERIFIED (evidence confirms claim), PLAUSIBLE (no counter-evidence but unverified), FLAGGED (evidence contradicts or missing critical pattern). ⛔ FLAGGED at L1 (Security) or L3 (Hallucination) → caller must fix before deploy. Return to caller.