Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Announcement capture trusts a page global the page can define or replace

Open
#296 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
playwright, typescript

Research direction

Start by locating the announcement capture and checkPage adoption code, then read how the toast ancestor walk accesses attributes over CDP. Trace how the CLI init script exposes window.__usablDrain and how the path helper is guarded. Add tests for a page that predefines the drain and one that replaces it after load; each should produce a gap or failure, never a pass.

Written by the indexing model from the issue text.

Description

area: playwright bug security

What happens

Flow requirements read announcements through window.__usablDrain, a function in the page's own JavaScript world.

  • On an adopted page (checkPage), the capture is installed only if __usablDrain is not already defined. A page that defines its own before adoption keeps it.
  • On a CLI page, the init script defines it first, but page script can replace it afterwards.

Either way, page code can hand usabl announcements no screen reader spoke.

Why it matters

A flow requirement's expectedAnnouncement can pass on text the page supplied directly. That is a false green, and page text is supposed to be untrusted data.

Fix direction

Run the capture in an isolated world, the way the toast ancestor walk now reads attributes over CDP, or bind the drain to a value page script cannot reach. Add tests for a page that predefines the drain and for a page that replaces it after load. Both must give a gap or a failure, never a pass. The path helper has the same kind of guard and should be checked at the same time.

Dominant language
TypeScript
Stars
0
Forks
0
Avg merge
2h 48m
Merged PRs (30d)
8

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from usabl-dev/usabl

All issues in usabl-dev/usabl

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.