Skills sast-bandit
๐Ÿ“ฆ

sast-bandit

v0.1.0 Content revision r2 High Risk โšก Contains scriptsโš™๏ธ External commands๐Ÿ“ Filesystem access๐ŸŒ Network access๐Ÿ”‘ Env variables

Scan Python Code with Bandit

Python security flaws can reach production unnoticed. This skill guides Bandit scans, prioritization, CI integration, and remediation with CWE and OWASP references.

Supports: Claude Codex Code(CC)
โš ๏ธ 38 Poor

Install with my Agent

Copy this request to your Agent. It includes the canonical Skill page and manifest.

Agent request
Review the Skillstore skill "sast-bandit" from https://skillstore.io/skills/agentsecops-sast-bandit.md and its manifest at https://skillstore.io/api/skills/agentsecops-sast-bandit/manifest. Verify the artifact. Stop and obtain explicit user consent before installing or changing files.

Your Agent should still show its plan and request any confirmation required by the security policy.

Agent-readable resources

Use these links when an AI agent, crawler, or script needs clean context instead of reading the full page.

Test it

Using "sast-bandit". Review Bandit finding B602 in payments/tasks.py.

Expected outcome:

  • Priority: High because user input reaches a shell-enabled subprocess.
  • Recommended action: use a fixed executable with validated arguments and no shell.
  • Validation: test metacharacters, traversal values, and unexpected option-like inputs.

Using "sast-bandit". Plan a Bandit gate for a legacy Python service.

Expected outcome:

  • Start by recording all findings without blocking builds.
  • Block new high-severity, high-confidence findings after the baseline is reviewed.
  • Store restricted reports and require documented approval for suppressions.

Security Audit

High Risk
v10 โ€ข 7/23/2026 Open versioned report

Most static matches are false positives from configuration lists, Markdown formatting, references, and labeled vulnerable examples. Confirmed risks include unsafe eval suppression, unvalidated subprocess guidance, fragile xargs filename handling, and unsafe pickle suppression. Third-party hooks and actions also use mutable references.

6
Files scanned
1,527
Lines analyzed
3
Review items
0
False positives ignored

Confirmed security concerns (2)

High
Unsafe Pickle Suppression Guidance
The skill presents pickle.load on a caller-provided path as an acceptable # nosec example. A writable cache or attacker-controlled path could enable code execution.
The example directly deserializes a caller-selected file and suppresses B301 without enforcing a trusted directory, ownership, or integrity check.
Medium
Mutable Third-Party Execution References
Pre-commit hooks and GitHub Actions execute third-party code through release tags instead of immutable commit hashes. A moved or compromised tag could execute altered code.
The cited configurations use version tags for code that runs in developer or CI environments. No immutable commit SHA or package hash is specified.
Capability review items (3)

These are real local capabilities that may be expected for this skill, so they require review but are not counted as confirmed malicious behavior.

High
Dynamic code evaluation with eval()
# result = eval(safe_expression) # nosec B307
The line is non-executable, but it presents eval() with a # nosec suppression and no validation. Copying this guidance can introduce arbitrary code execution.
High
Python subprocess.run
subprocess.run(["cat", filename], check=True, capture_output=True)
The example labels this call safe although filename comes directly from request.GET. An attacker can select arbitrary readable paths or inject options into cat.
Medium
xargs command (can execute arbitrary commands)
3. Scan only changed files in CI/CD: `git diff --name-only origin/main | grep '.py$' | xargs bandit`
Repository-controlled filenames are passed through newline and whitespace parsing into Bandit arguments. Crafted paths can split arguments or be interpreted as Bandit options.

Risk Factors

โšก Contains scripts (2)
โš™๏ธ External commands (50)
๐Ÿ“ Filesystem access (15)
๐ŸŒ Network access (29)
๐Ÿ”‘ Env variables (19)
Audited by: codex View Audit History โ†’
Share & cite this report

Share the versioned assessment report, neutral badge, embed card, and citations. Skillstore reports evidence without deciding whether this Skill is safe.

Open versioned report
Security Assessment

Copy report link

https://skillstore.io/skills/agentsecops-sast-bandit/audits/10?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_report

Markdown badge

