Bicep Security Scanner

VerifiedCaution

Scans Azure Bicep templates for security misconfigurations and compliance violations. Produces a prioritized findings report with remediation guidance.

Sby Skills Guide Bot
SecurityIntermediate
7/23/2026
Claude Code
#azure-bicep#security-scanner#compliance-validation#iac-hardening

Recommended for

Automated summary

Scans Azure Bicep templates for security misconfigurations and compliance violations, producing a prioritized findings report with remediation guidance.

Strengths

  • Detects a wide range of security issues including public endpoints, missing encryption, overly permissive access, and disabled logging.
  • Provides actionable remediation with corrected Bicep snippets for each finding.
  • Prioritizes findings by severity level (Critical, High, Medium, Low) for efficient triage.
  • Performs contextual analysis of parameter defaults, conditional deployments, and module references.

Limitations

  • Relies on a static analysis script that may produce false positives or miss context-specific nuances.
  • Requires the Python scanner script to be available in the repository (needs setup).
  • Does not scan runtime configurations or actual deployed resource states.
When to use it

Before deploying Bicep templates to any environment or during pull request review of infrastructure changes.

When not to use it

When you need runtime security scanning or dynamic analysis of deployed resources, or if you lack a Python environment to run the scanner.

Security analysis

Caution
Quality score85/100

The skill uses Bash to execute a local Python scanner, which is a powerful tool but for a legitimate static analysis purpose. It does not interact with live Azure resources and requires user consent for edits, so the risk is low but deserves caution.

Findings
  • •Executes a Python script via Bash, which could potentially run arbitrary code if the script were tampered with, though it is a legitimate use for scanning.
How this analysis is made

Examples

Full Security Scan
Scan all Bicep files in the repository for security misconfigurations and generate a prioritized report with remediation steps.
Specific Resource Check
Check my Bicep template for storage account and SQL server security issues, focusing on encryption and public access settings.

name: bicep-security-scanner description: > Scans Azure Bicep templates for security misconfigurations and compliance violations. Detects issues like public endpoints, missing encryption, overly permissive access, disabled logging, and insecure defaults. Produces a prioritized findings report with remediation guidance. USE FOR: Bicep security review, IaC security scanning, Azure resource hardening, pre-deployment security checks, compliance validation. allowed-tools: Read, Grep, Glob, Bash, Edit version: 1.0.0

Bicep Security Scanner

Analyze Azure Bicep templates for security misconfigurations, compliance gaps, and hardening opportunities. This skill scans .bicep files in the repository, identifies security issues, and provides actionable remediation with corrected Bicep snippets.

When to Use

  • Before deploying Bicep templates to any environment
  • During pull request review of infrastructure changes
  • When auditing existing IaC for security posture
  • When preparing for compliance assessments (CIS, Azure Security Benchmark)

Analysis Procedure

Step 1: Discover Bicep Files

Use glob to find all .bicep files in the repository:

**/*.bicep

Also check for bicepconfig.json to understand any linter rules already in place.

Step 2: Run the Python Scanner

Execute the embedded Python scanner against discovered files to extract resource definitions and flag known anti-patterns:

python3 "$(dirname "$0")/scripts/scan_bicep.py" --path <repo-root>

The scanner checks for:

  • Storage accounts without HTTPS-only enforcement
  • Storage accounts with blob public access enabled
  • SQL servers without auditing enabled
  • Key Vaults with soft delete disabled
  • Network Security Groups with unrestricted inbound rules (0.0.0.0/0 on sensitive ports)
  • App Services without HTTPS enforcement
  • Virtual Machines without disk encryption
  • Public IP addresses on resources that should be private
  • Missing diagnostic settings / logging
  • Resources deployed without managed identity

Step 3: Deep Analysis

For each Bicep file, perform contextual analysis beyond pattern matching:

  1. Parameter defaults — Check if security-sensitive parameters have insecure defaults
  2. Conditional deployments — Verify security controls aren't conditionally skipped
  3. Module references — Trace module calls to ensure child modules are also secure
  4. Output exposure — Flag any outputs that leak secrets, connection strings, or keys
  5. API versions — Flag deprecated API versions that may lack security features

Step 4: Generate Report

Produce a findings report organized by severity:

Severity Levels

| Level | Description | |-------|-------------| | 🔴 Critical | Immediate risk — public exposure, missing encryption at rest, credential leakage | | 🟠 High | Significant risk — overly permissive network rules, disabled logging | | 🟡 Medium | Moderate risk — missing best practices, insecure defaults | | 🔵 Low | Informational — optimization opportunities, minor hardening |

Report Format

For each finding:

### [SEVERITY] Finding Title

**Resource**: `resource.symbolicName` (resource type)
**File**: `path/to/file.bicep` (line N)
**Issue**: Description of the security concern
**Risk**: What could go wrong if unaddressed
**Remediation**:

\`\`\`bicep
// Corrected configuration
resource storageAccount 'Microsoft.Storage/storageAccounts@2023-01-01' = {
  properties: {
    supportsHttpsTrafficOnly: true
    allowBlobPublicAccess: false
  }
}
\`\`\`

Step 5: Offer Remediation

After presenting findings, offer to apply fixes directly to the Bicep files using the Edit tool. Group fixes by file and apply them in order.

Security Rules Reference

Storage Accounts

  • supportsHttpsTrafficOnly must be true
  • allowBlobPublicAccess must be false
  • minimumTlsVersion must be TLS1_2
  • networkAcls.defaultAction should be Deny
  • Encryption with customer-managed keys for sensitive data

Key Vault

  • enableSoftDelete must be true
  • enablePurgeProtection must be true
  • enableRbacAuthorization should be true
  • Network ACLs should restrict access

SQL / Database

  • minimalTlsVersion must be 1.2
  • Auditing and threat detection must be enabled
  • Transparent Data Encryption must be enabled
  • Azure AD admin should be configured

App Service / Function App

  • httpsOnly must be true
  • minTlsVersion must be 1.2
  • Managed identity should be enabled
  • ftpsState should be Disabled or FtpsOnly

Network Security Groups

  • No inbound Allow rules from * or 0.0.0.0/0 to ports 22, 3389, 1433, 3306, 5432
  • Deny-all rules should be present as the lowest priority

Virtual Machines

  • OS disk encryption must be enabled
  • Managed identity should be used instead of credentials
  • Boot diagnostics should be enabled

Boundaries

  • Do NOT modify files without user consent
  • Do NOT execute Bicep deployments
  • Do NOT access Azure subscriptions or resource groups
  • Focus only on static analysis of Bicep template content

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/bicep-security-scanner-mrwakaa1/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/bicep-security-scanner-mrwakaa1' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/bicep-security-scanner-mrwakaa1/download' --output '.skill-downloads/bicep-security-scanner-mrwakaa1/SKILL.md.part' && mv '.skill-downloads/bicep-security-scanner-mrwakaa1/SKILL.md.part' '.skill-downloads/bicep-security-scanner-mrwakaa1/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Read, Grep, Glob, Bash, Edit

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/bicep-security-scanner-mrwakaa1/SKILL.md' && test -s '.skill-downloads/bicep-security-scanner-mrwakaa1/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/bicep-security-scanner' && cp -R '.skill-downloads/bicep-security-scanner-mrwakaa1' '.claude/skills/bicep-security-scanner'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/bicep-security-scanner-mrwakaa1'

openskills read 'bicep-security-scanner-mrwakaa1'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/bicep-security-scanner-mrwakaa1/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills