# 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

- Skill: `wsh7ash/cookie-attribute-baseline` (Agent Skill)
- Install (CLI): `npx get-skill add wsh7ash/cookie-attribute-baseline`
- Raw SKILL.md: https://api.skillmd.com/api/skills/wsh7ash/cookie-attribute-baseline/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: Wsh7Ash (https://skillmd.com/u/wsh7ash)
- Updated: 2026-11-22
- Page: https://skillmd.com/skills/wsh7ash/cookie-attribute-baseline

---


# 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

1. Set a fresh cookie from each login flow and record every attribute the server assigns in one table.
2. Compare secure, samesite, domain, path, httpOnly and max-age against the promises the product maintains elsewhere.
3. Test whether cross-origin requests, scoped document scopes, iframes and script contexts carry the cookie.
4. Inventory flooding weights, such as session copies issued for other domains, and whether any carry elevated roles.
5. Verify cookie deletion commands behave consistently, including whether deletion propagates into the server-side store.
6. 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**

```text
name=csid secure=yes httpOnly=yes samesite=Lax domain=exact host=path=/ max-age=3600
```

**2. Scope test**

```text
third-party iframe GET /api/me -> 200 -> samesite too permissive for change-critical ops
```

**3. Result row**

```text
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.

## References

- [MDN - Set-Cookie and cookie attributes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie)
- [OWASP - session management cheat sheet](https://cheatsheetseries.owasp.org/cheatsheets/Session_Management_Cheat_Sheet.html)

