Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error messages for invalid target configs #4204

Open
gemesa opened this issue Nov 12, 2024 · 0 comments
Open

Improve error messages for invalid target configs #4204

gemesa opened this issue Nov 12, 2024 · 0 comments
Labels

Comments

@gemesa
Copy link

gemesa commented Nov 12, 2024

Expected behavior

When adding new targets under Configuration --> Target --> New Target we sometimes enter invalid data such as an invalid host. In these cases it would be helpful if more specific errors were raised for the user such as Invalid host or Invalid excluded host instead of a generic Unknown Error (see below).

Actual behavior

When trying to save the target Unknown Error is raised:

image

In this example I only added a host so I could rather quickly identify the issue. But when configuring multiple settings (hosts, excluded hosts, credentials etc.) it can take time to figure out what went wrong exactly. Since an Unknown Error is raised there appears to be some form of input validation in place. It would be helpful if more specific error messages were raised such as Invalid host or Invalid excluded host.

Steps to reproduce

See above.

GVM versions

I am not sure how to check, I am running OpenVAS in Docker and installed it today following this guide.

Environment

Operating system:

$ uname -a            
Linux fedora 6.11.7-300.fc41.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov  8 19:23:10 UTC 2024 x86_64 GNU/Linux
                                                                                                                      
$ cat /etc/os-release
NAME="Fedora Linux"
VERSION="41 (Workstation Edition)"
RELEASE_TYPE=stable
ID=fedora
VERSION_ID=41
VERSION_CODENAME=""
PLATFORM_ID="platform:f41"
PRETTY_NAME="Fedora Linux 41 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:41"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f41/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=41
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=41
SUPPORT_END=2025-12-15
VARIANT="Workstation Edition"
VARIANT_ID=workstation

Installation method / source: https://greenbone.github.io/docs/latest/22.4/container/index.html

Logfiles

gsa-1                  | gsad  gmp-Message: 15:20:08.759: Authentication success for 'admin' from 172.18.0.1
gvmd-1                 | event target:MESSAGE:2024-11-12 15h22.06 utc:2912: Target could not be created by admin
gvmd-1                 | event target:MESSAGE:2024-11-12 15h22.47 utc:2927: Target could not be created by admin
@gemesa gemesa added the bug label Nov 12, 2024
@y0urself y0urself transferred this issue from greenbone/openvas-scanner Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant