{"uid":"cap_wMMU7PjwVjvelYHWeDWQj","slug":"machina-agent-services-python-security-scanner-5f74d3b5","name":"Machina Agent Services — Python Security Scanner","description":"x402-powered API services for AI agents","url":"https://mach402.dev/scan/python?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"code":{"type":"string","description":"Python source code to scan"},"filename":{"type":"string","description":"Original filename (optional)"}}},"responseSchema":{"type":"json","example":{"bandit":{"total_issues":2},"pylint":{"score":7.5},"risk_level":"MEDIUM"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_FIj9I_Bsm_G4ZZm0VkcAI","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Scans Python source code for security vulnerabilities and quality issues using Bandit and Pylint, returning a risk level and issue counts","exampleAgentPrompt":"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: '))`","exampleUseCases":[{"title":"Pre-deployment security gate","prompt":"Before I deploy this Python Lambda function, scan the source code and tell me if there are any security issues or vulnerabilities I should fix — here's the code: `def handler(event, context): exec(event['cmd'])`"},{"title":"CI pipeline code review","prompt":"I just wrote a new Python script called data_processor.py — can you run a security and quality check on it and let me know the Bandit findings and Pylint score? Here's the full source code."},{"title":"Auditing third-party Python snippet","prompt":"I found this Python snippet online that I want to use in my project — can you analyze it for security risks and tell me whether it's safe to use based on its risk level?"}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T15:23:46.132Z","isFirstParty":false,"canonicalSlug":"machina-agent-services-python-security-scanner-5f74d3b5"}