268 Commits

Author SHA1 Message Date
fab
e5a7698724
Update README.md 2025-01-03 13:52:23 +01:00
github-actions[bot]
59dcd5155b Update: [Fri Jan 3 12:50:02 UTC 2025] 2025-01-03 12:50:02 +00:00
fab
76e6ccb5ce
Update update_patterns.yml 2025-01-03 13:49:41 +01:00
github-actions[bot]
8d87f12930 Update: [Fri Jan 3 12:48:10 UTC 2025] 2025-01-03 12:48:10 +00:00
fab
0b2aa45d4f
Update update_patterns.yml 2025-01-03 13:47:44 +01:00
github-actions[bot]
9c26633edc Update: [Fri Jan 3 12:45:52 UTC 2025] 2025-01-03 12:45:52 +00: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
github-actions[bot]
d27e602eb2 Update: [Fri Jan 3 12:40:41 UTC 2025] 2025-01-03 12:40:41 +00:00
fab
88ff40dc10
Update update_patterns.yml 2025-01-03 13:40:18 +01:00
github-actions[bot]
0dfd63699d Update: [Fri Jan 3 12:38:40 UTC 2025] 2025-01-03 12:38:40 +00:00
fab
a03fd54da8
Update update_patterns.yml 2025-01-03 13:38:18 +01:00
github-actions[bot]
e3416a1bad Update: [Fri Jan 3 12:36:53 UTC 2025] 2025-01-03 12:36:53 +00:00
fab
65429e6a70
Update update_patterns.yml 2025-01-03 13:36:20 +01:00
github-actions[bot]
92e6b34844 Update: [Fri Jan 3 12:35:31 UTC 2025] 2025-01-03 12:35:31 +00:00
fab
87ed3d33b2
Update update_patterns.yml 2025-01-03 13:35:05 +01:00
github-actions[bot]
2a6d69c159 Update: [Fri Jan 3 12:33:57 UTC 2025] 2025-01-03 12:33:57 +00:00
fab
9979cba21e
Update update_patterns.yml 2025-01-03 13:33:35 +01:00
github-actions[bot]
cb25ab6582 Update: [Fri Jan 3 12:31:45 UTC 2025] 2025-01-03 12:31:45 +00:00
fab
1f4aefe3ad
Update update_patterns.yml 2025-01-03 13:31:22 +01:00
fab
c7e6223731
Delete waf_patterns/caddy directory 2025-01-03 13:28:13 +01:00
github-actions[bot]
911e47401b Update: [Fri Jan 3 12:26:53 UTC 2025] 2025-01-03 12:26:53 +00:00
fab
add09f044a
Update README.md 2025-01-03 13:25:16 +01:00
fab
472b26aef4
Update README.md 2025-01-03 13:24:40 +01:00
fab
9aba2163c2
Update owasp.py
Minor improvements.
2025-01-03 13:22:31 +01:00
fab
61e1a856c9
Update badbots.py
Improved error handling, logging and code structure.
2025-01-03 13:20:01 +01:00
fab
2356cdcff0
Update owasp2nginx.py 2025-01-03 13:18:21 +01:00
fab
8dcbfbeda4
Update import_nginx_waf.py 2025-01-03 13:17:55 +01:00
fab
a93481de4f
Update import_nginx_waf.py 2025-01-03 13:17:10 +01:00
fab
7ada922222
Update owasp2nginx.py 2025-01-03 13:16:19 +01:00
fab
77cecae490
Update import_haproxy_waf.py 2025-01-03 13:15:27 +01:00
fab
2c1401c1cf
Update owasp2haproxy.py
- Error Handling:
    - Added error handling for file operations, JSON parsing, and invalid rule structures.
    - Logs warnings for invalid rules instead of crashing.

- Path Handling:
    - Used pathlib.Path for better path manipulation and readability.
Made paths configurable via environment variables.

- Logging:
    - Replaced print() with Python's logging module for more flexible and structured logging.

- Input Validation:
    - Added checks for missing keys in the input JSON file.

- Rule Formatting:
    - Ensured proper formatting of HAProxy ACL rules.

- Output Directory Permissions:
    - Ensured the output directory is created with parents=True to handle nested directories.

- Code Structure:
    - Encapsulated the main logic in a main() function for better organization.
    - Added docstrings to functions for clarity.
2025-01-03 13:14:27 +01:00
fab
4655a25c4d
Update import_apache_waf.py
- Error Handling: Added try-except blocks to handle file operations, subprocess commands, and permission issues. Logs detailed error messages for debugging.
- Path Handling: Used pathlib.Path for better path manipulation and readability. Made paths configurable via environment variables.
- File Permissions: Ensured the target directory is created with parents=True to handle nested directories. Checked if files already exist in the target directory to avoid unnecessary overwrites.
- Logging: Added more detailed logging for better transparency and debugging.
- Subprocess Security: Added checks for apachectl and systemctl commands to ensure compatibility with supported systems.
- Input Validation: Validated the existence of .conf files before copying them.
- Code Structure: Encapsulated the main logic in a main() function for better organization.
- Added docstrings to functions for clarity.
2025-01-03 13:12:12 +01:00
fab
55297a76cf
Update owasp2apache.py
- Error Handling: Added error handling for file operations, JSON parsing, and invalid rule structures. Logs warnings for invalid rules instead of crashing.
- Unique Rule IDs: Each rule is assigned a unique id to avoid collisions in ModSecurity.
- Path Handling: Used pathlib.Path for better path manipulation and readability.
- Logging: Replaced print() with Python's logging module for more flexible and structured logging.
- Input Validation: Added checks for missing keys in the input JSON file.
- Template for Rules: Used a template string (MODSEC_RULE_TEMPLATE) for consistent rule formatting.
- Output Directory Permissions: Ensured the output directory is created with parents=True to handle nested directories.
2025-01-03 13:09:05 +01:00
fab
e59be8dd91
Update import_traefik_waf.py
Minor improvements,
2025-01-03 13:06:49 +01:00
fab
c7a580c983
Update owasp2traefik.py
Should fix resulting exported rules to match Traefik standards.
2025-01-03 11:31:58 +01:00
github-actions[bot]
93271ca213 Update: [Fri Jan 3 00:25:56 UTC 2025] 2025-01-03 00:25:56 +00: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
75770a28ce
Update README.md 2025-01-02 19:08:47 +01:00
fab
af94e34764
Update README.md
Caddy support removed. Please check and contribute to the caddy-waf project [here](https://github.com/fabriziosalmi/caddy-waf).
2025-01-02 19:08:12 +01:00
fab
e6b1df2016
Delete waf_patterns/caddy directory 2025-01-02 19:05:52 +01:00
fab
25bae0e731
Delete owasp2caddy.py 2025-01-02 19:05:36 +01:00
fab
62e615c33b
Delete import_caddy_waf.py 2025-01-02 19:05:22 +01:00
fab
46a5414dcf
Update README.md 2025-01-02 13:56:42 +01:00
github-actions[bot]
a98af4e049 Update: [Wed Jan 1 11:56:40 UTC 2025] 2025-01-01 11:56:40 +00:00
fab
9f1266f81f
Update badbots.py
parsing fixes
2025-01-01 12:56:12 +01:00
github-actions[bot]
0c9e469587 Update: [Wed Jan 1 00:28:50 UTC 2025] 2025-01-01 00:28:50 +00:00
github-actions[bot]
9c9068b34e Update: [Tue Dec 31 00:25:45 UTC 2024] 2024-12-31 00:25:45 +00:00
github-actions[bot]
204e19f8c2 Update: [Mon Dec 30 00:27:08 UTC 2024] 2024-12-30 00:27:08 +00:00
github-actions[bot]
3760d3dcde Update: [Sun Dec 29 23:20:18 UTC 2024] 2024-12-29 23:20:18 +00:00