Skip to content

Commit 3ee7f1b

Browse files
devatsecureclaude
andcommitted
fix: Improve Falco installation reliability with version verification
Add falco --version check after install, FALCO_FRONTEND=noninteractive to prevent interactive prompts, and detailed failure diagnostics (GPG keyring, apt source, binary existence). Installation remains non-fatal but now provides clear success/failure status. Docker E2E workflow keeps Falco disabled with explanatory comment. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 98cbad2 commit 3ee7f1b

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

.github/workflows/docker-e2e.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ jobs:
4242
push: false
4343
load: true
4444
tags: argus-security:e2e-test
45+
# Falco requires kernel headers and privileged access for driver loading,
46+
# which are unavailable in GitHub Actions runners. Keep disabled to avoid
47+
# flaky CI failures from apt repo or driver issues.
4548
build-args: INSTALL_FALCO=false
4649
cache-from: type=gha
4750
cache-to: type=gha,mode=max

Dockerfile.complete

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,22 @@ RUN ZAP_VERSION="2.16.0" && \
8181
# Falco for runtime security monitoring (opt-in via build arg)
8282
ARG INSTALL_FALCO=true
8383
RUN if [ "$INSTALL_FALCO" = "true" ]; then \
84-
curl -fsSL https://falco.org/repo/falcosecurity-packages.asc \
84+
echo "=== Installing Falco ===" \
85+
&& curl -fsSL https://falco.org/repo/falcosecurity-packages.asc \
8586
| gpg --dearmor -o /usr/share/keyrings/falco-archive-keyring.gpg \
8687
&& echo "deb [signed-by=/usr/share/keyrings/falco-archive-keyring.gpg] https://download.falco.org/packages/deb stable main" \
8788
| tee /etc/apt/sources.list.d/falcosecurity.list \
8889
&& apt-get update \
89-
&& apt-get install -y --no-install-recommends falco \
90+
&& FALCO_FRONTEND=noninteractive apt-get install -y --no-install-recommends falco \
9091
&& rm -rf /var/lib/apt/lists/* \
91-
|| echo "WARNING: Falco installation failed (non-fatal) — runtime monitoring will be unavailable"; \
92+
&& falco --version \
93+
&& echo "=== Falco installed successfully ===" \
94+
|| { echo "ERROR: Falco installation failed (non-fatal) — runtime monitoring will be unavailable"; \
95+
echo " Diagnostics:"; \
96+
echo " - GPG keyring exists: $(test -f /usr/share/keyrings/falco-archive-keyring.gpg && echo yes || echo no)"; \
97+
echo " - Apt source exists: $(test -f /etc/apt/sources.list.d/falcosecurity.list && echo yes || echo no)"; \
98+
echo " - falco binary: $(which falco 2>/dev/null || echo 'not found')"; \
99+
rm -rf /var/lib/apt/lists/*; }; \
92100
else \
93101
echo "Skipping Falco installation (INSTALL_FALCO=$INSTALL_FALCO)"; \
94102
fi

0 commit comments

Comments
 (0)