Harden per review (SSRF/theme-injection/round-trip), add class guards, green CI gate + source map #33
No reviewers
Labels
No labels
accepted
bug
declined
docs
duplicate
enhancement
good first issue
in-progress
needs-info
privacy
security
triage
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
LibreKAT/Ocideck!33
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/review-t1-s2-hardening"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Addresses every finding of the 2026-06-29 review (security scan + code review),
adds class-level guards so each bug family can't recur, and restores a green,
enforceable quality gate. Also adds a per-file source map and refreshes the docs.
The gate was red on a clean checkout (format drift + a bare
catch (_)); afterthis branch,
make checkpasses end-to-end (formatting, analyze, conventions,897 tests) and local now uses the exact CI-pinned toolchain.
Changes
Security
deck now pass
NetGuard.isAllowedMediaUrlResolved(lexical + DNS resolve,per-host memoised) before
NetworkImage/VideoPlayerController.networkUrl.Closes the static-internal, resolves-to-internal and decimal-IP cases;
residual DNS-rebind window documented on the method.
ThemeProfile.fromJsonvalidates every colour to
#RRGGBBand whitelists fonts, at the singlechoke point that feeds both the HTML export and the audience-window styles.
Round-trip data-loss (silent)
-->, C4 table-cell literal<br>. Each fixed with a round-trip test.containing
" | "was truncated too — now every caption write pipe-encodes.Conventions / cleanups
catch (_)sites (CI gate back to 0).<!-- _style:branch.
Prevention — catch the whole class, not the case
network_sink_guard_test— source scan: network sinks only in NetGuard files.markdown_roundtrip_fuzz_test— adversarial corpus through every lossless field.ThemeProfile.fromJsonfuzz — every style field must sanitise.tool/mutation_check.dart+make mutate— mutation check for the dead/untestedbranch class that
analyzeand line coverage both miss (C6's class).CI gate + toolchain pin
so
make format-check— and the CI gate — is green..tool-versions; documented the pin and the "use the Flutter-bundleddart" caveat in
BUILD.md/CHECKS.md.Docs
docs/SOURCE_MAP.md: one-line description of every file underlib/(178),linked from README / ARCHITECTURE / CHECKS.
make mutate).Checklist
make checkpasses (format-check, analyze, full test suite)..mdround-tripsidentically; escaping is internal). FILE_FORMAT.md unaffected.
Notes for reviewers
this branch's logic — review it separately; it's what makes the gate green.
profile's
logoPathstill resolves viaresolveTrustedAssetPath.make mutateis intentionally not inmake check(slow; survivors needtriage). Running it on the validator flagged real untested branches.
🤖 Generated with Claude Code
C5 — _validateFenceBalance counted ``` fences across the whole document, so an unclosed fence in one slide and another in the next summed to an even count and neither was reported. It now runs per slide block (with a line offset for accurate reporting), so each imbalance is caught. C6 — two `t.startsWith('<!-- _style:')` branches in the rich-text parser were unreachable: the line list is built from `remaining`, which has all HTML comments (including `<!-- _style: -->`) stripped earlier in the same method. Removed; the live `<div>`/`</div>` structural checks stay. Adds a validator test for two slides whose fence imbalances cancel out. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>