Session Cookie Secure Flags
Every cookie that carries a session identifier or auth token must be issued with `Secure`, `HttpOnly`, and `SameSite=Lax` (or `Strict`).…
$ prime install @security/rule-session-cookie-secure-flags Projection
Always in _index.xml · the agent never has to ask for this.
SessionCookieSecureFlags [rule] v0.1.0
Every cookie that carries a session identifier or auth token must be issued with Secure, HttpOnly, and SameSite=Lax (or Strict). Where the session id is short, prefix the cookie name with __Host- to bind it to the origin and forbid subdomain overwrites.
Loaded when retrieval picks the atom as adjacent / supporting.
SessionCookieSecureFlags [rule] v0.1.0
Every cookie that carries a session identifier or auth token must be issued with Secure, HttpOnly, and SameSite=Lax (or Strict). Where the session id is short, prefix the cookie name with __Host- to bind it to the origin and forbid subdomain overwrites.
Checks
-
Secure: cookie sent only over HTTPS — never on plain HTTP. -
HttpOnly: cookie not accessible from JavaScript —document.cookiecannot read or write it. -
SameSite=Laxminimum; useStrictwhere cross-site GET landing is unnecessary. -
__Host-prefix on the cookie name where supported — locks Path=/, no Domain attribute, requires Secure. - Path attribute scoped to where the cookie is needed (default
/is acceptable; never broader than the app). - Cookie expiry: short idle timeout (15–30 min for sensitive apps) plus an absolute lifetime (e.g. 8 hours).
Label
Session cookies must set Secure, HttpOnly, and SameSite
Loaded when retrieval picks the atom as a focal / direct hit.
SessionCookieSecureFlags [rule] v0.1.0
Every cookie that carries a session identifier or auth token must be issued with Secure, HttpOnly, and SameSite=Lax (or Strict). Where the session id is short, prefix the cookie name with __Host- to bind it to the origin and forbid subdomain overwrites.
Checks
-
Secure: cookie sent only over HTTPS — never on plain HTTP. -
HttpOnly: cookie not accessible from JavaScript —document.cookiecannot read or write it. -
SameSite=Laxminimum; useStrictwhere cross-site GET landing is unnecessary. -
__Host-prefix on the cookie name where supported — locks Path=/, no Domain attribute, requires Secure. - Path attribute scoped to where the cookie is needed (default
/is acceptable; never broader than the app). - Cookie expiry: short idle timeout (15–30 min for sensitive apps) plus an absolute lifetime (e.g. 8 hours).
Label
Session cookies must set Secure, HttpOnly, and SameSite
Label
Session cookies must set Secure, HttpOnly, and SameSite
Source
prime-system/examples/security-appsec/primes/compiled/@security/rule-session-cookie-secure-flags/atom.yaml