Repository navigation
New rule: forms that silently lose submissions (unnamed fields, dead or staging actions) #707
Description
Problem
A contact or signup form can look perfect and still lose every submission. Two causes are common and invisible from the outside:
- A field with no
name. Browsers only submit controls that have aname. An<input id="email">withoutname="email"is shown, filled in and then silently dropped from the request. It usually comes from a copy-pasted field or a refactor that renamednametoid, and the site owner finds out weeks later when someone asks why nobody replies. - An
actionthat goes nowhere. The form posts to a URL that now returns 404 (an old/contact.php, a deleted Formspree form), to a staging or preview host that shipped by accident (https://staging.example.com/api/lead,http://localhost:3000/subscribe), or tomailto:, which only opens the visitor's mail client, if they have one, and loses the submission otherwise.
squirrel does not check either. security/form-https covers forms that submit over plain http: (including cross-host actions and formaction on submit buttons), and the accessibility rules check that fields have labels, but nothing checks that a field is submitted or that the action URL answers. content/dev-leakage finds staging and localhost hosts in href and src, but does not read form action.
Proposal
New rule reliability/broken-forms in the Reliability category (#703). It reports three things.
Fields that are never submitted
- Warn: a form with a real
actionURL (not empty,#orjavascript:) contains aninput,selectortextareawithout aname. If a script does not take over, that field never reaches the server, and a field missing beside named ones is the classic copy-paste bug. - Info: the same in a form with no real
action. Those are usually handled by a script that reads fields byidor from component state, so they are reported as unconfirmed, not broken. - Not reported:
type="submit|button|reset|image",disabledcontrols, controls inside<template>, and controls whoseformattribute points at a different form. A control outside any<form>that names one withform="id"is judged as part of that form.
Actions that go nowhere
- Error: a first-party action URL answers 404 or 410.
- Warn: the action points at a staging, preview, development or localhost host (the same host classification
content/dev-leakageuses), or usesmailto:. - Warn: a first-party action URL answers 5xx, or fails at the network level (DNS, TLS, timeout).
- Not broken: 405 or 501 (the endpoint exists but does not accept that probe method), 401 and 403, 429, 503 with
Retry-After, and WAF challenges. The last three are reported as unverified (info), as the link checks do.
How the action is checked, without ever submitting the form (a formaction on a submit button is checked the same way as the form's action):
- A same-origin action URL that the crawl already fetched uses that status. No new request.
- Any other same-origin action is probed only when the run's probe level is active or aggressive, with
HEAD, falling back toGET. NeverPOST. Under passive probing it is left unchecked and the result says so. - A third-party action (Formspree, HubSpot, Mailchimp) is checked only when external link checking is on, through the same checker and the same rules for unverified statuses.
Notes
- Cost: the field and host checks read the DOM a page rule already has. Action checks reuse crawl statuses first, then send at most one probe per distinct action URL, inside the shared probe budget.
- False-positive risk: the unnamed-field check is where it lives. Forms built with React, Vue and friends often read values from state, not from the submitted body. Warning only when the form has a real
actionkeeps the warning for forms that post their fields to a server, and the finding says a script may be reading the field. AGETprobe of aPOSThandler can return 5xx on a badly written endpoint, which is why 5xx only warns. - Insecure submission stays with
security/form-httpsand is not reported again here.
Acceptance Criteria
- Fixture:
<form action="/contact" method="post">with<input name="name">and<input id="email" type="email">produces a warning naming the unnamed email field and the form - Fixture: the same form with every field named produces no finding
- Fixture: a form with no
action(oraction="#") and an unnamed field produces an info result, not a warning - Fixture: unnamed
type="submit",type="button",disabledcontrols, and a control withform="other"are not reported against the form they sit in; a control outside the form withform="contact"and nonameis reported against#contact - Fixture: a form whose same-origin
actionwas crawled and answered 404 produces an error, with no extra request sent - Fixture: an uncrawled same-origin action that answers 405 to
HEADandGETis not reported as broken; one that answers 404 is - No probe ever uses
POST, and under passive probing no request is sent for an uncrawled action and the result says the action was not checked - Fixture:
action="https://staging.example.com/lead"onexample.com,action="http://localhost:3000/subscribe"andaction="mailto:[email protected]"each produce a warning - An action answering 429, 503 with
Retry-After, or a WAF challenge is reported as unverified (info), never as broken - A third-party action is only requested when external link checking is on
- An
http:action on an HTTPS page is reported bysecurity/form-httpsonly, not by this rule - The rule has a docs page under
docs/rules/reliability/
Activity
feat(rules): security-txt strictness and version-disclosure header ch…
nc9 commentedon Oct 13, 2026
Note: commit 7d772c1 (pub#717, security.txt and version-disclosure) references this issue by mistake in its subject; it belongs to #713 (already closed). This issue (broken-forms) is still open and is tracked by the replacement PR for #719.
feat(rules): add reliability/broken-forms for forms that lose submiss…
feat(rules): add reliability/broken-forms #707