# BRAINIAC CSP Policy Analyzer

> BRAINIAC CSP Policy Analyzer is a paid API for AI agents from www.brainiac.software, paid per call via x402, $0.04/call, status unknown (last checked 2026-11-17).

Analyzes a website's Content Security Policy headers and configuration for security misconfigurations, unsafe directives, and policy gaps

## Facts

- Endpoint: POST https://www.brainiac.software/api/v1/security-configuration/csp-policy-analyze?utm_source=zero.xyz
- Price: $0.04/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/brainiac-csp-policy-analyzer-539dd544
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_mO59Z_EE9kRfthvDdTdKS

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-csp-policy-analyzer-539dd544 -d '<json body>'
```

Example prompt: Can you audit the Content Security Policy on https://www.example.com and tell me if it allows unsafe-inline scripts, unsafe-eval, or wildcard sources? Also check the /login and /checkout paths.

## When to prefer this

Use this endpoint when you need a lightweight, pay-per-call, accountless CSP security audit without setting up a full scanner. It is ideal for agents performing automated pre-deployment checks, CI/CD security gates, or spot-checking third-party sites for CSP misconfigurations. It is especially useful when you already have headers or TLS metadata available from a prior fetch and want deep CSP analysis without an additional round-trip tool.

## Known failure modes

- URL unreachable or returns non-2xx — findings may be empty or unavailable
- Site does not return a CSP header — relevant checks marked unavailable
- TLS mismatch or certificate errors may prevent fetching — authorized field in TLS should be true
- Malformed Content-Security-Policy string — parser may produce partial directives
- Rate limiting or firewall blocking the probe request — requestsSent may be 0
- Paths or endpoints not provided — only the base URL is checked

## How this service works

Read Content-Security-Policy from a public response or from policy text supplied by the caller. unsafe-inline, unsafe-eval, a script wildcard, and data: scripts are confirmed. This is not a full policy review.

## Output

Returns a structured JSON object with: enforcement status (enforced vs report-only), a list of findings each with a code (e.g. csp_unsafe_inline), kind (confirmed/unavailable), detail, and affected directive; the full parsed list of CSP directives with names and values; counts of confirmed issues, unavailable checks, and recommendations; a websiteSecure boolean; the final resolved URL; timestamp; number of requests sent; and a list of limitations explaining the scope of the checks performed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "tls": {
   "type": "object",
   "properties": {
    "issuer": {
     "type": "string",
     "maxLength": 200
    },
    "subject": {
     "type": "string",
     "maxLength": 200
    },
    "validTo": {
     "type": "string",
     "maxLength": 80
    },
    "protocol": {
     "type": "string",
     "maxLength": 40
    },
    "validFrom": {
     "type": "string",
     "maxLength": 80
    },
    "authorized": {
     "type": "boolean"
    },
    "hostnameMatches": {
     "type": "boolean"
    }
   },
   "additionalProperties": false
  },
  "url": {
   "type": "string",
   "pattern": "^https?:\\/\\/\\S+$",
   "maxLength": 2000,
   "minLength": 8
  },
  "paths": {
   "type": "array",
   "items": {
    "type": "string",
    "maxLength": 200,
    "minLength": 1
   },
   "maxItems": 4
  },
  "origin": {
   "type": "string",
   "maxLength": 200,
   "minLength": 8
  },
  "headers": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "name",
     "value"
    ],
    "properties": {
     "name": {
      "type": "string",
      "maxLength": 80,
      "minLength": 1
     },
     "value": {
      "type": "string",
      "maxLength": 4000
     }
    },
    "additionalProperties": false
   },
   "maxItems": 40
  },
  "endpoints": {
   "type": "array",
   "items": {
    "type": "string",
    "pattern": "^https?:\\/\\/\\S+$",
    "maxLength": 2000,
    "minLength": 8
   },
   "maxItems": 4
  },
  "transport": {
   "enum": [
    "http",
    "https"
   ],
   "type": "string"
  },
  "setCookies": {
   "type": "array",
   "items": {
    "type": "string",
    "maxLength": 2000
   },
   "maxItems": 20
  },
  "contentSecurityPolicy": {
   "type": "string",
   "maxLength": 8000
  },
  "contentSecurityPolicyReportOnly": {
   "type": "string",
   "maxLength": 8000
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "status": "checked",
  "enforced": true,
  "finalUrl": "",
  "findings": [
   {
    "code": "csp_unsafe_inline",
    "kind": "confirmed",
    "detail": "script-src or default-src allows unsafe-inline.",
    "subject": "script-src"
   },
   {
    "code": "csp_unsafe_eval",
    "kind": "confirmed",
    "detail": "script-src or default-src allows unsafe-eval.",
    "subject": "script-src"
   },
   {
    "code": "csp_script_wildcard",
    "kind": "confirmed",
    "detail": "script-src or default-src allows every host.",
    "subject": "script-src"
   }
  ],
  "checkedAt": "2026-11-03T16:00:00.000Z",
  "directives": [
   {
    "name": "default-src",
    "value": "'self'"
   },
   {
    "name": "script-src",
    "value": "'unsafe-inline' 'unsafe-eval' *"
   }
  ],
  "httpStatus": 0,
  "limitations": [
   "These checks do not show that a website is secure.",
   "Only one public GET is sent per supplied URL or path. No login, brute force, exploit, or credential test is attempted.",
   "A path or endpoint is requested only when the caller lists it.",
   "Cookie values are not copied into the response.",
   "An unavailable check means that configuration was not in the response."
  ],
  "requestedUrl": "",
  "requestsSent": 0,
  "websiteSecure": false,
  "confirmedCount": 3,
  "unavailableCount": 0,
  "securityDetermined": false,
  "recommendationCount": 0
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brainiac-csp-policy-analyzer-539dd544/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)
