From e4d9586bda38e0148510dbb235fbc5379cdd5649 Mon Sep 17 00:00:00 2001 From: Oliver Kieselbach Date: Sat, 6 Jun 2026 10:16:14 +0200 Subject: [PATCH] fix(vuln): flush negative auto-resolve cache on mappings reload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ResetAutoResolveFailedCache() was documented as "called when seed/community mappings are reloaded" but had no callers, so the 7-day NVD-miss cache survived every reseed. Software that previously missed stayed blacklisted against the warm Function instance and never got a fresh resolution attempt against the reloaded mappings. Fold the negative-cache flush into ResetMappingsCache() so all 7 reload sites (reseed seed/community, save/delete/bulk-auto-resolve custom mappings) clear it — no call site can forget it. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../Services/Vulnerability/VulnerabilityCorrelationService.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Backend/AutopilotMonitor.Functions/Services/Vulnerability/VulnerabilityCorrelationService.cs b/src/Backend/AutopilotMonitor.Functions/Services/Vulnerability/VulnerabilityCorrelationService.cs index 42f70835..fc215a28 100644 --- a/src/Backend/AutopilotMonitor.Functions/Services/Vulnerability/VulnerabilityCorrelationService.cs +++ b/src/Backend/AutopilotMonitor.Functions/Services/Vulnerability/VulnerabilityCorrelationService.cs @@ -64,10 +64,14 @@ namespace AutopilotMonitor.Functions.Services.Vulnerability /// Resets the static mappings cache so the next call to EnsureMappingsLoadedAsync /// reloads all mappings (seed, custom, community) from their sources. /// Called after reseed operations that update community mappings in table storage. + /// Also flushes the negative auto-resolve cache so software that previously missed + /// gets a fresh resolution attempt against the reloaded mappings — otherwise stale + /// NVD-miss entries would suppress retries for up to days. /// public static void ResetMappingsCache() { _seedLoaded = false; + ResetAutoResolveFailedCache(); } public async Task?> CorrelateAsync(