Skip to content

CI: Align workflow with configure.ac (recursive submodules, v2 Linux job, drop x32)#3504

Open
Easton97-Jens wants to merge 11 commits intoowasp-modsecurity:v3/masterfrom
Easton97-Jens:v3/master_update_workflows
Open

CI: Align workflow with configure.ac (recursive submodules, v2 Linux job, drop x32)#3504
Easton97-Jens wants to merge 11 commits intoowasp-modsecurity:v3/masterfrom
Easton97-Jens:v3/master_update_workflows

Conversation

@Easton97-Jens
Copy link

@Easton97-Jens Easton97-Jens commented Feb 25, 2026

Summary

This PR introduces a new separate CI workflow (ci_new.yml).
The existing workflow remains unchanged.

The primary goal is to align CI behavior with the expectations defined in configure.ac, while modernizing the Linux environment and simplifying architecture handling.


1. Alignment with configure.ac

The build system assumes that required components provided via git submodules are fully and recursively initialized.

configure.ac explicitly documents this expectation (e.g., requiring recursive submodule initialization for bundled modules).

To ensure CI matches this requirement, the new workflow:

Upgrades actions/checkout from v4 to v6

Explicitly runs:

git submodule update --init --recursive

This guarantees:

  • Deterministic submodule state
  • Full availability of bundled modules
  • Consistency with configure.ac
  • Reduced risk for upcoming submodule updates (including the pending Mbed TLS update PR)

This is the primary structural change introduced by this workflow.


2. Integration of v2 Linux Static Analysis Flow

The workflow adds a dedicated Linux cppcheck job using a debian:sid container.

This structure is derived from the previous v2 CI logic and restores Linux-based static analysis in addition to the macOS job.

Benefits:

  • Closer alignment with the Linux target environment
  • Broader static analysis coverage
  • Continuity with earlier CI design

3. Removal of x32 (i386)

The new workflow drops 32-bit (x32/i386) builds:

Ubuntu upgraded from 22.04 to 24.04

Ubuntu 24.04 no longer provides native i386 runner support

Removes multilib setup and architecture-specific dependency branches

Simplifies the matrix and dependency logic

This reduces CI complexity and aligns the build matrix with current runner support.

Additional Updates

macOS 14 → macOS 15

Windows 2022 → Windows 2025

Minor matrix cleanup and clearer job structure


Rationale for Separate Workflow

The existing workflow is intentionally preserved to:

  • Avoid disrupting the current CI baseline
  • Allow isolated validation of structural changes
  • Enable safe comparison before potential consolidation
  • Reduce migration risk

@airween
Copy link
Member

airween commented Mar 2, 2026

Hi @Easton97-Jens,

many thanks for this PR.

The only one thing that I've done that a bit reformatted your description for the better visibility. Please take a look at that, I hope I put lines (lists, headings) to the right place.

If you think everything is okay, just let me know, or feel free to correct the description. I can merge this one soon.

Beside of that, I like this PR. If everything will be okay, we can remove the existing one later - what do you think?

@Easton97-Jens
Copy link
Author

You can go ahead and merge the PR.
I’ll leave it up to you when to remove the old CI workflow – we can keep it for a short observation period if you prefer.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new, parallel CI workflow (ci_new.yml) alongside the existing ci.yml. Its primary goals are: aligning the CI environment with what configure.ac requires (recursive submodule initialization), upgrading runner environments (Ubuntu 24.04, macOS 15, Windows 2025), dropping x32/i386 support, and adding a Linux-based static analysis job using a debian:sid container.

Changes:

  • Adds a new ci_new.yml workflow with updated runner versions (Ubuntu 24.04, macOS 15, Windows 2025) and explicit recursive submodule initialization.
  • Introduces a new cppcheck-linux static analysis job using a debian:sid container.
  • Drops x32/i386 matrix entries from the Linux build.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

cppcheck-linux:
name: Static analysis (cppcheck, Linux, debian:sid)
runs-on: ubuntu-latest
container: debian:sid
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

debian:sid (unstable) is a rolling release that receives continuous package updates without stability guarantees. Using it as a CI container base image means the build environment can break at any time due to upstream package updates, library ABI changes, or temporary package unavailability — completely unrelated to any code changes in the repository. Consider using a pinned Debian release (e.g., debian:bookworm or debian:trixie) to get a stable, reproducible build environment.

Suggested change
container: debian:sid
container: debian:bookworm

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, I've implemented it, although it then differs from v2/master.

Comment on lines +41 to +45
submodules: true

