new-tab
/new-tab
Use when reviewing HTML or JSX for anchor elements with target='_blank' to verify rel='noopener noreferrer' is present.
- Author
- thedaviddias ↗
- Repository
- front-end-checklist ↗
- Licence
- MIT
- Last repository change
- 06.10.2026
Assessment and security
- Files in this package
- 2
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 2
No signals detected. Repository changed on 06.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Use when reviewing HTML or JSX for anchor elements with target='_blank' to verify rel='noopener noreferrer' is present.
Triggers from the description
Original author description
Use when reviewing HTML or JSX for anchor elements with target='_blank' to verify rel='noopener noreferrer' is present.
How it works
- Quick Reference
- Check
- Fix
- Explain
- Code Review
SKILL.md preview
--- name: new-tab description: "Use when reviewing HTML or JSX for anchor elements with target='_blank' to verify rel='noopener noreferrer' is present." metadata: category: security priority: medium difficulty: beginner estimatedTime: "10" source: frontendchecklist.io url: https://frontendchecklist.io/rules/security/new-tab --- # 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 - `noopener` prevents the new tab from accessing `window.opener` and redirecting your page - `noreferrer` additionally suppresses the `Referer` header sent to the destination site - Modern browsers (Chrome 88+, Firefox 79+) implicitly add `noopener` for cross-origin `_blank` links, but explicit markup is required for older browsers and same-origin links - ESLint rule `jsx-a11y/anchor-is-valid` and `eslint-plugin-security` can 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
Files in this package (2)
- SKILL.md 2 KB
- references/rule.md 5 KB
Versions
The database has no other skills named new-tab.
Database snapshot: 13.11.2026 · package version e6693f75fdc1 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100favicon
Use when checking whether a site has a correctly configured favicon, auditing `<link rel='icon'>` tags in the `<head>`, or setting up favicon infrastructure for a new project. - 100external-links
Use when auditing content pages for citation quality, suggesting authoritative sources to link for factual claims, or reviewing whether a page's external link attributes (nofollow, noopener) are correctly set. - 90daisyui
Official daisyUI component-library skill for Tailwind CSS. When you write HTML or JSX code, you must use it. Even if the user does not request it, use it. - 85Version Management Skill
独立通用 Skill:管理前端项目全生命周期。只要任务**可能**写出 .html/.jsx/.tsx/.vue 入口文件,就必须在写出第一个文件**之前**读取并遵循本 Skill(用于确定落盘路径与项目目录),而不是产出之后才补救;即使用户没有提到"项目"或"版本"也要使用。同时响应用户的版本相关操作(查看历史、恢复版本、切换项目等)。 - 100yida-canvas-upgrade
将基于 JSX 组件 的自定义页面升级/迁移为使用 `YidaCodeCanvas` 组件实现的宜搭自定义页面。适用于用户要求“.oyd.jsx / .oyb.jsx / Jsx 页面转 YidaCodeCanvas”“renderJsx 页面迁移到 YidaCodeCanvas”“把发布产物改为 runtimeCode + importedModules”。不要用于从零编写自定义页面。 - 100hono-jsx
Use when building UI for a Hono app with hono/jsx — pages, layouts, forms, and interactive parts — server-rendered with jsxRenderer, developed and built with Vite, with client components via hono/jsx/dom. TRIGGER when tsconfig has jsxImportSource "hono/jsx", code imports…