本文へスキップ
Skillpedia
セキュリティ75k · #2939

mixed-content

できること

このスキルは、HTTPS のサイトが通常の HTTP で読み込むスクリプト、画像、スタイルシート、フレームを確認します。安全なページを安全に保ちたいサイト運営者や開発者向けです。

使う場面

  • ✓安全なウェブサイトに、安全でないリソースのリンクがないか確認してほしいとき。
  • ✓ブラウザが混在コンテンツについて警告したり、HTTPS のページでスクリプトをブロックしたりするとき。
  • ✓サイトを HTTPS に移行し、残っている http のアドレスを探したいとき。

スキルのリンク

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

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/mixed-content/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“ブラウザが、私のHTTPSサイトの一部のコンテンツが安全でないと警告しています。そのリンクを探して直してもらえますか。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは、ページのソース、ネットワークリクエスト、CSS の中にある平文の HTTP アドレスを探します。それらを HTTPS 版に置き換え、残ったものをアップグレードするセキュリティポリシーを追加することもできます。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Avoid mixed content on HTTPS pages

Active mixed content (scripts loaded over HTTP into an HTTPS page) gives network attackers the ability to execute arbitrary JavaScript on your page — the same power as XSS, despite the page itself being served over HTTPS.

Quick Reference

  • Active mixed content (scripts, iframes, stylesheets) is blocked outright by all modern browsers
  • Passive mixed content (images, audio, video) triggers a security warning and may be upgraded or blocked
  • Use upgrade-insecure-requests CSP directive to automatically upgrade HTTP sub-resources to HTTPS
  • Audit all hardcoded http:// URLs in HTML, CSS, and JavaScript
  • The Content-Security-Policy: upgrade-insecure-requests directive is the most practical fix for legacy content

Check

Scan the page source and network requests for any HTTP resources loaded on an HTTPS page. Check <script src>, <img src>, <link href>, <iframe src>, and CSS url() values for http:// URLs. Also check the Content-Security-Policy header for the upgrade-insecure-requests directive.

Fix

Replace all http:// resource URLs with https:// equivalents. If the resource provider does not support HTTPS, host the resource yourself or find an alternative. Add Content-Security-Policy: upgrade-insecure-requests as a safety net for any remaining HTTP URLs.

Explain

Explain the difference between active and passive mixed content, why active mixed content is blocked by browsers, and how the upgrade-insecure-requests CSP directive works.

Code Review

Review server config, headers, forms, and integration points related to Avoid mixed content on HTTPS pages. 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/mixed-content

よくある質問

能動的な混在コンテンツと受動的な混在コンテンツの違いは何ですか?

スクリプトのような能動的なコンテンツはブラウザがブロックし、画像のような受動的なコンテンツは警告が出ることがあります。

upgrade-insecure-requests とは何ですか?

HTTP のリソースを代わりに HTTPS で読み込むようブラウザに伝える、Content Security Policy の設定です。

提供元が HTTPS に対応していない場合はどうしますか?

そのリソースを自分でホストするか、別の代替手段を探すことを提案しています。

詳細

作者による元の説明

Use when reviewing an HTTPS page for resources (scripts, images, stylesheets, iframes) that are loaded over plain HTTP.

repo: thedaviddias/Front-End-Checklist

人気

GitHubのスター
75k
ランキング
#2939
ライセンス
MIT
更新日
2026/10/31

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル