feat: enable real-time agent output streaming with VSO filtering#159
feat: enable real-time agent output streaming with VSO filtering#159jamesadevine merged 1 commit intomainfrom
Conversation
d04ee33 to
6262e5e
Compare
🔍 Rust PR ReviewSummary: Has one pipeline-breaking bug that will fail the Findings🐛 Bugs / Logic Issues
|
Replace file-redirect-then-replay pattern with piped streaming: - AWF output piped through sed -u (unbuffered) for real-time VSO command filtering, then through tee for simultaneous display and file capture - Filters both ##vso[ and ##[ shorthand forms to prevent ADO command injection while streaming - Add dedicated agent_log artifact for easy access to agent output - Apply same streaming pattern to threat analysis steps in both standalone and 1ES templates Previously all agent output was hidden until the run completed, then replayed with post-hoc sed sanitization. Now output appears line-by-line in the ADO pipeline UI as the agent runs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
6262e5e to
b1a76bf
Compare
🔍 Rust PR ReviewSummary: Looks good — streaming implementation is correct; one PR description inaccuracy and one minor operator observation worth noting. Findings✅ What Looks Good
|
Summary
Enables real-time agent output streaming in ADO pipeline logs while filtering VSO commands to prevent injection.
Problem
All agent output was previously hidden until the run completed. The AWF step redirected stdout/stderr to a file (
> file 2>&1), then replayed it post-hoc viased. Operators watching the pipeline saw nothing during what can be a long-running agent execution.Solution
Replace file-redirect-then-replay with piped streaming:
sed -u(GNU unbuffered mode) processes output line-by-line for immediate displayteesplits output to both stdout (ADO pipeline log) and the artifact fileset -o pipefailensures AWF exit codes propagate correctly through the pipe##vso[and##[shorthand forms (consistent withsanitize.rs)Changes
templates/base.ymlagent_log_$(Build.BuildId)artifact for easy accesstemplates/1es-base.ymlSecurity
##vso[and##[) are filtered before reaching ADO log interpreterneutralize_pipeline_commands()insanitize.rs