hsts
できること
このスキルは、サイトがブラウザに対して、常に安全な HTTPS の接続を使うよう伝えているかを確認します。訪問者の保護を強めたいサイト運営者や開発者向けです。
使う場面
- ✓サイトは HTTPS で提供されているが、ブラウザがまだ平文の HTTP を先に試すとき。
- ✓ログインや個人情報を扱うサイトを運営しているとき。
- ✓新しいサーバー、CDN、ホスティングの設定をしているとき。
スキルのリンク
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/hsts/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私のウェブサイトの安全な応答に、HSTS ヘッダーを追加してもらえますか。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、HTTPS の応答に Strict-Transport-Security ヘッダーがあるかを確認し、その設定を見直します。有効期間を1年、サブドメインを含める設定を提案し、プリロードの前にはテストすることを勧めます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)を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; includeSubDomainson all HTTPS responses - Use
max-age=31536000(1 year) minimum; HSTS preloading requires at least 1 year - Add
includeSubDomainsto protect all subdomains from downgrade attacks - Add
preloadonly 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.
よくある質問
HSTS は何をしますか?
ブラウザに、サイトへ自動的に HTTPS を使うよう伝え、最初の平文のリクエストでのダウングレード攻撃を防ぎます。
includeSubDomains は何をしますか?
サイトのすべてのサブドメインに、同じ保護を適用します。
プリロードにはなぜ注意が必要ですか?
プリロードは元に戻しにくく、効果が出るまで数週間かかるため、先にテストすべきだとこのスキルは説明しています。
詳細
作者による元の説明
Use when reviewing HTTP response headers on any site that serves content over HTTPS.
人気
- GitHubのスター
- 75k
- ランキング
- #2870
- ライセンス
- MIT
- 更新日
- 2026/10/31
コメント
- …
このリポジトリの他のスキル
frontendchecklist
75kコマンドラインツールを使って、フロントエンドのコードとライブページを、アクセシビリティ、速度、SEO、セキュリティに関する380以上のルールと照らし合わせて確認します。
frontend-checklist-global
75kフロントエンドのプロジェクトを、386のFront-End Checklistのルールすべてと照らし合わせて監査し、見つかった問題ごとに具体的な修正方法を示します。
404-page
75k見つからないページの画面に役立つリンクがあり、本物の404ステータスを返すかを確認し、迷った訪問者が目的のページを見つけられるようにします。
about-page
75kサイトの運営者が誰かを説明する、分かりやすいAboutページがあるかを確認し、訪問者と検索エンジンからの信頼を高めます。
似ているスキル
reverse-engineer-anything
422kREAツールを使って、出荷済みのアプリやパッケージの中身を調べ、機能の説明、版の比較、再構築の手順をエージェントが支援します。
1password
394k1Password CLIをセットアップし、サインインして、秘密情報の値を会話に表示せずに読み取ったり注入したりするようエージェントを支援します。
healthcheck
394kOpenClawを動かすコンピューターやサーバーを、SSH、ファイアウォール、更新、バックアップなどのセキュリティリスクについて監査し、安全な修正案を提案するようエージェントを支援します。