# DopamineDesk Code Security Audit API

> DopamineDesk Code Security Audit API is a paid API for AI agents from ai-data-marketplace-1042299154756.us-central1.run.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Analyzes source code snippets for security vulnerabilities, SQL injection, secrets exposure, and risk level via pay-per-use USDC micropayment.

## Facts

- Endpoint: GET https://ai-data-marketplace-1042299154756.us-central1.run.app/api/v1/code_audit
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/dopaminedesk-code-security-audit-api-d7635fa2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8U3HSwPfkyYKW7iMkpF5k

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 dopaminedesk-code-security-audit-api-d7635fa2
```

Example prompt: Can you audit this Python snippet for security vulnerabilities and tell me the risk level? Here's the code: `query = 'SELECT * FROM users WHERE id = ' + user_input`

## When to prefer this

Choose this endpoint when you need fast, per-snippet static security analysis with pay-as-you-go USDC micropayment (no subscription), especially in agentic pipelines that need vulnerability classification with line-level detail and severity scoring for Python, JavaScript, Go, or other common languages.

## Known failure modes

- Missing 'code' field returns validation error
- Unsupported or misspelled language identifier may reduce detection accuracy
- Very large code snippets may timeout or be truncated
- Ambiguous or minified code may produce false positives or miss issues
- Payment failure via x402 returns 402 response blocking execution

## How this service works

Scan supplied code with transparent deterministic rules for common secret, injection, shell, weak-hash, and Solidity risks. This is not a professional audit.

## Output

Returns a JSON object containing a list of identified issues (each with line number, vulnerability type, severity level, and description), an overall risk_level (e.g. 'high'), a list of any secrets_found, and a status field indicating completion.

## 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": [
      "code",
      "language"
     ],
     "properties": {
      "code": {
       "type": "string",
       "description": "The source code snippet."
      },
      "language": {
       "type": "string",
       "description": "Programming language (python, javascript, go, etc.)."
      }
     },
     "additionalProperties": true
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "success",
      "engine",
      "language",
      "caveat",
      "lines_scanned",
      "findings_count",
      "findings",
      "marketplace_metadata"
     ],
     "properties": {
      "caveat": {
       "type": "string"
      },
      "engine": {
       "type": "string"
      },
      "success": {
       "type": "boolean"
      },
      "findings": {
       "type": "array",
       "items": {
        "type": "string"
       }
      },
      "language": {
       "type": "string"
      },
      "lines_scanned": {
       "type": "integer"
      },
      "findings_count": {
       "type": "integer"
      },
      "marketplace_metadata": {
       "type": "object",
       "required": [
        "data_mode",
        "billable",
        "availability",
        "source"
       ],
       "properties": {
        "source": {
         "type": "string"
        },
        "billable": {
         "type": "boolean"
        },
        "data_mode": {
         "type": "string"
        },
        "availability": {
         "type": "string"
        }
       },
       "additionalProperties": true
      }
     },
     "additionalProperties": true
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "caveat": "This is a fast heuristic scan, not a professional security audit.",
  "engine": "deterministic_static_rules_v1",
  "success": true,
  "findings": [
   "[nested detail omitted from the challenge header; see the full example in /openapi.json]"
  ],
  "language": "python",
  "lines_scanned": 2,
  "findings_count": 1,
  "marketplace_metadata": {
   "source": "deterministic static rules",
   "billable": true,
   "data_mode": "computed_service",
   "availability": "operational"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/dopaminedesk-code-security-audit-api-d7635fa2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from ai-data-marketplace-1042299154756.us-central1.run.app](https://www.zero.xyz/host/ai-data-marketplace-1042299154756.us-central1.run.app/llms.txt)
