askill
python-security-review

python-security-reviewSafety 95Repository

Review Python code for common security vulnerabilities

30 stars
1.2k downloads
Updated 2/14/2026

Package Files

Loading files...
SKILL.md

Python Security Code Review

Overview

Review Python code for security vulnerabilities, focusing on the OWASP Top 10 and Python-specific issues.

Critical Checks (Always Flag)

1. Injection Vulnerabilities

  • SQL: Look for string formatting in queries BAD: f"SELECT * FROM users WHERE id = {user_id}" GOOD: cursor.execute("SELECT * FROM users WHERE id = ?", (user_id,))

  • Command Injection: subprocess with shell=True BAD: subprocess.run(f"ls {user_input}", shell=True) GOOD: subprocess.run(["ls", user_input])

  • SSTI: Direct user input in templates BAD: render_template_string(user_input)

2. Authentication Issues

  • Hardcoded credentials
  • Weak password hashing (MD5, SHA1 without salt)
  • Missing rate limiting on auth endpoints
  • JWT without expiration

3. Data Exposure

  • Secrets in code or logs
  • Debug mode in production
  • Verbose error messages to users
  • Sensitive data in URLs

4. Insecure Deserialization

  • pickle.loads with untrusted data
  • yaml.load without Loader=SafeLoader
  • eval/exec on user input

5. Path Traversal

  • User input in file paths without validation
  • Missing path canonicalization

Output Format

For each issue found:

[SEVERITY] Issue Title
Line: X
Code: `affected code snippet`
Risk: What could happen
Fix: How to fix it

Severity levels: CRITICAL, HIGH, MEDIUM, LOW, INFO

False Positive Prevention

  • Check if input is sanitized before flagging
  • Look for middleware/decorators that might handle security
  • Consider the context (internal tool vs public API)

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

82/100Analyzed 2/20/2026

Solid technical reference skill for Python security code review. Covers OWASP Top 10 with Python-specific examples, provides clear bad/good code patterns, and defines output format with severity levels. Well-structured and actionable for general security reviews. The demo_skills path location suggests this is a sample/template, but the content quality is high and broadly applicable."

95
85
85
80
78

Metadata

Licenseunknown
Version-
Updated2/14/2026
Publisherzscole

Tags

apidatabasesecurity