From patchwork Thu Mar 21 20:51:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 7653 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4V0yLF2n38z3wkd for ; Thu, 21 Mar 2024 20:51:33 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4V0yLC1ZcNznn; Thu, 21 Mar 2024 20:51:31 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4V0yLB53fcz32qp; Thu, 21 Mar 2024 20:51:30 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4V0yL75q4wz32qp for ; Thu, 21 Mar 2024 20:51:27 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4V0yL511N4zn8; Thu, 21 Mar 2024 20:51:24 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1711054285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=kbJZd06lpIDdN6bG7FzA4j10RVAgHP+++sccV6udjDM=; b=98GFBXWg1LMm5F0/Bq179DDIVXlWlIXHrekQOelFbgBovwrA0QoO5h73lneS9oqdxDfSBy f3wLUsoZ2n9TPbDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1711054285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=kbJZd06lpIDdN6bG7FzA4j10RVAgHP+++sccV6udjDM=; b=bLUz4Lx1EHx0s2a32Fj2s9cN97d2TAEKMrKZokQ+6L7Do0SYIyWhmZtK8KNcafTlrEPMe5 AsLqlB3oAT4WgF+nkGDPiskBl2hJ9qNHUoVyywrsECUzi0RHJ4LBlYK05i83EioQ//gvmj iDdFH7EtOAoSpp79QSPPuQWJbwWT21+rSvBvtkDKv34mMlV/lMzIZLE19eYsugW3Cmempf KlhzvUxC0BBxGmqav9oe30DK3YeSO/SQXSOCETbpCGma5KlIqKKAtaKzWr2rv47BkvE9eB feGr/UD5WJSk9cvEbrp7DHJdsMI1eWKhmpRuNucntpk+owDhu3irmfHIiUT1Uw== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH 1/5] ids-functions.pl: Improve logic to get the cached rulesfile of a provider Date: Thu, 21 Mar 2024 21:51:14 +0100 Message-Id: <20240321205118.382948-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: H2WUGZDSFOE2UDSTLHBDZGAW2HXIA3XN X-Message-ID-Hash: H2WUGZDSFOE2UDSTLHBDZGAW2HXIA3XN X-MailFrom: stefan.schantl@ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Signed-off-by: Stefan Schantl --- config/cfgroot/ids-functions.pl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/config/cfgroot/ids-functions.pl b/config/cfgroot/ids-functions.pl index d97431b4a..c29a5151f 100644 --- a/config/cfgroot/ids-functions.pl +++ b/config/cfgroot/ids-functions.pl @@ -1027,11 +1027,14 @@ sub _store_error_message ($) { sub _get_dl_rulesfile($) { my ($provider) = @_; - # Check if the requested provider is known. - if ($IDS::Ruleset::Providers{$provider}) { - # Gather the download type for the given provider. - my $dl_type = $IDS::Ruleset::Providers{$provider}{'dl_type'}; + # Abort if the requested provider is not known. + return unless($IDS::Ruleset::Providers{$provider}); + # Try to gather the download type for the given provider. + my $dl_type = $IDS::Ruleset::Providers{$provider}{'dl_type'}; + + # Check if a download type could be grabbed. + if ($dl_type) { # Obtain the file suffix for the download file type. my $suffix = $dl_type_to_suffix{$dl_type}; From patchwork Thu Mar 21 20:51:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 7654 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4V0yLR5KJpz3wkd for ; Thu, 21 Mar 2024 20:51:43 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4V0yLC43SxzFLg; Thu, 21 Mar 2024 20:51:31 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4V0yLC06W9z32v7; Thu, 21 Mar 2024 20:51:31 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4V0yL76j4Xz32qp for ; Thu, 21 Mar 2024 20:51:27 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4V0yL73vYFznn; Thu, 21 Mar 2024 20:51:27 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1711054287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mGn8/YjpOw1x3yvrMD2zKvgCeoUF7p7vCJPgDemLjJw=; b=K2T+hyiyCg6m6IOeo+GmUTFwR53Cko3qyXiZ/nLdTtKP30mCzdBr5woeDotzW/8n0GDJqj rxFAYvNj7OZ0siBw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1711054287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mGn8/YjpOw1x3yvrMD2zKvgCeoUF7p7vCJPgDemLjJw=; b=uPBq2xU8zI9NSnP8Mljrv39kzHbYQUYevAvVYiQWDsLCKgtbjnCl9U/ITUSjxOwCQCiTyn O8wYIgjNyaBpza4KcybriMRR7O/ZXaiwT7j7znaxD8vMyMxJNevfy+DnkrlvpHW8+0qXQL 7NT897USnWSSzdEUtNbzwoWYTQDJfd9NBzss2jOYM9zzAfE6hk6gAfU3drdqP0n/7GJfdg ezyhhnrXQF5r8AKZqaXHz1nhmlfhh/8lCX/pvt/Y9jj7s9agrK+nffILsAqd4nNpn5lgIu w2KMe6TO2VSb50Yip6OuP6XfKP+9dNVS2eSGsHrYTQA/jypGNl9ZsDF3lIAAkg== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH 2/5] ids.cgi: Change check if a provider is not longer supported Date: Thu, 21 Mar 2024 21:51:15 +0100 Message-Id: <20240321205118.382948-2-stefan.schantl@ipfire.org> In-Reply-To: <20240321205118.382948-1-stefan.schantl@ipfire.org> References: <20240321205118.382948-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: YE5BW745JGQC27QWMBVOJZCIY74RG4I5 X-Message-ID-Hash: YE5BW745JGQC27QWMBVOJZCIY74RG4I5 X-MailFrom: stefan.schantl@ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This check is now based on a download URL instead of checking if an entry in the ruleset sources is present. Signed-off-by: Stefan Schantl --- html/cgi-bin/ids.cgi | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/html/cgi-bin/ids.cgi b/html/cgi-bin/ids.cgi index 369bf0276..e29482fa8 100644 --- a/html/cgi-bin/ids.cgi +++ b/html/cgi-bin/ids.cgi @@ -1171,11 +1171,7 @@ END } # Handle providers which are not longer supported. - unless ($provider_name) { - # Set the provider name to the provider handle - # to display something helpful. - $provider_name = $provider; - + unless ($IDS::Ruleset::Providers{$provider}{'dl_url'}) { # Assign background color $col="bgcolor='#FF4D4D'"; } @@ -1809,7 +1805,7 @@ sub show_additional_provider_actions() { } # Disable the manual update button if the provider is not longer supported. - unless ($IDS::Ruleset::Providers{$provider}) { + unless ($IDS::Ruleset::Providers{$provider}{"dl_url"}) { $disabled_update = "disabled"; } From patchwork Thu Mar 21 20:51:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 7655 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4V0yLZ0yh8z3wkd for ; Thu, 21 Mar 2024 20:51:50 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4V0yLF2rPszFL2; Thu, 21 Mar 2024 20:51:33 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4V0yLF2DR1z32v2; Thu, 21 Mar 2024 20:51:33 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4V0yL84l5Tz32v4 for ; Thu, 21 Mar 2024 20:51:28 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4V0yL80HkVzph; Thu, 21 Mar 2024 20:51:27 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1711054288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=o7dVOF26MODH2Pn9eLhoHEfpaqTrYfhPc6Ddv9FzC88=; b=Dy0u6EQp6zNeE3tzERYEoKf5XkdazJn1WdpShemqqtlTcZ0HQBadzBbHoUhBsmdkIBCNV6 ouiahWnZ5/rbM/Ag== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1711054288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=o7dVOF26MODH2Pn9eLhoHEfpaqTrYfhPc6Ddv9FzC88=; b=eAlvjqVfTCicN8y/8MbMzuY8JxNXboqj74/2pcjYNpVZ1QGEyiC0GwiOHB25dm8MBDETIt uUw0Zio9dacL9l/ZJmo/BD1eSlQfixN1wLSUnb4xMdiPcuIkraAzCroZ5BGrZEIKHs2l3H 7QcogUBGTJolj2y+HDuILNixeQXU+gHxAsbEdDcg3SerzFkD7hnY0QS9J04Ss6kx58zp1K MXLac6Piacn+/3PBTXzSxfAibuNmB5clt+BZgKYanEIWRdOv372VDoB7wkl259YBsvbySP cht4NJCoE0n4KeIOLEGlreeUK3jnrJTuBcfTFR9wHOuneBwqBi05Ux2ZkmsOSQ== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH 3/5] update-ids-ruleset: Disable provider if not dl_url can be obtained Date: Thu, 21 Mar 2024 21:51:16 +0100 Message-Id: <20240321205118.382948-3-stefan.schantl@ipfire.org> In-Reply-To: <20240321205118.382948-1-stefan.schantl@ipfire.org> References: <20240321205118.382948-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: 4ZQBMOBQQQA236XEU3FYBN63RTXLCYJL X-Message-ID-Hash: 4ZQBMOBQQQA236XEU3FYBN63RTXLCYJL X-MailFrom: stefan.schantl@ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Unsupported/Removed provides does not longer have these information Signed-off-by: Stefan Schantl --- src/scripts/update-ids-ruleset | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/update-ids-ruleset b/src/scripts/update-ids-ruleset index 553c1a1e1..806107e1c 100644 --- a/src/scripts/update-ids-ruleset +++ b/src/scripts/update-ids-ruleset @@ -106,7 +106,7 @@ foreach my $id (keys %providers) { my $autoupdate_status = $providers{$id}[3]; # Skip unsupported providers. - next unless($IDS::Ruleset::Providers{$provider}); + next unless($IDS::Ruleset::Providers{$provider}{'dl_url'}); # Skip the provider if it is not enabled. next unless($enabled_status eq "enabled"); From patchwork Thu Mar 21 20:51:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 7656 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4V0yLZ11c7z3ww6 for ; Thu, 21 Mar 2024 20:51:50 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4V0yLG33ZBzFM2; Thu, 21 Mar 2024 20:51:34 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4V0yLG2ZKnz32v4; Thu, 21 Mar 2024 20:51:34 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4V0yL93CCfz32v5 for ; Thu, 21 Mar 2024 20:51:29 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4V0yL869Dhzn8; Thu, 21 Mar 2024 20:51:28 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1711054289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BOCVsjmdu/0/LFYuyn7y9eX49KTP6NGwX90Ga5wVkpc=; b=fE0Xe5o9DtExE1O/iesCJRHqOv9cFGMjVmOVKi/fynWab+FWBhaXHa27iHsSc2/391GlCa lmM0B+juvcWrGaDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1711054289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BOCVsjmdu/0/LFYuyn7y9eX49KTP6NGwX90Ga5wVkpc=; b=OAesBtOjImbftNnAjE81fEZDuVzA5EU+6tvTxsXr/Vq0ZAfN6mH9/ta+vtqN5g4b10dU1W /AJ4efmTYyqiT6NSKVSrFVrG/mN3p/QbGlqG/uhaPXE9TGKk05u3gEkLKJ/F8XC46r0DtK Iy+ajsBoKzZ2Dabk+UjEKjbOBPRs8Aj+E+2lrgtMkvqj2n9QyxOXzBLD2U8u3kfC8BnvFY 1Ehy1BBOBsKOWktQ/15pJ5eHNP9/JFzlm2gB/crz4epyNPatV8M2EsbWBZAzhoCakwE+fL kpW1YZ48D6pgPjBmdDurE7JIOmqjIbYGus9g8dA73Z2Uy05AytZL/yo8JN4eUQ== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH 4/5] ruleset-sources: Restore generic details about recently dropped providers Date: Thu, 21 Mar 2024 21:51:17 +0100 Message-Id: <20240321205118.382948-4-stefan.schantl@ipfire.org> In-Reply-To: <20240321205118.382948-1-stefan.schantl@ipfire.org> References: <20240321205118.382948-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: XLAKQ74YQCNDC4YSFG4KG4GK3GTIUYVZ X-Message-ID-Hash: XLAKQ74YQCNDC4YSFG4KG4GK3GTIUYVZ X-MailFrom: stefan.schantl@ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: At least these informations are required to display something usefull on the webgui, even if a provider has been dropped. Signed-off-by: Stefan Schantl --- config/suricata/ruleset-sources | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/config/suricata/ruleset-sources b/config/suricata/ruleset-sources index 2b3b4ffcb..4e9ea5fa9 100644 --- a/config/suricata/ruleset-sources +++ b/config/suricata/ruleset-sources @@ -97,6 +97,34 @@ our %Providers = ( dl_type => "plain", }, + # Positive Technologies Attack Detection Team rules. + attack_detection => { + summary => "PT Attack Detection Team Rules", + website => "https://github.com/ptresearch/AttackDetection", + tr_string => "attack detection team rules", + }, + + # Secureworks Security rules. + secureworks_security => { + summary => "Secureworks Security Ruleset", + website => "https://www.secureworks.com", + tr_string => "secureworks security ruleset", + }, + + # Secureworks Malware rules. + secureworks_malware => { + summary => "Secureworks Malware Ruleset", + website => "https://www.secureworks.com", + tr_string => "secureworks malware ruleset", + }, + + # Secureworks Enhanced rules. + secureworks_enhanced => { + summary => "Secureworks Enhanced Ruleset", + website => "https://www.secureworks.com", + tr_string => "secureworks enhanced ruleset", + }, + # ThreatFox threatfox => { summary => "ThreatFox Indicators Of Compromise Rules", From patchwork Thu Mar 21 20:51:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 7657 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4V0yLc0SCZz3wkd for ; Thu, 21 Mar 2024 20:51:52 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4V0yLJ0YG1zFLY; Thu, 21 Mar 2024 20:51:36 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4V0yLH44kSz32v4; Thu, 21 Mar 2024 20:51:35 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4V0yLB2bwxz32v2 for ; Thu, 21 Mar 2024 20:51:30 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4V0yL94b6Zznn; Thu, 21 Mar 2024 20:51:29 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1711054290; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JBPrfEPRrh6uwu0L7aI2ONrYjDzkr2qT+CSAdj8CLhU=; b=O5QOA6YBQIylq1kzOron6Hymj+1tRFppVoZtMuB4M9BDgKvETiEkN2UlJIEJyBzxmE/0eA sxwwsI7GYmlJCWAw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1711054290; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JBPrfEPRrh6uwu0L7aI2ONrYjDzkr2qT+CSAdj8CLhU=; b=XtLqqPh98nu65skRIalE+Js9abKP/qG69Xj/oE3sZ+hd549jXq0fuW6dJNQzG1BsHHquUy B6CDCy7PRxDGvPR8iINdYv6DrdiWykWxJrB+G5wBM3pf8mosVvmibmv2kSZ/m0zJC3lJf+ ZVsnAj5n9g0M5lmS7XRl2c/mnPLuYozul7PmSGhDvDYyYO79rGXXULcrtTmDdPTAMNRgV+ hsOZ6feva9k6+nZkDVXPUEM1+rldHq9eDXZHhjwpod8+n1lboJZmSP/l+DamwzMrFzJE8g kEoDd8Rhurqgs9qAguIiLatNUhF2j0MT5YJ8m4qznWpo6PZZ+qC/etGRIuBGEA== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH 5/5] ids.cgi: Adjust code for marking unsupported providers Date: Thu, 21 Mar 2024 21:51:18 +0100 Message-Id: <20240321205118.382948-5-stefan.schantl@ipfire.org> In-Reply-To: <20240321205118.382948-1-stefan.schantl@ipfire.org> References: <20240321205118.382948-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: J2DTLAJHDBE4BZKEMESYAH3DRZ3PXHUE X-Message-ID-Hash: J2DTLAJHDBE4BZKEMESYAH3DRZ3PXHUE X-MailFrom: stefan.schantl@ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Signed-off-by: Stefan Schantl --- html/cgi-bin/ids.cgi | 28 +++++++++++++++++----------- langs/de/cgi-bin/de.pl | 1 + langs/en/cgi-bin/en.pl | 1 + 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/html/cgi-bin/ids.cgi b/html/cgi-bin/ids.cgi index e29482fa8..2d4ac6fc3 100644 --- a/html/cgi-bin/ids.cgi +++ b/html/cgi-bin/ids.cgi @@ -1162,6 +1162,7 @@ END my $subscription_code = $used_providers{$id}[1]; my $autoupdate_status = $used_providers{$id}[2]; my $status = $used_providers{$id}[3]; + my $unsupported; # Check if the item number is even or not. if ($line % 2) { @@ -1172,8 +1173,8 @@ END # Handle providers which are not longer supported. unless ($IDS::Ruleset::Providers{$provider}{'dl_url'}) { - # Assign background color - $col="bgcolor='#FF4D4D'"; + # Mark this provider as unsupported. + $unsupported = "*"; } # Choose icons for the checkboxes. @@ -1202,7 +1203,7 @@ END print < - $provider_name + $provider_name$unsupported $rulesetdate @@ -1258,10 +1259,15 @@ print <
-
- - - +
+ + + - -
+END + print "* $Lang::tr{'ids unsupported provider'}\n"; +print < +
END # Only show this button if a ruleset provider is configured. @@ -1270,10 +1276,10 @@ END } print < -
-
+ + + + END &Header::closebox(); diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl index f13bddf4b..b7b86fc7f 100644 --- a/langs/de/cgi-bin/de.pl +++ b/langs/de/cgi-bin/de.pl @@ -1416,6 +1416,7 @@ 'ids show' => 'Anzeigen', 'ids the choosen provider is already in use' => 'Der gewhählte Provider wird bereits verwendet.', 'ids unable to download the ruleset' => 'Das Regelset konnte nicht heruntergeladen werden.', +'ids unsupported provider' => 'Provider wird nicht mehr unterstützt', 'ids visit provider website' => 'Anbieter-Webseite besuchen', 'ids working' => 'Änderungen werden übernommen. Bitte warten Sie, bis dieser Vorgang erfolgreich beendet wurde.', 'iface' => 'Iface', diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl index 0113f8811..8e50aba76 100644 --- a/langs/en/cgi-bin/en.pl +++ b/langs/en/cgi-bin/en.pl @@ -1467,6 +1467,7 @@ 'ids subscription code required' => 'The selected ruleset requires a subscription code', 'ids the choosen provider is already in use' => 'The choosen provider is already in use.', 'ids unable to download the ruleset' => 'Unable to download the ruleset', +'ids unsupported provider' => 'Provider is not supported anymore', 'ids visit provider website' => 'Visit provider website', 'ids working' => 'Changes are being applied. Please wait until all operations have completed successfully...', 'iface' => 'Iface',