Commit Graph

31 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
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
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
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
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
132380eeaf Update update_patterns.yml 2025-02-03 02:04:42 +01:00
fab
437d3a251c Update update_patterns.yml 2025-02-03 02:02:52 +01:00
fab
4d2969c56c Update update_patterns.yml 2025-01-16 14:07:27 +01:00
fab
76e6ccb5ce Update update_patterns.yml 2025-01-03 13:49:41 +01:00
fab
0b2aa45d4f Update update_patterns.yml 2025-01-03 13:47:44 +01:00
fab
ba72f79990 Update update_patterns.yml 2025-01-03 13:45:28 +01:00
fab
cf43e2a382 Update update_patterns.yml 2025-01-03 13:43:55 +01:00
fab
88ff40dc10 Update update_patterns.yml 2025-01-03 13:40:18 +01:00
fab
a03fd54da8 Update update_patterns.yml 2025-01-03 13:38:18 +01:00
fab
65429e6a70 Update update_patterns.yml 2025-01-03 13:36:20 +01:00
fab
87ed3d33b2 Update update_patterns.yml 2025-01-03 13:35:05 +01:00
fab
9979cba21e Update update_patterns.yml 2025-01-03 13:33:35 +01:00
fab
1f4aefe3ad Update update_patterns.yml 2025-01-03 13:31:22 +01:00
fab
9d057542c3 Update update_patterns.yml
Caddy support removed. 
Please check [this](https://github.com/fabriziosalmi/caddy-waf/)  project instead.
2025-01-03 00:15:47 +01:00
fab
016badd14e Update update_patterns.yml 2024-12-21 02:01:55 +01:00
fab
16aa0c409f Update update_patterns.yml 2024-12-21 01:59:01 +01:00
fab
b8cabcd3ee Update update_patterns.yml 2024-12-21 01:56:34 +01:00
fab
dfce75bf1a Update update_patterns.yml 2024-12-21 01:47:27 +01:00
fab
af85608aa8 Update update_patterns.yml 2024-12-21 01:34:24 +01:00
fab
034d133d1c Update update_patterns.yml 2024-12-21 01:28:38 +01:00
fab
4b53038fbc Update update_patterns.yml 2024-12-21 01:24:02 +01:00
fab
c0b1a834fe Update update_patterns.yml 2024-12-21 01:21:44 +01:00
fab
07ff92bd1d Update update_patterns.yml 2024-12-21 01:21:26 +01:00
fab
696bc9c2f7 Create update_patterns.yml 2024-12-21 01:06:44 +01:00