{"uid":"cap_-7xVih3HnmFlkvvptaBm1","slug":"wealth-agent-code-review-5f0b1c30","name":"Wealth Agent Code Review","description":"Reviews source code and returns line-numbered findings with severity and a concrete fix, combining deterministic static rules (eval, SQL concat, secrets, shell injection) with an AI review. Call it before merging or running untrusted code. Input: {\"code\": \"...\", \"language\": \"javascript\"}.","url":"https://wealth-agent.wealthagent-app.workers.dev/api/x402/code-review?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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"],"properties":{"code":{"type":"string","description":"Source code to review (10-60,000 chars)"},"language":{"type":"string","description":"Optional language hint, e.g. javascript, python, go"}}}}},"output":{"type":"object","properties":{"type":{"type":"string"},"example":{"type":"object","required":["ok","resource","status","deliverable"],"properties":{"ok":{"type":"boolean"},"tx":{"type":["string","null"]},"note":{"type":"string"},"error":{"type":["string","null"]},"job_id":{"type":["string","null"]},"status":{"enum":["delivered","paid_not_delivered"],"type":"string"},"resource":{"type":"string"},"receipt_id":{"type":["string","null"]},"deliverable":{"type":["object","null"],"required":["kind","summary"],"properties":{"kind":{"type":"string"},"summary":{"type":"string"},"ai_review":{"type":["object","null"]},"static_findings":{"type":"array","items":{"type":"object","properties":{"line":{"type":"integer"},"rule":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string"}}}}}}}}}}}},"responseSchema":{"type":"json","example":{"ok":true,"status":"delivered","resource":"code-review","deliverable":{"kind":"code-review","summary":"8 lines checked","ai_review":{"findings":[{"fix":"Use placeholders","line":6,"issue":"SQL injection","severity":"high","confidence":"high"}]},"static_findings":[{"line":6,"rule":"sqlcat","message":"SQL string concatenation","severity":"high"}]}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_h7eJGMxMtcFv2R1JyHYqP","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Reviews source code for security vulnerabilities and code quality issues, returning AI-powered findings and static analysis results","exampleAgentPrompt":"Can you review this Python snippet for security issues? Here's the code: `query = 'SELECT * FROM users WHERE id = ' + user_input` — tell me if there are any SQL injection or other high-severity problems.","exampleUseCases":[{"title":"SQL injection detection in backend code","prompt":"Check this Python database function for SQL injection vulnerabilities and tell me what line the problem is on and how to fix it: `def get_user(uid): return db.execute('SELECT * FROM users WHERE id=' + uid)`"},{"title":"Security audit before code deployment","prompt":"Before I deploy this JavaScript API handler, can you scan it for any high-severity security issues or bad practices? Here's the full code — flag anything dangerous with the line number and a suggested fix."},{"title":"Code review for a Go microservice","prompt":"I just wrote a new Go HTTP handler — can you do a security and quality review on it? I want to know about any vulnerabilities, bad patterns, or risky lines before I merge this to main."}],"resultDescription":"Returns a JSON object with an overall summary, AI-generated findings (each with issue description, severity, confidence level, affected line, and suggested fix), and static analysis findings (each with rule name, message, severity, and line number). Status field indicates whether delivery succeeded.","failureModes":["Code input missing or empty — returns error if 'code' query parameter is not provided","Code exceeds 60,000 character limit — rejected with error","Payment not completed — status returns 'paid_not_delivered'","Unsupported or ambiguous language with no hint — analysis may be less accurate","Network or worker timeout for very large code files"],"whenToPreferThis":"Choose this endpoint when you need a combined AI + static analysis code review with per-line findings, severity ratings, and actionable fix suggestions in a single paid API call. It is especially well-suited for catching security issues like SQL injection in snippets up to 60,000 characters across multiple languages.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-20T13:00:40.843Z","isFirstParty":false,"canonicalSlug":"wealth-agent-code-review-5f0b1c30"}