跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
安全

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)

IDThreatAPIM Mitigation
API1Broken Object Level AuthorizationPolicy: validate-jwt + check user claims for resource ownership
API2Broken AuthenticationPolicy: OAuth 2.0 (validate-jwt), no plaintext credentials
API3Broken Object Property Level AuthorizationPolicy: Validate input/output schemas, mask sensitive fields
API4Unrestricted Resource ConsumptionPolicy: rate-limit-by-key (per user/subscription), quota enforcement
API5Broken Function Level AuthorizationPolicy: Validate JWT scopes/roles per operation
API6Unrestricted Access to Sensitive Business FlowsPolicy: Advanced rate limiting, CAPTCHA integration
API7Server Side Request Forgery (SSRF)Network: VNet Internal mode, Private Link to backends
API8Security MisconfigurationInfrastructure: TLS 1.3, disable weak ciphers, NSG rules
API9Improper Inventory ManagementGovernance: Azure API Center, version tracking, deprecation
API10Unsafe Consumption of APIsPolicy: Validate backend responses, timeout policies

Security Controls Checklist

See references/SECURITY_CONTROLS.md for complete 60+ control checklist across 9 categories

Quick Control Summary

  1. Network Security (NS-): VNet Internal, Private Link, NSG, no public IPs
  2. Identity & Access (IA-): OAuth 2.0, MFA, PIM, no service accounts
  3. Data Protection (DP-): TLS 1.3, Key Vault, no PII in logs
  4. Logging & Threat (LT-): App Insights, correlation IDs, SIEM integration
  5. Identity Management (IM-): Managed Identity, RBAC, least privilege
  6. Recovery (RA-): Backups, zone redundancy, DR plan
  7. Governance (GS-): API Center, policy enforcement, compliance
  8. Posture (PS-): Azure Policy, Defender for APIs, vulnerability scanning
  9. 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:

  1. Front Door origin type = Private Link (not Custom or Public)
  2. Private Link target = APIM resource ID
  3. Private Link status = Approved (not Pending)
  4. 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'])" />
阅读完整来源 ↗