[![Skillstore security assessment](https://skillstore.io/badges/skills/agentsecops-sast-bandit/security.svg)](https://skillstore.io/skills/agentsecops-sast-bandit?utm_source=security_passport_badge)

HTML badge

<a href="https://skillstore.io/skills/agentsecops-sast-bandit?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/agentsecops-sast-bandit/security.svg" alt="Skillstore security assessment" loading="lazy"></a>

Embed card

<iframe src="https://skillstore.io/embed/skills/agentsecops-sast-bandit.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>
Academic citations (APA ยท BibTeX ยท CFF)

APA citation

AgentSecOps. (2026). sast-bandit security audit report (audit version 10) [Author version 0.1.0]. Skillstore. https://skillstore.io/skills/agentsecops-sast-bandit/audits/10

BibTeX citation

@techreport{agentsecops-agentsecops-sast-bandit-2026, author = {AgentSecOps}, title = {sast-bandit security audit report (audit version 10)}, institution = {Skillstore}, year = {2026}, number = {10}, url = {https://skillstore.io/skills/agentsecops-sast-bandit/audits/10}, note = {Author version 0.1.0} }

CITATION.cff

cff-version: 1.2.0 message: "If you use this Skill, cite its author and this versioned security audit report." title: "sast-bandit security audit report (audit version 10)" version: "0.1.0" type: report authors: - name: "AgentSecOps" date-released: "2026-07-23" url: "https://skillstore.io/skills/agentsecops-sast-bandit/audits/10" identifiers: - type: other value: "skillstore:agentsecops-sast-bandit:audit:10" description: "Skillstore immutable audit report identifier"

Skillstore Score

Why this score Evidence Confidence: Medium
55
Architecture
100
Maintainability
87
Content
73
Community
91
Spec Compliance

What You Can Build

Triage a Python Feature

Scan changed Python files, review high-confidence findings, and prepare focused fixes before code review.

Establish an Application Baseline

Inventory existing Bandit findings, map them to CWE and OWASP, and define remediation priorities.

Add a CI Security Gate

Configure Bandit or pre-commit checks that block selected severity levels while preserving reviewable reports.

Try These Prompts

Run a Basic Scan
Scan the Python files in [path] with Bandit. Use a read-only workflow, explain the command, and summarize findings by severity and confidence.
Review a Bandit Report
Review the Bandit report at [path]. Prioritize exploitable findings, identify likely false positives, and recommend one verification step for each priority item.
Design a CI Gate
Design a Bandit gate for [repository]. Specify scan scope, thresholds, exclusions, report retention, failure behavior, and a safe exception review process.
Build a Remediation Plan
Analyze Bandit findings in [report]. Map each confirmed issue to CWE and OWASP, rank exploitability, propose fixes, and define validation tests.

Best Practices

  • Run scans with read-only source access and restrict report access.
  • Review exploitability before suppression, and document every accepted exception.
  • Pin Bandit, hooks, and CI actions to reviewed immutable versions.

Avoid

  • Do not treat every Bandit finding as a confirmed vulnerability.
  • Do not suppress eval, pickle, or shell findings without a documented trust boundary.
  • Do not publish reports containing credentials or sensitive source snippets.

Frequently Asked Questions

Does this skill install Bandit automatically?
It provides installation commands and configurations. Confirm package installation and external downloads before execution.
Which languages can Bandit scan?
Bandit analyzes Python source code. Use other tools for non-Python languages.
Does Bandit cover the complete OWASP Top 10?
No. It covers selected Python patterns, while business logic and authorization issues require additional review.
How should false positives be handled?
Verify data flow and exploitability first. Record a precise justification before adding a targeted suppression.
Can Bandit reports contain secrets?
Yes. Reports may include source snippets, so restrict access or disable code excerpts.
Is the enhanced analyzer included?
No. The package references scripts/bandit_analyzer.py, but that file is absent.

Developer Details

License

MIT

Author version

v0.1.0

Skillstore revision

r2

Ref

9e952417e76879bc9d853e1b8b2cd6d6d8d4a1c2

Maintenance freshness

7/24/2026

Usage

10 downloads ยท 417 views

File structure

๐Ÿ“ assets/

๐Ÿ“„ .gitkeep

๐Ÿ“„ bandit_config.yaml

๐Ÿ“„ pre-commit-config.yaml

๐Ÿ“ references/

๐Ÿ“„ cwe_owasp_mapping.md

๐Ÿ“„ remediation_guide.md

๐Ÿ“„ SKILL.md