Saltar al contenido
Skillpedia
Seguridad75 mil · #3091

x-frame-options

Qué hace

Esta skill comprueba si un sitio impide que otros sitios web incrusten sus páginas en marcos. Es para desarrolladores y personal de seguridad que protegen sitios donde los usuarios inician sesión o realizan acciones.

Cuándo usarla

  • ✓Cuando un sitio con inicios de sesión o pagos no tiene un encabezado de protección contra marcos.
  • ✓Cuando un análisis de seguridad reporta un riesgo de clickjacking.
  • ✓Cuando un sitio solo debe incrustarse en su propio dominio.

Link de la skill

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/x-frame-options/SKILL.md

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/x-frame-options/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“Un análisis de seguridad dice que mi página de inicio de sesión puede ponerse dentro del marco de otro sitio. ¿Cómo lo bloqueo?”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

El agente añade un encabezado que impide que otros sitios enmarquen las páginas, o limita el enmarcado al mismo dominio. También puede sugerir la configuración más nueva frame-ancestors de CSP.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de GitHub.

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

Preguntas frecuentes

¿Qué es el clickjacking?

Es un ataque en el que un marco oculto permite que un sitio malicioso engañe a los usuarios para que pulsen botones que no ven.

¿En qué se diferencian DENY y SAMEORIGIN?

DENY bloquea todo el enmarcado, mientras que SAMEORIGIN lo permite solo desde tu propio dominio.

¿ALLOWFROM sigue siendo compatible?

No. La skill indica que está obsoleto y no es compatible con los navegadores modernos.

Detalles

Descripción original del autor

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

repo: thedaviddias/Front-End-Checklist

Popularidad

Estrellas en GitHub
75 mil
Posición en el ranking
#3091
Licencia
MIT
Actualizada
31/10/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas