api-security-review
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.
Thomas Thornton · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add thomast1906/github-copilot-agent-skills --skill api-security-review技能说明
name: api-security-review description: 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. license: MIT metadata: author: Thomas Thornton version: "1.0.0" last-updated: "2026-05-19" azure-services: "api-management, security-center" compliance-frameworks: "owasp-api-top10,azure-security-benchmark,cis-azure"
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'])" />
阅读完整来源 ↗