{"id":18906621,"url":"https://github.com/claranet/ansible-role-log4shell","last_synced_at":"2025-04-15T04:31:39.504Z","repository":{"id":45368835,"uuid":"437949273","full_name":"claranet/ansible-role-log4shell","owner":"claranet","description":"Find Log4Shell CVE-2021-44228 on your system","archived":false,"fork":false,"pushed_at":"2024-06-20T08:48:06.000Z","size":37,"stargazers_count":11,"open_issues_count":2,"forks_count":5,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-03-28T00:34:25.542Z","etag":null,"topics":["ansible","claranet","log4j","log4shell","role"],"latest_commit_sha":null,"homepage":"","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/claranet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-13T16:41:31.000Z","updated_at":"2023-11-16T14:11:42.000Z","dependencies_parsed_at":"2022-08-30T04:01:10.320Z","dependency_job_id":null,"html_url":"https://github.com/claranet/ansible-role-log4shell","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claranet%2Fansible-role-log4shell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claranet%2Fansible-role-log4shell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claranet%2Fansible-role-log4shell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claranet%2Fansible-role-log4shell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/claranet","download_url":"https://codeload.github.com/claranet/ansible-role-log4shell/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249006449,"owners_count":21197279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["ansible","claranet","log4j","log4shell","role"],"created_at":"2024-11-08T09:17:08.058Z","updated_at":"2025-04-15T04:31:39.160Z","avatar_url":"https://github.com/claranet.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible role - log4shell\n[![Maintainer](https://img.shields.io/badge/maintained%20by-claranet-e00000?style=flat-square)](https://www.claranet.fr/)\n[![License](https://img.shields.io/github/license/claranet/ansible-role-log4shell?style=flat-square)](LICENSE)\n[![Release](https://img.shields.io/github/v/release/claranet/ansible-role-log4shell?style=flat-square)](https://github.com/claranet/ansible-role-log4shell/releases)\n[![Status](https://img.shields.io/github/workflow/status/claranet/ansible-role-log4shell/Ansible%20Molecule?style=flat-square\u0026label=tests)](https://github.com/claranet/ansible-role-log4shell/actions?query=workflow%3A%22Ansible+Molecule%22)\n[![Ansible version](https://img.shields.io/badge/ansible-%3E%3D4-black.svg?style=flat-square\u0026logo=ansible)](https://github.com/ansible/ansible)\n[![Ansible Galaxy](https://img.shields.io/badge/ansible-galaxy-black.svg?style=flat-square\u0026logo=ansible)](https://galaxy.ansible.com/claranet/log4shell)\n\n\n\u003e :star: Star us on GitHub — it motivates us a lot!\n\nFind Log4Shell CVE-2021-44228 on your system\n\nThis role tries to find JAR and WAR from filesystem and from opened files (lsof)\n\n:warning: Your system may runs slowly during the scan due to a `find` on `/` and the unarchive process to lookup inside the JARs/WARs\n\nThis role populates the variable `log4shell_analyze_versions` with a dictionary like this one:\n```\n{\n    \"/tmp/rundeck.war\": {\n        \"version\": \"2.13.2\",\n        \"type\": \"war\",\n        \"jndilookup\": false\n    },\n    \"/tmp/apache-log4j-2.12.1-bin/log4j-core-2.12.1.jar\": {\n        \"version\": \"2.12.1\",\n        \"type\": \"jar\",\n        \"jndilookup\": true\n    },\n    \"/tmp/apache-log4j-2.12.1-bin/log4j-core-2.12.1-tests.jar\": {\n        \"version\": \"2.12.1\",\n        \"type\": \"jar\",\n        \"jndilookup\": false\n    }\n}\n```\n\nThe key is the path where the role has found the log4j library.\n\nThe value is a dictionary containing the log4j version in `version`, the file type in `type` (war/jar) and and the key `jndilookup` which tells you if the file `org/apache/logging/log4j/core/lookup/JndiLookup.class` is present in a jar\n\nA JAR without JndiLookup.class is not vulnerable according to [https://www.kb.cert.org/vuls/id/930724](https://www.kb.cert.org/vuls/id/930724)\n\n\n## :warning: Requirements\n\nAnsible \u003e= 4\n\n## :zap: Installation\n\n```bash\nansible-galaxy install claranet.log4shell\n```\n\n## :gear: Role variables\n\nVariable                | Default value | Description\n------------------------|---------------|------------------------\nlog4shell_scan_path     | /             | Filesystem path to scan\n\n## :arrows_counterclockwise: Dependencies\n\nN/A\n\n## :pencil2: Example Playbook\n\n```yaml\n---\n- hosts: all\n  roles:\n    - role: claranet.log4shell\n      log4shell_scan_path: /opt\n```\n\n## :closed_lock_with_key: [Hardening](HARDENING.md)\n\n## :heart_eyes_cat: [Contributing](CONTRIBUTING.md)\n\n## :copyright: [License](LICENSE)\n\n[Mozilla Public License Version 2.0](https://www.mozilla.org/en-US/MPL/2.0/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclaranet%2Fansible-role-log4shell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclaranet%2Fansible-role-log4shell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclaranet%2Fansible-role-log4shell/lists"}