Files
openwaf/scripts
Pavlo Ratushnyi a48ebd650d Running the workflow, not just linting it, turned the lint job red
The workflow file had never been executed anywhere. It was linted, and its
steps were run by hand through scripts/ci-gates.sh, but nothing had ever taken
the YAML and played it start to finish. nektos/act (0.2.89, sha256
48ae218af96725f7635a66de2b87e1e346893b02add0f16b92f560296b2151fc) does that in a
Docker container, so the file itself got executed.

It found a defect on the first run. The lint job called `shellcheck` expecting
the copy baked into ubuntu-latest - 0.9.0-1, per the runner image's own package
list. Local shellcheck is 0.11.0 and says nothing about
scripts/geo-db-bump.sh:42; 0.9.0 flags it (SC2015: `A && B || C` is not
if-then-else). So the gate's verdict depended on which tool version the image
happened to ship, and the first push to a real runner would have gone red on a
pattern that is legal, just ambiguous.

Two changes, both version-independent:
- geo-db-bump.sh: the guard is now an explicit `if [ -z "$newest" ] || [
  "$newest" = unknown ]`. Verified with the version that found it: shellcheck
  0.9.0 in a Linux container now exits 0 over scripts/*.sh, and 0.11.0 on the
  host exits 0. The script's behaviour is unchanged: DRY_RUN with a current pin
  exits 0 ("nothing to do"), and an edition the vendor does not serve exits 2
  ("REFUSED - the freshness check could not name a newer release").
- ci.yml: shellcheck is pinned to 0.11.0 with a checksum per architecture, the
  same way actionlint already is, and the step prints the version so the log
  says which version did the linting.

Executed end to end in act on catthehacker/ubuntu:act-latest, arm64:
  lint    - Job succeeded (checkout, actionlint 1.7.12 sha256 OK, shellcheck
            0.11.0 sha256 OK, 0 findings over scripts/*.sh)
  source  - Job succeeded (setup-dotnet, restore, build, unit, integration
            34/34, smoke 19/19)
  image   - Job succeeded (docker build -> openwaf:ci 261 MB, compose smoke
            43 passed / 0 failed)
This is not GitHub: it is a local Actions-compatible runner, so it proves the
file executes and the pinned tools resolve, not that a GitHub-hosted run is
green. The console job is the remaining one and is reported separately.
2026-10-01 22:13:46 +02:00
..