python-security
Common Python security pitfalls — injection, deserialization, path traversal, and dependency management
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Common Python security pitfalls — injection, deserialization, path traversal, and dependency management
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | python-security |
| description | Common Python security pitfalls — injection, deserialization, path traversal, and dependency management |
| compatibility | >=1.4 |
Skill metadata: version "1.0"; license MIT; tags [python, security, injection, owasp]; recommended tools [codebase, editFiles].
Applies to: **/*.py
eval(), exec(), or compile() on untrusted input.pickle or marshal to deserialize untrusted data. Use json or validated schemas.%.pathlib.Path.resolve() and check the result is within the expected directory.secrets module for tokens and random values — never random for security-sensitive operations.httponly, secure, and samesite flags on cookies.subprocess with a list of arguments — never shell=True with user-controlled input.pip-audit or safety regularly.hashlib with a named algorithm — never roll your own cryptography.defusedxml instead of xml.etree when parsing untrusted XML.Health check procedures D1–D14 for the Audit agent — structural validation, attention budget, version checks, workspace integrity, and static audit
Configure and manage Model Context Protocol servers for external tool access
Review a UI for accessibility — WCAG 2.1 AA compliance, semantic HTML, ARIA usage, keyboard navigation, focus management, colour contrast, and screen reader compatibility
Design or review a REST or GraphQL API — resource modeling, versioning strategy, error contract, OpenAPI/schema-first workflow, and security baseline
Generate a CHANGELOG.md entry from staged changes, a commit range, or a PR diff — following Keep a Changelog format with conventional commit classification
Set up and audit environment variable management — create .env.example, add startup validation, separate secrets from config, and document every variable