You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
integrity/brand-impersonation: control ranking reads the raw destination, so a backslash or tab-split link skips the long read #1495
Found in a security review of released code (since v0.0.148). In the control scan, shortlist() decides whether a link goes to the page's own site after normalising the URL (tabs, newlines and leading control characters removed, a backslash read as a slash), but rank() reads the raw href. A destination written with a backslash or split by a tab is ranked as local, so the control gets no long read of its label and is not counted in controlsUnread when its label is cut.
Shape (synthetic hosts)
A link to /\other.example/x (or / + a tab + /other.example/x) whose label has a sign-in phrase after 300 nodes is not read and controlsUnread stays 0; the same markup with https://other.example/x reads the label.
Acceptance Criteria
rank() decides local or off-site from the normalised destination (the same one shortlist() uses), and treats a backslash as a slash
The shape above gets the long read of its label, or is counted in controlsUnread when the read is cut
Tests cover the backslash form, the tab form and a leading-space form, and fail without the change
Checked against v0.0.156. Ticked: criteria 1 (rank() and shortlist() read the same normalised destination, a backslash read as a slash) and 2 (the shape gets the long read, or is counted in controlsUnread when the read is cut). Open: criterion 3, the tests cover the backslash and tab forms but there is no committed leading-space case in integrity-budget-1495.test.ts. Leaving this open for that one test.
Activity
fix(integrity): looksOffSite mirrors the URL parser for ranking and s…
fix(rules): shortlist no longer promotes off-site links; normalised t…
fix(integrity): rank a control by the normalised destination, backsla…
fix(integrity): looksOffSite mirrors the URL parser for ranking and s…
fix(rules): shortlist no longer promotes off-site links; normalised t…
test(rules): name the overlay tests' base style OVERLAY_BASE so it do…
nc9 commentedon Nov 1, 2026
Checked against v0.0.156. Ticked: criteria 1 (rank() and shortlist() read the same normalised destination, a backslash read as a slash) and 2 (the shape gets the long read, or is counted in
controlsUnreadwhen the read is cut). Open: criterion 3, the tests cover the backslash and tab forms but there is no committed leading-space case inintegrity-budget-1495.test.ts. Leaving this open for that one test.nik
test(rules,tech-detect): leading-space sign-in forms and three clarit…
nc9 commentedon Nov 1, 2026
Shipped in v0.0.157 and checked against it: the leading-space cases are in
integrity-budget-1495.test.ts(a sign-in path with leading spaces in the shortlist test;/sign-in,\u0001/sign-inand//host/xranking as sign-in or off-site,/plainas local), alongside the backslash and tab cases. Every acceptance criterion is met. Release: https://github.com/squirrelscan/squirrelscan/releases/tag/v0.0.157nik