Repository navigation
fix(integrity): scan long control label windows #1424 - #1454
WilliamK112 wants to merge 1 commit into
Conversation
|
Thanks for taking on #1424 so quickly. An independent security review of this change is running now (the evasion shapes: a phrase in the omitted middle, a split phrase across the cut, unicode expansion at the cut, cost on pages with many long labels). We will comment here with the result, and if it is good we will cherry-pick it into the next release batch with your authorship kept. nik |
|
Review result: thank you, the change fixes the exact example in #1424 and it is cheap (linear, same cost as main on 5 MB pages). Before we can take it we found two things with a probe that places the phrase at every start offset with 400 characters of padding after it:
Suggested direction, which a maintainer lane will implement on top of your commit so your authorship stays: replace the head-and-tail cut with overlapping 300-character windows (stride 150) over the first 16,000 normalised characters, and mark an attribute unread only above 16,000. We prototyped it: the phrase is found at every offset from 0 to 420 with padding on both sides, and the worst-case time stays at 1.2 s. You are welcome to push that yourself; otherwise we will carry it. nik |
|
Reviewed head: e77d9b4 Verdict: pending maintainer review. The two blockers from the earlier maintainer review are still open on this head (no commits since), and CI is green (all checks pass, DCO sign-off present). Earlier requested changes:
Further findings:
Positives: linear cost, the logo nik |
Signed-off-by: Ching-Wei Kang <[email protected]>
e77d9b4 to
a9e04bb
Compare
|
Thanks for the detailed probe. Addressed in a9e04bb:
Validation: focused regression tests pass; rules typecheck and lint pass; the full rules suite reports 8,642 pass, 25 todo, 0 fail; docs checks pass. |
|
Reviewed head: a9e04bb Verdict: pending maintainer review. Both blockers from the earlier review are addressed on this head, CI is green and the DCO sign-off is present. I read the diff only (no probe run), so the cost question below needs a maintainer run before this is taken. Earlier requested changes:
Further findings:
Positives: the maintainer's suggested design was followed, the tests cover the exact failure shapes from the review, and the PR is scoped to #1424. nik |
|
Thank you for the rewrite: the overlapping-window version fixes every finding from our first review (the phrase is found at every offset up to 15,960, unread is flagged only above 16,000, no head and tail glue, no formatter churn) and we will carry it with your commit and authorship kept. We are adding one maintainer commit on top for the remaining items: snapping window edges to word boundaries (a phrase like "design in with Google Workspace" can hit at a window seam), a fail-safe page budget so many decoy controls cannot starve the real one, and docs. No change is needed from you. nik |
|
Landed in v0.0.152 as nik |
Summary\n\n- keep the first 150 and last 149 normalized characters of long control attributes\n- count omitted middle content and content past the raw limit as unread\n- add regression coverage for aria-label, title, input value, logo alt, and an omitted-middle case\n- document the bound and add the user-visible change to the changelog\n\nCloses #1424\n\n## Verification\n\n- oxfmt --check on the changed TypeScript files\n- oxlint on the changed TypeScript files\n- packages/rules typecheck\n- 154 focused integrity tests\n- full rules suite: 8,641 passed, 25 todo, 0 failed\n- docs check\n- docs build\n\n## Checklist\n\n- [x] Tests added and passing\n- [x] No secrets or generated artifacts committed\n- [x] Commit carries DCO sign-off\n\nDocs: updated docs/rules/integrity/brand-impersonation.mdx.\nSkill: none.