fix(daily-security-observability): pre-download firewall runs to avoid MCP tool timeout - #48988
Merged
Conversation
…daily-security-observability Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix missing tools in daily security observability report
fix(daily-security-observability): pre-download firewall runs to avoid MCP tool timeout
Jul 29, 2026
pelikhan
marked this pull request as ready for review
July 29, 2026 22:22
Contributor
There was a problem hiding this comment.
Pull request overview
Moves firewall-run discovery out of the MCP call to avoid its 60-second deadline.
Changes:
- Pre-downloads firewall-enabled runs with activation artifacts.
- Reads the downloaded JSON during analysis.
- Regenerates the compiled workflow.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/daily-security-observability.md |
Adds pre-download logic and updates the analysis prompt. |
.github/workflows/daily-security-observability.lock.yml |
Compiles the new workflow step and prompt. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comments suppressed due to low confidence (1)
.github/workflows/daily-security-observability.md:129
- Give this scan a separate logs output directory. Both pre-download commands currently use the default
.github/aw/logs, and the integrity scan writesrun_summary.jsoncaches there from themcpartifact. For a run that has both DIFC events and firewall enabled, this second scan accepts that summary as a cache hit without considering the newly requested artifact set, never downloadsactivation, and then--firewallskips the run becauseaw_info.jsonis absent. A dedicated-opath prevents those false negatives.
gh aw logs --firewall --start-date -7d --json -c 100 \
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Medium
Comment on lines
+129
to
+131
| gh aw logs --firewall --start-date -7d --json -c 100 \ | ||
| --artifacts activation --timeout 8 \ | ||
| > "$FIREWALL_RUNS" || true |
| "count": 100 | ||
| } | ||
| ``` | ||
| Read the pre-downloaded list of firewall-enabled workflow runs from `/tmp/gh-aw/agent/firewall/firewall-enabled-runs.json`. This file was populated by the startup step and contains runs from the last 7 days with the firewall feature enabled. Extract the `run_id` from each entry in the `runs` array. |
Contributor
|
🎉 This pull request is included in a new release. Release: |
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.
The
agenticworkflows logsMCP tool call withfirewall:true, start_date:-7dconsistently exceeds the gateway's 60-second per-tool RPC deadline — downloading theactivationartifact (needed to checkaw_info.jsonfor firewall detection) across ~100 runs takes longer than the gateway allows, causing Phase 1/2 of the report to fail entirely.Changes
New pre-download step — "Download firewall-enabled workflow runs" runs before the agent, mirroring the existing integrity-filtered logs pattern:
Uses
--artifacts activationto download only the minimal artifact required for firewall detection, with an 8-minute step timeout instead of the MCP's 60-second limit. Falls back to an empty dataset on failure.Phase 1.1 prompt update — replaced the
logsMCP tool call with a read from the pre-downloaded file at/tmp/gh-aw/agent/firewall/firewall-enabled-runs.json.Recompiled
.lock.ymlfor all 266 workflows.