{"uid":"cap_dN0MN_4ISNcgLm76uSNRP","slug":"csp-directive-parse-d31f6e7f","name":"CSP Directive Parse","description":"CSP Directive Parse: CSP Directive Parse parses Content-Security-Policy directives into normalized source lists from bounded caller-supplied values without an external provider. Call CSP Directive Parse before accepting, caching, redirecting, or retrying a caller-supplied web response. Returns normalized web evidence, the computed finding, and an explicit pass or advisory status for CSP Directive Parse as versioned deterministic JSON. Price: $0.001 USDC via x402 on Base. First-party, stateless,…","url":"https://api.delx.ai/api/v1/x402/csp-directive-parse","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"header":{"type":"string","maxLength":8192,"description":"Header supplied to CSP Directive Parse; used only for this bounded calculation and processed in memory without retention."}}},"responseSchema":{"type":"json","example":{"result":{"count":3,"directives":{"img-src":["'self'","https:"],"object-src":["'none'"],"default-src":["'self'"]}},"schema":"delx/util-csp-directive-parse/v1","status":"pass","evidence":{"retained":false,"input_sha256":"16664d9b05dde627e8d811fbffe5a404de8cef67d018c7c5f1017d3fed519e30","external_calls":0},"operation":"web_reliability:csp_directive_parse"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_t95Il9094uGpTvy6tZa8p","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Parses a Content-Security-Policy header value into normalized source lists and returns a structured pass/advisory finding with deterministic versioned JSON","exampleAgentPrompt":"Can you parse this Content-Security-Policy header for me and tell me what directives and source lists it contains, and whether it passes or just has advisories: \"default-src 'self'; script-src 'self' https://cdn.example.com; img-src *\"?","exampleUseCases":[{"title":"Pre-cache CSP header validation","prompt":"Before I cache this HTTP response, parse the Content-Security-Policy header \"default-src 'none'; connect-src 'self' https://api.myapp.com; frame-ancestors 'none'\" and tell me if it passes or has any advisories."},{"title":"Security audit of third-party response","prompt":"I just got a response from a third-party API and the CSP header is \"script-src 'unsafe-inline' 'unsafe-eval' *\" — can you parse it into normalized directives and flag any issues?"},{"title":"Redirect safety check on CSP","prompt":"I'm about to follow a redirect and want to validate the CSP header first: \"default-src 'self'; img-src 'self' data:; style-src 'self' 'unsafe-inline'\" — parse it and give me the pass/advisory status."}],"resultDescription":"Returns versioned deterministic JSON containing: normalized web evidence (parsed CSP directives with their source lists), the computed security finding, and an explicit pass or advisory status indicating whether the CSP header is well-formed and acceptable.","failureModes":["Malformed or excessively long header value exceeding 8192 characters returns a validation error","Empty header string may return an advisory or error finding","Payment failure via x402 prevents the call from being processed","Non-CSP header strings may parse with unexpected or empty directive lists"],"whenToPreferThis":"Choose this endpoint when you need deterministic, stateless, in-memory parsing of a Content-Security-Policy header into structured directives before accepting, caching, redirecting, or retrying a caller-supplied web response — especially in agentic pipelines where reproducible, versioned JSON output is required without external dependencies or data retention.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T07:04:10.439Z","isFirstParty":false}