Leakage of sensitive information in exception message

Description

Leakage of sensitive information in exception messages can compromise your application's security. This occurs when exception messages reveal too much about your application's internal workings or user-specific data, potentially aiding attackers in crafting targeted attacks such as path traversal.

Remediations

  • Do not include sensitive information in exception messages. This prevents accidental exposure of application details or user data.
  • Do limit the information logged in error messages to only what is necessary for troubleshooting. This minimizes the risk of information leakage.

References

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

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

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