docs(tour): report — 2026-07-12 run, converged, 11 commits

This commit is contained in:
Bastien Chanot committed 2026-07-12 12:50:56 +02:00
1 parent 1078f74793
commit 716b1a2be1
2 files changed
+58

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
# BUGS-FOUND — behavior-changing findings quarantined by audits
Findings that fixing would change observable behavior — logged here by
audit/cleanup passes, never fixed by them. Route to /bugfix or /feat.
## Tour 2026-07-12 (clean-phase audit)
| id | file:line | description | severity |
|----|-----------|-------------|----------|
| B-1 | src/components/ui/Dialog.tsx:54 | Close button `aria-label="Fermer"` hardcoded French — every dialog exposes a French label to EN-locale screen-reader users. No `common.close` key exists; fix = add key to both dicts + `t()` | low (a11y/i18n) |
| B-2 | src/components/brand/LanguageSwitcher.tsx | Group `aria-label="Language"` hardcoded English — FR users get English group label. Fix = new dict key | low (a11y/i18n) |
| B-3 | src/state/reportStore.ts:145-152 | Draft persistence write-only: every change mirrors report to sessionStorage `osteo:draft`, but no code path restores it — refresh loses session despite the mirror. `readPersistedDraft()` (reportStore.ts:154) exists unused; either implement restore or remove mirror+helper. CLAUDE.md advertises the auto-save | medium (unfinished feature) |
| B-4 | src/i18n/fr.ts vs en.ts (`pdf.title_prefix`) | PDF title prefix semantics differ per locale: FR 'Bilan ostéo — ' vs EN 'Faunosteo — ' (document type vs brand). Possibly unintended discrepancy in exported PDF metadata | low |
| B-5 | src/app/routes/SvgEditorRoute.tsx:146,152,154 | Hardcoded placeholders `"head"`, `"ex: Hanche"`, `"ex: Hip joint"` bypass i18n on an otherwise localized page. Possibly intentional examples | low |
| B-6 | src/domain/species/types.ts:19 + AnimalForm.tsx:32 | SpeciesManifest only carries `labelFr` — species dropdown shows "Cheval" to EN users. Fix requires manifest type change (labelEn) | low (i18n gap) |
+43
View File
@@ -0,0 +1,43 @@
# TOUR — grouped multi-axis sweep reports (append-only)
## Tour 2026-07-12 — branch chore/tour-2026-07-12 — 3 iterations — CONVERGED
Axes: security (semgrep floor ×3 + cso posture it1) · clean · reconcile (report-only) · doc.
Iteration 2 clean pass was delta-scoped (3 doc files — only changes since it1's full audit + PASS re-verify).
Iteration 3 ran because it2 surfaced 1 new tuning note; it3 = fresh semgrep on unchanged tree → identical result, 0 new → converged.
| ID | Axis | File | Sev | Finding | Status |
|----|------|------|-----|---------|--------|
| SEC-1 | security | package.json | crit/high | CVE deps: vite (GHSA-fx2h-pf6j-xcff HIGH), vitest (GHSA-5xrq-8626-4rwp CRIT dev), happy-dom (GHSA-37j7-fg3j-429f CRIT dev), esbuild, js-yaml | fixed 18865de — pnpm audit: 0 vulns |
| SEC-2 | security | SvgEditorRoute.tsx:498, pathology-editor.html:1126 | medium | user-dropped SVGs inserted without full sanitization (React editor: none; HTML editor: missed root on* + javascript: hrefs) | fixed 3f91a45 |
| SEC-3 | security | package.json | low | build toolchain (vite + plugins) in prod dependencies — inflated audit surface | fixed 187dfb5 |
| SEC-4 | security | Dockerfile:34 | high | semgrep BLOCK: no USER before ENTRYPOINT — container ran as root | fixed d8e478a — **BREAKING**: PORT env must now be >=1024 (default 8080 unaffected). Docker-verified: build, HTTP 200, SPA fallback, env override, ps = uid 101 |
| SEC-5 | security | .npmrc | medium | no minimum-release-age supply-chain guard | fixed a2bd884 (1440 min) |
| SEC-6 | security | Dockerfile:19 | low | unpinned nginx:alpine base | fixed c55da07 (nginx:1.31-alpine, build-verified) |
| SEC-7 | security | docker/nginx.conf:10,16,21 | medium | add_header inside location blocks — silently drops server-level headers if any are added later | open — defer to /harden (no server-level headers exist yet) |
| SEC-8 | security | src/pdf/attachment.ts:64-72 | low | no decompression-bomb cap on PDF import inflate | open — protected path (CLAUDE.md: ask before changing import) |
| SEC-9 | security | docker/entrypoint.sh:10-17 | low | unescaped env interpolation in env.js heredoc (operator-controlled input; a quote in APP_* breaks the JS) | open |
| SEC-10 | security | .npmrc | low | minimum-release-age=1440 below semgrep-recommended 10080 | open — deliberate 24h dev-velocity trade-off; human call |
| CLN-1 | clean | src (6 sites) | - | dead code: assertNever, canvg dep (never imported), VertebraPicker re-export shim, equine named export, validateBoneElement export, rasterizeSvg _scale param | fixed bbdc0e8 (−93 lines net) |
| CLN-2 | clean | pdf/render, EditorRoute, svgConvention | - | byte-identical word-wrap ×2 → pdf/render/text.ts; mergeBones block ×2 → helper; getBoneIdFromEvent dup walk-up → delegates | fixed bbdc0e8 |
| CLN-3 | clean | i18n/{fr,en}.ts, LanguageSwitcher | - | 6 dead dict keys; switcher hardcoded strings identical to existing lang.* keys | fixed 4ea8c90 (parity 204/204) |
| CLN-4 | clean | Brand.tsx:7 | - | hardcoded alt="Faunosteo" — identity rule violation | fixed 86ac366 (alt via useConfig) |
| CLN-5 | clean | reportStore.ts:154 | - | readPersistedDraft() never called — entangled with bug B-3 (write-only draft mirror); deleting would prejudge the product fix | open — see BUGS-FOUND.md B-3 |
| CLN-6 | clean | anatomy/types.ts:43 + styles/index.css:13 | - | BoneState 'linked'/'multi' never produced + 2 dead CSS rules — possible planned feature | open — human call |
| CLN-7 | clean | public/assets (22 of 24 PNGs) | - | unused logo sizes ship in every build/Docker image | open — confirm no external hotlinks before deleting |
| CLN-8 | clean | labels/canvas/pdf/EditorRoute | - | larger refactors: locale-fallback dedup (6+ sites), PDF constants module, onZoneClick ~60 logic lines, addObservationPage ~200 lines/9 params | open — beyond tour minimal-fix scope, route to /refactor |
| CLN-9 | clean | pdf/attachment.ts:23 | - | attachment description hardcodes brand ('Faunosteo state v2') — PDF format contract | open — confirm before touching (docs/PDF-FORMAT.md) |
| CLN-10 | clean | Dialog/LanguageSwitcher/reportStore/i18n/SvgEditorRoute/species types | - | 6 behavior-changing findings (hardcoded aria labels FR/EN, write-only draft, PDF title prefix asymmetry, i18n placeholders, labelFr-only species) | quarantined → BUGS-FOUND.md B-1..B-6, code untouched |
| REC-1 | reconcile | .claude/tasks/TODO.md:147-149 | - | declared cross-refs "BDR-001..008, LRN-001..010, BLK-001..004" \| real: 22 BDR / 29 LRN / 5 BLK | suggested — update ranges via /reconcile |
| REC-2 | reconcile | TODO.md:126 | - | declared "[ ] env-var brand identity verified" \| real: verified this tour (docker run APP_BRAND_NAME=TourCheck → env.js correct, non-root) | suggested — check box with evidence |
| REC-3 | reconcile | TODO.md:50 | - | declared "[x] sessionStorage draft mirror" \| real: mirror write-only, no restore path (B-3) | suggested — add open item "draft restore or drop mirror" |
| REC-4 | reconcile | CLAUDE.md | - | declared: canvg raster, svgToPngDataUrl(), ReportSchema.version=1, pako, pnpm at ~/.local/share/pnpm/bin \| real: native raster, rasterizeSvg, version 2, DecompressionStream, pnpm at ~/.local/bin | suggested — human-applied CLAUDE.md sync (tour never edits it) |
| DOC-1 | doc | README.md | - | canvg credited for PDF rasterization (feature bullet + stack list) | fixed 1078f74 |
| DOC-2 | doc | DEPLOY.md | - | stale: generic nginx:alpine, root container, no PORT constraint, `origin/master` reference (remote only has main/develop) | fixed 1078f74 |
| DOC-3 | doc | CHANGELOG.md | - | Unreleased section missing tour changes (canvg removal, base pin, security fixes) | fixed 1078f74 |
Checks: typecheck PASS · eslint PASS (0 warnings) · vitest 174/174 PASS · vite build PASS · docker build+run PASS (non-root verified).
Residuals: SEC-7..10, CLN-5..9 (all `open` above) + info: vite chunk >500 kB warning (pre-existing); CI build/push/deploy still unverified (TODO.md:130).
Iteration 2 cso pass skipped by design (iteration-1-only posture audit). semgrep floor ran every iteration (it1 BLOCK(1) → it2 PASS → it3 PASS identical).
Commits: 11 (6 security, 3 clean, 1 doc, 1 report). BREAKING: 1 (SEC-4 — PORT >=1024).
Branch chore/tour-2026-07-12 left UNMERGED — review, then `gitflow finish` on your GO.