Usage of weak hashing library (Adler-32)

Description

While Adler-32 can give a quick assurance of integrity it provides little protection against intentional alteration of data.

Remediations

❌ Avoid algorithms with known weaknesses:

  $myhash = hash('adler32', $input)

✅ Use stronger hashing algorithms.

  $myhash = hash('sha256', $input)

Associated CWE

OWASP Top 10

Configuration

To skip this rule during a scan, use the following flag

bearer scan /path/to/your-project/ --skip-rule=php_lang_weak_hash_adler32

To run only this rule during a scan, use the following flag

bearer scan /path/to/your-project/ --only-rule=php_lang_weak_hash_adler32