# Sentinel402 PII & Secret Guardrail Scanner

> Sentinel402 PII & Secret Guardrail Scanner is a paid API for AI agents from pii-guardrail.chronokey.workers.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-12).

Scans outbound text or JSON payloads for PII and leaked secrets using 34 configurable rules, returning risk scores, findings, and optionally redacted or blocked output

## Facts

- Endpoint: POST https://pii-guardrail.chronokey.workers.dev/v1/scan?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sentinel402-pii-secret-guardrail-scanner-30ab2d76
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DaefY1kl5bJAXoaWrYaR5

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 sentinel402-pii-secret-guardrail-scanner-30ab2d76 -d '<json body>'
```

Example prompt: Before sending this response to the user, redact any PII or secrets from it — use block mode if the risk score exceeds 40, and only flag findings at medium severity or above.

## When to prefer this

Use this endpoint when you need real-time PII and secret detection on outbound text or JSON payloads before they are sent, logged, or stored — especially in AI agent pipelines where LLM outputs may inadvertently echo sensitive user data. Prefer this over client-side regex when you need a scored, multi-rule engine with 34 built-in patterns covering credit cards, SSNs, API keys, and more. The block mode makes it suitable as a hard guardrail, not just a reporting tool.

## Known failure modes

- Text exceeds 32,000 character limit — request rejected
- Invalid mode enum value — validation error returned
- Conflicting `text` and `payload` fields both provided — mutually exclusive
- Payment not settled via x402 — 402 Payment Required response
- Unknown rule ID in `rules`, `enable`, or `disable` arrays — rule not found error
- Empty input text or payload — no findings, risk score 0
- blockThreshold set but mode is not block — threshold ignored silently

## How this service works

Paid tools for AI agents over x402: a PII and secret guardrail that scans outbound payloads, live citable data (crypto, weather, GitHub, sports, FX), and an RCP/1 retrieval server backed by that live data.

## Output

Returns a JSON object with: overall risk score (0-100), decision (detect/redact/block), counts of findings by severity (low/medium/high/critical), detailed findings list per rule (rule name, count, severity, confidence, character positions, preview with redaction tokens), sanitized text or sanitized JSON payload clone, scan metadata (CPU time, rules applied, engine version), and x402 payment settlement details.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "mode": {
   "enum": [
    "detect",
    "redact",
    "block"
   ],
   "type": "string",
   "description": "detect = report only (default). redact = also return sanitized text. block = fail closed when findings exist."
  },
  "text": {
   "type": "string",
   "description": "Text to scan for PII and leaked secrets. Mutually exclusive with `payload`. Max 32000 chars."
  },
  "rules": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "Explicit rule ids, e.g. [\"CREDIT_CARD\",\"SSN\"]. Defaults to the standard profile (34 rules)."
  },
  "enable": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "Rule ids to add to the default profile, e.g. [\"IPV6\",\"SWIFT_BIC\"]."
  },
  "disable": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "Rule ids to remove, e.g. [\"IPV4\"] if client IPs are expected."
  },
  "payload": {
   "description": "Any JSON to scan instead of raw text. Returns a structurally identical sanitized clone as `sanitizedPayload`."
  },
  "minSeverity": {
   "enum": [
    "low",
    "medium",
    "high",
    "critical"
   ],
   "type": "string",
   "description": "Only report findings at or above this severity."
  },
  "blockThreshold": {
   "type": "number",
   "description": "Risk score (0-100) at which `block` mode refuses. Default 40."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "meta": {
   "mode": "redact",
   "cpuMs": 1,
   "rulesApplied": 34,
   "engineVersion": "1.1.0"
  },
  "risk": 100,
  "x402": {
   "network": "eip155:8453",
   "settled": true,
   "facilitator": "https://facilitator.payai.network",
   "transaction": "0xabc123"
  },
  "counts": {
   "low": 0,
   "high": 0,
   "medium": 0,
   "critical": 1
  },
  "decision": "redact",
  "findings": [
   {
    "rule": "CREDIT_CARD",
    "count": 1,
    "label": "Credit / debit card number (PAN)",
    "samples": [
     {
      "end": 31,
      "start": 12,
      "preview": "[CREDIT_CARD:************4242]",
      "confidence": 0.99,
      "contextual": false
     }
    ],
    "severity": "critical",
    "confidence": 0.99
   }
  ],
  "sanitized": "Charge card [CREDIT_CARD:************4242] for order 991.",
  "truncated": false,
  "scannedChars": 51
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sentinel402-pii-secret-guardrail-scanner-30ab2d76/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pii-guardrail.chronokey.workers.dev](https://www.zero.xyz/host/pii-guardrail.chronokey.workers.dev/llms.txt)
