Commit Graph

280 Commits

Author SHA1 Message Date
Fabrizio Salmi
478c20a83c Generate dense release notes with stats, install snippet, and SHA-256
- New workflow step builds release_notes.md from runtime data: build date,
  resolved CRS tag (queried from upstream API), total OWASP rule count,
  category count, per-backend bot counts, archive sizes (du -h), and
  SHA-256 checksums of every zip.
- Replace deprecated actions/create-release@v1 + 4x upload-release-asset@v1
  with a single softprops/action-gh-release@v2 step that publishes the body
  and all four archives in one go.
- Release body becomes a self-contained, email-friendly summary visible in
  GitHub notification mails: coverage, backends table, quick-install
  one-liner, and supply-chain-verifiable SHA-256 list.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 09:51:10 +02:00
Fabrizio Salmi
075f92d2a6 Refine home page: traffic-grid hero, editorial feature rail, real platform marks
- Replace hero shield with HeroVisual: 11-track flowing SVG of request glyphs
  with ~7% Apple-red blocked highlights, slow CSS-only drift, edge fade,
  monospace meta header and pass/blocked footer (data-driven feel).
- Drop the six default feature cards. New HomeFeatureRail renders a 3x2
  hairline-bordered editorial grid: numbered eyebrow + bold title + body,
  zero icon chrome.
- Redraw platform icons as recognizable brand marks (Nginx hexagon-N, Apache
  feather, Traefik "Mr. Traefik" head, HAProxy load-balanced H). Showcase
  cards drop card chrome in favor of column dividers; hover adopts the
  platform's brand color via per-card --accent CSS var.
- Stats strip becomes a hairline-bordered four-column rail with tabular-num
  values, mono sub-labels, and a Google-data-display feel.
- Hero name no longer uses gradient text; pure neutral.
- Code-block bg corrected for light mode.
- Respects prefers-reduced-motion.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 09:39:20 +02:00
Fabrizio Salmi
8cd150af87 Use GitHub-hosted runners on every workflow
Drops the self-hosted runner-02 default. With no self-hosted runner registered
on the repo, workflows now run reliably on ubuntu-latest without needing a
RUNS_ON repo variable override.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 08:16:15 +02:00
Fabrizio Salmi
5c654b3da8 Redesign docs with Apple-native theme; verify content; route CI to self-hosted runner-02
- VitePress: custom theme (SF system fonts, glass nav, soft surfaces, pill buttons,
  light/dark code blocks, refined feature cards, platform showcase + stat strip).
- Replace every emoji across docs and README with inline SVG icons.
- Verify and fix doc accuracy against actual scripts: JSON schema (category+pattern only),
  env-var configuration for json2*/import_* scripts, owasp2json CLI surface.
- Add public assets (logo.svg, favicon.svg, hero-shield.svg) and Shiki haproxy alias.
- Workflows default to self-hosted runner-02 with a configurable fallback to GitHub
  runners via the RUNS_ON repo variable.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 08:07:04 +02:00
Fabrizio Salmi
4575736fed Set release name to WAF rules (Nginx, Apache, Traefik, Haproxy)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 07:50:11 +02:00
fab
06be1f077d Merge pull request #20 from fabriziosalmi/dependabot/npm_and_yarn/docs/npm_and_yarn-5f44a83626
Bump postcss from 8.5.6 to 8.5.12 in /docs in the npm_and_yarn group across 1 directory
2026-04-28 11:04:23 +02:00
fab
1ab8519547 chore: add .gitignore 2026-04-27 08:09:38 +02:00
dependabot[bot]
c988ab7654 Bump postcss in /docs in the npm_and_yarn group across 1 directory
Bumps the npm_and_yarn group with 1 update in the /docs directory: [postcss](https://github.com/postcss/postcss).


Updates `postcss` from 8.5.6 to 8.5.12
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.5.6...8.5.12)

