Skip to content

feat(rules): an external link confirmed broken is an error, not a warning #1739

Closed

Description

@nc9

links/broken-links (internal) has severity error and its failing check is fail. links/broken-external-links has severity warning and its failing check is warn, whatever was found. A link to a page that answers 404 or 410, or to a host that no longer exists, is as broken for the visitor as an internal one, and it is the case site owners most want to hear about. In a report it sits among dozens of warnings and never counts as a failure.

Expected: an external link that is confirmed broken is reported as a failure. A link that could not be verified stays out of it, exactly as today.

What is wanted

  • Confirmed broken means a definite answer: the target answered 404 or 410, or its host does not resolve (see the companion issue on unresolvable hosts). These fail.
  • Possibly broken stays a warning: 5xx, timeouts, connection resets, TLS errors, other 4xx. These can be transient or bot-specific.
  • Not verifiable stays informational: bot walls, rate limits, refused addresses, links over the audit's limit. No change.
  • The rule's severity becomes error, and the report shows broken external links alongside broken internal links.

Acceptance Criteria

  • A page linking to an external URL that answers 404 or 410 produces a fail check on links/broken-external-links naming the link, its status and the pages that carry it.
  • A link whose target answers 5xx, times out or fails TLS produces a warn check, separate from the confirmed-broken one, with its own check name.
  • Links that were rate limited, blocked by a bot wall, refused or not requested are reported exactly as before and never fail.
  • The rule's severity is error, and the rule docs page says which outcomes fail, warn and inform.
  • The score impact is measured before release on a sample of stored reports (how many sites gain a failure, and the median score change) and stated in the PR.
  • The CHANGELOG says that confirmed broken external links are now errors.
  • Verified on the public demo site nutshop.squirrelscan.com (repo squirrelscan/nut-shop): with its broken-external-404 fault on, an audit reports a failing external link; with it off, the failure is gone.

Activity

  1. added
    enhancement
    size: M
    rules
    on Nov 11, 2026
  2. added theissue type on Nov 11, 2026
  3. nc9 commented on Nov 11, 2026

    @nc9
    ContributorAuthor

    Evidence from the public demo site (nutshop.squirrelscan.com, repo squirrelscan/nut-shop), cloud audit with three external-link faults on:

    • A non-resolving name on a real TLD is reported today as warn broken-external-links with "domain does not exist". Under this issue it becomes a failure.
    • A link to a real 404 on a live host is not reported as broken on the first audit. It is listed under the informational check waf-blocked-external-links with unverifiedReason: awaiting-confirmation and wafProvider: unknown, because the cloud link checker holds a first 404 until a second failed check confirms it.

    One addition to the criteria, so the first-404 case reads correctly while it waits:

    • A link that failed once and is awaiting confirmation is reported under its own check name with wording such as "answered 404 once, being confirmed", as a warning, and never under waf-blocked-external-links. When it is confirmed it moves to the failing check.

    nik

  4. nc9 commented on Nov 12, 2026

    @nc9
    ContributorAuthor

    Not closed after v0.0.179 (https://github.com/squirrelscan/squirrelscan/releases/tag/v0.0.179). Confirmed broken links now fail, possible ones warn, severity is error, docs and the behaviour-change note shipped. Still open: the score-impact measurement on a sample of stored reports and the nutshop on/off verification. The change that shipped is 2ab28c8.

    nik

  5. nc9 commented on Nov 13, 2026

    @nc9
    ContributorAuthor

    Shipped in v0.0.179. Implemented in 2ab28c8 (an ancestor of the v0.0.179 tag), and described in that release's CHANGELOG entry for #1739.

    nik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementrulessize: M

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions