For your security team
Trimline security summary
Everything a reviewer needs in one place: what the scan may run, what access ongoing work uses, where data goes, how to remove access and who has it. Printable as a PDF.
1. What scan.sh may run
scan.sh (sha256 7827704bbcd804e692f43073a672652f6dc1854d2cfcbc321353a37f9e953bd9) refuses every az command that is not on this list, before az starts. The same check is installed as a temporary az wrapper, so the Python scanner it runs is held to the same list. The list below is generated from the script itself.
az account show | az account list | az graph query | az monitor metrics list
az monitor log-analytics query | az monitor activity-log list
az advisor recommendation list (without --refresh)
az rest GET on https://management.azure.com/ only
az rest POST only to three query endpoints, which take the query in a POST body and cannot change
any resource:
- Resource Graph (resources query, with paging)
- Cost Management query at a subscription, management group, billing account,
billing profile, department or enrollment account scope, and its next pages
- Azure Monitor metrics:getBatch on <region>.metrics.monitor.azure.com (up to 50
resources a call, with --resource https://metrics.monitor.azure.com)
az storage blob list | az storage blob download
only with --auth-mode login (your Microsoft Entra login, no keys, SAS or connection
strings), only for --focus with a storage URL: reads your cost export files.
Command words accepted by az_allowed(): az account show, az account list, az graph query, az monitor metrics list, az monitor log-analytics query, az monitor activity-log list, az storage blob list, az storage blob download, az login, az advisor recommendation list, az version; plus az rest as above. Allowed POST targets match ^https://management\.azure\.com/(providers/Microsoft\.ResourceGraph/resources\?api-version=[0-9-]+(-preview)?|(subscriptions/[0-9a-fA-F-]{36}|providers/Microsoft\.Management/managementGroups/[A-Za-z0-9._()-]{1,90}|providers/Microsoft\.Billing/billingAccounts/([0-9]+|[Pp][Cc][Nn]\.[A-Za-z0-9]+|[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}(:[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}_[0-9]{4}-[0-9]{2}-[0-9]{2})?)(/billingProfiles/[A-Za-z0-9_-]{1,128}|/departments/[A-Za-z0-9_-]{1,64}|/enrollmentAccounts/[A-Za-z0-9_-]{1,64})?)/providers/Microsoft\.CostManagement/query\?api-version=[0-9-]+(-preview)?(&(\$|%24)top=[0-9]{1,5})?(&(\$|%24)skiptoken=[A-Za-z0-9%._~+/=-]+)?)$ or ^https://[a-z0-9]{2,40}\.metrics\.monitor\.azure\.com/subscriptions/[0-9a-fA-F-]{36}/metrics:getBatch\?[A-Za-z0-9=&%:.,/_*()~+-]+$ (the second only with --resource https://metrics.monitor.azure.com). az advisor recommendation list --refresh is refused. Run bash scan.sh --check to self-test the allowlist without calling Azure.
Outbound reads during a scan: the scanner download from this site (sha256-pinned) and the public Azure Retail Prices API (GET, SKU and region names only; --no-prices skips it). No sudo, no package or extension installs, no az configuration changes.
2. Access for ongoing work
The free audit needs no access from us. Ongoing work uses one service principal with exactly three built-in read roles, created by the onboarding script (with a dry-run mode):
| Role | What it allows | Definition |
|---|---|---|
| Reader | View resources, no changes | Microsoft docs |
| Cost Management Reader | View cost data and configuration | Microsoft docs |
| Monitoring Reader | Read monitoring data and metrics | Microsoft docs |
For a large estate, the onboarding script can grant the same three roles once at a management group instead of each subscription (--management-group), and add only the optional read roles you choose:
| Optional role | Scope | Why | Definition |
|---|---|---|---|
| Storage Blob Data Reader | Only the cost-exports container of your export storage account (--export-reader) | Read your Cost Management export files | Microsoft docs |
| Enterprise Agreement Enrollment reader | Your EA billing account (--ea-billing-account) | Read cost for every subscription in one query | Microsoft docs |
| Billing account reader or Billing profile reader (MCA) | Your MCA billing account or one billing profile (--mca-billing-account, --mca-billing-profile) | Read cost for every subscription in one query | Microsoft docs |
A billing role is assigned by your billing administrator (EA: an enrollment writer). The script shows every command first with --dry-run, and prints the matching revoke command for each grant.
By default your team runs every fix. If you prefer that we apply one, you grant a time-limited role scoped to that single resource, and we remove it afterward.
The client secret is written to finops-readonly-credentials.json (mode 600) and never printed. Keep it in your own Azure Key Vault, or send it only through a channel agreed in writing. Never by email or chat.
3. Where data goes
| Path | What leaves your environment |
|---|---|
| Cost export CSV on the report page | Nothing. The file is read by JavaScript in your browser. The page's security policy only allows requests back to this site, and the file is never sent. |
| scan.sh in Azure Cloud Shell | Nothing is sent to us. Results stay in a folder in your Cloud Shell home directory until you choose to share them. |
| Contact form (work email, spend band, workload) | Stored in our lead database on Supabase, region us-east-1 (US East), and in the application log of our hosting cluster on Azure (East US). Stored fields: email, email domain, a company name guessed from the domain, whether it is a free mail domain, spend band, workload, plan interest, time, a salted hash of the IP address (not the IP) and the first 160 characters of the browser user agent. No cookies or ad trackers. |
| Service principal (ongoing work) | Read-only inventory, metrics and cost data, read with the roles above. Where that data is stored and for how long is confirmed in writing before onboarding. |
4. Remove our access
Run as someone who can manage role assignments and app registrations, with the client id the onboarding script printed. Remove role assignments first: deleting only the app can leave assignments behind as "Identity not found".
az role assignment delete --assignee <CLIENT_ID> --scope /subscriptions/<SUBSCRIPTION_ID>
az role assignment list --assignee <CLIENT_ID> --all
az ad sp delete --id <CLIENT_ID>
az ad app delete --id <CLIENT_ID>
Repeat the first line for each onboarded subscription or management group (--scope /providers/Microsoft.Management/managementGroups/<ID>), and for the export container if you granted it. A billing reader role is removed with the az rest --method delete line the onboarding script printed for it. Microsoft docs: Remove Azure role assignments.
5. Who has access on our side
Adolfo Lugo, founder of Foundational IT. No one else has access to client data or credentials.
Contact
hello@foundationalit.net. Methodology: how findings are scored.