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

Filter terminal-unsafe characters through one helper: list and the status printer keep bidi overrides and zero-width characters that core policy::strip_unsafe drops

Aperta Adatta ai principianti
#1,860 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
83/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
cli, security

Direzione di ricerca

Leggi crates/socket-patch-core/src/policy/mod.rs e i filtri in crates/socket-patch-cli/src/commands/list.rs e crates/socket-patch-cli/src/ui/status.rs. Consolida il filtraggio come descritto, quindi aggiungi il test unitario per una descrizione contenente U+202E e U+200B; il lavoro è completato quando questi caratteri vengono rimossi e l'output abituale dell'elenco rimane identico byte per byte.

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

Descrizione

agent:triaged arch-audit priority:p3 refactor

[agent] Filed by the scheduled architecture audit (audit-cli-tests). Register: register comment.

Kind: refactor. Register ID: T23.

Problem

Three functions filter characters before they reach the terminal:

So core already decided that bidi and zero-width characters are unsafe in output. list, however, prints API-sourced patch descriptions and vulnerability summaries through the weaker filter, so a description carrying U+202E can still reorder what the user sees. I found this by reading the code; I did not run it.

Proposed change
  1. Make core policy::strip_unsafe (or a renamed printable) keep \n and \t, and normalize \r\n, as list::sanitize does. Move it to a neutral home, such as utils::text or the CLI ui layer if core does not need it.
  2. Call it from list::sanitize's callers and from StatusPrinter::println, and delete the two copies.
Size

3 files, about −15 lines plus one test.

Acceptance criteria
  • list output for ordinary text is byte-identical.
  • A new unit test shows that a description containing \u{202E} and \u{200B} is printed without them.
  • policy tests are unchanged.
Lingua principale
Rust
Stelle
8
Fork
2
Merge medio
19h 19m
PR unite (30g)
697

Preparare l'ambiente

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 SocketDev/socket-patch

Tutte le issue di SocketDev/socket-patch

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.