From 162eb04a748a19a93c5dbaaa977c693c961f6ccf Mon Sep 17 00:00:00 2001 From: bigbear Date: Thu, 8 Feb 2024 02:35:30 +0100 Subject: PR405 - icons for computer/security --- modules/computer.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/computer.c b/modules/computer.c index a235efc9..cfa6bb3c 100644 --- a/modules/computer.c +++ b/modules/computer.c @@ -668,9 +668,16 @@ gchar *callback_security(void) continue; const gchar *icon = NULL; + if (g_strstr_len(contents, -1, "Not affected") ) + icon = "circle_green_check.svg"; + + if (g_str_has_prefix(contents, "Mitigation:") || + g_str_has_prefix(contents, "mitigation:")) + icon = "circle_yellow_exclaim.svg"; + if (g_strstr_len(contents, -1, "Vulnerable") || g_strstr_len(contents, -1, "vulnerable")) - icon = "dialog-warning.png"; + icon = "circle_red_x.svg"; info_group_add_fields(vulns, info_field(g_strdup(vuln), -- cgit v1.2.3