Skip to main content
ShadowAI Defense GitHub
← All detections
DET-NET-002 Generic Network Network config Severity: Medium

Generic firewall — block AI API endpoints from non-developer subnets

Block outbound TLS to LLM API endpoints from non-developer subnets to limit script/agent-based use.

Rule

# Generic next-gen firewall policy
#
# Policy: Block outbound HTTPS to LLM API endpoints from non-developer subnets
#
# Match:
#   - Destination FQDN/SNI ∈ {api.openai.com, api.anthropic.com,
#                              generativelanguage.googleapis.com, api.mistral.ai,
#                              api.x.ai, api.deepseek.com, dashscope.aliyuncs.com}
#   - Source: ANY EXCEPT (DEVELOPER_SUBNETS, AI_ENGINEERING_SUBNETS, sanctioned API gateways)
#
# Action: Block, log full record
#
# Logging:
#   - Forwarded to SIEM for correlation with sanctioned-use tracking
#
# Allow-list: maintained as a network group object referencing approved pipelines

How it works

Splits API access from chat access — most knowledge workers do not need API access; developers and AI engineering teams do. Restrict accordingly.

Required data sources

  • Any next-gen firewall with FQDN/SNI matching

Prerequisites

  • Identity-aware or subnet-segmented network
  • Developer/AI engineering subnets identifiable

Expected volume

Block events spike during first weeks of policy then drop as scripted use migrates to sanctioned paths.

False-positive guidance

Some Office add-ins or vendor SaaS integrations call these APIs server-to-server (not from user endpoint). Those typically come from vendor IP space, not user subnet.

Tuning steps

  1. Refresh API endpoint list quarterly.
  2. Maintain sanctioned-egress allow-list with change control.
  3. Pair with API gateway logging for sanctioned flows.

Framework mappings

  • NIST AI RMF: GOVERN-4.1, MANAGE-2.2
  • ISO/IEC 42001: 8.2, 8.3
  • NIST CSF: PR.AC-3, PR.AC-5

Related AI Controls Catalog entries