[quality] e2e coverage report's repository-escape guard has no test
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
- 89/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, node.js, playwright
- Ambito
- security, testing-qa, tooling
Direzione di ricerca
Leggi tests/tools/e2e-coverage-report.mjs:196-200 e i casi correlati in tests/e2e-coverage-report.test.mjs:709 e :848. Crea il fixture descritto con src come symlink al di fuori della radice del fixture, quindi esegui node --test tests/e2e-coverage-report.test.mjs. È completato quando il test asserisce /source map source escapes repository/ e le righe di guardia sono coperte.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Finding
tests/tools/e2e-coverage-report.mjs is the tool that converts Playwright V8 coverage
into src/** line attribution. It contains three layered containment guards that stop a
malicious or malformed source map from pulling file contents in from outside the
repository. One of them — the repository-escape guard — has no test:
tests/tools/e2e-coverage-report.mjs:196-200
if (!isInside(rootPath, resolvedSource)) {
throw new Error(
`source map source escapes repository: ${sourceFile.relative}`,
);
}
Its two siblings are already pinned: tests/e2e-coverage-report.test.mjs:709
(rejects symlinked maps, bundles, and sources) and :848
(rejects a nominal src symlink to an unrelated repo file) both assert
/source map source escapes src directory/. Nothing asserts
/source map source escapes repository/.
The guard is reachable, not dead code. It fires when src itself is the symlink:
srcRootPath = await realpath(srcRoot) then resolves to the outside directory, so the
isInside(srcRootPath, resolvedSource) check at :185-189 is satisfied and only the
repository check at :196 sees the escape. Untested, a refactor can delete it silently
and the tool will happily read and embed file contents from outside the checkout into a
published coverage artifact.
Evidence
Unit evidence — npm run test:unit:coverage (node --test coverage, TZ=UTC,
node v26.8.1) run locally on 2026-10-02 at 0c87310:
tests/tools/e2e-coverage-report.mjs | 97.32 | 89.49 | 133-134 180-183 197-200 598-602 | ...
Lines 197-200 are the guard body. Adding one test moves the file to
98.03 | 89.83 and leaves 197-200 covered.
End-to-end evidence — not applicable. This file is build tooling executed by the
End-to-end coverage (non-gating) CI job; it is never loaded in the browser, so it
cannot appear in the Playwright V8 coverage artifact. Confirmed against the
e2e-coverage artifact (id 11211344262) of run
https://github.com/cncf/endusers/actions/runs/36972418667 (report.txt, run
36972418667-1, status passed), whose file list is src/** only. This is therefore
a unit-only gap and carries no e2e dimension.
Why this matters now
Repository region coverage is 94.90% against the --check-regions 94 floor enforced by
npm run test:unit:coverage:check. tests/tools/e2e-coverage-report.mjs at 89.49%
regions is the single largest drag on that margin.
Recommendation
Add one test to tests/e2e-coverage-report.test.mjs that builds a fixture whose src
is a symlink to a directory outside the fixture root, and assert
collectE2ECoverage rejects with /source map source escapes repository/.
Completion criteria
- a test asserts
/source map source escapes repository/ -
node --test tests/e2e-coverage-report.test.mjspasses -
tests/tools/e2e-coverage-report.mjslines196-200are covered
Priority
- Impact: medium
- Effort: low
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5n31 | SHA: 0c87310
— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88
- Lingua principale
- JavaScript
- Stelle
- 0
- Fork
- 2
- Merge medio
- 17h 48m
- PR unite (30g)
- 553
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- 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 cncf/endusers
-
[scanner] check:spelling skips blog/ — posts and author metadata are never spell-checkedForse già presa @hivecommons-hive l’ha presa oggi. Apertaagent/scanner bug hive/covered-by-pr hive/hosted-available-lke648397-260827-5n31
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
cncf/endusers#1452 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[scanner] deploy-gh-pages.yml: fetch full git history so the generated changelog renders entriesApertaagent/scanner blocked ci hive/hosted-available-lke648397-260827-5n31
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 70/100
cncf/endusers#1409 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[scanner] Importer fabricates cncf.io project URLs for cards without one; 9 fabricated links on 3 architecture pages are live 404sForse già presa @hivecommons-hive l’ha presa oggi. Apertaagent/scanner bug hive/covered-by-pr hive/hosted-available-lke648397-260827-5n31
Difficoltà 3/5 Mezza giornata Idoneità per principianti 55/100
cncf/endusers#1448 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[quality] e2e coverage gate's measurement record is stale and nothing guards the suite it was measured againstForse già presa @hivecommons-hive l’ha presa oggi. Apertaagent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5n31 quality testing
Difficoltà 3/5 Mezza giornata Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
agent/architect architecture hive/hosted-available-lke648397-260827-5n31 tech-debt
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di cncf/endusers
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
nodejs/node#66743 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
OWASP/cve-lite-cli#1335 ·
I maintainer di solito rispondono entro 1 giorno
-
Channels status: needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
mastra-ai/mastra#27093 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
category/development priority/P1 scope/ci-cd scope/testing status/ready-for-agent type/bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
QwenLM/qwen-code#14225 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100