Secret masking runs all lines under one 1 s regex budget, so large log indexes fail with a misleading error
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 74/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- node.js, typescript
- Ambito
- performance
Direzione di ricerca
Start with src/utils/ocr.ts and trace regexRanges, REGEX_BUDGET_MS, and the DEFAULT_SECRET_PATTERN; then read how maskSecrets is called from src/utils/bugReport.ts and the indexing paths named in the issue. Run the relevant tests with npm test, including the 50k-line masking case and a caller-supplied catastrophic regex. Done means default-pattern masking handles the specified input and custom regexes still stop at the budget.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
regexRanges runs every text in a single runInNewContext(REGEX_SCAN, { texts, query }, { timeout: REGEX_BUDGET_MS }) call with a 1,000 ms budget. Each text is scanned three times against the 8-alternative DEFAULT_SECRET_PATTERN. index_recording masks every log line in one call (up to 50,000 lines of up to 2,000 chars), and searchIndex masks every item again on each query. The budget therefore caps the total volume of text, not a pathological pattern.
Where
src/utils/ocr.ts:141, 166-182(REGEX_BUDGET_MS, the single vm call at:173)src/utils/bugReport.ts:124(maskSecrets)src/tools/indexRecording.ts:167,src/utils/recordingIndex.ts:419
Impact
A long recording with chatty logs can exceed 1 s on a slower machine. index_recording then fails, or search_recording fails on every query, with an error blaming nested quantifiers in "your" regex, although the pattern is the built-in secret pattern. The exact tipping size depends on line length and the machine and was not measured.
Suggested fix
Run the built-in DEFAULT_SECRET_PATTERN directly, without the vm budget, or chunk texts into batches that each get their own budget. Keep the shared budget only for caller-supplied regexes.
Acceptance criteria
- Masking 50k synthetic 1 KB log lines with the default pattern does not throw.
- A caller-supplied catastrophic regex is still stopped by the budget.
Getting started
- Relevant files:
src/utils/ocr.ts,src/utils/bugReport.ts - How to run tests:
npm test
Filed by repo-audit/full-audit at b9b94fa. Severity: medium. Effort: S. audit-key: performance|src/utils/ocr.ts|regexRanges
- Lingua principale
- TypeScript
- Stelle
- 1
- Fork
- 4
- Merge medio
- 14h 8m
- PR unite (30g)
- 48
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di TMHSDigital/screencast-mcp
-
effort: small good first issue priority: medium testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
TMHSDigital/screencast-mcp#351 ·
I maintainer di solito rispondono entro 1 giorno
-
bug effort: small priority: medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
TMHSDigital/screencast-mcp#344 ·
I maintainer di solito rispondono entro 1 giorno
-
bug effort: small good first issue priority: medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
TMHSDigital/screencast-mcp#343 ·
I maintainer di solito rispondono entro 1 giorno
-
effort: medium help wanted priority: medium testing
Difficoltà 3/5 1-2 giorni Idoneità per principianti 76/100
TMHSDigital/screencast-mcp#350 ·
I maintainer di solito rispondono entro 1 giorno
-
effort: medium priority: medium testing
Difficoltà 4/5 1-2 giorni Idoneità per principianti 70/100
TMHSDigital/screencast-mcp#349 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di TMHSDigital/screencast-mcp
Issue simili
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
openclaw/openclaw#200365 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
area-templates triage:bot-seen triage:needs-human
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
microsoft/aspire#22356 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Archiving an agent that is not loaded keeps its old updatedAtForse già presa @luoph l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
content triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno