api-security-review
Security audit tool for Azure API Management compliance and configuration.
Install
mkdir -p .claude/skills/api-security-review && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/10216" && unzip -o skill.zip -d .claude/skills/api-security-review && rm skill.zipInstalls to .claude/skills/api-security-review
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Reviews Azure API Management configurations for security vulnerabilities, OWASP API Security Top 10 compliance, VNet Internal mode validation, Private Link verification, and Azure Security Benchmark alignment. Use when performing security audits, pre-deployment validation, or compliance reviews.Key capabilities
- →Audit APIM security
- →Validate OWASP compliance
- →Check network configurations
- →Verify private link setup
How it works
It reviews APIM configurations against OWASP API Security Top 10 and Azure Security Benchmark.
Inputs & outputs
When to use api-security-review
- →Validate APIM security before deployment
- →Check for OWASP API compliance
- →Audit private network configurations
- →Identify authentication vulnerabilities
About this skill
API Security Review Skill
Performs comprehensive security reviews of Azure API Management configurations, policies, and network architecture with focus on OWASP API Security Top 10 and Azure Security Benchmark.
When to Use This Skill
Activate this skill when users need:
- Security audits: Comprehensive review of APIM configuration and policies
- Pre-deployment validation: Security checklist before production deployment
- Compliance reviews: OWASP API Top 10, Azure Security Benchmark, CIS Azure alignment
- Vulnerability assessments: Identify security gaps in authentication, network, policies
- Incident response: Review configuration after security incident
- Architecture validation: Verify VNet Internal mode, Private Link, authentication setup
Security Review Framework
1. OWASP API Security Top 10 (2023 RC)
| ID | Threat | APIM Mitigation |
|---|---|---|
| API1 | Broken Object Level Authorization | Policy: validate-jwt + check user claims for resource ownership |
| API2 | Broken Authentication | Policy: OAuth 2.0 (validate-jwt), no plaintext credentials |
| API3 | Broken Object Property Level Authorization | Policy: Validate input/output schemas, mask sensitive fields |
| API4 | Unrestricted Resource Consumption | Policy: rate-limit-by-key (per user/subscription), quota enforcement |
| API5 | Broken Function Level Authorization | Policy: Validate JWT scopes/roles per operation |
| API6 | Unrestricted Access to Sensitive Business Flows | Policy: Advanced rate limiting, CAPTCHA integration |
| API7 | Server Side Request Forgery (SSRF) | Network: VNet Internal mode, Private Link to backends |
| API8 | Security Misconfiguration | Infrastructure: TLS 1.3, disable weak ciphers, NSG rules |
| API9 | Improper Inventory Management | Governance: Azure API Center, version tracking, deprecation |
| API10 | Unsafe Consumption of APIs | Policy: Validate backend responses, timeout policies |
Security Controls Checklist
See references/SECURITY_CONTROLS.md for complete 60+ control checklist across 9 categories
Quick Control Summary
- Network Security (NS-): VNet Internal, Private Link, NSG, no public IPs
- Identity & Access (IA-): OAuth 2.0, MFA, PIM, no service accounts
- Data Protection (DP-): TLS 1.3, Key Vault, no PII in logs
- Logging & Threat (LT-): App Insights, correlation IDs, SIEM integration
- Identity Management (IM-): Managed Identity, RBAC, least privilege
- Recovery (RA-): Backups, zone redundancy, DR plan
- Governance (GS-): API Center, policy enforcement, compliance
- Posture (PS-): Azure Policy, Defender for APIs, vulnerability scanning
- DevSecOps (DV-): APIOps, IaC security, secret scanning
Important: MCP Tools (ALWAYS Use)
1. Call Security Best Practices FIRST
Tool: mcp_azure_mcp_get_azure_bestpractices
Intent: "Azure API Management security best practices"
2. Search Security Documentation
Tool: mcp_azure_mcp_documentation search
Query: "APIM security best practices OWASP"
3. Query Existing Resources (If Reviewing Deployed Environment)
Tool: azure_resources-query_azure_resource_graph
Intent: "Get API Management instances with network configuration and SKU details"
Critical Security Validations
1. VNet Internal Mode Validation
Check: APIM instances deployed in VNet Internal mode (no public IP)
// Azure Resource Graph Query
resources
| where type == 'microsoft.apimanagement/service'
| extend vnetType = properties.virtualNetworkType
| where vnetType != 'Internal'
| project name, resourceGroup, location, vnetType, sku=properties.sku.name
Expected: vnetType == 'Internal' for all production APIM instances
Risk if External: Gateway endpoint exposed to public internet, larger attack surface
2. Private Link Validation
Check: Azure Front Door connects to APIM via Private Link (not public origin)
Validation Steps:
- Front Door origin type =
Private Link(notCustomorPublic) - Private Link target = APIM resource ID
- Private Link status =
Approved(notPending) - APIM has no public DNS record resolving to public IP
Risk if Public: Traffic goes over public internet, no zero-trust architecture
3. Authentication Configuration
Check: APIs use OAuth 2.0 (validate-jwt policy) or subscription keys (not both for sensitive APIs)
Policy Review:
<!-- GOOD: OAuth for sensitive APIs -->
<validate-jwt header-name="Authorization">
<openid-config url="https://login.microsoftonline.com/{tenant}/..." />
<required-claims>
<claim name="scp" match="any">
<value>api.read</value>
</claim>
</required-claims>
</validate-jwt>
<!-- BAD: No authentication -->
<policies>
<inbound>
<base />
<!-- No validate-jwt or check-header -->
</inbound>
</policies>
Risk if Missing: Unauthenticated access to sensitive data, API abuse
4. Rate Limiting Configuration
Check: All APIs have rate limiting (rate-limit-by-key or quota-by-key)
Policy Review:
<!-- GOOD: Per-user rate limiting -->
<rate-limit-by-key calls="1000" renewal-period="3600"
counter-key="@((string)context.Variables['userId'])" />
<!-- BAD: No rate limiting -->
<policies>
<inbound>
<base />
<!-- No rate-limit-by-key -->
</inbound>
</policies>
Risk if Missing: API4 Unrestricted Resource Consumption, DDoS vulnerability
5. TLS Configuration
Check: TLS 1.2+ only, no SSL 3.0/TLS 1.0/TLS 1.1
Azure Portal Validation:
- APIM → Security → Protocols → TLS 1.0 Disabled
- APIM → Security → Protocols → TLS 1.1 Disabled
- APIM → Security → Protocols → SSL 3.0 Disabled
- APIM → Security → Ciphers → Weak ciphers Disabled
Risk if Enabled: Vulnerable to BEAST, POODLE, CRIME attacks
6. Secret Management
Check: All secrets/certificates stored in Azure Key Vault (not in policies or code)
Policy Review:
<!-- GOOD: Secret from Key Vault -->
<set-header name="X-API-Key">
<value>{{api-backend-key}}</value> <!-- Named value linked to Key Vault -->
</set-header>
<!-- BAD: Hardcoded secret -->
<set-header name="X-API-Key">
<value>sk-abc123xyz789</value>
</set-header>
Risk if Hardcoded: Secret exposure in logs, code repositories, APIM exports
7. CORS Configuration
Check: CORS policies have specific origins (not * wildcard for production)
<!-- GOOD: Specific origins -->
<cors allow-credentials="true">
<allowed-origins>
<origin>https://app.example.com</origin>
</allowed-origins>
</cors>
<!-- Warning: ACCEPTABLE FOR DEV: Wildcard -->
<cors allow-credentials="false">
<allowed-origins>
<origin>*</origin>
</allowed-origins>
</cors>
<!-- BAD: Wildcard with credentials -->
<cors allow-credentials="true">
<allowed-origins>
<origin>*</origin> <!-- Security risk! -->
</allowed-origins>
</cors>
Risk: CSRF attacks, credential theft if misconfigured
8. Error Response Validation
Check: Error responses don't leak sensitive information (stack traces, internal IPs)
Policy Review:
<!-- GOOD: Generic error -->
<on-error>
<set-body>@{
return new JObject(
new JProperty("error", "Internal server error"),
new JProperty("correlationId", context.Variables["correlationId"])
).ToString();
}</set-body>
</on-error>
<!-- BAD: Detailed error -->
<on-error>
<set-body>@{
return context.LastError.Message; // Might contain stack trace, DB connection strings
}</set-body>
</on-error>
Risk: Information disclosure (API3, API8)
Security Review Output Format
When performing security review, structure findings as:
Finding: [Title]
- Severity: Critical | High | Medium | Low
- OWASP Mapping: API1, API4, API8, etc.
- Azure Security Benchmark: NS-1, DP-2, IA-3, etc.
- Current State: What was found
- Risk: Impact if not fixed
- Remediation: Step-by-step fix with code examples
- Microsoft Docs: Link to official guidance
- Priority: Immediate | Before Production | Post-Launch
Example:
Finding: VNet External Mode Detected
- Severity: Critical
- OWASP Mapping: API7 (SSRF), API8 (Security Misconfiguration)
- Azure Security Benchmark: NS-1 (Network Segmentation)
- Current State: APIM instance
apim-api-marketplace-prod-uksdeployed in VNet External mode with gateway endpoint10.2.1.4exposed via public IP - Risk: Gateway endpoint accessible from public internet, no network isolation, vulnerable to DDoS bypassing Front Door
- Remediation:
- Redeploy APIM in VNet Internal mode:
az apim update --name apim-api-marketplace-prod-uks --resource-group rg-apim-prod-uks \ --virtual-network-type Internal - Update Front Door origin to use Private Link (not public IP)
- Verify no public DNS resolution:
nslookup apim-api-marketplace-prod-uks.azure-api.netshould return internal IP only
- Redeploy APIM in VNet Internal mode:
- Microsoft Docs: APIM VNet Internal Mode
- Priority: Immediate (block production deployment)
Azure Security Benchmark Quick Reference
| Control ID | Category | Requirement | APIM Implementation |
|---|---|---|---|
| NS-1 | Network Segmentation | Isolate workloads | VNet Internal mode |
| NS-2 | Private Connectivity | Private Link/Endpoints | Front Door → APIM Private Link |
| NS-4 | DDoS Protection | Enable DDoS Standard or ingress with DDoS | Front Door Premium (DDoS included) |
| IA-2 | Secure Authen |
Content truncated.
When not to use it
- →Non-Azure environments
- →General API performance testing
Prerequisites
Limitations
- →Requires Azure environment access
How it compares
It provides a specialized security framework for Azure APIM rather than generic API testing.
Compared to similar skills
api-security-review side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| api-security-review (this skill) | 0 | 2mo | Review | Advanced |
| azure-partner-solutions | 0 | 4mo | No flags | Advanced |
| cloud-penetration-testing | 3 | 6mo | Review | Advanced |
| azure-bgp | 2 | 6mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by thomast1906
View all by thomast1906 →You might also like
azure-partner-solutions
RobGibbens
Expert knowledge for Azure Partner Solutions development including troubleshooting, decision making, architecture & design patterns, security, configuration, and integrations & coding patterns. Use when building, debugging, or optimizing Azure Partner Solutions applications. Not for Azure Industry (
cloud-penetration-testing
davila7
This skill should be used when the user asks to "perform cloud penetration testing", "assess Azure or AWS or GCP security", "enumerate cloud resources", "exploit cloud misconfigurations", "test O365 security", "extract secrets from cloud environments", or "audit cloud infrastructure". It provides comprehensive techniques for security assessment across major cloud platforms.
azure-bgp
benchflow-ai
Analyze and resolve BGP oscillation and BGP route leaks in Azure Virtual WAN–style hub-and-spoke topologies (and similar cloud-managed BGP environments). Detect preference cycles, identify valley-free violations, and propose allowed policy-level mitigations while rejecting prohibited fixes.
building-cloud-siem-with-sentinel
26zl
This skill covers deploying Microsoft Sentinel as a cloud-native SIEM
azure-cloud-security-review
shyamagu-ms
>
performing-cloud-forensics-investigation
yanacuti1121
Conduct forensic investigations in cloud environments by collecting and