Missing Secure option in cookie configuration

Description

A cookie that is configured to be secure ensures that a client will only send the cookie to the server when HTTPS is being used. This prevents the cookie from being observed by unauthorized third parties.

Remediations

✅ Set secure to true to force cookies to only send over HTTPS.

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_symfony_insecure_cookie

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

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