Standard Library

GoCrypto

Weak cryptographic algorithms: crypto/md5, crypto/sha1, crypto/des, crypto/rc4. All New() and Sum() calls are findings — these algorithms are cryptographically broken.

2 sinks
Taint flow0 sources 2 sinks
Sinks — dangerous call
.New()
.Sum()

Sinks

.New()Sink
#
Signature
New() hash.Hash

Creates new hash instance using the weak algorithm. Always a finding.

.Sum()Sink
#
Signature
Sum(data []byte) [N]byte

Computes weak hash. Always a finding.

Fully-Qualified Names

FQNField
crypto/sha256fqns[0]
crypto/sha512fqns[1]
crypto/hmacfqns[2]
crypto/aesfqns[3]
sha256.*patterns
sha512.*patterns
hmac.*patterns

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

Import

go.mod
// standard library — no go.mod entry required
rule.py
from codepathfinder.go_rule import GoCrypto

Rules Using This Class