fix(support-output): safely render dashboard values and decode Git streams — prevent injection and corrupted repository state - #770
Merged
unohee merged 1 commit intoSep 28, 2026
Conversation
…reams (AGT-3493) Salvaged from draft PR #770: re-applied onto current main (was 177 commits behind). Sanitizes dashboard-rendered values and decodes git subprocess output as a stream so multibyte output is not split.
unohee
force-pushed
the
swarm/AGT-3493-fix-support-output-safely-render-dashboa
branch
from
September 28, 2026 05:38
6d9b82f to
56f3fa7
Compare
unohee
marked this pull request as ready for review
September 28, 2026 05:39
unohee
deleted the
swarm/AGT-3493-fix-support-output-safely-render-dashboa
branch
September 28, 2026 05:50
This was referenced Sep 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Salvaged from a draft left by a parked autonomous run (original body said "failed 4 times … very likely incomplete"). Re-applied onto current
main(the branch was 177 commits behind) and verified.What it does
src/support/dashboardHtml.ts: renders dashboard values through a sanitizer (safeCssClass,escapeHtmlon hot-module names) so untrusted issue/PR text cannot break out of the markup.src/support/gitTracker.ts: decodes git subprocess output as a stream (TextDecoder … { stream: true }/stdoutDecoder) so multibyte output is not split at chunk boundaries.Verification (on current main)
npx tsc --noEmit→ cleannpx vitest run src/support/dashboardHtml.test.ts src/support/gitTracker.test.ts→ 24 passedmain: no matching patch-id in main history;mainstill usesdata.toString()and the raw inline-style span.Notes
origin/main;package-lock.jsonuntouched.