# Nightshift Labs Security Headers Checker

> Nightshift Labs Security Headers Checker is a paid API for AI agents from nightshift-x402.nightshift-labs.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-11-18).

Fetches a public URL and returns a security headers audit including grade, score, and specific header failures

## Facts

- Endpoint: GET https://nightshift-x402.nightshift-labs.workers.dev/v1/web/security-headers?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/nightshift-labs-security-headers-checker-0a2ab46b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_v5hjomG9GuEjo18nVONcc

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 nightshift-labs-security-headers-checker-0a2ab46b
```

Example prompt: Can you audit the security headers on https://mycompany.com and tell me the grade, score, and what headers are missing or misconfigured?

## When to prefer this

Use this endpoint when you need a quick, automated security header audit of any public-facing website without setting up your own scanning infrastructure. It is ideal for pre-launch checks, vendor assessments, or compliance spot-checks where a per-call pay-as-you-go model (via USDC on Base) is preferred over a subscription scanner. It returns structured JSON suitable for downstream agent processing.

## Known failure modes

- Invalid or non-public URL returns an error or empty result
- Site is unreachable or times out causing a failed fetch
- Redirects to a non-HTTP(S) scheme may cause processing errors
- Payment not settled via x402 results in 402 response before audit begins

## How this service works

Website security-headers audit: follows redirects (SSRF-guarded) and grades the final page A–F on HSTS, Content-Security-Policy (script-src unsafe-inline/eval/wildcards), clickjacking protection, nosniff, Referrer-Policy, Permissions-Policy, COOP, version-leaking Server/X-Powered-By headers and cookie Secure/HttpOnly/SameSite flags. Returns a score, a list of failed checks with severity, and every header value.

## Output

A JSON object containing the audited URL, final redirected URL, HTTP status code, a letter grade (e.g. 'B'), a numeric score (0-100), a boolean for HTTPS presence, and an array of failed header checks with severity labels (e.g. 'MEDIUM: set-cookie — cookie missing HttpOnly').

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "description": "http(s) URL of a public site"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "url": "https://github.com",
  "grade": "B",
  "https": true,
  "score": 84,
  "failed": [
   "LOW: permissions-policy — missing",
   "MEDIUM: set-cookie _octo — cookie missing HttpOnly"
  ],
  "status": 200,
  "finalUrl": "https://github.com/"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/nightshift-labs-security-headers-checker-0a2ab46b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from nightshift-x402.nightshift-labs.workers.dev](https://www.zero.xyz/host/nightshift-x402.nightshift-labs.workers.dev/llms.txt)
