Files
patterns/THIRD_PARTY_NOTICES.md
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

5.6 KiB

Third-Party Notices

patterns does not author its detection rules from scratch. It fetches, parses, and converts rule and blocklist data published by third-party projects into the native configuration syntax of Nginx, Apache, Traefik, and HAProxy.

The original code of this project — the Python converters (owasp2json.py, json2nginx.py, json2apache.py, json2traefik.py, json2haproxy.py, badbots.py, import_*.py), the documentation, and the tests — is licensed under the MIT License (Copyright (c) Fabrizio Salmi).

The generated data is a different matter. The following artifacts are not original works of this project; they are generated / derived artifacts built from the upstream sources listed below, and they are redistributed under the upstream licenses, not under this project's MIT license:

  • owasp_rules.json — intermediate JSON extracted from the OWASP Core Rule Set.
  • waf_patterns/** — the per-platform WAF configurations converted from that JSON and from the bad-bot / referrer-spam blocklists.

Each source below states what it provides, its SPDX license identifier, and the attribution it requires. Where a project's license text is required to accompany redistribution, a copy is included in the LICENSES/ directory.


OWASP Core Rule Set (CRS)

  • Upstream: https://github.com/coreruleset/coreruleset
  • Provides: the WAF detection rules (SQLi, XSS, RCE, LFI, RFI, generic anomaly and protocol-violation patterns). owasp2json.py downloads the CRS .conf rule files, extracts the SecRule patterns, and writes them to owasp_rules.json; the json2*.py converters then transform that JSON into waf_patterns/nginx/, waf_patterns/apache/, waf_patterns/traefik/, and waf_patterns/haproxy/.
  • SPDX license: Apache-2.0
  • License copy: LICENSES/Apache-2.0.txt (included to satisfy Apache-2.0 §4(a): recipients of the redistributed material must receive a copy of the License).
  • Attribution and required notices:
    • Copyright © the OWASP® CRS project and its contributors.
    • Modification / "state changes" notice (Apache-2.0 §4(b)): the files owasp_rules.json and everything under waf_patterns/** are derived and converted works. The original CRS SecRule directives have been parsed, filtered, reformatted, and translated into Nginx map/if directives, Apache ModSecurity SecRule sets, Traefik middleware TOML, and HAProxy ACL files. These outputs are not the unmodified OWASP Core Rule Set and are not endorsed by the OWASP CRS project. Every generated file additionally carries a provenance header (or, for owasp_rules.json, a top-level _provenance key) recording the CRS reference it was built from and pointing back to this file.
    • "OWASP" is a registered trademark of the OWASP Foundation. This project is not affiliated with or endorsed by the OWASP Foundation.

Crawler-Detect (JayBizzle)

  • Upstream: https://github.com/JayBizzle/Crawler-Detect

  • Provides: part of the bad-bot User-Agent list consumed by badbots.py (raw/Crawlers.txt), used to generate the bots.* files under waf_patterns/**.

  • SPDX license: MIT

  • Required copyright notice:

    MIT License
    
    Copyright (c) 2015-2020 Mark Beech
    
    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction ... (full MIT terms as published upstream).
    

nginx-ultimate-bad-bot-blocker (mitchellkrogza)

  • Upstream: https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker

  • Provides: part of the bad-bot User-Agent list consumed by badbots.py (_generator_lists/bad-user-agents.list), used to generate the bots.* files under waf_patterns/**.

  • SPDX license: MIT

  • Required copyright notice:

    MIT License
    
    Copyright (c) 2017 Mitchell Krog - mitchellkrog@gmail.com
    
    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction ... (full MIT terms as published upstream).
    

referrer-spam-blacklist (Matomo / piwik)

  • Upstream: https://github.com/matomo-org/referrer-spam-blacklist (fetched by badbots.py via the legacy piwik/referrer-spam-blacklist path, spammers.txt).
  • Provides: the referrer-spam domain list used as an additional signal when generating the bots.* files under waf_patterns/**.
  • SPDX license: none — the project is released into the Public Domain ("Public Domain (no copyright)", per the upstream README/LICENSE).
  • Attribution: none legally required. Credit is given here voluntarily.

Summary

Upstream source Provides SPDX License copy
coreruleset/coreruleset owasp_rules.json, waf_patterns/** rules Apache-2.0 LICENSES/Apache-2.0.txt
JayBizzle/Crawler-Detect bad-bot User-Agent list MIT notice above
mitchellkrogza/nginx-ultimate-bad-bot-blocker bad-bot User-Agent list MIT notice above
matomo-org/referrer-spam-blacklist referrer-spam domain list Public Domain

If you redistribute the generated artifacts (for example the release archives nginx_waf.zip, apache_waf.zip, traefik_waf.zip, haproxy_waf.zip, or the files under waf_patterns/**), you must keep this notice and the accompanying LICENSES/ directory with them.