Commit Graph

86 Commits

Author SHA1 Message Date
dependabot[bot]
a6161e4a7d Bump the actions group across 1 directory with 8 updates
Bumps the actions group with 8 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `3` | `7` |
| [actions/setup-node](https://github.com/actions/setup-node) | `4` | `7` |
| [actions/configure-pages](https://github.com/actions/configure-pages) | `4` | `6` |
| [actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact) | `3` | `5` |
| [actions/deploy-pages](https://github.com/actions/deploy-pages) | `4` | `5` |
| [actions/cache](https://github.com/actions/cache) | `3` | `6` |
| [actions/setup-python](https://github.com/actions/setup-python) | `4` | `7` |
| [softprops/action-gh-release](https://github.com/softprops/action-gh-release) | `2` | `3` |



Updates `actions/checkout` from 3 to 7
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v7)

Updates `actions/setup-node` from 4 to 7
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4...v7)

Updates `actions/configure-pages` from 4 to 6
- [Release notes](https://github.com/actions/configure-pages/releases)
- [Commits](https://github.com/actions/configure-pages/compare/v4...v6)

Updates `actions/upload-pages-artifact` from 3 to 5
- [Release notes](https://github.com/actions/upload-pages-artifact/releases)
- [Commits](https://github.com/actions/upload-pages-artifact/compare/v3...v5)

Updates `actions/deploy-pages` from 4 to 5
- [Release notes](https://github.com/actions/deploy-pages/releases)
- [Commits](https://github.com/actions/deploy-pages/compare/v4...v5)

Updates `actions/cache` from 3 to 6
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v6)

Updates `actions/setup-python` from 4 to 7
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v7)

Updates `softprops/action-gh-release` from 2 to 3
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/configure-pages
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/deploy-pages
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/setup-node
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/upload-pages-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: softprops/action-gh-release
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-25 21:42:43 +00:00
Fabrizio Salmi
a8c59b99b4 chore(license): attribute third-party sources for derived WAF data
The generated data (owasp_rules.json, waf_patterns/**) is derived from
third-party projects but was implicitly covered by the blanket MIT LICENSE
with no NOTICE. Add the missing attribution — additively and reversibly:

- THIRD_PARTY_NOTICES.md (new): per-source attribution
  - OWASP CoreRuleSet          -> Apache-2.0    (owasp_rules.json + waf_patterns/**)
  - JayBizzle/Crawler-Detect   -> MIT           (bad-bot list)
  - mitchellkrogza/...bad-bot  -> MIT           (bad-bot list)
  - matomo/referrer-spam-...   -> Public Domain (referrer spam)
- LICENSES/Apache-2.0.txt (new): canonical license copy (Apache-2.0 §4a).
- README: License section now scopes MIT to the original project code; the
  generated data is redistributed under its upstream licenses. Resources now
  credit the real bad-bot sources (removed the unused ai.robots.txt mention).
- Converters (owasp2json, json2nginx, json2apache, json2traefik, json2haproxy)
  emit a provenance header on every generated file (Apache-2.0 §4b "state
  changes"); owasp_rules.json gains a top-level _provenance key. Loaders accept
  both the {_provenance, rules} object and the legacy bare-array form.
- owasp_rules.json wrapped as {_provenance, rules} (rule content unchanged).
- update_patterns.yml jq updated for the object shape.

LICENSE stays MIT (GitHub detection unaffected). Propagation of the headers to
waf_patterns/** is left to the daily update_patterns workflow.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-19 08:06:56 +02:00
fab
37ff839204 chore: add Dependabot config for automated dependency updates (#24)
Enables weekly Dependabot updates (minor/patch grouped to limit PR noise)
for the ecosystems present in this repo (GitHub Actions plus the relevant
package managers and Dockerfiles). Config-only, no code changes.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 22:37:18 +02:00
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
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
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
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
339a5e0350 Update test_apache_docker.yml 2025-02-03 02:05:58 +01:00
fab
c3578e4570 Update test_nginx.yml 2025-02-03 02:05:25 +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
9ccac4241f Update test_nginx.yml 2025-01-17 13:30:09 +01:00
fab
05571dad86 Update test_apache_docker.yml 2025-01-17 13:29:22 +01:00
fab
146335721c Update and rename test_docker.yml to test_apache_docker.yml 2025-01-17 13:28:23 +01:00
fab
0d92cd36c6 Update test_docker.yml 2025-01-17 12:04:59 +01:00
fab
ddb39751e8 Update test_docker.yml
nginx & haproxy tests temp removed
2025-01-17 12:02:39 +01:00
fab
4eccf10943 Update test_docker.yml 2025-01-17 12:00:27 +01:00
fab
cf1a4da2bd Rename nginx.yml to test_nginx.yml 2025-01-16 19:19:08 +01:00
fab
45d9f34241 Rename test.yml to test_docker.yml 2025-01-16 19:18:58 +01:00
fabriziosalmi
ae9c2756f7 test 2025-01-16 14:38:01 +01:00
fabriziosalmi
bc5eb455bf test 2025-01-16 14:33:59 +01:00
fabriziosalmi
3297168bec test 2025-01-16 14:31:04 +01:00
fabriziosalmi
64e14d23ef test 2025-01-16 14:28:30 +01:00
fabriziosalmi
84c4a49c2d action (crossplane) 2025-01-16 14:20:25 +01:00
fabriziosalmi
cc0a8de6c2 action 2025-01-16 14:19:16 +01:00
fabriziosalmi
99ee7c07fb action 2025-01-16 14:17:49 +01:00
fabriziosalmi
69dbb9caa6 action fix 2025-01-16 14:15:40 +01:00
fab
d2a51a1e17 Update nginx.yml 2025-01-16 14:10:54 +01:00
fab
a08df69fbd Update nginx.yml 2025-01-16 14:08:31 +01:00
fab
4d2969c56c Update update_patterns.yml 2025-01-16 14:07:27 +01:00
fab
a698c9a397 Update nginx.yml 2025-01-16 14:05:23 +01:00
fab
8bf88a4c28 Update nginx.yml 2025-01-16 13:38:49 +01:00
fab
dc1668f287 Create FUNDING.yml 2025-01-15 17:14:28 +01:00
fab
fe5f92f6ed Update nginx.yml 2025-01-07 20:56:02 +01:00
fab
1f2562df14 Update nginx.yml 2025-01-07 20:54:34 +01:00
fab
e27a07c274 Update nginx.yml 2025-01-07 20:52:33 +01:00
fab
c997976f0c Update nginx.yml 2025-01-07 20:50:58 +01:00
fab
efabe7f7d6 Update nginx.yml 2025-01-07 20:49:31 +01:00
fab
b9874d25b4 Update nginx.yml 2025-01-07 20:36:46 +01:00
fab
4015663ee8 Update nginx.yml 2025-01-07 20:35:22 +01:00
fab
0ecebe6d74 Update nginx.yml 2025-01-07 20:29:22 +01:00
fab
2aa998a792 Update nginx.yml 2025-01-07 20:28:16 +01:00
fab
e6d095bd72 Update nginx.yml 2025-01-07 20:23:58 +01:00
fab
a9dd3e7a8d Update nginx.yml 2025-01-07 20:21:37 +01:00