# CodePulse Secret Scan

> CodePulse Secret Scan is a paid API for AI agents from codepulse-api.hahavoid0.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Scans a block of text for exposed secrets, credentials, and sensitive data leaks such as database URLs, API keys, and passwords

## Facts

- Endpoint: POST https://codepulse-api.hahavoid0.workers.dev/security/secret-scan
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/codepulse-secret-scan-8b8e4128
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_nd99FWlB0Xdrb3dlBx1HR

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 codepulse-secret-scan-8b8e4128 -d '<json body>'
```

Example prompt: Scan this text for any exposed secrets or leaked credentials: 'mysql://root:s3cr3t@prod-db.internal:3306/users DB_PASSWORD=hunter2 STRIPE_SECRET_KEY=sk_live_abc123'

## When to prefer this

Choose this endpoint when you need a quick, pay-per-call secret scan without managing API keys or subscriptions — ideal for ad-hoc checks in agent workflows, CI/CD pipelines, or incident response. Best for scanning discrete text blocks (configs, logs, code snippets) rather than entire repositories. Prefer over heavyweight SAST tools when cost per scan and zero-setup are priorities.

## Known failure modes

- Empty or missing text field returns validation error
- Extremely long text may hit payload size limits
- False positives on dummy/example credentials that match patterns
- False negatives if secrets use unusual encoding or obfuscation
- Payment failure (insufficient USDC balance) blocks the call
- Non-JSON body type may cause parsing errors if schema mismatch

## How this service works

Runs high-accuracy regular expression scans on a text block to find leaked API keys, tokens, or private keys.

## Output

Returns a JSON object indicating whether secrets were found (found: boolean), an array of leak objects each containing the type of secret (e.g. 'Database credentials') and the matched string, a confidence level ('high'/'medium'/'low'), warnings, a supported flag, and a data_as_of timestamp. Also includes an informational disclaimer.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "description": "Text block content to scan"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "found": true,
   "leaks": [
    {
     "type": "Database credentials",
     "match": "mysql://root:secret"
    }
   ]
  },
  "warnings": [],
  "supported": true,
  "confidence": "high",
  "data_as_of": "2026-06",
  "disclaimer": "Informational support only. Not legal, tax, medical, veterinary, or financial advice. Verify with the cited official source or a qualified professional before acting."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/codepulse-secret-scan-8b8e4128/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from codepulse-api.hahavoid0.workers.dev](https://www.zero.xyz/host/codepulse-api.hahavoid0.workers.dev/llms.txt)
