Session management cookies

From RedHatProductSecurity/prodsec-skills · View interactive version

Session management cookies is an AI agent skill from the GitHub repository RedHatProductSecurity/prodsec-skills. Apply when reviewing or writing code that creates, stores, or validates user sessions or sets cookies. Covers session ID generation, cookie security, rotation, timeouts, theft detection, and client-side storage restrictions.

How to use this skill

Skill file

Session Management and Cookies

Implement robust, attack-resistant session handling that prevents fixation, hijacking, and theft while maintaining usability.

Session ID Generation and Properties

Cookie Security Configuration

Example header:

Set-Cookie: id=<opaque>; Secure; HttpOnly; SameSite=Strict; Path=/

Session Lifecycle and Rotation

Expiration and Logout

Transport and Caching

Cookie Theft Detection and Response

Client-Side Storage

Framework and Multi-Cookie Scenarios

Monitoring and Telemetry

Implementation Checklist

Test Plan

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.