session-cookie-flags
하는 일
이 스킬은 사용자를 로그인 상태로 유지하는 쿠키를 확인하고, 이를 보호하는 보안 플래그를 설정합니다. 인증과 서버 설정을 관리하는 개발자를 위한 것입니다.
사용하는 경우
- ✓로그인이나 세션 시스템의 쿠키 설정을 검토해 달라고 요청할 때.
- ✓사이트가 보안 플래그 없이 세션 쿠키를 설정할 때.
- ✓인증 미들웨어를 추가하면서 처음부터 쿠키를 안전하게 설정하고 싶을 때.
스킬 링크
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/session-cookie-flags/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 로그인 시스템이 설정하는 세션 쿠키를 확인하고 Secure, HttpOnly, SameSite 플래그를 추가해 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 Set-Cookie 헤더와 쿠키 생성 코드를 검토합니다. Secure는 HTTPS로만 쿠키가 전송되게 하고, HttpOnly는 스크립트가 쿠키를 읽지 못하게 하며, SameSite는 Strict나 Lax로 설정해 교차 사이트 요청을 제한합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Set Secure, HttpOnly, and SameSite flags on session cookies
Missing cookie flags are one of the most common and easily fixed authentication weaknesses. Without Secure, session tokens are transmitted in plain text over HTTP and can be captured by network eavesdroppers. Without HttpOnly, any XSS payload can exfiltrate the session token in one line. Without SameSite, any website can trigger authenticated actions on behalf of the victim without their knowledge.
Quick Reference
- Secure — cookie is only sent over HTTPS, never plain HTTP
- HttpOnly — cookie is invisible to JavaScript (blocks XSS theft)
- SameSite=Strict or Lax — prevents the cookie from being sent on cross-site requests (blocks CSRF)
- Never use SameSite=None without also setting Secure and understanding the CSRF implications
Check
Check whether session and authentication cookies are set with the Secure, HttpOnly, and SameSite flags.
Fix
Update the server's cookie configuration to include Secure, HttpOnly, and SameSite=Strict (or Lax) on all session and auth cookies.
Explain
Explain what each cookie security flag does and the specific attack each one prevents.
Code Review
Review all Set-Cookie headers and cookie creation code. Flag any cookies missing the HttpOnly flag, absent Secure flag, or an unspecified or overly permissive SameSite setting.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/security/session-cookie-flags
자주 묻는 질문
HttpOnly는 무엇을 막나요?
JavaScript가 쿠키를 읽지 못하게 해, 많은 교차 사이트 스크립팅 공격이 세션을 훔치는 것을 막는다고 설명합니다.
SameSite는 무엇을 막나요?
교차 사이트 요청에 쿠키가 전송되지 않게 해, 교차 사이트 요청 위조를 막는 데 도움이 된다고 설명합니다.
SameSite None은 언제 괜찮나요?
Secure도 함께 설정되어 있고 교차 사이트 요청의 위험을 이해한 경우에만 괜찮다고 설명합니다.
상세 정보
작성자의 원본 설명
Use when reviewing server-side session management, setting up authentication middleware, or auditing cookie configuration in HTTP response headers.
인기도
- GitHub 스타
- 75k
- 순위
- #3017
- 라이선스
- MIT
- 업데이트
- 2026. 10. 31.
댓글
- …
이 저장소의 다른 스킬
frontendchecklist
75k명령줄 도구를 사용해 380개가 넘는 규칙으로 프런트엔드 코드와 실시간 페이지를 접근성, 속도, SEO, 보안 측면에서 점검합니다.
frontend-checklist-global
75kFront-End Checklist의 386개 규칙 전체로 프런트엔드 프로젝트를 감사하고, 발견한 문제마다 구체적인 해결 방법을 제시합니다.
404-page
75k없는 페이지 화면에 도움이 되는 링크가 있고 실제 404 상태 코드를 반환하는지 확인해, 길을 잃은 방문자를 돕습니다.
about-page
75k사이트를 운영하는 사람을 설명하는 명확한 소개 페이지가 있는지 검토해, 방문자와 검색 엔진의 신뢰를 높입니다.