From a0721b94fb7af7223dd690cc5cac22455c47931a Mon Sep 17 00:00:00 2001 From: Eric Blankenhorn Date: Thu, 19 Feb 2026 11:01:16 -0600 Subject: [PATCH] Fix tls-anvil workflow: C_EXTRA_FLAGS quoting and report.json parsing CPPFLAGS replaces C_EXTRA_FLAGS with embedded single-quotes, which were passed as literal characters through the shell variable and caused configure's C compiler test to fail. Fix the report.json summary parser to use the actual TLS-Anvil field names (TotalTests, FullyFailedTests, etc.) and include category scores. Co-Authored-By: Claude Sonnet 4.6 --- .github/scripts/tls-anvil-test.sh | 2 +- .github/workflows/tls-anvil.yml | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/scripts/tls-anvil-test.sh b/.github/scripts/tls-anvil-test.sh index 2c949d6800..406b80ac5a 100644 --- a/.github/scripts/tls-anvil-test.sh +++ b/.github/scripts/tls-anvil-test.sh @@ -110,7 +110,7 @@ CONFIGURE_OPTS="$CONFIGURE_OPTS --enable-alpn" CONFIGURE_OPTS="$CONFIGURE_OPTS --enable-truncatedhmac" CONFIGURE_OPTS="$CONFIGURE_OPTS --enable-extended-master" CONFIGURE_OPTS="$CONFIGURE_OPTS --enable-enc-then-mac" -CONFIGURE_OPTS="$CONFIGURE_OPTS C_EXTRA_FLAGS='-DWOLFSSL_EXTRA_ALERTS'" +CONFIGURE_OPTS="$CONFIGURE_OPTS CPPFLAGS=-DWOLFSSL_EXTRA_ALERTS" if [[ -n "$EXTRA_FLAGS" ]]; then CONFIGURE_OPTS="$CONFIGURE_OPTS $EXTRA_FLAGS" diff --git a/.github/workflows/tls-anvil.yml b/.github/workflows/tls-anvil.yml index 7b0767f1b8..ca2621e669 100644 --- a/.github/workflows/tls-anvil.yml +++ b/.github/workflows/tls-anvil.yml @@ -45,7 +45,8 @@ jobs: - name: Install dependencies run: | sudo apt-get update -q - sudo apt-get install -y autoconf automake libtool gcc make jq psmisc + sudo apt-get install -y build-essential autoconf automake libtool jq psmisc || \ + sudo apt-get install -y build-essential autoconf automake libtool jq - name: Pull TLS-Anvil Docker image run: docker pull ghcr.io/tls-attacker/tlsanvil:latest @@ -70,11 +71,16 @@ jobs: echo "| | Count |" echo "|---|---|" jq -r ' - "| Total | \(.Score.Total // "N/A") |", - "| Passed | \(.Score.Succeeded // "N/A") |", - "| Failed | \(.Score.Failed // "N/A") |", - "| Disabled | \(.Score.Disabled // "N/A") |" + "| Total | \(.TotalTests // "N/A") |", + "| Strictly Passed | \(.StrictlySucceededTests // "N/A") |", + "| Conceptually OK | \(.ConceptuallySucceededTests // "N/A") |", + "| Partially Failed | \(.PartiallyFailedTests // "N/A") |", + "| Fully Failed | \(.FullyFailedTests // "N/A") |", + "| Disabled | \(.DisabledTests // "N/A") |" ' "$REPORT" 2>/dev/null || echo "| (could not parse report.json) | — |" + echo "" + echo "**Category scores:**" + jq -r '.Score | to_entries[] | "- \(.key): \(.value)%"' "$REPORT" 2>/dev/null || true else echo "No report.json found — check step logs for errors." fi