The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu
Go agent-ai-cliagent-harnessesagent-securitybrowser-extensionciclaude-codecloudcodexcursordetection-engineeringjevknowledge-basememorymobile-device-managementobservabilitysecuritysecurity-information-and-event-managementsecurity-toolstelemetrytraces
fix(packaging): pin Linux Vector to 0.56.0; validate every pack against it
shukieshahea113eedf59f
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 542a6f47..d2d96464 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -529,6 +529,10 @@ jobs:- name: Download Vector for the Linux packagesif: steps.vector-cache.outputs.cache-hit != 'true'run: sh packaging/linux/fetch-vector.sh+ # Every generated Vector pack has to load in the Vector the packages ship. Vector 0.57 and 0.58+ # changed how ${VAR} expands and broke most of them with no Beacon change at all.+ - name: Validate the Vector packs against the bundled Vector+ run: sh packaging/linux/validate-vector-packs.sh cli/beacon/release-vector/linux_amd64/beacon-vector- uses: goreleaser/goreleaser-action@v6with:version: latestdiff --git a/CLAUDE.md b/CLAUDE.mdindex 147786af..84a3e02a 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -296,8 +296,10 @@ The Linux `.deb`, `.rpm`, and release archives carry Vector too. Runfor a program interpreter, and stages it under `cli/beacon/release-vector/`. TheGoReleaser before-hook fails without it. The packages install it as`/opt/beacon/bin/vector`; the archives carry it as `beacon-vector`, which the-Homebrew formula installs on Linux. The version is pinned in that script; keep-it in step with the tap's `beacon-vector` formula.+Homebrew formula installs on Linux. The version is pinned in that script at+0.56.0, the same as the macOS package. Vector 0.57 and 0.58 stop expanding the+`${VAR}` references the generated packs rely on, so bump it only together with+`packaging/linux/validate-vector-packs.sh` passing against the new version.### Preferred CI Releasediff --git a/packaging/linux/fetch-vector.sh b/packaging/linux/fetch-vector.shindex da9b00c0..c5d12850 100755--- a/packaging/linux/fetch-vector.sh+++ b/packaging/linux/fetch-vector.sh@@ -13,10 +13,15 @@# Beacon ships is static so it runs on stripped and custom-built hosts without caring which libc# they carry. The script fails unless the binary has no program interpreter.#-# Set VECTOR_VERSION to change the version. Keep it in step with the tap's beacon-vector formula.+# Set VECTOR_VERSION to change the version, and run packaging/linux/validate-vector-packs.sh+# against the result before shipping it. 0.56.0 matches the signed macOS package. Newer releases+# break the generated packs, which take destinations and credentials from ${VAR}: 0.57 stops+# expanding the ${VAR:-default} form, and 0.58 stops expanding ${VAR} at all unless Vector runs+# with --dangerously-allow-env-var-interpolation. (Beacon Managed's connect is unaffected because+# it writes literal values.)set -eu-VECTOR_VERSION="${VECTOR_VERSION:-0.58.0}"+VECTOR_VERSION="${VECTOR_VERSION:-0.56.0}"ROOT_DIR="$(CDPATH='' cd -- "$(dirname -- "$0")/../.." && pwd)"OUT_DIR="${1:-$ROOT_DIR/cli/beacon/release-vector}"[ "$#" -gt 0 ] && shiftdiff --git a/packaging/linux/validate-vector-packs.sh b/packaging/linux/validate-vector-packs.shnew file mode 100755index 00000000..0731f6ba--- /dev/null+++ b/packaging/linux/validate-vector-packs.sh@@ -0,0 +1,60 @@+#!/bin/sh+# Renders every Vector content pack Beacon generates and runs `vector validate` on each, with the+# Vector binary Beacon ships. Fails if any pack does not load.+#+# packaging/linux/validate-vector-packs.sh <vector-binary> [beacon command...]+#+# Without a beacon command, the CLI is built from this checkout. Destinations and credentials are dummy but+# well-formed: validate needs URIs it can parse, not endpoints it can reach, and health checks are+# skipped. Exists because Vector releases have changed how ${VAR} in a config expands, which broke+# packs without any Beacon change.+set -eu++VECTOR="${1:?usage: validate-vector-packs.sh <vector-binary> [beacon command...]}"+shift+ROOT_DIR="$(CDPATH='' cd -- "$(dirname -- "$0")/../.." && pwd)"+work="$(mktemp -d)"+trap 'rm -rf "$work"' EXIT INT TERM++if [ "$#" -eq 0 ]; then+ (cd "$ROOT_DIR/cli/beacon" && go build -o "$work/beacon" .)+ set -- "$work/beacon"+fi++export AWS_REGION=us-east-1 \+ BEACON_ASYMPTOTE_DATA_DIR="$work/data" \+ BEACON_ASYMPTOTE_INGEST_URL=https://ingest.invalid \+ BEACON_ASYMPTOTE_SECRETS_FILE="$work/secrets.json" \+ BEACON_CLOUDWATCH_LOG_GROUP=beacon \+ BEACON_FALCON_HEC_ENDPOINT=https://falcon.invalid/services/collector \+ BEACON_FALCON_HEC_TOKEN=placeholder \+ BEACON_GCS_BUCKET=bucket BEACON_S3_BUCKET=bucket \+ RAPID7_WEBHOOK_URL=https://rapid7.invalid/hook \+ SUMO_URL=https://sumo.invalid/receiver SUMO_TOKEN=placeholder \+ BEACON_SENTINEL_DCE_ENDPOINT=https://dce.eastus-1.ingest.monitor.azure.com \+ BEACON_SENTINEL_DCR_IMMUTABLE_ID=dcr-00000000000000000000000000000000 \+ AZURE_TENANT_ID=00000000-0000-0000-0000-000000000000 \+ AZURE_CLIENT_ID=00000000-0000-0000-0000-000000000000 \+ AZURE_CLIENT_SECRET=placeholder+mkdir -p "$work/data"+printf '{"device_key":"bcn_device_placeholder"}\n' > "$work/secrets.json"++"$VECTOR" --version+failed=0+checked=0+for pack in asymptote cloudwatch falcon gcs rapid7 s3 sentinel sumo; do+ "$@" endpoint "$pack" install-pack --output "$work/$pack" --log-path "$work/runtime.jsonl" >/dev/null+ [ -f "$work/$pack/vector.toml" ] || continue+ checked=$((checked + 1))+ if out="$("$VECTOR" validate --no-environment --skip-healthchecks "$work/$pack/vector.toml" 2>&1)"; then+ echo "ok: $pack"+ else+ echo "FAIL: $pack" >&2+ printf '%s\n' "$out" | grep -E '^x ' >&2 || printf '%s\n' "$out" >&2+ failed=1+ fi+done+# A pack list that silently matched nothing would pass. Six packs carried a vector.toml when this+# was written.+[ "$checked" -ge 6 ] || { echo "only $checked packs had a vector.toml; expected at least 6" >&2; exit 1; }+exit "$failed"