Code & Engineering

Cookie Attributes Review

Reviews the Set-Cookie headers of a response, or the code that sets them, and lists only the attribute mistakes that expose a login cookie, one line each with a fixed code, the cookie, why it hurts and the fix - or exactly No findings. It catches a session cookie sent without Secure, a session cookie that script can read because HttpOnly is missing, SameSite=None without Secure, a __Host- cookie that carries a Domain or a Path other than the root, a Domain attribute wider than the host that needs the cookie, and a login cookie that lives for months. It leaves out the safe look-alikes, such as a theme or language cookie that script reads, a missing SameSite attribute, and SameSite=None together with Secure. Use to review the cookies of a login flow, to audit a framework's cookie settings, or before a security review of a web app.

Cookie Attributes Review is a tested SKILL.md that reviews the Set-Cookie headers of a response, or the code that sets them, and lists only the attribute mistakes that expose a login cookie, one line each with a fixed code, the cookie, why it hurts and the fix - or exactly No findings; an agent buys it once for $0.01 over x402.

Tested 2026-10-26No code, no hidden instructionsv1.0.0 · 5.9 KB · perpetual license

Not for

Consent banners, cookie law, token issuing and revocation, cookie size limits and browser-specific caps. It reads pasted headers or cookie code and judges only the attributes written there; it cannot see framework defaults or a proxy that rewrites headers.

Tested, honestly

Tested 2026-10-26 with a strong and a weak model.

SonnetStrong model, claude-sonnet-5-5
Right on all 3 cases, read by hand. On the shop headers it found the ninety-day login cookie and the __Host- cookie that carries a Domain, and left out the year-long theme cookie that has no flags at all. On the Flask handler it gave the readable token and the parent domain, and left out the SameSite=None that already comes with Secure and the language cookie. On the clean set of three cookies it answered exactly No findings.
HaikuWeak model, claude-haiku-5-5
Right on all 3 cases, read by hand. It matched the strong model on both planted inputs, with sound fixes, and kept the preference cookies and the Secure-protected SameSite=None out. On the clean set it answered exactly No findings. Its two answers on the planted inputs differ in layout only: one has a blank line between the findings and one is indented by four spaces, and the check accepts both.

Full test summary

Example

Our own test text, before and after the skill ran. Excerpts only.

English · claude-sonnet-5-5

Before

Response headers of https://shop.example.com/login: Set-Cookie: sid=7f3a9c41; Path=/; Secure; HttpOnly; SameSite=Lax; Max-Age=7776000 Set-Cookie: __Host-view=compact; Path=/; Domain=shop.example.com; Secure; SameSite=Lax Set-Cookie: ui_theme=dark; Path=/; Max-Age=31536000

After

LONG-SESSION — sid, Max-Age=7776000 — ninety days is above the limit of 604800 — shorten it PREFIX-BROKEN — __Host-view, Domain=shop.example.com — a __Host- cookie must not carry a Domain attribute, so browsers will reject it — remove the Domain attribute

What is in the file

  • What the MDN Set-Cookie page says, as published on 26 October 2026
  • What counts as a session cookie
  • The answer
  • The codes
  • Rules
  • Work in this order
  • Short example

Languages

English. Tried in: English.

License

Perpetual, non-exclusive; use and modify for yourself incl. paid work; no resale or republishing. Holder: Georgi Kalchev, aiskills402.com. Full terms.

Versions

Current version 1.0.0, updated 2026-10-26. Whoever bought an earlier version gets new ones free through the same re-download token.

  1. v1.0.0 · 2026-10-26

    First release, written in the second light-test batch of 26 October 2026 (three cases, price $0.01). The idea is ours; no foreign skill was opened, facts come from the public MDN page (see notes/ideas.md). Output: see the skill description.

    Test: three cases written by hand (two planted, each with a safe look-alike, one clean control), one run on Claude Sonnet and one on Claude Haiku, no run without the skill, no iteration on the skill rules after the runs. `test/control.mjs` shows that the checks pass on the ideal answers and fail on realistic wrong ones. See `test-summary.json` for the verdicts read by hand.

