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

form-captcha

它能做什么

这项技能检查公开表单(例如注册、登录和联系页面)是否有防止自动化滥用的保护。适用于运营带表单的开放网站的开发者。

适用场景

  • ✓当你的注册或联系表单收到大量垃圾信息的时候。
  • ✓当你添加了可能遭受自动化密码猜测攻击的登录页面的时候。
  • ✓当你希望阻止机器人,又不想让访客解答复杂谜题的时候。

技能链接

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

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“请为我的联系表单和注册表单添加机器人防护。”

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

工作原理

智能体会检查每个公开表单是否有验证码、蜜罐字段或速率限制。它会建议使用低摩擦的验证码服务,并确认结果在服务器端进行了检查。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Protect public forms with CAPTCHA

An unprotected registration form can create thousands of spam accounts per minute; an unprotected login form enables credential stuffing attacks that test millions of username/password combinations from data breaches.

Quick Reference

  • Public forms (contact, registration, login, password reset, comment) without CAPTCHA are targets for automated abuse
  • Prefer invisible/automated solutions (Cloudflare Turnstile, Google reCAPTCHA v3, hCaptcha) over interactive challenges that harm UX
  • Always validate CAPTCHA tokens server-side — client-side validation is bypassable
  • Rate limiting is complementary to CAPTCHA but not a substitute — bots can solve rate limits with distributed attacks
  • Honeypot fields (hidden inputs that users never fill but bots do) are a lightweight CAPTCHA alternative for low-risk forms

Check

Identify all public-facing forms (contact, registration, login, password reset, newsletter, comment). Check whether each has CAPTCHA, honeypot fields, or server-side rate limiting. Verify any CAPTCHA tokens are validated server-side.

Fix

Integrate a CAPTCHA service (Cloudflare Turnstile, hCaptcha, or Google reCAPTCHA v3) on all public forms. Validate the CAPTCHA response token on your server before processing the form submission. Add rate limiting as a defense-in-depth measure.

Explain

Explain what credential stuffing and spam bot attacks are, how CAPTCHA protects public forms, the trade-offs between different CAPTCHA approaches (v2 checkbox, v3 invisible, Turnstile), and why server-side validation is required.

Code Review

Review server config, headers, forms, and integration points related to Protect public forms with CAPTCHA. 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-captcha

常见问题

什么是蜜罐字段?

它是一个隐藏的表单字段,真人从不填写,但机器人经常会填写,因此有助于识别自动提交。

仅在浏览器中检查够吗?

不够。这项技能指出,验证码令牌必须在服务器端验证,因为浏览器端的检查可能被绕过。

它提到了哪些服务?

这项技能提到了 Cloudflare Turnstile、hCaptcha 和 Google reCAPTCHA v3。

详情

作者的原始描述

Use when reviewing public HTML forms (no authentication required to reach them) for bot and abuse protection mechanisms.

repo: thedaviddias/Front-End-Checklist

热度

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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能