Skip to content

Commit 77a26ec

Browse files
committed
fix: guard ss pipelines with || true for CI compatibility
With set -euo pipefail, grep returning no matches in the ss pipeline causes the script to exit before reaching bridge/summary checks. This broke 11 of 21 tests in CI where no services listen on 7890/11434.
1 parent debfdf3 commit 77a26ec

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

bin/security-audit.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ echo ""
228228
echo "Network"
229229

230230
# Check if bridge is bound to localhost only
231-
bridge_bind=$(ss -tlnp 2>/dev/null | grep ':7890' | awk '{print $4}' | head -1)
231+
bridge_bind=$(ss -tlnp 2>/dev/null | grep ':7890' | awk '{print $4}' | head -1 || true)
232232
if [ -n "$bridge_bind" ]; then
233233
if echo "$bridge_bind" | grep -q '127.0.0.1'; then
234234
ok "Slack bridge bound to 127.0.0.1:7890"
@@ -273,7 +273,7 @@ echo ""
273273

274274
echo "Services"
275275
if ss -tlnp 2>/dev/null | grep -q ':11434'; then
276-
bind_addr=$(ss -tlnp 2>/dev/null | grep ':11434' | awk '{print $4}' | head -1)
276+
bind_addr=$(ss -tlnp 2>/dev/null | grep ':11434' | awk '{print $4}' | head -1 || true)
277277
if echo "$bind_addr" | grep -qE '(0\.0\.0\.0|\*|::)'; then
278278
finding "INFO" "Ollama listening on $bind_addr (all interfaces)" \
279279
"Consider binding to 127.0.0.1 if not needed externally"

0 commit comments

Comments
 (0)