new-tab
하는 일
이 스킬은 새 탭에서 열리는 링크를 확인하고, 탭 가로채기 공격을 막는 보안 속성이 들어 있는지 점검합니다. HTML이나 JSX 코드를 검토하는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓새 탭에서 열리는 링크의 보안 설정을 확인해 달라고 에이전트에게 요청할 때.
- ✓외부 링크를 새 탭으로 여는 코드를 검토할 때.
- ✓새로 추가되는 링크를 자동으로 검사하도록 린트 규칙을 설정하고 싶을 때.
스킬 링크
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/new-tab/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“우리 사이트에서 새 탭으로 열리는 모든 링크에 올바른 보안 속성이 붙어 있는지 확인해 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 새 탭으로 열리는 a 요소를 찾고 rel noopener noreferrer, 또는 최소한 noopener가 있는지 확인합니다. 빠진 속성은 추가하고, 앞으로 빠지지 않도록 린트 규칙도 제안할 수 있습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
External Link Security
A malicious site opened via target='_blank' can use window.opener.location to silently redirect your original tab to a phishing page — the user switches back and sees a fake login screen on what appears to be your domain.
Quick Reference
- Always add
rel="noopener noreferrer"to any<a target="_blank">link noopenerprevents the new tab from accessingwindow.openerand redirecting your pagenoreferreradditionally suppresses theRefererheader sent to the destination site- Modern browsers (Chrome 88+, Firefox 79+) implicitly add
noopenerfor cross-origin_blanklinks, but explicit markup is required for older browsers and same-origin links - ESLint rule
jsx-a11y/anchor-is-validandeslint-plugin-securitycan enforce this automatically
Check
Find all anchor elements with target='_blank' in the HTML and JSX source. Verify each one includes rel='noopener noreferrer' (or at minimum rel='noopener'). Flag any external links opening in a new tab that are missing this attribute.
Fix
Add rel='noopener noreferrer' to all <a target='_blank'> elements. In React/JSX this is rel="noopener noreferrer". Configure an ESLint rule to prevent this from recurring.
Explain
Explain the reverse tabnapping attack enabled by window.opener, how rel='noopener' and rel='noreferrer' prevent it, and the difference between the two values.
Code Review
Review server config, headers, forms, and integration points related to External Link Security. Flag exact responses, cookies, or browser behaviors that violate the rule, and verify them against the effective production-like response.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/security/new-tab
자주 묻는 질문
리버스 탭내빙이란 무엇인가요?
새 탭이 window.opener를 이용해 원래 탭을 몰래 가짜 페이지로 바꾸는 공격입니다.
noreferrer는 무엇을 하나요?
브라우저가 목적지 사이트에 Referer 헤더를 보내지 않도록 막습니다.
최신 브라우저는 이미 보호해 주지 않나요?
일부 브라우저는 다른 출처 링크를 보호하지만, 이 스킬은 구형 브라우저와 같은 출처 링크를 위해 명시적인 속성이 여전히 필요하다고 설명합니다.
상세 정보
작성자의 원본 설명
Use when reviewing HTML or JSX for anchor elements with target='_blank' to verify rel='noopener noreferrer' is present.
인기도
- GitHub 스타
- 75k
- 순위
- #2949
- 라이선스
- MIT
- 업데이트
- 2026. 10. 31.
댓글
- …
이 저장소의 다른 스킬
frontendchecklist
75k명령줄 도구를 사용해 380개가 넘는 규칙으로 프런트엔드 코드와 실시간 페이지를 접근성, 속도, SEO, 보안 측면에서 점검합니다.
frontend-checklist-global
75kFront-End Checklist의 386개 규칙 전체로 프런트엔드 프로젝트를 감사하고, 발견한 문제마다 구체적인 해결 방법을 제시합니다.
404-page
75k없는 페이지 화면에 도움이 되는 링크가 있고 실제 404 상태 코드를 반환하는지 확인해, 길을 잃은 방문자를 돕습니다.
about-page
75k사이트를 운영하는 사람을 설명하는 명확한 소개 페이지가 있는지 검토해, 방문자와 검색 엔진의 신뢰를 높입니다.