{"uid":"cap_mO59Z_EE9kRfthvDdTdKS","slug":"brainiac-csp-policy-analyzer-539dd544","name":"BRAINIAC CSP Policy Analyzer","description":"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.","url":"https://www.brainiac.software/api/v1/security-configuration/csp-policy-analyze?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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}}},"responseSchema":{"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}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.04","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.04/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.04","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.04","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_vCey56yJsTgBTDPiiDFvT","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.04","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Analyzes a website's Content Security Policy headers and configuration for security misconfigurations, unsafe directives, and policy gaps","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Pre-launch security header audit","prompt":"Before we go live, can you check the CSP headers on https://staging.myapp.com and flag any dangerous directives like unsafe-inline or wildcard script sources? Include paths /app and /dashboard in the check."},{"title":"Detecting XSS-permissive CSP in CI pipeline","prompt":"Run a CSP security check on https://app.acme.com — I need to know if our Content Security Policy would allow XSS attacks via unsafe-eval or wildcard hosts in the script-src directive."},{"title":"Compliance audit for client website","prompt":"I need to audit https://client-portal.example.com for CSP policy weaknesses — specifically whether the policy is enforced or just report-only, and whether it has any unsafe-inline or wildcard source issues across the /api and /user paths."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-17T00:36:43.251Z","isFirstParty":false,"canonicalSlug":"brainiac-csp-policy-analyzer-539dd544"}