Leakage of information in logger message

  • Rule ID: javascript_lang_logger_leak
  • Languages: javascript
  • Source: logger_leak.yml

Description

Leaking data to loggers is a common cause of data leaks and can lead to data breaches. This rule looks for instances of data sent to loggers.

Remediations

❌ Avoid using data in logger messages:

logger.info(`Results: ${data}`)

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=javascript_lang_logger_leak

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

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