code-review-python
Security review of Python code — dangerous sinks and framework-specific pitfalls (Django/Flask/ FastAPI). Load when reviewing a Python codebase/PR, on .py source in scope, or "review this Python". Signals: requirements.txt/pyproject, Django/Flask/FastAPI, ORMs, pickle/yaml, subprocess.
v2026.10.14-ee0e0c53 installazioni+3 in 7 giorni27 StelleMITsincronizzato 23 ore fa
Installa
Non hai ancora la CLI di NotHoly? Installala prima.
$ curl -fsSL https://notholy.com/install.sh | sh$ notholy skills install noorqureshi/code-review-pythonScrive in ~/.notholy/skills dopo aver controllato la firma e lo SHA-256.
FirmaFirmato, ed25519
Pacchetto269092ba…cc95f0c6
269092ba689c…fe9acc95f0c61 file · 1.6 KBScansioneBassonessuna segnalazione
Sorgentegithub.com/NoorQureshi/security-skills/tree/main/skills/code-review/code-review-python@ee0e0c5
Questa voce non è ancora scritta in italiano, quindi è mostrata in un'altra lingua: English.
In questa pagina
When it applies
You're reading Python source (a repo, a PR, a service). This is the language-specific companion to
code-review-methodology — the exact sinks and framework gotchas to grep and trace.
Why it works
Most severe Python bugs come from a known set of sinks plus framework misuse. Grep the sinks, trace each argument to a user source, and check the framework's safe-vs-unsafe API was used.
Sinks & patterns (grep, then trace to user input)
- Command exec:
os.system,subprocess.*(..., shell=True),os.popen— shell=True + user input = injection. - Code eval:
eval,exec,pickle.loads,yaml.load(withoutSafeLoader),marshal— deserialization/eval RCE. - SQL: raw/f-string queries,
.raw(),.extra(),cursor.execute("... %s" % x)— use params, not formatting. - SSRF:
requests.get/urllib/httpxon a user URL (→web-ssrf). - Path/upload:
open/send_file/os.path.joinwith user paths (traversal); zip extraction (zip-slip). - Template (SSTI):
render_template_string, Jinja from user input (→web-ssti). - Secrets: hardcoded keys/passwords;
DEBUG=Truein prod.
Framework specifics
- Django:
mark_safe/|safe(XSS),.raw()/.extra()(SQLi),DEBUG=True(info leak),SECRET_KEYexposure (session forgery), missing@login_required/object-level checks (IDOR),ALLOWED_HOSTS='*', pickle session serializer. - Flask:
render_template_string(SSTI),debug=True(Werkzeug console RCE), weakSECRET_KEY(session tampering —flask-unsign),send_filetraversal. - FastAPI: missing dependency-injected auth on routes, over-broad CORS, Pydantic not enforcing server-side authz (BOLA at the data layer).
Method
rg -n "shell=True|eval\(|exec\(|pickle.loads|yaml.load\(|render_template_string|\.raw\(|\.extra\(";
run bandit -r . and semgrep --config auto; triage by exploitable source→sink.
Gotchas
yaml.safe_loadand parameterized ORM queries are the safe variants — confirm which is used.- Bandit is noisy; rank by user-controllable input reaching the sink.
References
Bandit; Semgrep Python rules; OWASP Django/Flask cheat sheets.
File di questa versione
- SKILL.md2.7 KB
Permessi
| Permesso | Dichiarato | Trovato dalla scansione |
|---|---|---|
| Legge file | No | No |
| Scrive file | No | No |
| Esegue comandi shell | Sì | Sì |
| Usa la rete | Sì | Sì |
| Usa i connettori | No | No |
| Controlla un browser | No | No |
Segnalazioni della scansione
Rivisto il 13 nov 2026
La scansione non ha trovato nulla da segnalare in questa versione.
Una scansione pulita abbassa il rischio, ma non prova che il pacchetto sia sicuro. Leggi quello che installi.
| Versione | Pubblicata | Commit | SHA-256 | Firma | Cambio di permessi |
|---|---|---|---|---|---|
| v2026.10.14-ee0e0c5 | 13 nov 2026 | ee0e0c5 | 269092ba | Firmata | – |
Altro da NoorQureshi
Tutto da questo editoreAltro in Web e bug bounty
Vai alla categoria- src-hunterzhaoxuya520/src-hunter5
- owasp-top10-analysissecurityskills/owasp-top10-analysis5
- testing-for-xml-injection-vulnerabilitiesmukul975/testing-for-xml-injection-vulnerabilities5
- offensive-xsssnailsploit/offensive-xss5
- offensive-rcesnailsploit/offensive-rce5
- source-review-techniqueaeondave/source-review-technique5
Chiedi tutto quello che il tuo perimetro consente.
Crea un account, aggiungi crediti e fai la prima domanda in chat o nel terminale.
- 1/3
Crea l'account
Privato o azienda. Puoi passare ad azienda in seguito senza perdere saldo o chiavi.
PrivatoAzienda - 2/3
Aggiungi crediti
Con carta. Paghi a token, senza abbonamento.
$5.00ricarica minima - 3/3
Chiedi
In chat, oppure installa la CLI ed esegui notholy login nel terminale.
$ notholy login