Skip to content

Wire GitHub Actions CI for WAF ModSecurity CRS updater tests#43

Open
Divyateja2709 wants to merge 43 commits intoOWASP:masterfrom
Divyateja2709:ci-waf-modsec-build-and-test
Open

Wire GitHub Actions CI for WAF ModSecurity CRS updater tests#43
Divyateja2709 wants to merge 43 commits intoOWASP:masterfrom
Divyateja2709:ci-waf-modsec-build-and-test

Conversation

@Divyateja2709
Copy link
Copy Markdown

@Divyateja2709 Divyateja2709 commented Mar 16, 2026

This PR introduces continuous integration (CI) coverage to the honeytraps/waf_modsec Docker-based WAF honeypot, ensuring stability and making it easy to review changes to the OWASP Core Rule Set (CRS) updater. CI will build the container image and run the existing shell-based test suite via a single test runner script.

What changed:
Added honeytraps/waf_modsec/run_tests.sh to build the Docker image and run tests/test_.sh

  • Added a GitHub Actions workflow to run the test runner on pull requests
  • (If applicable) Fixed honeytraps/waf_modsec/include.conf to remove any errant trailing quote from the CRS rules include line

How CI validates:

  • Builds the honeytraps/waf_modsec/Dockerfile

  • Fails the workflow if any test fails (non-zero exit code)

Why it's important:
This will ensure that the CRS auto-updater remains reliable over time and make the project mentor-reviewable since every PR has a repeatable build + test signal.

Added optional CRS update logic and improved logging for background processes.
Added initial README.md for CRS Auto Update script with planned features and assumptions.
Removed comment about Sidekick code generation.
Added logging and process management for Apache and Filebeat.
Updated the script to enforce SHA256 checksum format and added timeout options for curl and wget commands.
Updated filebeat configuration path to absolute path.
Updated Dockerfile to include TARGETARCH argument and modified file paths.
Added headers to prevent HTTP_PROXY leakage and set authentication headers.
Add a test script to verify the existence of bundled CRS paths and includes in the Docker container.
This script tests the successful update of the CRS within a Docker container, ensuring that the configuration remains valid and usable after the update.
Refactor test script for CRS update to use unique identifiers and validate fixture installation.
This script tests the behavior of the CRS update when the updater is disabled, ensuring that the status reflects 'skipped' and that the bundled CRS files remain intact.
Add a test script to verify fallback behavior during CRS update download failure.
This script tests the fallback behavior of the CRS updater when the SHA256 checksum does not match the expected value. It verifies that the bundled CRS remains unchanged and that the correct status is recorded.
This script tests the behavior of the CRS update process when a lock is held by another instance. It verifies that the update is skipped and the bundled CRS remains intact.
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.

1 participant