Skip to content

fix(rules): integrity brand and overlay detectors miss attribute labels, buttons, homoglyphs; flag identity brokers #784

Closed

Description

@nc9

Found in the security review of #749 (#696). These gaps predate it.

Evasions (integrity/brand-impersonation, integrity/fake-auth-overlay miss these on main):

  • The sign-in label exists only in an attribute: aria-label, title, or the alt of a logo image inside the link.
  • The control is a <button>, an <input type=submit value="Sign in with Google"> or role=button, or the kit uses an email-first form with no password field. The credential surface reads only a[href] and password forms.
  • "Continue with Google" (Google's own default button wording) and "Log in with Google" are not in the Google lexicon.
  • Non-English labels, Cyrillic homoglyphs, and fullwidth letters. These need NFKC normalisation plus a confusables map.
  • Links inside <template> or a declarative shadow root.
  • Hidden decoy text inside the label (Sign<span style=display:none>x</span> in).
  • Overlay geometry written as position:fixed !important or inset:0, or set from a class instead of inline style.

False positives:

  • Identity brokers' sign-in links (Auth0, Okta, Cognito, Supabase, Firebase) labelled "Sign in with Google" are reported as Google impersonation.
  • Microsoft's legitimate hosts are missing login.windows.net, login.microsoftonline.us and b2clogin.com.

Cost: a.textContent per nested <a> grows faster than linearly when the parser nests unclosed anchors. 4,000 nested anchors (0.14 MB) took about 1.7 s.

Acceptance Criteria

  • An off-brand control labelled "Sign in with Google" or "Continue with Google" fires brand-impersonation when it is a <button>, an <input type=submit>, or an <a> whose label is only in aria-label, title or a logo's alt, with tests.
  • A label written with Cyrillic look-alikes or fullwidth letters is matched after normalisation, with a test.
  • A sign-in link to a known identity broker host is not reported as brand impersonation, and the three Microsoft hosts count as legitimate, with tests.
  • Overlay geometry from inset:0, !important or a class is detected, with a test.
  • A page of 4,000 nested anchors runs the brand detector in linear time (n/2n/4n test).

Activity

  1. added
    bug
    size: M
    rules
    security
    on Oct 14, 2026
  2. added theissue type on Oct 28, 2026
  3. nc9 commented on Oct 31, 2026

    @nc9
    ContributorAuthor

    Shipped in v0.0.148 (5f164c04), verified against main: every acceptance criterion is met. Release: https://github.com/squirrelscan/squirrelscan/releases/tag/v0.0.148

    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

    bugrulessecuritysize: M

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions