A software security skill that integrates with Project CodeGuard to help AI coding agents write secure code and prevent common vulnerabilities. Use this skill when writing, reviewing, or modifying code to ensure secure-by-default practices are followed.
rule_id: codeguard-0-session-management-and-cookies
Implement robust, attack-resistant session handling that prevents fixation, hijacking, and theft while maintaining usability.
id) rather than framework defaults. Reject any incoming ID not created by the server.Secure, HttpOnly, SameSite=Strict (or Lax if necessary for flows) on session cookies.Path and Domain. Avoid cross-subdomain exposure.Example header:
Set-Cookie: id=<opaque>; Secure; HttpOnly; SameSite=Strict; Path=/Cache-Control: no-store on responses containing session identifiers or sensitive data.sec-ch-ua where available).localStorage/sessionStorage due to XSS risk. Prefer HttpOnly cookies for transport.Secure, HttpOnly, SameSite set; tight domain/path.Cache-Control: no-store for sensitive responses.tessl i cisco/software-security@1.2.2evals
scenario-11
scenario-12
scenario-13
scenario-14
scenario-15
rules