Pular para o conteúdo
Skillpedia
Segurança75 mil · #2870

hsts

O que ela faz

Esta skill verifica se o site informa aos navegadores que devem sempre usar a conexão HTTPS segura. É para donos de sites e desenvolvedores que querem uma proteção mais forte para os visitantes.

Quando usar

  • ✓Quando seu site entrega HTTPS, mas os navegadores ainda podem tentar HTTP simples primeiro.
  • ✓Quando você mantém um site que trata logins ou dados pessoais.
  • ✓Quando você configura um servidor, CDN ou hospedagem novos.

Link da skill

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

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/hsts/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Você pode adicionar o cabeçalho HSTS às respostas seguras do meu site?”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

O agente verifica se as respostas HTTPS incluem um cabeçalho Strict-Transport-Security e revisa suas configurações. Ele sugere um max-age de um ano com subdomínios incluídos, e testar antes de qualquer preload.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do GitHub.

Set an HSTS header

Without HSTS, an attacker on the same network can intercept the first HTTP request and strip TLS (SSL stripping), silently downgrading the connection before the browser ever sees a redirect.

Quick Reference

  • Set Strict-Transport-Security: max-age=31536000; includeSubDomains on all HTTPS responses
  • Use max-age=31536000 (1 year) minimum; HSTS preloading requires at least 1 year
  • Add includeSubDomains to protect all subdomains from downgrade attacks
  • Add preload only after testing — it is difficult to reverse and takes weeks to propagate
  • Never send the HSTS header over plain HTTP — only over HTTPS

Check

Check whether the server sends a Strict-Transport-Security header on all HTTPS responses, and verify the max-age, includeSubDomains, and preload directives are appropriate.

Fix

Add a Strict-Transport-Security header with max-age=31536000 and includeSubDomains to all HTTPS responses. Configure your web server or CDN to send this header, and validate it with curl or securityheaders.com.

Explain

Explain what HTTP Strict Transport Security (HSTS) is, how it prevents SSL stripping attacks, what the max-age and includeSubDomains directives do, and why the preload directive requires caution.

Code Review

Review server config, headers, forms, and integration points related to Set an HSTS 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/hsts

Perguntas frequentes

O que o HSTS faz?

Ele diz ao navegador para usar HTTPS no site automaticamente, o que bloqueia ataques de rebaixamento na primeira requisição simples.

O que faz o includeSubDomains?

Ele aplica a mesma proteção a todos os subdomínios do site.

Por que ter cuidado com o preload?

A skill diz que o preload é difícil de reverter e leva semanas para valer, então deve ser testado antes.

Detalhes

Descrição original do autor

Use when reviewing HTTP response headers on any site that serves content over HTTPS.

repo: thedaviddias/Front-End-Checklist

Popularidade

Estrelas no GitHub
75 mil
Posição no ranking
#2870
Licença
MIT
Atualizada em
31/10/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas