Communication Security
Cookie Security Check
Learn how to check the Secure, HttpOnly, and SameSite flags on your cookies to strengthen session security and prevent session hijacking and XSS attacks.
What this test checks
This test verifies that your site's cookies are protected by the following security flags: Secure (transmitted only over HTTPS), HttpOnly (inaccessible via JavaScript), and SameSite (restricted to same‑site requests). These flags prevent session hijacking and XSS attacks.
Our recommendation
Configure session and authentication cookies with the Secure, HttpOnly, and SameSite flags. In Laravel, this is done via config/session.php by setting the appropriate options. For custom cookies, use the relevant parameters when creating them. Test the configuration using browser developer tools.
Security tests