Skip to content
Back to skills

X Frame Options

ASecurity

Use when reviewing HTTP response headers for clickjacking protection on any web application with authenticated user actions.

  • 74,358 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 5, 2026
developmentgogitfrontendsecurity

Works with

  • cli

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned October 5, 2026

npx -y skills add thedaviddias/Front-End-Checklist --skill x-frame-options --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of X Frame Options?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for X Frame Options
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/thedaviddias-x-frame-options/badge)](https://www.skillsdirectory.com/skills/thedaviddias-x-frame-options)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: x-frame-options
description: "Use when reviewing HTTP response headers for clickjacking protection on any web application with authenticated user actions."
metadata:
  category: security
  priority: high
  difficulty: beginner
  estimatedTime: "5"
  source: frontendchecklist.io
  url: https://frontendchecklist.io/rules/security/x-frame-options
---

# Set an X-Frame-Options header

Without framing protection, an attacker can embed your banking login page in a transparent iframe on a malicious site and trick users into clicking buttons they cannot see — transferring money, changing settings, or leaking credentials.

## Quick Reference

- Use `X-Frame-Options: DENY` to prevent all framing, or `SAMEORIGIN` to allow framing only from your own domain
- `ALLOWFROM` is obsolete and unsupported in modern browsers — use CSP `frame-ancestors` instead
- The modern equivalent is `Content-Security-Policy: frame-ancestors 'none'` — prefer CSP for new sites
- Both headers can coexist: X-Frame-Options for older browsers, frame-ancestors for modern ones
- Clickjacking attacks trick users into clicking invisible iframe buttons — DENY eliminates this entirely

## Check

Check whether the server sends an X-Frame-Options header (DENY or SAMEORIGIN) or a Content-Security-Policy header with frame-ancestors directive to prevent clickjacking.

## Fix

Add X-Frame-Options: DENY to all responses if the site does not need to be embedded anywhere. If legitimate framing is needed on the same origin, use SAMEORIGIN. For fine-grained control, use CSP frame-ancestors instead.

## Explain

Explain what a clickjacking attack is, how X-Frame-Options and CSP frame-ancestors prevent it, and the difference between DENY and SAMEORIGIN values.

## Code Review

Review server config, headers, forms, and integration points related to Set an X-Frame-Options header. 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/x-frame-options

Files in this skill

  • SKILL.md2.1 KB
  • references/rule.md5.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…