Leakage of sensitive data in cookie
- Rule ID: java_lang_cookie_leak
- Languages: java
- Source: cookie_leak.yml
Storing sensitive data in cookies can lead to a data breach. This rule looks for instances where sensitive data is stored in browser cookies.
❌ Avoid storing sensitive data in unencrypted cookies:
new Cookie("user_email", user.email);
OWASP Top 10
To skip this rule during a scan, use the following flag
bearer scan /path/to/your-project/ --skip-rule=java_lang_cookie_leak
To run only this rule during a scan, use the following flag
bearer scan /path/to/your-project/ --only-rule=java_lang_cookie_leak
Ready to take the next step? Learn more about Bearer Cloud.