Skip to content

armgit / AiSOC

Public Imported from GitHub
0

Open-source AI Security Operations Center: alert fusion, LLM-agent triage, MITRE ATT&CK investigation, and a replayable decision ledger for every agent step. Self-hostable, runs with no API keys, MIT licensed. Ships an MCP server for Claude, Cursor and Continue.

fix(ci): image-channel's target probe died silently before its first line of output (#1479)

Beenu Arora511a94854ed2
diff --git a/.github/workflows/image-channel.yml b/.github/workflows/image-channel.yml
index 19e6863e8..e7d31a7da 100644
--- a/.github/workflows/image-channel.yml
+++ b/.github/workflows/image-channel.yml
@@ -82,11 +82,19 @@ jobs:
# The target must exist; a channel pointed at nothing is worse
# than a channel in the wrong place.
+ #
+ # NOT `read -r code ctype < <(curl -w ...)`: curl's -w output
+ # carries no trailing newline, so `read` assigns both fields and
+ # still returns 1 at EOF — and under the step's `bash -e` that
+ # exited the whole script before its first line of output. The
+ # first dispatch of this workflow died exactly there, silently.
tmp_target=$(mktemp)
- read -r code ctype < <(curl -s -o "$tmp_target" \
+ hdr=$(curl -s -o "$tmp_target" \
-w '%{http_code} %{content_type}' \
-H "Authorization: Bearer ${tok}" -H "Accept: ${MEDIA}" \
- "https://ghcr.io/v2/beenuar/${repo}/manifests/${VERSION}")
+ "https://ghcr.io/v2/beenuar/${repo}/manifests/${VERSION}" || echo "000 none")
+ code=${hdr%% *}
+ ctype=${hdr#* }
if [ "$code" != "200" ]; then
echo "::error::${repo}: ${VERSION} answered HTTP ${code}; stable left at '${before}'"
failures=$((failures + 1))