Skip to content

Local link checks: list bot-walled answers and timeouts as unverified, not broken; suggest signing in #800

Closed

Description

@nc9

A link check run from the user's own machine (signed out, --offline, or the local fallback for a link the cloud checker did not answer in time) reports many working links as broken. Sites answer an automated request with a bot wall, and the local checker treats most of those answers as a dead link:

  • a 403 is "unverifiable" only when detectWaf recognises the vendor; a bare 403 is broken;
  • 401, 405, 406 and LinkedIn's 999 are broken;
  • a 503 challenge page without Retry-After is broken;
  • a timeout is broken (a site that stalls robots looks exactly like a dead one).

The cloud link checker already lists all of these as "status unverifiable", never as broken.

Proposal

For links checked locally, list these answers as unverified (the existing waf-blocked-external-links info row, vendor when detected, else unknown), not broken:

  • 401, 403, 405, 406, 999, whatever the firewall detection says;
  • a 503 that carries a bot-challenge marker;
  • a timeout.

Still broken: 404, 410, other 4xx and 5xx, a domain that does not exist, a refused connection, an invalid certificate.

When an audit's external links were checked only locally and some came back unverified, the CLI says so and how to get a real answer:

N external links could not be verified from this machine (bot protection or a timeout), so they are listed as unverified, not broken. Sign in with squirrel auth login to check them with the squirrelscan link checker.

Acceptance Criteria

  • A locally checked link answering 401, 403 (with or without a detected firewall), 405, 406 or 999 is listed under waf-blocked-external-links, not under broken-external-links or as dead in links/dead-links.
  • A locally checked link that times out is listed as unverified, not broken.
  • A 503 with a bot-challenge marker is unverified; a plain 503 without one stays broken.
  • 404, 410, a nonexistent domain and a refused connection stay broken.
  • Results from the cloud link checker keep their own verdicts (unchanged).
  • A signed-out or --offline audit with at least one unverified external link prints the sign-in notice once in its summary; an audit with none, or one whose links were all checked in the cloud, prints nothing.
  • The broken-external-links and dead-links docs pages say which local answers are listed as unverified; CHANGELOG entry under Changed.
  • Tests cover each status above against a local server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugrulessize: M

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions