sdk/python/Cryptography/PyWerkzeugSecurity
Cryptography

PyWerkzeugSecurity

werkzeug.security provides generate_password_hash and check_password_hash. The default method is pbkdf2:sha256 with 600_000 iterations. Findings arise when method='plain' or a weak hasher is passed explicitly.

2 sanitizers

Sanitizers

.generate_password_hash()Sanitizer
#
Signature
werkzeug.security.generate_password_hash(password, method='scrypt', salt_length=16) -> str

Hashes a password. Safe with default method. Finding when method='plain'.

tracks:return
.check_password_hash()Sanitizer
#
Signature
werkzeug.security.check_password_hash(pwhash: str, password: str) -> bool

Constant-time password verification. Safe.

tracks:return

Fully-Qualified Names

FQNField
werkzeug.securityfqns[0]

Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.

Import

rule.py
from codepathfinder.go_rule import PyWerkzeugSecurity