scan_with_bandit
Scan Python code with Bandit to uncover security vulnerabilities including SQL injection, hardcoded secrets, and unsafe functions.
Instructions
Scan Python code using Bandit for security issues.
This tool analyzes Python source code for common security issues using PyCQA's Bandit security linter. Bandit is specifically designed for Python and can detect issues like:
Use of insecure functions (pickle, eval, exec)
Hardcoded passwords and secrets
SQL injection vulnerabilities
Command injection risks
Weak cryptographic practices
Insecure random number generation
And many other Python-specific security issues
Args: code: The Python code content to analyze
Returns: A dictionary with scan results including found security issues
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Python code content to scan |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |