DeineAgenturUG / greenbone-gvm-openvas-for-docker

The Greenbone Vulnerability Management (GVM) and OpenVAS Scanner for Docker!
MIT License
24 stars 7 forks source link

[Bug] AUTO_SYNC parameter is inconsistent with other parameters #21

Closed miyoyo closed 2 years ago

miyoyo commented 2 years ago

Describe the bug The "AUTO_SYNC" Parameter requires the variable to exactly be YES, otherwise, it will not be enabled.

To Reproduce Steps to reproduce the behavior:

  1. Start a container with "AUTO_SYNC" set to "true"
  2. Observe that no connection to feed.community.greenbone.net happens, and running the sync script manually exits instantly
  3. Kill the container
  4. Restart a new container with "AUTO_SYNC" set to "YES", or unset
  5. Observe that the container syncs normally now

Expected behavior This is inconsistent with other variables, such as HTTPS or SSHD, which use 'true' instead The default docker-compose.yml also contains AUTO_SYNC set to "true" instead of "YES".

Image in use:

``` [ { "Id": "sha256:93b98fade5062160f2599319664584fed70c326d0b3adb249741d6d31b80183d", "RepoTags": [ "deineagenturug/gvm:latest-full" ], "RepoDigests": [ "deineagenturug/gvm@sha256:c2c60e5dd8df68d30e28843a007e6bb8b154a76b4a470e1d7b43809804823ddd" ], "Parent": "", "Comment": "buildkit.dockerfile.v0", "Created": "2022-04-04T21:16:42.23403662Z", "Container": "", "ContainerConfig": { "Hostname": "", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": false, "AttachStderr": false, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": null, "Cmd": null, "Image": "", "Volumes": null, "WorkingDir": "", "Entrypoint": null, "OnBuild": null, "Labels": null }, "DockerVersion": "", "Author": "", "Config": { "Hostname": "", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": false, "AttachStderr": false, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "POSTGRESQL_VERSION=13", "GSAD_VERSION=21.4.4", "GSA_VERSION=21.4.4", "GVM_LIBS_VERSION=21.4.4", "GVMD_VERSION=21.4.5", "OPENVAS_SCANNER_VERSION=21.4.4", "OPENVAS_SMB_VERSION=21.4.0", "PYTHON_GVM_VERSION=21.11.0", "OSPD_OPENVAS_VERSION=21.4.4", "GVM_TOOLS_VERSION=21.10.0", "SYSTEM_DIST=debian", "SUPVISD=supervisorctl", "USERNAME=admin", "PASSWORD=adminpassword", "PASSWORD_FILE=none", "TIMEOUT=15", "DEBUG=N", "RELAYHOST=smtp", "SMTPPORT=25", "AUTO_SYNC=YES", "AUTO_SYNC_ON_START=YES", "HTTPS=true", "CERTIFICATE=none", "CERTIFICATE_KEY=none", "TZ=Etc/UTC", "SSHD=false", "DB_PASSWORD=none", "DB_PASSWORD_FILE=none", "DEBIAN_FRONTEND=noninteractive", "LANG=en_US.UTF-8", "SETUP=0", "OPT_PDF=1", "LANGUAGE=en_US.UTF-8", "LC_ALL=en_US.UTF-8" ], "Cmd": [ "/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf" ], "ArgsEscaped": true, "Image": "", "Volumes": null, "WorkingDir": "", "Entrypoint": [ "/opt/setup/scripts/entrypoint.sh" ], "OnBuild": null, "Labels": null }, "Architecture": "amd64", "Os": "linux", "Size": 965144981, "VirtualSize": 965144981, "GraphDriver": { "Data": { "LowerDir": "/var/lib/docker/overlay2/0b143a79bbb8baba8626f54cc92280e5085fea548c7f08cd1dc51c8a797f09b5/diff:/var/lib/docker/overlay2/b2a1bacbfa3cec884004db0c50677d7d191cf35fad799407686eaea8d23a502a/diff:/var/lib/docker/overlay2/3b853913a901b8e81e5069a5f65803159a51906d6c004570ccb5a0a1c6b61207/diff:/var/lib/docker/overlay2/94ba03c7ed20639f10b0c6f7d50e5b7dba4dabac9b1799c095b4bdf187344092/diff:/var/lib/docker/overlay2/8c7252c6a544396529d2e81c69104534abcd73455bbd621fd97bef3a28b4f9f9/diff:/var/lib/docker/overlay2/63261b1bcc9e00a75b1d7c47ab8966680e3b905b344bc5646c013b0178dbb9d4/diff:/var/lib/docker/overlay2/ae01a0fa879f6864960c24c0b384edff135b4ee93749f4a21853876e0da5d8fe/diff:/var/lib/docker/overlay2/4aff15d288d69f6b8c135c6e13cfb768aec0f9596e1395e0fc77bce4d4ecdb0f/diff:/var/lib/docker/overlay2/4897efff72c3ed3ac7be27aeb8ab5ecb1f0c548524123b46ddf6725165cb687e/diff", "MergedDir": "/var/lib/docker/overlay2/e2f025b6a7b74354b0e17e893fdc93c197c5f8cb1f9be4aabd654d9783fa864d/merged", "UpperDir": "/var/lib/docker/overlay2/e2f025b6a7b74354b0e17e893fdc93c197c5f8cb1f9be4aabd654d9783fa864d/diff", "WorkDir": "/var/lib/docker/overlay2/e2f025b6a7b74354b0e17e893fdc93c197c5f8cb1f9be4aabd654d9783fa864d/work" }, "Name": "overlay2" }, "RootFS": { "Type": "layers", "Layers": [ "sha256:608f3a074261105f129d707e4d9ad3d41b5baa94887f092b7c2857f7274a2fce", "sha256:dba9a9d326ff41d40374d80b4744f7ff1b92eabc38fb98624687ce5fc3d77f95", "sha256:c9751b15e693833f5f9bae8095f7da479f61f69eb46ffb63616268988dd06d9d", "sha256:8fd799d5fdf62138333617e9aaa47a794bdeab920b39ad2b01ad95a8f44e3807", "sha256:0169458c97dccd26028b459f993dc7d0c52d0e56e15ad6273ade503f0b53575b", "sha256:5803f7c8296e77576eca0ff1debc3e2646ac656ef3b7debd0ce91bb977df07ab", "sha256:fbbe20f7b55acd80eb478bcb6f971b89a0b92123d538b90176cba6100ed378b0", "sha256:2d3f877edc2f2d55e0018f97d6a3152664a13bbd085a45e4bc18dbc89d80f4dc", "sha256:3a8e777b35857f3631aa9e825a15724c6ceb0085475a6292464d9e3da7577cbd", "sha256:958715c7e3385b3206a2365b69038c95f4337f9f18923b1296bc6cdd63da9c36" ] }, "Metadata": { "LastTagTime": "0001-01-01T00:00:00Z" } } ] ```
miyoyo commented 2 years ago

Missed #15, my bad