vetkit.py.crypto.timing-unsafe-compare
An HMAC digest is compared with == / !=. The comparison time leaks how many leading bytes match, allowing signatures to be forged byte by byte.
Last updated:
Suite: Security
python
An HMAC digest is compared with == / !=. The comparison time leaks how many leading bytes match, allowing signatures to be forged byte by byte.
Category: SECURITY · Engine rule severity: WARNING
How to fix it
Compare digests with hmac.compare_digest(expected, received).
References
Source: packages/engine/rules/sast/python.yml.
Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.