Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#296 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
playwright, typescript

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
0
Fork
0
Merge medio
2h 48m
PR unite (30g)
8

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di usabl-dev/usabl

Tutte le issue di usabl-dev/usabl

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.