{"id":25074882,"url":"https://github.com/farisc0de/ansible-role-modsecurity","last_synced_at":"2026-02-17T10:04:22.251Z","repository":{"id":273003717,"uuid":"915961221","full_name":"farisc0de/ansible-role-modsecurity","owner":"farisc0de","description":"Ansible Role to Install and Configure Apache mod_security2","archived":false,"fork":false,"pushed_at":"2025-01-18T00:07:14.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-26T20:29:58.809Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/farisc0de.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-13T07:30:16.000Z","updated_at":"2025-01-18T00:07:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"8ce30424-dc0b-4384-814e-cfcd8406f610","html_url":"https://github.com/farisc0de/ansible-role-modsecurity","commit_stats":null,"previous_names":["farisc0de/ansible-role-modsecurity"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/farisc0de/ansible-role-modsecurity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farisc0de%2Fansible-role-modsecurity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farisc0de%2Fansible-role-modsecurity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farisc0de%2Fansible-role-modsecurity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farisc0de%2Fansible-role-modsecurity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/farisc0de","download_url":"https://codeload.github.com/farisc0de/ansible-role-modsecurity/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farisc0de%2Fansible-role-modsecurity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29539974,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T08:11:05.436Z","status":"ssl_error","status_checked_at":"2026-02-17T08:09:38.860Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-07T00:19:31.461Z","updated_at":"2026-02-17T10:04:22.219Z","avatar_url":"https://github.com/farisc0de.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible Role: ModSecurity\n\nThis Ansible role installs and configures ModSecurity with OWASP Core Rule Set (CRS) for Apache web server. ModSecurity is an open-source web application firewall (WAF) that provides real-time web application monitoring, logging, and access control.\n\n## Requirements\n\n- Apache2 web server installed\n- Ansible 2.9 or higher\n- Debian/Ubuntu Linux (other distributions may work but are not tested)\n\n## Role Variables\n\n### Main Configuration\n\n```yaml\n# Enable/disable ModSecurity\nmodsecurity_enabled: true\n\n# Set ModSecurity to detection-only mode (no blocking)\nmodsecurity_detection_only: false\n\n# Audit log parts to be recorded\nmodsecurity_audit_log_parts: \"ABCEFHJKZ\"\n```\n\n### OWASP CRS Configuration\n\n```yaml\n# OWASP CRS version to install\nmodsecurity_crs_version: \"3.3.5\"\n\n# Enable/disable OWASP CRS\nmodsecurity_crs_enabled: true\n```\n\n### Path Configuration\n\nThe role uses OS-specific paths that are automatically set based on the target system. These can be overridden if needed:\n\n```yaml\nmodsecurity_conf_path: \"{{ _modsecurity_conf_path }}\"\nmodsecurity_recommended_conf: \"{{ _modsecurity_recommended_conf }}\"\nmodsecurity_apache_config: \"{{ _apache_modsecurity_config }}\"\n```\n\n## Dependencies\n\nNone.\n\n## Example Playbook\n\n```yaml\n- hosts: webservers\n  roles:\n    - role: farisc0de.modsecurity\n      vars:\n        modsecurity_enabled: true\n        modsecurity_detection_only: true  # Set to false in production\n        modsecurity_crs_enabled: true\n```\n\n## Tags\n\n- `modsecurity`: Configure ModSecurity\n- `owasp_crs`: Install and configure OWASP CRS\n- `always`: Tasks that should always run\n\n## License\n\nMIT\n\n## Author Information\n\nThis role was created by [Faris AL-Otaibi](https://github.com/farisc0de).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarisc0de%2Fansible-role-modsecurity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffarisc0de%2Fansible-role-modsecurity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarisc0de%2Fansible-role-modsecurity/lists"}