Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/daily-security-observability.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 26 additions & 10 deletions .github/workflows/daily-security-observability.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,31 @@ steps:
}
}' > "$CACHE_FILE"

- name: Download firewall-enabled workflow runs
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mkdir -p /tmp/gh-aw/agent/firewall
FIREWALL_RUNS=/tmp/gh-aw/agent/firewall/firewall-enabled-runs.json
EMPTY_DATA='{"runs":[],"summary":{"total_runs":0}}'

# Download logs filtered to only runs with the firewall feature enabled.
# --artifacts activation: only download the activation artifact (aw_info.json)
# needed for firewall detection, avoiding large agent artifact downloads.
# --timeout 8: cap execution at 8 minutes to prevent runaway downloads.
gh aw logs --firewall --start-date -7d --json -c 100 \
--artifacts activation --timeout 8 \
> "$FIREWALL_RUNS" || true
Comment on lines +129 to +131

# Validate JSON output and fall back to an empty dataset on failure
if ! jq -e '.runs' "$FIREWALL_RUNS" > /dev/null 2>&1; then
echo "No valid firewall logs produced; continuing with empty dataset"
echo "$EMPTY_DATA" > "$FIREWALL_RUNS"
fi

count=$(jq '.runs | length' "$FIREWALL_RUNS" 2>/dev/null || echo 0)
echo "Downloaded $count firewall-enabled workflow runs"

tools:
bash:
- "*"
Expand Down Expand Up @@ -174,16 +199,7 @@ Both datasets cover the **last 7 days** and share the cache-memory path `/tmp/gh

**ALWAYS PERFORM FRESH ANALYSIS**: This report must always use fresh data from the audit tool. Do NOT skip analysis based on cached results or reuse aggregated statistics from previous runs.

Use the `logs` tool from the agentic-workflows MCP server to collect workflow runs that have firewall enabled:

**Tool call:**
```json
{
"firewall": true,
"start_date": "-7d",
"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.

### Step 1.2: Early Exit if No Firewall Data

Expand Down