From f4c6ec9a03dfc42e3b572b7f42ee0d144f18ba81 Mon Sep 17 00:00:00 2001 From: Jesper Kristensen Date: Tue, 21 May 2024 15:01:23 +0200 Subject: [PATCH] 1451: Added clam-av module and settings --- CHANGELOG.md | 2 ++ composer.json | 1 + composer.lock | 58 +++++++++++++++++++++++++++++- config/sync/clamav.settings.yml | 19 ++++++++++ config/sync/core.extension.yml | 1 + docker-compose.override.yml | 8 +++++ docker-compose.server.override.yml | 8 +++++ 7 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 config/sync/clamav.settings.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 998a9a27..c3d4381a 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ Versioning](https://semver.org/spec/v2.0.0.html). * [PR-409](https://github.com/itk-dev/hoeringsportal/pull/409) Enabled and configured log_stdout +* [PR-410](https://github.com/itk-dev/hoeringsportal/pull/410) + Added ClamAv module and docker containers to run it ## [4.4.0] - 2024-05-14 diff --git a/composer.json b/composer.json index 31135e2f..3156d6af 100755 --- a/composer.json +++ b/composer.json @@ -113,6 +113,7 @@ "drupal/better_social_sharing_buttons": "^4.0", "drupal/block_content_suggestions": "^1.0", "drupal/captcha": "^2.0", + "drupal/clamav": "^2.0", "drupal/color_field": "^3.0", "drupal/config_ignore": "^3.2", "drupal/config_import_locale": "^2.0", diff --git a/composer.lock b/composer.lock index e85960be..f4d918d6 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "61aa53a5a6375a828a96b9beb65bcc4e", + "content-hash": "9f54900187807a09a83d29e4f9eea304", "packages": [ { "name": "asm89/stack-cors", @@ -1940,6 +1940,62 @@ "issues": "https://www.drupal.org/project/issues/captcha" } }, + { + "name": "drupal/clamav", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/clamav.git", + "reference": "2.0.2" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/clamav-2.0.2.zip", + "reference": "2.0.2", + "shasum": "298f63201af7a4b25760f574e5561c6c4696324d" + }, + "require": { + "drupal/core": "^8 || ^9 || ^10" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "2.0.2", + "datestamp": "1692700952", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "adammalone", + "homepage": "https://www.drupal.org/user/1295980" + }, + { + "name": "James Andres", + "homepage": "https://www.drupal.org/user/33827" + }, + { + "name": "manarth", + "homepage": "https://www.drupal.org/user/321496" + }, + { + "name": "mcdruid", + "homepage": "https://www.drupal.org/user/255969" + } + ], + "description": "Integration with the ClamAV anti-virus scanner.", + "homepage": "https://www.drupal.org/project/clamav", + "support": { + "source": "https://git.drupalcode.org/project/clamav" + } + }, { "name": "drupal/color_field", "version": "3.0.0", diff --git a/config/sync/clamav.settings.yml b/config/sync/clamav.settings.yml new file mode 100644 index 00000000..378eec40 --- /dev/null +++ b/config/sync/clamav.settings.yml @@ -0,0 +1,19 @@ +_core: + default_config_hash: pfrv6lPS72f5WG1UB4wHkgQV2invlHwVpaCy_mY-ClQ +enabled: true +outage_action: 0 +overridden_schemes: + - library-definitions + - asset + - php-file + - translations +scan_mode: 0 +verbosity: 0 +mode_executable: + executable_path: /usr/bin/clamscan + executable_parameters: '' +mode_daemon_tcpip: + hostname: clamav + port: 3310 +mode_daemon_unixsocket: + unixsocket: /var/clamav/clamd diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index 0c76d5fe..43f590fd 100644 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -13,6 +13,7 @@ module: breakpoint: 0 captcha: 0 ckeditor5: 0 + clamav: 0 color_field: 0 config: 0 config_ignore: 0 diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 330fa69e..a67864ae 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -12,6 +12,14 @@ services: volumes: - .:/app:delegated + clamav: + image: clamav/clamav:1.2 + networks: + - app + ports: + - '3310' + - '7357' + playwright: # https://playwright.dev/docs/docker # This Playwright version should match the one in `package.json`. diff --git a/docker-compose.server.override.yml b/docker-compose.server.override.yml index 90db23c9..97b8845c 100644 --- a/docker-compose.server.override.yml +++ b/docker-compose.server.override.yml @@ -11,3 +11,11 @@ services: image: node:18 volumes: - .:/app:delegated + + clamav: + image: clamav/clamav:1.2 + networks: + - app + ports: + - '3310' + - '7357'