Files
Charon/scripts
GitHub Actions 8b0011f6c6 fix(ci): enhance rate limit integration test reliability
- Added HTTP status checks for login and security config POST requests to ensure proper error handling.
- Implemented a readiness gate for the Caddy admin API before applying security configurations.
- Increased sleep duration before verifying rate limit handler to accommodate Caddy's configuration propagation.
- Changed verification failure from a warning to a hard exit to prevent misleading test results.
- Updated Caddy admin API URL to use the canonical trailing slash in multiple locations.
- Adjusted retry parameters for rate limit verification to reduce polling noise.
- Removed stale GeoIP checksum validation from the Dockerfile's non-CI path to simplify the build process.
2026-03-17 14:05:25 +00:00
..
2026-03-04 18:34:49 +00:00
2026-03-04 18:34:49 +00:00
2026-03-04 18:34:49 +00:00
2026-03-04 18:34:49 +00:00
2026-03-04 18:34:49 +00:00
2026-03-04 18:34:49 +00:00
2026-03-04 18:34:49 +00:00
2026-03-04 18:34:49 +00:00
2026-03-04 18:34:49 +00:00
2026-03-04 18:34:49 +00:00
2026-03-04 18:34:49 +00:00
2026-03-04 18:34:49 +00:00
2026-03-04 18:34:49 +00:00
2026-03-04 18:34:49 +00:00
2026-03-04 18:34:49 +00:00
2026-03-04 18:34:49 +00:00
2026-03-04 18:34:49 +00:00
2026-03-04 18:34:49 +00:00
2026-03-04 18:34:49 +00:00
2026-03-04 18:34:49 +00:00
2026-03-04 18:34:49 +00:00
2026-03-04 18:34:49 +00:00
2026-03-04 18:34:49 +00:00
2026-03-04 18:34:49 +00:00
2026-03-04 18:34:49 +00:00
2026-03-04 18:34:49 +00:00
2026-03-04 18:34:49 +00:00
2026-03-04 18:34:49 +00:00
2026-03-04 18:34:49 +00:00

Scripts Directory

Running Tests Locally Before Pushing to CI

WAF Integration Test

Always run this locally before pushing WAF-related changes to avoid CI failures:

# From project root
bash ./scripts/coraza_integration.sh

Or use the VS Code task: Ctrl+Shift+PTasks: Run TaskCoraza: Run Integration Script

Requirements:

  • Docker image charon:local must be built first:

    docker build -t charon:local .
    
  • The script will:

    1. Start a test container with WAF enabled
    2. Create a backend container (httpbin)
    3. Test WAF in block mode (expect HTTP 403)
    4. Test WAF in monitor mode (expect HTTP 200)
    5. Clean up all test containers

Expected output:

✓ httpbin backend is ready
✓ Coraza WAF blocked payload as expected (HTTP 403) in BLOCK mode
✓ Coraza WAF in MONITOR mode allowed payload through (HTTP 200) as expected
=== All Coraza integration tests passed ===

Other Test Scripts

  • Security Scan: bash ./scripts/security-scan.sh
  • Go Test Coverage: bash ./scripts/go-test-coverage.sh
  • Frontend Test Coverage: bash ./scripts/frontend-test-coverage.sh

CI/CD Workflows

Changes to these scripts may trigger CI workflows:

  • coraza_integration.sh → WAF Integration Tests workflow
  • Files in .github/workflows/ directory control CI behavior

Tip: Run tests locally to save CI minutes and catch issues faster!