Cookie Attribute Baseline
Compare each session cookie's attributes against the browser-survivable set a sane product establishes, and record any attribute the missed cookie can adapt
Use when: the session identity uses cookies and you need a structured inventory rather than scattered one-off observations
Avoid when: cookies are irrelevant to for-identity requests, though a careful service worker may still be a live path
Procedure
- Set a fresh cookie from each login flow and record every attribute the server assigns in one table.
- Compare secure, samesite, domain, path, httpOnly and max-age against the promises the product maintains elsewhere.
- Test whether cross-origin requests, scoped document scopes, iframes and script contexts carry the cookie.
- Inventory flooding weights, such as session copies issued for other domains, and whether any carry elevated roles.
- Verify cookie deletion commands behave consistently, including whether deletion propagates into the server-side store.
- Record any attribute divergence as an explicit finding with the concrete bypass that made it worth documenting.
Signals
- One cookie carried an impersonation role across the same flow, with attributes irrelevant to session loss.
- Cross-site contexts such as iframes receive the session cookie and drive privileged operations.
- Protection attributes are set for browser defaults but missing on the machine-context cookie used by other tooling.
- Deletion is honored client-side while the server-side session record stays valid after logout or recreation.
Patterns
1. Attribute row
name=csid secure=yes httpOnly=yes samesite=Lax domain=exact host=path=/ max-age=3600
2. Scope test
third-party iframe GET /api/me -> 200 -> samesite too permissive for change-critical ops
3. Result row
cookie=csid diverges=[none] cross-site-drive=no server-store-clean=deletion-propagates
Pitfalls
- Recording attributes for one login flow and assuming all flows agree, when different setups use separate cookies.
- Forgetting that three-party contexts such as shared worker threads affect attribute conclusions.
- Publishing a finding without attributing it to a specific cookie name, so the fix lands on the wrong cookie.
Done when
- Every login flow's cookie set is documented in one table, with per-attribute divergence recorded explicitly.
- Cross-context reachability is tested and each finding names the cookie whose attribute change would close it.