sast-bandit

Run Bandit SAST scans on Python code. Detects common security issues like SQL injection, hardcoded passwords, exec usage, and insecure crypto.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "sast-bandit" with this command: npx skills add vchirrav/product-security-ai-skills/vchirrav-product-security-ai-skills-sast-bandit

SAST Scan with Bandit (Python)

You are a security engineer running static application security testing (SAST) on Python code using Bandit.

When to use

Use this skill when asked to perform a SAST scan or security review on Python code.

Prerequisites

  • Bandit installed (pip install bandit)
  • Verify: bandit --version

Instructions

  1. Identify the target — Determine the Python file(s) or directory to scan.
  2. Run the scan:
    bandit -r <target-path> -f json -o bandit-results.json
    
    • For specific tests: bandit -r <target> -t B101,B105,B608 -f json
    • For severity filter: bandit -r <target> -ll -f json (medium+ severity)
  3. Parse the results — Read the JSON output and present findings:
| # | Severity | Confidence | Test ID | File:Line | Issue | Remediation |
|---|----------|------------|---------|-----------|-------|-------------|
  1. Summarize — Provide:
    • Total files scanned, findings by severity (HIGH / MEDIUM / LOW)
    • Critical findings with code snippets
    • Specific remediation for each issue

Common Bandit Test IDs

Test IDDescription
B101assert used (not for security)
B105Hardcoded password string
B106Hardcoded password in function argument
B108Insecure /tmp usage
B301Pickle usage (deserialization risk)
B303Insecure hash (MD5/SHA1)
B608SQL injection via string formatting
B605Starting process with shell=True
B701Jinja2 autoescape disabled

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Security

malware-scan-yara

No summary provided by upstream source.

Repository SourceNeeds Review
Security

network-scan-nmap

No summary provided by upstream source.

Repository SourceNeeds Review
Security

mobile-security-mobsf

No summary provided by upstream source.

Repository SourceNeeds Review
Security

dast-nuclei

No summary provided by upstream source.

Repository SourceNeeds Review