Cookie & Privacy Hygiene
100 points total
Audits cookies set by your site for security attributes — Secure flag, HttpOnly flag, SameSite policy, session lifetime, tracking practices, and overall cookie hygiene.
Checks
| Check | Weight | What it measures |
|---|---|---|
Secure Flag Audit cookie_secure_flag_audit | 34 pts | Checks whether cookies (especially session cookies) have the Secure flag set. |
HttpOnly Audit cookie_httponly_audit | 33 pts | Checks whether cookies have the HttpOnly flag to prevent JavaScript access. |
SameSite Audit cookie_samesite_audit | 33 pts | Evaluates SameSite attribute usage across cookies for CSRF protection. |
Overall Hygiene cookie_overall_hygiene | info | Informational roll-up of cookie count, scope breadth, prefix usage, and lifetime analysis. Not scored but may generate findings. |
Pass / Warn / Fail Logic
Secure Flag Audit
Composite score based on proportion of cookies with Secure flag; higher penalty for session cookies.
HttpOnly Audit
Composite score; session cookies without HttpOnly are penalized more heavily.
SameSite Audit
Composite score; SameSite=None without Secure is a fail; missing SameSite is a warning.
Overall Hygiene
Informational only (weight 0). Generates advisory findings.
Findings & How to Fix Them
These are the specific findings RedScore may report for this category, along with remediation guidance.
COOKIE_SECURE_SESSION_MISSINGSet the Secure flag on all session cookies so they are never sent over plain HTTP.
COOKIE_HTTPONLY_SESSION_MISSINGSet HttpOnly on session cookies so JavaScript cannot read them (mitigates XSS token theft).
COOKIE_SAMESITE_NONE_NO_SECURESameSite=None requires Secure; either add Secure or change SameSite to Lax/Strict.
COOKIE_SECURE_NONSESSION_MISSINGSet Secure on sensitive cookies, or scope them so they are only needed on HTTPS pages.
COOKIE_SAMESITE_MISSINGSet an explicit SameSite attribute (typically Lax or Strict) on session cookies for predictable CSRF behavior.
COOKIE_SESSION_LIFETIME_LONGReduce session cookie lifetime. Favor short-lived sessions with renewal and server-side invalidation.
COOKIE_TRACKER_BEFORE_CONSENTAvoid setting non-essential tracking cookies before consent is recorded on the page.
COOKIE_SESSION_STRICTNESS_GAPSession cookies should consistently use Secure, HttpOnly, and SameSite attributes.
COOKIE_HTTPONLY_NONSESSION_WARNConsider HttpOnly on authentication-related cookies where JavaScript access is not required.
COOKIE_HYGIENE_TOO_MANYReduce first-response Set-Cookie volume where possible; many cookies increase attack surface and tracking.
COOKIE_HYGIENE_SCOPE_BROADPrefer host-scoped cookies over parent-domain (Domain=.) when feasible to limit cross-subdomain exposure.
COOKIE_HYGIENE_PREFIXUse __Host- / __Secure- prefixes for high-sensitivity cookies where applicable to enforce scope and HTTPS.
COOKIE_TRACKING_LIFETIME_LONGReduce long-lived tracking cookie retention and align retention windows with your privacy policy.