mirror of
https://github.com/okieselbach/AutopilotMonitor.git
synced 2026-10-25 05:00:07 +00:00
fix(vuln): flush negative auto-resolve cache on mappings reload
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) <noreply@anthropic.com>
This commit is contained in:
+4
@@ -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 <see cref="AutoResolveFailedCacheDays"/> days.
|
||||
/// </summary>
|
||||
public static void ResetMappingsCache()
|
||||
{
|
||||
_seedLoaded = false;
|
||||
ResetAutoResolveFailedCache();
|
||||
}
|
||||
|
||||
public async Task<Dictionary<string, object>?> CorrelateAsync(
|
||||
|
||||
Reference in New Issue
Block a user