Insecure cookie

From zakirkun/ice-tea · View interactive version

Insecure cookie is an AI agent skill from the GitHub repository zakirkun/ice-tea. Detects cookies set without Secure, HttpOnly, or SameSite attributes.

How to use this skill

Skill file

Insecure Cookie Configuration

Overview

Cookies that store session tokens or authentication data must be configured with security attributes to prevent theft and CSRF attacks:

Missing any of these attributes expands the attack surface.

Detection Strategy

Look for Set-Cookie headers or cookie-setting function calls that omit one or more of the critical security flags.

Remediation

Always set session cookies with all three security attributes.

Vulnerable (Go):

http.SetCookie(w, &http.Cookie{
    Name:  "session",
    Value: token,
})

Safe (Go):

http.SetCookie(w, &http.Cookie{
    Name:     "session",
    Value:    token,
    Secure:   true,
    HttpOnly: true,
    SameSite: http.SameSiteStrictMode,
})
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.