# Machina Agent Services — Python Security Scanner

> Machina Agent Services — Python Security Scanner is a paid API for AI agents from mach402.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-22).

Scans Python source code for security vulnerabilities and quality issues using Bandit and Pylint, returning a risk level and issue counts

## Facts

- Endpoint: POST https://mach402.dev/scan/python?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/machina-agent-services-python-security-scanner-5f74d3b5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wMMU7PjwVjvelYHWeDWQj

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 machina-agent-services-python-security-scanner-5f74d3b5 -d '<json body>'
```

Example prompt: Can you scan this Python code for security vulnerabilities and tell me the risk level? Here's the script: `import os; os.system(input('cmd: '))`

## When to prefer this

Choose this endpoint when you need a fast, automated security and code-quality assessment of Python source code without setting up local tooling. It combines Bandit (security-focused) and Pylint (quality-focused) in a single call, making it ideal for AI agents running pre-deployment checks, code review pipelines, or auditing untrusted Python snippets.

## Known failure modes

- Empty or missing 'code' field returns a validation error
- Non-Python code submitted may produce misleading or empty results
- Very large files may time out or be rejected
- Malformed JSON body returns a 400 error
- Payment failure (insufficient USDC balance) returns 402 Payment Required

## How this service works

x402-powered API services for AI agents

## Output

Returns a JSON object with Bandit results (including total_issues count), Pylint score (0-10 float), and an overall risk_level string (e.g. LOW, MEDIUM, HIGH) summarizing the security posture of the submitted Python code.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "code": {
   "type": "string",
   "description": "Python source code to scan"
  },
  "filename": {
   "type": "string",
   "description": "Original filename (optional)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "bandit": {
   "total_issues": 2
  },
  "pylint": {
   "score": 7.5
  },
  "risk_level": "MEDIUM"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/machina-agent-services-python-security-scanner-5f74d3b5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from mach402.dev](https://www.zero.xyz/host/mach402.dev/llms.txt)
