Kit

Runner and approvals kit

Everything here runs in your own tenant, with your own read-only identity. Nothing in this kit can change a resource in Azure.

1. Nightly runner (your GitHub Actions or Azure Container Apps Job)

The runner is the same read-only scanner as scan.sh, plus two daily checks. It signs in with an identity you own that holds only Reader, Cost Management Reader and Monitoring Reader, and every az call goes through the scanner's allowlist before az starts.

  • Scheduled scans. --management-group <id> sweeps every enabled subscription under it. --billing-account <id> reads cost once at EA or MCA billing scope. --subscription <id> for one subscription.
  • Anomaly check. Yesterday's cost for each resource group and meter is compared with the median of the 14 days before it. More than 20% above the median, and at least 1.00 above it, is reported. A meter with no history is reported as new spend from 10.00. All three numbers are flags you can change.
  • Tag and budget report. Lists resources missing owner, env or cost-center (production first) and compares month-to-date spend with each monthly Azure budget, with a straight-line projection for the month.
  • Weekly pulse (optional). Monday at 8:00 AM in your time zone, one message to your own Slack or Teams channel: verified savings to date, taken only from proof-of-savings statements (until the first one, it says not yet measured), new waste found since last week (estimates), and budget pacing as green, yellow or red. Each pending change gets Review, Approve and Snooze 14d buttons.
  • Output. Markdown and JSON files in the job's output folder (a GitHub artifact). An alert to your own Slack or Teams webhook is optional and off unless you set it.

Download the runner kit

trimline-runner-kit-h20.tar.gz, sha256 7aa6b4af66a60c3b617a18d09261c42c8cabfef4865b38952c28f9dd9df29de6. Contains .github/workflows/trimline-nightly.yml, the trimline-runner Dockerfile, the Container Apps Job commands, the runner, the scanner and the proof-of-savings tool, with tests.

sha256sum trimline-runner-kit-h20.tar.gz
tar xzf trimline-runner-kit-h20.tar.gz && cd trimline-runner-kit
PYTHONPATH=scanner:runner python3 -m trimline_runner --management-group <MG_ID> --out trimline-out

2. Approval cards in Slack or Teams

Each proposed change becomes one card: the estimated savings (an estimate), the risk score, the resource, the exact change and the rollback. Approve or Reject records a decision for that exact change, identified by a change hash over the change and both scripts. The endpoint checks Slack's signing secret or the Microsoft Bot Framework token on every click, refuses clicks from any other Slack workspace or Teams tenant (in Teams, also anyone who is not a named approver; in Slack, post cards only to a channel your approvers control), and only after an approval returns the exact patch and rollback the decision covers. Approving changes nothing in Azure; your team runs the reviewed fix script with the approval id.

3. Proof of savings and invoicing

For each changed resource the statement compares its cost over the 30 days before the change, from your pre-change export, with its cost after the change, from your post-change export, normalized to 30 days. The change day is left out, a day with no billing counts as 0, and a cost increase counts as 0 savings. The same files always give the same statement, and the statement lists the sha256 of each input file so you can check it. The invoice follows the statement and is reviewed by a person before it is sent.

Sample statement (PDF, sample Azure estate)

4. Parquet cost exports

The free report page reads Parquet exports in your browser, one row group at a time, loading only the columns the rules use. The reader is bundled with the page, so nothing is downloaded from another site and nothing is uploaded.

Contact

hello@foundationalit.net. Security details: security summary.