FAQ

Theme or language cookie readable by script: reported?

No. Only a login cookie needs the HttpOnly flag. A preference cookie, even a year-long one without Secure, gets no line, and neither does a cookie that sets no SameSite attribute at all.

Where does the seven-day limit come from?

From the skill itself. The MDN page names no figure for a login lifetime, so the 604800 seconds is stated as our own limit, and an Expires date counts only when the paste gives today's date.

What went into the test?

Three inputs: a set of response headers with a ninety-day login cookie and a broken host prefix, a Flask login handler with a readable token and a parent domain, and a clean set of three cookies. Each input went to Claude Sonnet once and to Claude Haiku once.

What comes back for a clean set of cookies?

A single sentence, No findings., and nothing around it. A defect is one line holding the code, the cookie, the reason and the fix, so the answer can be read in seconds or checked by a script.

Share

Read this page as Markdown: /skills/cookie-attributes-review.md.

More in Code & Engineering

  • OAuth Redirect Flow Review

    Code & Engineering

    SKILL.md · v1.0.0 · 7.0 KB

    Reviews ONE OAuth 2.0 or OpenID Connect sign-in flow written in code for the four mistakes that let an attacker steal a login or a token, and lists only those, one line each with a fixed code, the function, why it hurts and the fix - or exactly No findings. It catches a state value that is never compared or not tied to the user's session, a browser or mobile client that sends no PKCE challenge, a redirect address matched by prefix or substring, and an implicit flow or an access token carried in a URL. It leaves out the safe look-alikes, such as a state kept in a cookie and compared, an exact redirect match, a server-side client with a secret, and a token sent in a header. Use to review a login integration, to audit a single-page app before launch, or to check a gateway that handles redirects.

    $0.01once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 26 Oct 2026

  • PostgreSQL Migration Lock Review

    Code & Engineering

    SKILL.md · v1.0.0 · 6.9 KB

    Reviews ONE PostgreSQL migration file for the four statements that lock or rewrite a table that is already in use, and lists only those, one line each with a fixed code, the statement, why it hurts and the fix - or exactly No findings. It catches CREATE INDEX without CONCURRENTLY on an existing table, a not-null or constraint check run in one blocking step, a column type change or volatile default that rewrites the table, and a drop or rename of a column that running code may still read. It leaves out the safe look-alikes, such as an index built concurrently, a column added with a constant default, a constraint added NOT VALID and validated separately, and the drop of a column the file says nothing reads. Use to review a migration before deploy, to plan a zero-downtime change, or to check a schema pull request.

    $0.01once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 26 Oct 2026

  • JWT Verification Review

    Code & Engineering

    SKILL.md · v1.0.0 · 6.6 KB

    Reviews ONE piece of code that verifies JSON Web Tokens for the five mistakes that let a forged or stale token in, and lists only those, one line each with a fixed code, the function, why it hurts and the fix - or exactly No findings. It catches an algorithm taken from the token header or no fixed algorithm list, an expiry check switched off, neither audience nor issuer checked, a payload read with decode where verify is needed, and a signing secret written into the source. It leaves out the safe look-alikes, such as an algorithm list fixed in the verify call, an audience compared in a second step, and a decode that only reads the key id. Use to review login middleware, to audit token handling in a service, or to check an API before release.

    $0.01once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 26 Oct 2026

  • Terraform Plan Risk Review

    Code & Engineering

    SKILL.md · v1.0.0 · 6.2 KB

    Reviews the text of ONE terraform plan for the four changes that can lose data or open a door, and lists only those, one line each with a fixed code, the resource, why it hurts and the fix - or exactly No findings. It catches a database, bucket or disk that the plan destroys or replaces, an ingress rule open to the whole internet on a port other than web, encryption switched off, and a rebuild forced only because an id changes upstream. It leaves out the safe look-alikes, such as a tag changed in place, a stateless server replaced because of a new image, and a web port open to the world. Use to read a plan before terraform apply, to review a pull request that shows plan output, or to check what a change will destroy.

    $0.01once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 26 Oct 2026