-
Notifications
You must be signed in to change notification settings - Fork 80
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
Add: openvasd_get_performance() #900
base: main
Are you sure you want to change the base?
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. OpenSSF Scorecard
Scanned Files |
Depends on greenbone/openvas-scanner#1859 |
🔍 Vulnerabilities of
|
digest | sha256:442da6b75e135075dccbba118620d17fcb031b35b0776b07fe570510af8c77c9 |
vulnerabilities | |
size | 68 MB |
packages | 201 |
📦 Base Image debian:testing-20250224-slim
also known as |
|
digest | sha256:dd44ac7e9b6d7271b382c9bf5bce34920ecb1c3f2ec09426137a4e72de79fd11 |
vulnerabilities |
Description
Description
Description
Description
Description
Description
Description
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
Description
Description
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
Description
Description
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
Description
Description
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
|
curl_slist_free_all (customheader); | ||
if (response->code != RESP_CODE_ERR) | ||
response->body = g_strdup (openvasd_vt_stream_str (conn)); | ||
else if (response->code == RESP_CODE_ERR) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could drop the if
and just have the else
because the condition is always true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, this is like this everywhere in this file. I'm happy to do them all as a PR.
{ | ||
int start; /**< Start interval. */ | ||
int end; /**< End interval. */ | ||
char *titles; /**< Graph title. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
char *titles; /**< Graph title. */ | |
gchar *titles; /**< Graph title. */ |
"to scanner. Bad or missing parameters.\"}"); | ||
return response; | ||
} | ||
gchar *query = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to see more consistency with the declarations. All the others are at the top of the block, even for example hnd
which is first used below this.
Personally I'd also like you to drop the excess inits in general. Like response is set to NULL then it's set again basically straight away.
CURL *hnd = NULL; | ||
struct curl_slist *customheader = NULL; | ||
time_t now; | ||
time (&now); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
time (&now); | |
time (&now); |
What
Add: openvasd_get_performance()
Jira: SC-1039
Why
References
Checklist