Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

CI: use libmodsecurity release binaries in the Windows nginx jobs

オープン
#404 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
c, github-actions, nginx
領域
ci-cd

調査の方向性

Open .github/workflows/test_new.yml and find the build-windows job with the windows-nginx-* steps. First check whether the trigger condition is met: does a libmodsecurity release (expected v3.0.18) attach libmodsecurity-<version>-windows-x64.zip? If not, the issue is blocked. If yes, replace the source-build/Conan steps with gh release download, verify the sha256, set MODSECURITY_INC/MODSECURITY_LIB and copy the DLL into objs, and optionally move to windows-2025. Done is a green CI run. Note the caveat: leave test.yml's build-windows building from source, and the workflow YAML plus CI debugging experience needed makes this non-trivial for a first-timer.

索引モデルが issue の本文から書いたものです。

説明

Summary

Once libmodsecurity publishes prebuilt Windows binaries with its releases (owasp-modsecurity/ModSecurity#3702, closing owasp-modsecurity/ModSecurity#3313), the windows-nginx-* jobs in test_new.yml could use the latest release zip instead of building libModSecurity from source on every run.

Trigger: the first libmodsecurity release that has libmodsecurity-<version>-windows-x64.zip attached (expected v3.0.18).

Why

Building libmodsecurity on Windows means building its dependencies with Conan. That takes about 15-18 minutes per job and has broken this CI twice in October 2026, both times for reasons unrelated to the connector:

  • HTTP 429 from git.openldap.org when Conan downloads the lmdb sources. #403 worked around it with Conan download retries.
  • yajl failing to configure with CMake 4 (CMP0026, owasp-modsecurity/ModSecurity#3604) on the windows-2025 image, which now ships Visual Studio 2026. ConanCenter has no prebuilt packages for that compiler, so every dependency was built from source. #403 moved the jobs to windows-2022 as a workaround.

The release zip is self-contained: the dependencies are linked statically, and the release workflow checks that libModSecurity.dll depends only on system DLLs and the VC++ runtime. It is built with the dynamic CRT (/MD), the same as the current source build.

What to change

In the build-windows job (windows-nginx-*) of .github/workflows/test_new.yml:

  1. Replace the "Get libModSecurity source", "Setup Conan", "Retry rate-limited Conan downloads" and "Build libModSecurity" steps with a download of the latest release zip:
    gh release download -R owasp-modsecurity/ModSecurity --pattern 'libmodsecurity-*-windows-x64.zip' --pattern 'libmodsecurity-*-windows-x64.zip.sha256'
    
    (the -debug zips don't match this pattern). Then verify the zip with sha256sum -c or gh attestation verify <zip> --repo owasp-modsecurity/ModSecurity, and extract it.
  2. Point the nginx build at the extracted directories. The zip is a cmake --install tree, so bin/libModSecurity.dll, lib/libModSecurity.lib and include/modsecurity/ map to:
    export MODSECURITY_INC=<dist>/include
    export MODSECURITY_LIB=<dist>/lib
    cp <dist>/bin/libModSecurity.dll objs
    
  3. Optionally move the jobs back to windows-2025, since they no longer depend on Conan or CMake.

Keep one job building from source

With release binaries, these jobs test the connector against the latest libmodsecurity release instead of v3/master. That matches what users run, but two things would go unnoticed until the next release: a v3/master change that breaks the connector, and a connector PR that relies on an API only v3/master has.

So keep build-windows in test.yml building libModSecurity v3/master from source with Conan. The Linux jobs already build v3/master from source.

References

  • #403: Conan download retries, windows-2022 for the test_new.yml Windows jobs
  • #389: retries for the pcre2, zlib and OpenSSL downloads
  • owasp-modsecurity/ModSecurity#3702: Windows release workflow
  • owasp-modsecurity/ModSecurity#3604: yajl / CMake 4 CMP0026
主要言語
Perl
スター
1.9k
フォーク
311
平均マージ
7時間 5分
マージ済み PR(30日)
2

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

owasp-modsecurity/ModSecurity-nginx のほかの issue

owasp-modsecurity/ModSecurity-nginx の issue をすべて見る

似ている issue

Perl の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。