# BRAINIAC Federation Subgraph Exposure Audit

> BRAINIAC Federation Subgraph Exposure Audit is a paid API for AI agents from www.brainiac.software, paid per call via x402, $0.05/call, status unknown (last checked 2026-11-13).

Audits a GraphQL federation setup for subgraph exposure risks, authentication gaps, introspection leaks, and trust boundary violations based on supplied configuration.

## Facts

- Endpoint: POST https://www.brainiac.software/api/v1/graphql-security/federation-subgraph-exposure-audit?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/brainiac-federation-subgraph-exposure-audit-8aa66860
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xRGDjvv9oPJaaG_KeUcZ5

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability brainiac-federation-subgraph-exposure-audit-8aa66860 -d '<json body>'
```

Example prompt: Audit my GraphQL federation setup for security issues — my router has introspection enabled and authentication set to per_subgraph. I have a 'reviews' subgraph with public ingress, its service exposure is 'public', authentication is disabled, and it accepts direct clients. Can you check for trust boundary violations, exposed federation fields, and authentication gaps?

## When to prefer this

Use this endpoint when you need a fast, pay-per-call, no-account static security audit of a GraphQL Apollo Federation or similar federated schema configuration. It is best suited for CI/CD pipelines, pre-deployment checks, or agent-driven compliance workflows where you can describe the configuration programmatically but don't need live network probing. Prefer this over manual review or heavier DAST tools when you want structured, machine-readable findings at $0.05/call with no subscription required.

## Known failure modes

- Invalid subgraph name pattern causes schema validation error
- Subgraph count exceeds maxItems:32 limit — request rejected
- Network rule references a subgraph name not in the subgraphs array
- Missing required fields (name in subgraph, audience in ingress, exposure in service) cause 400-level errors
- Endpoint string exceeds 500 character limit
- Payment not settled via x402 — 402 response with payment instructions returned
- Empty subgraph array (minItems:1 violated) causes rejection

## How this service works

Pay-per-call APIs for AI agents: OFAC sanctions screening, compliance checks, token security, and Base chain data via x402. No account. Fixed USDC price. MCP-ready.

## Output

A JSON object containing an array of findings, each with a code (e.g. federation_field_exposed, configured_public, trust_boundary_violation, authentication_disabled, introspection_enabled), a severity (high/medium/low), the subgraph name, a field name where relevant, and a human-readable detail string explaining the issue. All analysis is static — based solely on the supplied configuration, not live probing.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "router": {
   "type": "object",
   "properties": {
    "sandbox": {
     "type": "boolean"
    },
    "introspection": {
     "type": "boolean"
    },
    "authenticationToSubgraphs": {
     "enum": [
      "required",
      "disabled",
      "per_subgraph",
      "unknown"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "subgraphs": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "name"
    ],
    "properties": {
     "name": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,79}$"
     },
     "ingress": {
      "type": "object",
      "required": [
       "audience"
      ],
      "properties": {
       "audience": {
        "enum": [
         "public",
         "internal",
         "unknown"
        ],
        "type": "string"
       }
      },
      "additionalProperties": false
     },
     "service": {
      "type": "object",
      "required": [
       "exposure"
      ],
      "properties": {
       "exposure": {
        "enum": [
         "cluster_local",
         "internal",
         "public",
         "unknown"
        ],
        "type": "string"
       }
      },
      "additionalProperties": false
     },
     "endpoint": {
      "type": "string",
      "maxLength": 500,
      "minLength": 1
     },
     "introspection": {
      "type": "boolean"
     },
     "authentication": {
      "enum": [
       "required",
       "disabled",
       "unknown"
      ],
      "type": "string"
     },
     "developmentMode": {
      "type": "boolean"
     },
     "federationFields": {
      "type": "object",
      "properties": {
       "service": {
        "enum": [
         "router_only",
         "exposed",
         "unknown"
        ],
        "type": "string"
       },
       "entities": {
        "enum": [
         "router_only",
         "exposed",
         "unknown"
        ],
        "type": "string"
       }
      },
      "additionalProperties": false
     },
     "acceptsDirectClients": {
      "type": "boolean"
     }
    },
    "additionalProperties": false
   },
   "maxItems": 32,
   "minItems": 1
  },
  "networkRules": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "subgraph",
     "source",
     "action"
    ],
    "properties": {
     "action": {
      "enum": [
       "allow",
       "deny"
      ],
      "type": "string"
     },
     "source": {
      "enum": [
       "router
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "findings": [
   {
    "code": "federation_field_exposed",
    "field": "_service",
    "detail": "The supplied policy marks _service as exposed. This was not checked by sending a query.",
    "severity": "high",
    "subgraph": "reviews"
   },
   {
    "code": "federation_field_exposed",
    "field": "_entities",
    "detail": "The supplied policy marks _entities as exposed. This was not checked by sending a query.",
    "severity": "high",
    "subgraph": "reviews"
   },
   {
    "code": "configured_public",
    "detail": "The supplied service exposure is public. This is a configuration label, not a live network observation.",
    "severity": "high",
    "subgraph": "reviews"
   },
   {
    "code": "configured_public",
    "detail": "The supplied ingress audience is public. This is a configuration label, not a live network observation.",
    "severity": "high",
    "subgraph": "reviews"
   },
   {
    "code": "configured_public",
    "detail": "The supplied endpoint host reviews.example.com is not a local, link-local, or private address. The host was not resolved or probed, so this is not evidence that it is reachable from the internet.",
    "severity": "high",
    "subgraph": "reviews"
   },
   {
    "code": "configured_public",
    "detail": "The supplied configuration says this subgraph accepts direct client traffic. This was not checked by opening a connection.",
    "severity": "high",
    "subgraph": "reviews"
   },
   {
    "code": "configured_public",
    "detail": "A supplied network rule allows public or any source. This was not checked against a live firewall.",
    "severity": "high",
    "subgraph": "reviews"
   },
   {
    "code": "trust_boundary_violation",
    "detail": "reviews is not in publicEndpoints. The supplied configuration uses service_public, ingress_public, public_url_host, direct_clients, network_allow. This comparison uses only the request and does not show that the endpoint is reachable.",
    "severity": "high",
    "subgraph": "reviews"
   },
   {
    "code": "authentication_disabled",
    "detail": "The subgraph configuration sets authentication to disabled. The subgraph was not called.",
    "severity": "high",
    "subgraph": "reviews"
   },
   {
    "code": "introspection_enabled",
    "detail": "The supplied configuration enables introspection. This was not checked by sending a query.",
    "severity": "high",
    "subgraph": "reviews"
   },
   {
    "code": "development_mode",
    
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brainiac-federation-subgraph-exposure-audit-8aa66860/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.brainiac.software](https://www.zero.xyz/host/www.brainiac.software/llms.txt)
