microsoft/sre-agent is the community repository for Azure SRE Agent, an AI assistant for diagnosing and resolving production problems and reducing routine operations work. It is for teams working on service reliability and includes documentation, discussions, videos, and hands-on labs for using the product. The catalogue skills relate to the agent's official plugins and resources.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/microsoft/sre-agent/deployment-compliance-checknpx skills add microsoft/sre-agent --skill deployment-compliance-checkgit clone --depth 1 https://github.com/microsoft/sre-agentWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/microsoft/sre-agent/deployment-compliance-check)<a href="https://agentmods.dev/skills/microsoft/sre-agent/deployment-compliance-check"><img src="https://agentmods.dev/badge/skills/microsoft/sre-agent/deployment-compliance-check.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00049 | $0.01005 |
| Opus 5 | $0.00024 | $0.00502 |
| Sonnet 5 | $0.00010 | $0.00201 |
| Haiku 4.5 | $0.00005 | $0.00101 |
Grade C, and why
deployment-compliance-check scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Hidden instructionshighPrompt injection
Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.
<!-- Add your skill instructions here --> How it starts
The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Organization Policy All Container App deployments MUST go through the approved CI/CD pipeline (GitHub Actions).
Deployments via Azure Portal, interactive Azure CLI, or PowerShell are non-compliant. Only service principal / managed identity deployments from the CI/CD pipeline are compliant. Non-compliant deployments should be flagged, reported, and reverted (with user approval). This policy ensures every production change is traceable to a code commit, reviewed via PR, and auditable through the pipeline.
How the Pipeline Works GitHub Actions builds the Docker image with immutable compliance labels, pushes to ACR, which fires an Event Grid event. An Automation Runbook (running under a managed identity) picks up the event and updates the Container App via ARM. The key point: GitHub never authenticates to Azure AD directly — all Azure-side auth happens through managed identities inside Azure.
Data Sources Activity Logs in Log Analytics Activity Logs flow to the Log Analytics workspace via diagnostic settings. Use QueryLogAnalyticsByWorkspaceId to run KQL against the AzureActivity table.
To discover the workspace ID if needed:
az monitor log-analytics workspace show --resource-group rg-compliancedemo --workspace-name law-compliance-compliancedemo --query customerId -o tsv Container App Resource Tags Use RunAzCliReadCommands to check tags on the Container App.
Docker Image Labels in ACR The CI/CD pipeline bakes labels into every image at build time (deployed-by, commit-sha, pipeline-run-id, branch, repository, workflow). These are immutable once pushed — they cannot be added or changed after the fact. An image pushed manually (via Portal or docker push) will NOT have these labels.
How to Detect Compliance See compliance_detection.md for the detailed decision tree and well-known app IDs.
Step 1: Query Activity Logs Query the AzureActivity table for Container App write operations. Extract claims.appid and Caller to identify who made the deployment. See compliance_detection.md for the KQL template.
Step 2: Classify each deployment by caller Well-known Azure Portal / CLI / PowerShell app IDs → NON-COMPLIANT Caller contains @ (user principal) → NON-COMPLIANT Known pipeline managed identity → proceed to Step 3 Unknown service principal → INVESTIGATE Caller identity ALWAYS takes precedence over tags.
Step 3: Verify Docker image labels (the tamper-proof check) This is the most important step. Even if the caller is the pipeline's managed identity, the image itself might have been pushed to ACR manually (bypassing the CI/CD build). When that happens, Event Grid still fires, the Automation Runbook still deploys it, and the Activity Log looks legitimate — but the image was never built by GitHub Actions.
To catch this:
Get the currently running image tag from the Container App Retrieve the image config from ACR and check for the expected labels (deployed-by=pipeline, commit-sha, pipeline-run-id, etc.) If labels are missing or invalid → NON-COMPLIANT regardless of caller This closes the "portal push via Event Grid" bypass.
Step 4: Verify resource tags (secondary) Compliant pipelines stamp tags like deployed-by=pipeline, pipeline-run-id, commit-sha, repository. Missing deployed-by tag is additional non-compliance evidence — but tags alone are weak because the Automation Runbook stamps them on every deploy, including ones triggered by manual ACR pushes.
Step 5: Generate compliance report Report should include scan timestamp, time range, total/compliant/non-compliant counts, image label check results, and details of any violations.
Revert Procedures IMPORTANT: Always get user approval before any revert action.
Option A — Reactivate previous Container App revision: list revisions, activate the last known-good one, shift traffic, deactivate the non-compliant revision.
Option B — Re-run the CI/CD pipeline to redeploy the last known compliant image from the approved pipeline.
Notes Activity Logs may take 5-15 minutes to appear in Log Analytics
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 80 lines · 49 tokens per session scan C 2689aed5677d
deployment-compliance-check is a skill published in the GitHub repository microsoft/sre-agent (151 stars, last pushed 2d ago), licensed MIT. It adds 49 tokens to every session and 1,005 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (hidden instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
import-prom-rule
Bulk import of a Prometheus alert rule YAML file (create a whole set of rules at once). Dedicated to handling a remote URL or local YAML text, automatically parsing the three formats groups / a plain rules array / a single rule. ⚠️ Do not use this skill for single-rule creation — when the user describes a single alert…
chinese-git-workflow
国内 Git 平台配置参考——Gitee、Coding.net、极狐 GitLab、CNB 的 SSH/HTTPS/凭据/CI 接入差异与镜像同步配置。仅在用户显式 /chinese-git-workflow 时调用,不要根据上下文自动触发。.
azsdk-common-pipeline-analysis
Analyze Azure SDK CI/CD pipeline failures into a structured diagnosis, and define the required output format. Load this skill before calling azsdkanalyzepipeline, which returns raw failure data that this skill interprets and formats. USE FOR: "pipeline failed", "build failure", "CI check failing", "tests failing in…
configure-env-variables
Configures environment variables for Power Pages site settings to support ALM across environments. Creates environment variable definitions in Dataverse, guides the user through linking site settings to those variables via the Power Pages Management app, adds the variables to the solution, and generates a…
desktop-principles
Desktop-specific UX principles - hover states, pointer precision, keyboard shortcuts, multi-window, focus management. Covers macOS, Windows, Linux, web desktop.
atmos-cache
Atmos caching: CI cache configuration and commands, GitHub Actions cache integration, Terraform registry cache mirror/list/prune/stats/trust, and cache modernization guidance.