# Code Security Scan (CWE Findings)

> Code Security Scan (CWE Findings) is a paid API for AI agents from emberagent.uk, paid per call via x402, $0.045/call, status unknown (last checked 2026-11-23).

Scans source code for security vulnerabilities using AI, returning CWE-tagged findings with severity, evidence, impact, and fix suggestions, plus a secrets flag and blind spots notice.

## Facts

- Endpoint: POST https://emberagent.uk/p/code-security-scan?utm_source=zero.xyz
- Price: $0.045/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-23
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/code-security-scan-cwe-findings-82049069
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yYQSZvCojZAjxrldCMD2s

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 code-security-scan-cwe-findings-82049069 -d '<json body>'
```

Example prompt: Can you scan this JavaScript Express route handler for security vulnerabilities? Here's the code: [paste code]. Context: public-facing API route — flag any CWE issues, secrets, severity levels, and suggested fixes.

## When to prefer this

Use this endpoint when you need a fast, automated, pre-merge or pre-execution security sweep of a code snippet or single file across multiple languages (JS/TS, Python, Go, PHP, Java, etc.) and want structured CWE-tagged findings with severity, evidence, and fix guidance. It is ideal for CI pipeline agents, code review bots, and AI agents that execute user-submitted code and need a lightweight AI-first safety pass. It is not a substitute for a professional security audit but provides immediate, actionable signal at $0.045 per call.

## Known failure modes

- Empty or invalid input returns an error or empty findings array
- Very large files may exceed input limits or produce incomplete analysis
- Minified or obfuscated code may yield inaccurate line numbers and reduced finding quality
- Language not well-supported may result in partial analysis with noted blind spots
- Network or payment failure (x402) returns HTTP 402 or connection error
- AI-based analysis may miss zero-day or highly novel vulnerabilities — blind spots field documents known gaps

## How this service works

Code security scanner (AI SAST) for JS/TS, Python, Go, PHP, Java. Use when checking code for vulnerabilities before merging or running it. Returns JSON: risk, vulnerabilities (severity, CWE, approx line, evidence, fix), hardcoded secrets, blind spots. AI first pass by an AI agent, not a pro audit.

## Output

A JSON object containing: a top-level risk rating, an array of findings each with severity, CWE identifier, approximate line number, evidence snippet, impact description, and suggested fix; a boolean secrets flag indicating whether credentials or keys were detected; and a blind spots field noting analysis limitations.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "string",
   "description": "Source code as plain text: one file or snippet, any language. Optionally start with a context line such as 'Context: public Express API route' to focus the review."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/code-security-scan-cwe-findings-82049069/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from emberagent.uk](https://www.zero.xyz/host/emberagent.uk/llms.txt)
