lucab85.ansible_role_log4shell
luacb85.ansible_role_log4shell
対象のLinuxホストを調査するためのAnsibleロールです。このロールは、Log4Shell(CVE-2021-44228)のための公式Red Hat Log4j検出スクリプトRHSB-2021-009を使用します。
Red Hatバージョン1.3検出器 2022-01-10でテスト済みです。
Ansibleプレイブック
コードはAnsibleプレイブックとしても利用可能です: lucab85/log4j-cve-2021-44228
要件
ansible 2.9以上
ロール変数
デフォルトの変数値 - defaults/main.yml:
sh_detector: "cve-2021-44228--2022-01-10-1242.sh"
sh_signature: 'cve-2021-44228--2022-01-10-1242.sh.asc'
detector_baseurl: 'https://access.redhat.com/sites/default/files/'
detector_path: "/var/"
detector_dir: "/opt/cve-2021-44228/"
detector_run_dir: 'tmp'
detector_options: '-n -d --no-progress --scan {{ detector_path }}'
gpg_keyid: '7514F77D8366B0D9'
gpg_server: "pgp.mit.edu"
clean_run_before: true
delete_after: true
verify_gpg: false
sh_detector: 検出器バッシュスクリプトファイルのファイル名sh_signature: 検出器GPG署名ファイルのファイル名detector_baseurl: ファイルをダウンロードするためのベースURLdetector_path: 調査するパス(デフォルト/var/)detector_dir: 検出器のダウンロードパス(デフォルトdetector_dir-/opt/cve-2021-44228/)注意: ボリュームは実行権限が必要です!detector_run_dir: 実行前に作成するサブディレクトリ(デフォルトtmp)detector_options: 検出器スクリプトのコマンドラインオプション(デフォルト-n -d --no-progress --scan {{ detector_path }})gpg_keyid: 検証用にダウンロードするGPG公開鍵(デフォルト Red Hat Product Security7514F77D8366B0D9)gpg_server: GPG公開鍵をダウンロードするGPGサーバー(デフォルトpgp.mit.edu)clean_run_before: 実行前に走行ディレクトリを削除し再作成(デフォルトtrue)delete_after: 実行後に detector_dir を削除(デフォルトfalse)verify_gpg: GPG署名のダウンロードと検証を行う(デフォルト:false)
依存関係
なし。
ダウンロード
最初にAnsibleロールの最新バージョンをダウンロードします: lucab85.ansible_role_log4shell Ansible Galaxy:
ansible-galaxy install lucab85.ansible_role_log4shell
例プレイブック
以下は lucab85.ansible_role_log4shell ロールの使用例(引数として変数を渡す場合)です:
---
- name: 検出器を実行
hosts: all
become: true
roles:
- role: lucab85.ansible_role_log4shell
detector_path: "/var/www"
ライセンス
MIT / BSD
著者情報
このロールは2021年にLuca Bertonによって作成されました。Ansible Pilotの著者です。
Ansible Pilot
詳細情報:
寄付
サポートありがとうございます:
プロジェクトについて
Ansible playbook to verify target Linux hosts using the official Red Hat Log4j detector script RHSB-2021-009 version 1.2 2021-12-20 for Log4Shell (CVE-2021-44228).
インストール
ansible-galaxy install lucab85.ansible_role_log4shellライセンス
mit
ダウンロード
316
所有者
Ansible Automation Engineer with Open Source passion: (Ansible, Progressive Web Applications, Cloud Computing, IoT, GNU/Linux)
