# ARM Template Parameter Sanitizer

> Scans ARM templates, parameter files, Bicep and bicepparam for hardcoded secrets, password parameters that are not secure, unused parameters, and insecure defaults such as public storage, weak TLS and open NSG rules. Offline and read-only.

ARM Template Parameter Sanitizer 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/arm-template-parameter-sanitizer
- Tags: devops, azure, arm, bicep, parameters, secrets, storage, nsg

## What it does

- Scans ARM templates, ARM parameter files, Bicep and bicepparam files in a folder
- Flags password-like parameters that are not secureString or are missing @secure()
- Reports hardcoded secret defaults, connection-string keys and secret values stored in parameter files
- Warns about parameters that are declared and then never referenced
- Flags a fixed set of insecure defaults (public storage, weak TLS, open NSG rules, secret outputs)

## Who it's for

- **Platform, DevOps and security engineers:** reviewing Azure ARM or Bicep templates before a deployment or a pull request
- **Anyone who needs to confirm a parameters file:** does not contain a password

## About this skill

The cheapest secret leak is the one already sitting in git. This skill gives your agent a deterministic, offline workflow: point the bundled scanner at your templates and parameter files, read the BLOCKER and WARN findings, then fix each one using the included notes.

The scanner is a single standard-library script. It does not call Azure and it does not modify files. It understands ARM deployment templates, ARM parameter files (including Key Vault references), Bicep parameters and bicepparam assignments. Secret-like parameter names must be secure, must not have a literal default, and must not be written as plain values in a parameters file. Connection-string account keys, private key PEM and JWT-like tokens are treated as blockers wherever they appear. A short list of insecure resource defaults is also reported, including storage accounts that allow HTTP, NSG rules that open management ports to the internet, and outputs whose names look like secrets.

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

## Known limitations

- File-based only: it cannot see parameter values passed only at deploy time, or what is already in a subscription.
- Bicep support is a line parser, not the Bicep compiler; module graphs and compile-time functions are not evaluated.
- It knows only the secret-name patterns, value patterns and resource defaults in its notes. Unusual names or new Azure properties need a rule update.
- Reports and explains; it does not rewrite your templates.

## Technical details

The scanner is a single standard-library Python script. It makes no network calls and never writes files. Give it one or more files or directories; it walks .json, .bicep and .bicepparam files.

ARM templates are parsed as JSON. Parameters are checked for secret-like names, type (secureString or secureObject), hardcoded defaultValue, and whether they appear in a parameters('name') expression. Variables and resource properties are scanned for connection-string keys, private key PEM and JWT-like tokens. Nested resources are included. Parameter files that use a Key Vault reference are accepted; a secret stored as value is not.

Bicep is scanned with a line parser, not a compiler: @secure() on the preceding decorators, string defaults, identifier use-counts, and a fixed set of insecure property literals.

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

It cannot see values passed only at deploy time, and it does not compile Bicep modules or call Azure.

## 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 ARM Template Parameter Sanitizer 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 Azure access or a login?

No. It only reads the files you point it at.

### Will it print my secrets?

The finding message describes the problem and the location. It does not echo the secret value.

### Which Python?

Python 3.9 or newer, no packages to install.

### Does a Key Vault reference in a parameters file pass?

Yes. A secret-named parameter with a Key Vault reference (and no literal value) is accepted.

### 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.