- name: Ensure submodules are fully initialized (recursive)
run: git submodule update --init --recursive

Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The checkout step specifies submodules: true, which performs a non-recursive shallow submodule checkout, and then a separate step runs git submodule update --init --recursive. While this is functional, using submodules: recursive directly in the checkout action (instead of submodules: true) would handle recursive initialization in one step and make the subsequent manual git submodule update --init --recursive step redundant. This applies to all five checkout instances in the file (lines 38–41, 103–106, 171–174, 223–226, 254–257).

Suggested change
submodules: true
- name: Ensure submodules are fully initialized (recursive)
run: git submodule update --init --recursive
submodules: recursive

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, I checked the behavior and it behaves the same as the other one.

liblua5.2-dev \
libmaxminddb-dev \
libpcre2-dev \
libgeoip-dev \
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The libgeoip-dev package has been removed from Debian Sid (unstable). Debian dropped the legacy GeoIP C library (libgeoip-dev) as it is deprecated and unmaintained upstream. Attempting to install it on debian:sid will fail with a package-not-found error, breaking the cppcheck-linux job. This package should be removed from the dependency list for this job, which implicitly means GeoIP support won't be analyzed by cppcheck (it will be configured away).

Suggested change
libgeoip-dev \

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's removed, he's right about that, I also completely removed it on macOS.

liblua5.2-dev \
libmaxminddb-dev \
libpcre2-dev \
libpcre3-dev \
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

libpcre3-dev was dropped from Ubuntu 24.04 (Noble Numbat). The package no longer exists in the Ubuntu 24.04 APT repositories, so this apt-get install step will fail with a package-not-found error for every matrix job in the Linux build. Since the new workflow targets ubuntu-24.04 (line 13), libpcre3-dev should be removed from the dependency list. The PCRE (v1) --with-pcre configure option can use the libpcre3-dev-equivalent package libpcre2-dev is already listed; for PCRE v1 support, note that Ubuntu 24.04 still provides libpcre3 (runtime) but no longer ships the -dev headers package. You may need to build or bundle PCRE v1 separately if PCRE v1 support is still needed, or conditionally install it only for the with pcre matrix variant.

Suggested change
libpcre3-dev \

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is removed

Comment on lines +254 to +261
- uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: true

- name: Mark repo as safe for git
run: git config --global --add safe.directory $GITHUB_WORKSPACE

Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the cppcheck-linux job running inside a debian:sid container, the git config --global --add safe.directory step is placed after the actions/checkout@v6 step. The checkout action itself internally invokes git operations within the workspace directory. In a container context where the workspace is owned by a different UID than the runner user, git may refuse to operate on it during checkout itself. The safe.directory configuration should be set before the checkout step — or alternatively, install git and run the safe.directory config before the checkout action runs.

Suggested change
- uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: true
- name: Mark repo as safe for git
run: git config --global --add safe.directory $GITHUB_WORKSPACE
- name: Mark repo as safe for git
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: true

Copilot uses AI. Check for mistakes.
Updated CI workflow to use recursive submodules and changed container from debian:sid to debian:trixie. Removed GeoIP library build steps and unnecessary dependencies.
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 6, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
3 Security Hotspots

See analysis details on SonarQube Cloud

Copy link
Member

@airween airween left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see my comments.

name: Static analysis (cppcheck, Linux, debian:sid)
runs-on: ubuntu-latest
container: debian:sid
container: debian:trixie
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trixie is the current stable release of Debian (Debian 13). It contains 2.17.1, see the packages site.

Sid contains 2.19.0, and here that's the point: we definitely want to use the last cppcheck version, as soon as possible.

I saw Copilot suggestion, but I'm afraid in this case you shouldn't follow it :).

- { label: "without ssdeep", opt: "--without-ssdeep" }
- { label: "with lmdb", opt: "--with-lmdb" }
- { label: "with pcre2 (default)", opt: "" }
- { label: "with pcre", opt: "--with-pcre" }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You removed the old PCRE library's check, but I think while the used OS supports PCRE3, we must check that too.

It seems you use ubuntu24.04, which still contains pcre3, so please keep this case too.

(Unfortunately we don't have any information about how many uses uses the old and the new PCRE lib)

liblua5.2-dev \
libmaxminddb-dev \
libpcre2-dev \
libgeoip-dev \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

libgeoip-dev was removed, but there is not a replacement, but a new library which can be used: maxminddb. I see that's also installed (two lines above), but for some reason the configure script does not recongise it. You can see what happens during the job (check the output, for eg. like this one).

Also, if you want to use LMDB, then you should pass that to configure script: --with-lmdb. Beside of that, you could try to pass --with-maxmind too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants