# Azure DevOps Variable Group Hygiene

> Checks Azure DevOps variable group exports and pipeline YAML for secrets stored as plain text, account keys in connection strings, secrets echoed in scripts, setvariable without issecret, and unused or unresolved variable groups. Offline and read-only.

Azure DevOps Variable Group Hygiene is a free AI agent skill on Agensi by Abdelrhman Fikri, in DevOps & Cloud. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Abdelrhman Fikri](https://www.agensi.io/creators/abdelrhman-fikri)
- Category: [DevOps & Cloud](https://www.agensi.io/skills/devops-cloud)
- Version: 1.0.0
- Last updated: 2026-12-03
- Security: scan passed (2026-12-03); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/azure-devops-variable-group-hygiene
- Tags: devops, security, code-review, azure-devops, pipelines, variable-groups, secrets, library

## What it does

- Scans variable group JSON exports and pipeline YAML files in a folder
- Flags secret-named variables and account-key connection strings stored as plain text
- Flags secret-named pipeline variables that carry a literal value in YAML
- Warns when a script step prints a secret variable or sets one without issecret=true
- Warns about unused, empty and unresolved variable groups
- Warns when a pull-request-triggered pipeline uses variable groups

## Who it's for

- **Platform and DevOps engineers:** who own Azure DevOps pipelines and Library variable groups, and anyone cleaning up secrets before an audit or a pipeline migration.

## About this skill

Secrets in Azure DevOps usually leak in two quiet ways: a variable group where someone forgot the lock icon, and a pipeline file where a password was written as a literal. This skill gives your agent a deterministic, offline workflow for both. Export your variable groups to JSON, point the scanner at the export and your pipeline YAML, read the BLOCKER and WARN findings, and fix them with the included notes.

The scanner is a single standard-library script. It makes no network calls, never talks to Azure DevOps and never modifies files. It reads variable group exports (a name, a type and a variables map), including Key Vault linked groups, and pipeline YAML. A secret-named variable with a plain-text value, a storage account key or password inside a connection string, a JWT-like token, or a literal value on a secret-named YAML variable is a blocker. Printing a secret variable in a script, setting a secret-looking variable without the issecret flag, a group nobody references, an empty group, a group the pipeline names but the export lacks, and a pull-request trigger that uses variable groups are warnings.

Synthetic example files with expected output are included so you can verify the behaviour in seconds.

## Known limitations

- File-based only: it cannot see pipeline settings (for example whether secrets are available to fork builds), Key Vault access, or who can use a group.
- YAML is read line by line, not parsed; templates, expressions and variables defined in other files are not resolved.
- Variable group JSON must be exported by you; the skill does not connect to Azure DevOps. The expected shape is a name, a type and a variables map.
- Secret names are matched by a fixed word list; unusual names may be missed.
- Reports and explains; it does not rewrite your pipelines or change groups.

## Technical details

The scanner is a single standard-library Python script. It makes no network calls and never writes files. Give it files or directories; it reads .json and .yml/.yaml.

JSON files are treated as variable group exports: a list (or one object, or an object with a value list) whose entries have a name, an optional type (Vsts or AzureKeyVault) and a variables map. A variable is secret when isSecret is true. Secret-named variables (password, secret, token, key and similar names) with a non-empty plain value are blockers; connection-string account keys, shared access keys, passwords and JWT-like tokens are blockers wherever they appear as a plain value.

YAML is read line by line, not with a full parser: variables blocks (name/value pairs and mapping form), group references, the pr trigger, setvariable logging commands and echo-style steps that print $(name) for a secret-named variable.

Exit codes: 0 no blockers, 1 blockers found, 2 bad arguments. Optional --format json.

It cannot see pipeline settings such as secrets for fork builds, Key Vault access policies, or permissions.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Azure DevOps Variable Group Hygiene skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### Does it need an Azure DevOps token or login?

No. It only reads files you point it at.

### Will it print my secrets?

Findings name the variable and the problem. They do not echo plain-text values.

### Which Python?

Python 3.9 or newer, no packages to install.

### Does it understand Key Vault linked groups?

Yes. Secrets in a Key Vault linked group are treated as secret; the group is still checked for use and empty state.

### What does exit code 1 mean?

One or more BLOCKER findings. Warnings alone still exit 0.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