---
updated-dependencies:
- dependency-name: postcss
  dependency-version: 8.5.12
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-26 21:22:13 +00:00
fab
561c1bc734 Merge pull request #19 from fabriziosalmi/dependabot/npm_and_yarn/docs/npm_and_yarn-b2936519f3
Bump rollup from 4.53.3 to 4.59.0 in /docs in the npm_and_yarn group across 1 directory
2026-04-26 23:20:51 +02:00
dependabot[bot]
555809a627 Bump rollup in /docs in the npm_and_yarn group across 1 directory
Bumps the npm_and_yarn group with 1 update in the /docs directory: [rollup](https://github.com/rollup/rollup).


Updates `rollup` from 4.53.3 to 4.59.0
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.53.3...v4.59.0)

---
updated-dependencies:
- dependency-name: rollup
  dependency-version: 4.59.0
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-28 21:08:10 +00:00
fab
ae2ba190ee Merge pull request #18 from fabriziosalmi/dependabot/npm_and_yarn/docs/npm_and_yarn-01492243ae
Bump preact from 10.28.0 to 10.28.2 in /docs in the npm_and_yarn group across 1 directory
2026-01-11 18:12:58 +01:00
dependabot[bot]
2ee366fb53 Bump preact in /docs in the npm_and_yarn group across 1 directory
Bumps the npm_and_yarn group with 1 update in the /docs directory: [preact](https://github.com/preactjs/preact).


Updates `preact` from 10.28.0 to 10.28.2
- [Release notes](https://github.com/preactjs/preact/releases)
- [Commits](https://github.com/preactjs/preact/compare/10.28.0...10.28.2)

---
updated-dependencies:
- dependency-name: preact
  dependency-version: 10.28.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-07 19:31:17 +00:00
Fabrizio Salmi
a6f372e0c9 Fix nginx test workflow paths
The nginx_waf.zip extracts files directly to the target directory,
not into waf_patterns/nginx/ subdirectory. Updated paths accordingly.
2025-12-09 08:09:21 +01:00
Fabrizio Salmi
ea474cbcf2 Add VitePress documentation with GitHub Pages deployment
- Create docs/ directory with VitePress configuration
- Add documentation for all web servers (Nginx, Apache, Traefik, HAProxy)
- Add bad bot detection and API reference documentation
- Add GitHub Actions workflow for automatic deployment to GitHub Pages
- Configure VitePress with sidebar, navigation, and search
2025-12-09 08:07:06 +01:00
Fabrizio Salmi
6bcca53eae Fix CI workflow and clarify Nginx WAF usage
- Remove redundant 'gh auth login' command in CI workflow (fixes exit code 1 error)
- Use GH_TOKEN env var instead of GITHUB_TOKEN for gh CLI
- Update Nginx README to clarify that individual category .conf files should not be included directly
- Document that users must use waf_maps.conf (http block) + waf_rules.conf (server block)

Fixes #17
2025-12-09 07:59:25 +01:00
fab
87f18886b7 Merge pull request #16 from fabriziosalmi/copilot/improve-documentation-quality
docs: Synchronize documentation with codebase and expand contribution guides
2025-11-15 20:46:44 +01:00
copilot-swe-agent[bot]
0e9d13cb5e docs: Add prerequisites, improve bug template, enhance security policy
Co-authored-by: fabriziosalmi <1569108+fabriziosalmi@users.noreply.github.com>
2025-11-15 19:35:18 +00:00
copilot-swe-agent[bot]
1fe6802ffe docs: Fix script names, improve CONTRIBUTING, add WAF READMEs, fix workflow
Co-authored-by: fabriziosalmi <1569108+fabriziosalmi@users.noreply.github.com>
2025-11-15 19:33:13 +00:00
copilot-swe-agent[bot]
908e93cf8c Initial plan 2025-11-15 19:28:04 +00:00
fab
ed0c2e736e Update json2apache.py 2025-02-28 11:26:45 +01:00
fab
4c01d419de Update update_patterns.yml
Explanation of the Workflow:

    Checkout: Checks out the repository. fetch-depth: 0 gets the full Git history, which is necessary for tag manipulation.

    Setup Python: Sets up Python 3.11.

    Cache: Caches the pip directory to speed up dependency installation.

    Install Dependencies: Installs dependencies from requirements.txt.

    Run Scripts: Runs the owasp2json.py, json2nginx.py, json2apache.py, json2traefik.py, and json2haproxy.py scripts to generate the WAF configurations. These steps will now fail fast if any of the scripts encounter an error.

    Generate Bad Bot Blockers: Executes badbots.py.

    Commit and Push (Conditional):

        Configures Git with a bot user.

        Adds all changes.

        Uses git diff --quiet --exit-code to check for changes. If there are no changes, the git diff command exits with a non-zero code, and the if condition is false.

        If there are changes, commits them with a descriptive message and pushes to the repository.

        continue-on-error: true is used only on this step because it's okay if there are no changes to commit.

    Create Zip Archives: Creates ZIP files containing the generated configurations for each web server. The (cd ... && zip ...) command ensures that the ZIP files contain the correct directory structure (e.g., nginx_waf.zip should contain a nginx/ directory).

    Delete Existing Release: Deletes the latest tag (both locally and remotely) and the latest release (if they exist). This ensures that we always have a clean "latest" release. Uses the gh CLI (GitHub CLI) for release management.

    Create GitHub Release (Conditional): The if: success() condition ensures that this step only runs if all preceding steps were successful. This prevents creating a new release if the rule generation failed. Creates a new release tagged as latest.

    Upload Assets (Conditional): Uploads the generated ZIP files as assets to the new release. Also uses if: success().

    Clean Up (Optional): Removes the pip cache. if: always() ensures this runs even if previous steps fail.

    Notify on Failure (Optional): Uses if: failure() to run only if a previous step failed. This step currently just prints a message, but you can replace it with a notification mechanism (e.g., sending a message to Slack or sending an email). You'll need to set up the necessary secrets (like SLACK_WEBHOOK) for your chosen notification method.
2025-02-28 11:25:24 +01:00
fab
23d11b6552 Update import_traefik_waf.py 2025-02-28 11:24:10 +01:00
fab
df23dd0d04 Update json2traefik.py 2025-02-28 11:23:08 +01:00
fab
8277d8bc13 Update import_nginx_waf.py 2025-02-28 11:22:21 +01:00
fab
edd338a311 Update import_haproxy_waf.py 2025-02-28 11:21:33 +01:00
fab
068c4c59b4 Update import_apache_waf.py 2025-02-28 11:20:17 +01:00
fab
676c53d383 Update json2nginx.py 2025-02-28 11:19:32 +01:00
fab
1a3c968ba2 Update json2apache.py 2025-02-28 11:17:52 +01:00
fab
4591dfa52e Update owasp2json.py 2025-02-28 11:16:46 +01:00
fab
95b1b4a784 Update json2haproxy.py 2025-02-28 11:15:14 +01:00
github-actions[bot]
c2306aca23 Update: [Fri Feb 28 10:03:59 UTC 2025] 2025-02-28 10:03:59 +00:00
fab
b0a1204ea7 Update json2haproxy.py 2025-02-28 11:03:13 +01:00
github-actions[bot]
cc2b6d768f Update: [Fri Feb 28 10:01:01 UTC 2025] 2025-02-28 10:01:01 +00:00
fab
a6307b5cf6 Update json2haproxy.py 2025-02-28 11:00:40 +01:00
github-actions[bot]
dc731a715c Update: [Fri Feb 28 09:59:23 UTC 2025] 2025-02-28 09:59:23 +00:00
fab
9e85df0fee Update json2haproxy.py
feat: Implement OWASP CRS to HAProxy WAF conversion with enhanced features

This commit introduces significant improvements to the script for converting OWASP Core Rule Set (CRS) rules into HAProxy Web Application Firewall (WAF) configurations.

Key changes include:

- **Expanded Operator Mapping:** Added more comprehensive mappings between ModSecurity operators and HAProxy equivalents, improving the translation of OWASP rules.

- **Location-Based ACLs:** Implemented support for inspecting different request parameters (User-Agent, Request-URI, Host, etc.) based on the `location` field in the JSON rules, increasing the WAF's coverage.

- **Rule Prioritization:** Introduced rule prioritization based on severity (high, medium, low), allowing for different actions (deny, log, tarpit) to be triggered based on the assessed risk.

- **Improved Regex Handling:** Enhanced regex validation to identify and skip overly complex or invalid patterns, preventing performance issues and potential errors.

- **Clearer ACL Logic:** Restructured the generated `waf.acl` file for better organization, separating ACL definitions from deny logic and grouping rules by request parameter location.

- **Detailed Logging:** Improved logging to provide more specific information about skipped rules, invalid patterns, and other issues, aiding in debugging and configuration.

- **Integer Comparison:** Added capability to use http-request to perform integer comparison instead of strings in the rules.

These enhancements result in a more effective, maintainable, and configurable HAProxy WAF implementation based on the OWASP CRS.

Please note that thorough testing and tuning are still crucial to ensure the WAF is working correctly and not causing false positives.

This commit addresses the following issues:

- Addresses overly aggressive rules causing false positives.
- Implements missing support for ModSecurity operators.
- Enables inspection of request parameters beyond the User-Agent header.
- Provides a more organized and maintainable HAProxy WAF configuration.
2025-02-28 10:58:24 +01:00
github-actions[bot]
85d732ced9 Update: [Fri Feb 28 01:41:36 UTC 2025] 2025-02-28 01:41:36 +00:00
github-actions[bot]
87d028e20c Update: [Thu Feb 27 01:41:26 UTC 2025] 2025-02-27 01:41:26 +00:00
github-actions[bot]
02b100fdb2 Update: [Wed Feb 26 00:26:23 UTC 2025] 2025-02-26 00:26:24 +00:00
github-actions[bot]
9f8a891fd8 Update: [Tue Feb 25 00:26:42 UTC 2025] 2025-02-25 00:26:42 +00:00
github-actions[bot]
9554870ec8 Update: [Mon Feb 24 00:27:16 UTC 2025] 2025-02-24 00:27:16 +00:00
fab
6070f591ae Update README.md 2025-02-23 22:33:08 +01:00
github-actions[bot]
2c1fbc2853 Update: [Sun Feb 23 00:28:29 UTC 2025] 2025-02-23 00:28:29 +00:00
github-actions[bot]
1968c16e46 Update: [Sat Feb 22 10:52:46 UTC 2025] 2025-02-22 10:52:46 +00:00
fab
f90caf30d9 Update json2apache.py
JSON bug fixed.
2025-02-22 11:41:33 +01:00
fab
fe8ca8c3d2 Merge pull request #13 from fabriziosalmi/codeflash/optimize-sanitize_pattern-m6xpxrl4
️ Speed up function `sanitize_pattern` by 631%
2025-02-09 15:30:59 +01:00
codeflash-ai[bot]
b08285fd76 ️ Speed up function sanitize_pattern by 631%
Here's an optimized version of the given Python program for better runtime efficiency.
2025-02-09 14:27:36 +00:00
fab
75cdaa01b9 Merge pull request #10 from fabriziosalmi/codeflash/optimize-validate_regex-m6xoy1wp
️ Speed up function `validate_regex` by 162%
2025-02-09 15:15:00 +01:00
fab
870da8e1c9 Merge pull request #11 from fabriziosalmi/codeflash/optimize-validate_regex-m6xp4bpf
️ Speed up function `validate_regex` by 2,003%
2025-02-09 15:14:42 +01:00
fab
fb284892f1 Merge pull request #12 from fabriziosalmi/codeflash/optimize-sanitize_pattern-m6xp6cvk
️ Speed up function `sanitize_pattern` by 11,547%
2025-02-09 15:14:24 +01:00