跳到正文
Skillpedia
安全75k · #2857

form-https

它能做什么

这项技能检查网站上的表单和数据请求是否使用安全的 HTTPS 地址。适用于收集访客信息的开发者。

适用场景

  • ✓当登录或注册表单将数据发送到以 http 开头的地址的时候。
  • ✓当你的 JavaScript 调用了不安全的 http 端点的时候。
  • ✓当你的网站仍通过纯 HTTP 提供部分页面的时候。

技能链接

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

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/form-https/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请检查我所有的表单是否都通过 HTTPS 发送数据。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会扫描表单的 action 和 JavaScript 请求中的不安全 http 地址。它会建议改为 https,并设置服务器将纯 HTTP 流量重定向。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Submit forms over HTTPS

A login form that posts credentials to an HTTP endpoint sends usernames and passwords as plain text over the network — anyone on the same Wi-Fi, the ISP, or a network proxy can read them without any special tools.

Quick Reference

  • Every <form action> URL must use https:// — never http://
  • Forms without an explicit action attribute submit to the current page URL — ensure the page itself is on HTTPS
  • Check fetch() and XMLHttpRequest calls in JavaScript — data posted to http:// endpoints is unencrypted
  • Browsers show a 'Not Secure' warning in the address bar when a form is on an HTTP page
  • From Chrome 86+, autofill is disabled on HTTP forms to protect credentials

Check

Scan all HTML form elements for action attributes pointing to http:// URLs. Check all JavaScript fetch() and XMLHttpRequest calls for http:// endpoints. Verify the current page URL is HTTPS so forms without an explicit action submit securely.

Fix

Replace all http:// form action URLs with https:// equivalents. Ensure the web server redirects HTTP to HTTPS (301) so that forms on the page also benefit. For JavaScript API calls, update all endpoint URLs to use https://.

Explain

Explain why form submissions over HTTP expose user data in transit, how network attackers can intercept plain HTTP traffic, and what the browser security indicators look like on insecure forms.

Code Review

Review server config, headers, forms, and integration points related to Submit forms over HTTPS. 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/form-https

常见问题

为什么纯 HTTP 很重要?

通过 HTTP 发送的数据,同一网络上的任何人都可以读取,包括密码。

浏览器如何显示不安全的表单?

这项技能指出,在 HTTP 页面上,浏览器会在地址栏显示“不安全”警告。

这会影响自动填充吗?

这项技能指出,Chrome 86 及更高版本会在 HTTP 表单上禁用自动填充,以保护凭据。

详情

作者的原始描述

Use when reviewing HTML forms, fetch/XHR calls, and form action attributes to ensure data is submitted exclusively over HTTPS.

repo: thedaviddias/Front-End-Checklist

热度

GitHub 星标
75k
排名
#2857
许可证
MIT
更新时间
2026/10/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能