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。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 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 usehttps://— neverhttp:// - Forms without an explicit
actionattribute submit to the current page URL — ensure the page itself is on HTTPS - Check
fetch()andXMLHttpRequestcalls in JavaScript — data posted tohttp://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.
热度
- GitHub 星标
- 75k
- 排名
- #2857
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。