TOOLS / AI SURFACE

FREEOPEN SOURCERUNS OFFLINECI/CD

Find the AI attack surface your code is about to ship.

AI Surface finds agents, MCP servers, RAG stores, LLM calls and APIs in your source code. It flags new risk before merge and analyzes code locally, so your source never leaves the machine.

uvx --from apisec-ai-surface ai-surface scan .Copy

MIT · NO TELEMETRY · LOCAL ANALYSIS

TERMINAL REPORTEXAMPLE REPO
AI Attack Surface ReportProject: example application · illustrative output19 production AI surfaces · 25 risk indicators · 8 detectorsAGENT FRAMEWORKS• Support agent · tools detected▲ HIGH · Financial actions lack human approvalRecommendation: require approval for financial actions.MCP SERVERS• Payments connector · configured server▲ HIGH · Secrets referenced in environment configurationVECTOR STORES / RAG• Retrieval pipeline · external contentAPI ENDPOINTS• Application endpoints · inventory included

WHAT IT DETECTS

Eight categories of AI surface.

OUTPUTTERMINALJSONMARKDOWNCycloneDX AI-BOMSARIF
01

Agent frameworks

LangChain, LangGraph, CrewAI and more.

02

MCP servers

The MCP servers your agents can call.

03

Vector stores / RAG

Stores and retrieval components that supply context.

04

LLM SDK call sites

Calls to model-provider SDKs.

05

API endpoints

OpenAPI and routes from common web frameworks.

06

Model gateways

LiteLLM, Portkey, Helicone and other model gateways.

07

AI infrastructure

Deployment manifests and infrastructure definitions.

08

AI provider keys

Key names only. Secret values aren’t displayed.

IN CI/CD

A gate on every pull request.

  • PR comments update as the branch changes.
  • The baseline limits the gate to new risk.
  • Uses GitHub’s built-in token for comments. No APIsec keys.
  • The local UI runs on loopback only.
View GitHub Action setup →
.github/workflows/ai-surface.ymlYAML
name: AI Surface Checkon: [pull_request]permissions: contents: read pull-requests: writejobs: ai-surface: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - uses: apisec-inc/AI-Surface@v1 with: path: '.' comment-on-pr: 'true' fail-on: 'high'

WHERE IT FITS

The one check that runs before merge.

Maps findings to OWASP LLM Top 10, the EU AI Act, NIST AI RMF and ISO/IEC 42001. It produces evidence; it doesn’t certify compliance.

CategoryWhat it seesWhen
SASTCode-pattern vulnerabilitiesAfter commit; no AI inventory
DASTReachable web vulnerabilitiesAfter deploy; not agent internals
SCAVulnerable dependenciesAfter commit; packages, not AI usage
ObservabilityWhat LLM calls happenedAfter deploy; requires runtime traffic
AI-SPM / AI governanceCloud and runtime AI postureRuntime-first; not a PR gate
APIsec platformAI and API surfaces validated at runtimeRuntime validation and evidence

PROVEN ON REAL CODE

19 open-source repos, about 941k stars.

Read the State of AI Surface report →
SHIP AGENTS
83%
EXPOSE MCP
42%
TRIP A GOV RULE
100%
For every application you run

Find what's deployed and prove which exploits are real.

Go to apisec.ai