Python security
Python security workflow for secure implementation and review of secrets, input validation, path and command injection, unsafe deserialization, auth boundaries, dependency risks, filesystem safety, and network calls.From its SKILL.md
npx -y skills add nyquistwilder/personal-pi --skill python-securityAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
3.3 KB, 616 tokens by cl100k_base, as published. Nobody here has run it
Python Security
Rule
Treat security-sensitive code as boundary work. Identify trust boundaries, validate inputs, protect secrets, and prefer safe standard APIs over stringly or shell-based approaches.
Use this skill for security review, hardening, or fixes. Do not treat it as a generic linting or dependency-update skill.
Hard Stops
Stop and ask before proceeding when:
- Work involves real secrets, production systems, customer data, mutable user data, or incident response.
- A change may weaken authentication, authorization, encryption, audit logging, or data retention expectations.
- Testing would require live credentials, production endpoints, destructive operations, or vulnerability exploitation against third-party systems.
- You discover likely exposed secrets. Do not repeat secret values; ask how to rotate and purge them.
- The requested fix is to suppress or ignore a security finding without understanding risk.
Security Checklist
Assess relevant boundaries:
- Secrets: no hard-coded credentials, tokens in logs,
.envcommits, or exception leaks. - Input validation: parse and validate untrusted data with Pydantic or explicit validators.
- Paths: prevent traversal; resolve paths against allowed roots; avoid unsafe temp names.
- Subprocess: avoid
shell=True; pass argument lists; validate executable and arguments. - Deserialization: avoid unsafe pickle/yaml loaders for untrusted input.
- HTTP: use
httpxwith timeouts, TLS verification, bounded redirects, and safe error handling; do not log auth headers. - Auth: enforce authorization at service boundaries, not only UI/CLI layers.
- Databases: use parameterized queries/ORM expressions; make transactions explicit.
- Files: set safe permissions for secrets; avoid writing outside intended directories.
- Dependencies: evaluate necessity, maintenance, licenses if relevant, and known vulnerabilities before adding or upgrading.
Workflow
- Identify assets, actors, trust boundaries, and expected threat model.
- Inspect code paths that ingest input, access secrets, call networks, touch files, spawn processes, or enforce authorization.
- Reproduce or demonstrate risk with safe local tests where practical.
- Implement minimal hardening that preserves intended behavior.
- Add regression tests for the security boundary when safe.
- Run relevant tests and repository validation.
- Report residual risk and operational actions such as secret rotation separately from code changes.
Greenfield Defaults
- Prefer Pydantic settings and models for typed, validated external configuration and input.
- Prefer
secretsfor tokens,hashlib/hmacfor integrity primitives, and vetted libraries for password hashing or cryptography. - Prefer
tempfileandpathlibover handcrafted temp paths. - Prefer deny-by-default authorization checks and explicit allow-lists.
- Keep logs structured but redacted.
Completion
Report boundaries reviewed, vulnerabilities fixed or ruled out, tests run, secrets handling considerations, and any required manual operational follow-up.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.
Gives 0 of the 12 instructions most security skills give in 616 tokens
Counted across 648 of the 828 authors here whose files we hold, read 2026-08-07
- Parameterize all database queriesin 68 of 648, across 51 files
- Hash passwords using bcrypt, scrypt, or argon2in 49 of 648, across 36 files
- Apply rate limiting to authentication endpointsin 48 of 648, across 24 files
- Configure security headersin 35 of 648, across 19 files
- Validate all inputsin 32 of 648, across 24 files
- Validate all external input at the system boundaryin 29 of 648, across 19 files
- Run containers as a non-root userin 28 of 648, across 15 files
- Use httponly secure samesite cookies for sessionsin 26 of 648, across 15 files
- Run dependency audits before every releasein 21 of 648, across 10 files
- Encode output to prevent cross-site scriptingin 21 of 648, across 11 files
- Copy dependencies before source codein 20 of 648, across 9 files
- Store secrets in environment variablesin 20 of 648, across 18 files
Said here and by no other author read
- identify trust boundaries before changing code
- prevent path traversal across allowed roots
- avoid shell equals true in subprocesses
- enforce authorization at service boundaries
- prefer safe standard APIs over shell-based approaches
- run relevant tests and repository validation
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.