Skip to content

integrity/brand-impersonation: an attribute label padded with real characters before the phrase is cut at 300 #1424

Closed

Description

@nc9

Found in review of #1399. aria-label, title, value and a logo alt are normalised over their first 16,000 characters and cut to 300, and a longer value is only counted in controlsUnread. A control whose attribute is padded with real characters (not spaces or invisible ones, which are removed first) before the phrase, e.g. aria-label="aaaa...(400 chars) Sign in with Google" on an icon-only control with no text, is missed, and the only signal is the info note when nothing else fired.

Acceptance Criteria

  • An icon-only control whose aria-label, title, value or logo alt has a sign-in phrase after more than 300 real characters is found, or reported as not fully read in the check it belongs to
  • The cut keeps the end of the label as well as the start, or reads every sign-in cue in the attribute within a fixed bound
  • One test per attribute fails on the current code and passes with the fix
  • The rule docs state the bound and the signal it gives

Activity

  1. added
    size: S
    rules
    security
    on Oct 31, 2026
  2. added theissue type on Oct 31, 2026
  3. WilliamK112 commented on Oct 31, 2026

    @WilliamK112
    Contributor

    I can take this. I’ll add regression cases for aria-label, title, value, and logo alt, then adjust the bounded attribute reader so it preserves both the start and end of long labels (and document the bound/signal). I’ll keep the change focused on this rule and validate the relevant rules tests before opening a PR.

  4. nc9 commented on Oct 31, 2026

    @nc9
    ContributorAuthor

    Shipped in v0.0.152 (c09396f9 794e1dc3), verified against main: every acceptance criterion is met. Release: https://github.com/squirrelscan/squirrelscan/releases/tag/v0.0.152

    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

    rulessecuritysize: S

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions