From 1a3359e874c44f92ca7532011b426b5584d71a5e Mon Sep 17 00:00:00 2001 From: Richard Date: Tue, 14 Jul 2026 16:48:29 +0200 Subject: [PATCH] Security F3+F4: verwundbares Newtonsoft ersetzt + hardcodierte Secrets entfernt F4: Newtonsoft.Json in der Threema-Lib von 11.0.2 (Advisory NU1903, high) auf 13.0.4 gehoben (= App-Version). Build ohne NU1903, 311 Tests gruen. F3: hardcodierte Secrets aus ServerSettings-Defaults entfernt (Alchemy-API-Key in PolygonRpcUrl, Mullvad-Account-ID) -> leere Defaults; echte Werte kommen aus server_settings.xml (gitignored). WICHTIG (nicht im Code moeglich): beide Secrets ROTIEREN, da sie in der Git-History liegen. Co-Authored-By: Claude Opus 4.8 --- .../IcgSoftware.Threema.CoreMsgApi.csproj | 3 ++- src/PolyTrader.Core/Models/ServerSettings.cs | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/libs/Threema-MsgApi-Net-Core/IcgSoftware.Threema.CoreMsgApi/IcgSoftware.Threema.CoreMsgApi.csproj b/libs/Threema-MsgApi-Net-Core/IcgSoftware.Threema.CoreMsgApi/IcgSoftware.Threema.CoreMsgApi.csproj index d5156e2..6197d33 100644 --- a/libs/Threema-MsgApi-Net-Core/IcgSoftware.Threema.CoreMsgApi/IcgSoftware.Threema.CoreMsgApi.csproj +++ b/libs/Threema-MsgApi-Net-Core/IcgSoftware.Threema.CoreMsgApi/IcgSoftware.Threema.CoreMsgApi.csproj @@ -15,7 +15,8 @@ - + + diff --git a/src/PolyTrader.Core/Models/ServerSettings.cs b/src/PolyTrader.Core/Models/ServerSettings.cs index ccf9b59..a4875a7 100644 --- a/src/PolyTrader.Core/Models/ServerSettings.cs +++ b/src/PolyTrader.Core/Models/ServerSettings.cs @@ -49,8 +49,8 @@ namespace PolyTraderSharp.Models [Category("Mullvad VPN")] [DisplayName("Mullvad Account")] - [Description("Account ID for Mullvad VPN.")] - public string MullvadAccount { get; set; } = "7748925650632296"; + [Description("Account ID for Mullvad VPN. In server_settings.xml (gitignored) hinterlegen – NICHT im Code committen.")] + public string MullvadAccount { get; set; } = ""; // F3: Secret nicht mehr im Quellcode [Category("Mullvad VPN")] [DisplayName("VPN Location")] @@ -70,8 +70,8 @@ namespace PolyTraderSharp.Models [Category("Blockchain Listener")] [DisplayName("Polygon RPC URL")] - [Description("RPC URL for Alchemy WSS.")] - public string PolygonRpcUrl { get; set; } = "wss://polygon-mainnet.g.alchemy.com/v2/iWCbs9p3nf-8OpR-BtvGi"; + [Description("RPC-/WSS-URL inkl. Alchemy-API-Key. In server_settings.xml (gitignored) hinterlegen – der Key gehört NICHT in den Quellcode/Git. Format: wss://polygon-mainnet.g.alchemy.com/v2/")] + public string PolygonRpcUrl { get; set; } = ""; // F3: Alchemy-Key nicht mehr im Quellcode [Category("Polymarket WebSockets")] [DisplayName("Use Polymarket WebSockets")]