Learn to scan Azure resources for cost governance violations using PSRule, Checkov, Cloud Custodian, and Infracost.
View the Project on GitHub devopsabcs-engineering/finops-scan-workshop
| Duration | 30 minutes |
| Level | Intermediate |
| Prerequisites | Lab 01 |
By the end of this lab, you will be able to:
You will scan the missing-tags app with Checkov and generate SARIF output.
Create the reports directory if it does not exist:
mkdir -p reports
Run Checkov against app 001 with both console and SARIF output:
checkov -d finops-demo-app-001/infra/ --output cli --output sarif --output-file-path console,reports/
This produces CLI output on screen and writes a SARIF file to the reports/ directory.
CKV_AZURE_* (for example, CKV_AZURE_18 for storage account network rules).
[!TIP] Checkov scans for both security and best practice violations. You will see checks related to HTTPS enforcement, TLS version, access keys, and network configuration — not only cost governance. This broader coverage complements PSRule’s Azure-specific focus.
You will analyse the Checkov results to understand what each finding means.
Open the SARIF file generated by Checkov in the reports/ directory.
results array. Each entry contains:
ruleId — the Checkov check ID (for example, CKV_AZURE_18)level — severity of the findingmessage.text — description of the failed checklocations — file path and resource referenceCategorise the findings into groups:
| Category | Example Check IDs | Description |
|---|---|---|
| Network Security | CKV_AZURE_18, CKV_AZURE_59 |
Storage account network rules, HTTPS only |
| Encryption | CKV_AZURE_33, CKV_AZURE_43 |
Encryption at rest, TLS version |
| Access Control | CKV_AZURE_36 |
Shared access key disabled |
| Monitoring | CKV_AZURE_65 |
App Service detailed error messages |

[!IMPORTANT] Checkov check IDs and descriptions may vary between versions. Use
checkov --listto see all available checks for thearmframework.
You will scan the redundant/expensive resources app and look for additional findings.
Run Checkov against app 005:
checkov -d finops-demo-app-005/infra/ --output cli --output sarif --output-file-path console,reports/
westus and westeurope)
You will create a side-by-side comparison to understand the strengths of each tool.
Build a comparison table based on your findings:
| Aspect | PSRule | Checkov |
|---|---|---|
| Focus Area | Azure best practices, tagging, naming | Security, compliance, CIS benchmarks |
| Tag Checks | Explicit Azure.Resource.UseTags rule |
No dedicated tag governance check |
| Region Checks | AZURE_RESOURCE_ALLOWED_LOCATIONS config |
Limited region awareness |
| SKU Checks | Some rules for sizing best practices | Checks for specific service configurations |
| Output Format | SARIF, CSV, JSON | SARIF, JSON, JUnit, CSV |
| Language Support | Bicep (via expansion), ARM JSON | ARM JSON, Bicep, Terraform |
| Custom Rules | PowerShell-based custom rules | Python-based custom checks |

[!TIP] In a production FinOps scanning pipeline, you run all scanner tools in parallel and merge the SARIF results. Labs 06 and 07 cover this exact pattern using GitHub Actions.
Before proceeding, verify:
reports/ directoryProceed to Lab 04 — Cloud Custodian: Runtime Resource Scanning.