Replace runtime observer curl access with a constrained HTTP helper - #1658
Open
vitek-karas wants to merge 2 commits into
Open
Replace runtime observer curl access with a constrained HTTP helper#1658vitek-karas wants to merge 2 commits into
vitek-karas wants to merge 2 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the runtime failure observer workflow to stop using agent-generated curl commands (which are being denied by the harness) and instead route all required Azure DevOps/Helix reads through a repository-owned, constrained HTTP helper that constructs allow-listed URLs and enforces size/time/path limits.
Changes:
- Added a new executable helper (
runtime-failure-observer-http) that performs a small set of GET-only AzDO/Helix read operations with strict URL, redirect, size, timeout, and output-path validation. - Updated the observer agent instructions/workflow to install and authorize only the helper (
runtime-failure-observer-http:*) and removecurlfrom the shell allowlist. - Added targeted unit tests for URL/output validation, redirect handling, response size limiting, HTTP errors, and Helix console traversal; regenerated the compiled lock workflow.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/runtime-failure-observer-http |
New constrained HTTP helper implementing fixed AzDO/Helix GET subcommands with validation and bounded I/O. |
.github/workflows/tests/test_runtime_failure_observer_http.py |
New unit tests for helper validation, redirects, size limits, and Helix console resolution. |
.github/workflows/runtime-failure-observer.agent.md |
Switches observer instructions from curl to the helper; adds a pre-agent install step and tool authorization changes. |
.github/workflows/runtime-failure-observer.agent.lock.yml |
Regenerated workflow lockfile reflecting the helper install step and allowlist updates. |
.gitattributes |
Ensures LF line endings for the new helper script. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7de80e7e-b903-41a5-a727-ab3abeb75343
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.
Motivation
The runtime failure observer has been unable to complete its scans because its agent-generated
curlcommands are denied before they reach the public Azure DevOps and Helix endpoints. This has affected repeated runs, including 31344723626 and 31387864364.The observer only needs a small set of specific read operations, so it should not require generic
curl:*authorization. This change tries a purpose-built repository tool instead: the agent selects an operation and supplies constrained identifiers, while the helper constructs and performs the request.Changes
runtime-failure-observer-http, an executable Pythonurllibhelper with fixed subcommands for Azure DevOps build lists, timelines, task logs, Helix work-item lists, and work-item console logs./tmp/gh-aw/agent/.runtime-failure-observer-http:*; removecurlfrom the agent shell allowlist.Validation
python3 .github/workflows/tests/test_runtime_failure_observer_http.pygh aw compile .github/workflows/runtime-failure-observer.agent.md --schedule-seed dotnet/xharness --validateshell(runtime-failure-observer-http:*)and do not allowcurl,python, orpython3.