Chuyển đến nội dung
Skillpedia
Bảo mật75k · #2939

mixed-content

Skill này làm gì

Skill này kiểm tra một website HTTPS xem có script, ảnh, stylesheet và khung tải qua HTTP thường không. Skill dành cho chủ website và lập trình viên muốn các trang an toàn vẫn an toàn.

Khi nào nên dùng

  • ✓Khi bạn nhờ agent kiểm tra website an toàn có link tài nguyên không an toàn không.
  • ✓Khi trình duyệt cảnh báo nội dung hỗn hợp hoặc chặn một script trên trang HTTPS.
  • ✓Khi bạn chuyển website sang HTTPS và muốn tìm các địa chỉ http còn sót lại.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/mixed-content/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Trình duyệt của tôi báo một số nội dung trên website HTTPS không an toàn. Bạn có thể tìm và sửa các link đó không?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent quét mã nguồn trang, các yêu cầu mạng và CSS để tìm địa chỉ HTTP thường. Nó thay chúng bằng phiên bản HTTPS và có thể thêm chính sách bảo mật để nâng cấp những tài nguyên còn lại.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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

Câu hỏi thường gặp

Khác nhau giữa nội dung hỗn hợp chủ động và bị động là gì?

Nội dung chủ động như script bị trình duyệt chặn, còn nội dung bị động như ảnh có thể kích hoạt cảnh báo.

upgrade-insecure-requests là gì?

Đó là một thiết lập Content Security Policy, bảo trình duyệt tải tài nguyên HTTP qua HTTPS thay thế.

Nếu nhà cung cấp không hỗ trợ HTTPS thì sao?

Skill gợi ý tự lưu trữ tài nguyên hoặc tìm phương án thay thế.

Chi tiết

Mô tả gốc của tác giả

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

repo: thedaviddias/Front-End-Checklist

Độ phổ biến

Sao GitHub
75k
Vị trí xếp hạng
#2939
Giấy phép
MIT
Cập nhật
31/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự