Fix the four medium findings from the 2026-08-25 security audit #16
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/security-audit-medium"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What does this PR do?
Remediates the four Medium findings from the 2026-08-25 security audit (codebase evaluated against all 25 applicable prompts from ai-security-audit at commit 5885e32; prompts 07/15/28 N/A - no installer, PowerShell scripts, or CI/CD in this repo. No Critical or High findings).
DefaultPolicyEnginepreviously scrapedsender=/from=markers out of free-form classification text (category, reasons, recommended action) - text that derives from attacker-influenceable mail content, so a crafted message could steer the sender-allowlist guardrail. The sender is now read exclusively from the storedMailMessageEvent''s structuredFromaddresses (engine gains anIEventStoredependency); the free-form extraction helpers are deleted. A regression test proves text markers can no longer trigger the allowlist. Note: the guardrail now applies to every mail-message classification rather than only categories containing "sender" - strictly more protective of allowlisted senders.[BODY NOT FETCHED BY VIEGARD ...]marker so classifiers see the absence honestly.nuget.configwith<clear />, nuget.org only, andpackageSourceMapping- restores are reproducible for every contributor and cannot be redirected by ambient machine-level feeds. Verified withdotnet restore --force.TODO.md records the audit outcome and the deferred recommendations (revisit at Phase 9 hardening): audit-record exception text, LISTEN/NOTIFY wakeup spam (least-privilege per-instance DB roles arrive with the D-0025 satellite), secret string zeroization, in-memory audit ledger doc note. A follow-up PR covers the Low/Info batch (bounded tail reads, UID-wrap guard, log sanitization, stats cast, Hosting patch).
How was this tested?
dotnet build- 0 errors, 0 warningsdotnet test- 271 passed, 9 skipped (live-PostgreSQL integration tests; local WSL Docker unavailable)dotnet restore --forceagainst the pinned feed restores all projectsChecklist