Fix 36 high-severity log injection (cs/log-forging) vulnerabilities#80
Merged
JustAGhosT merged 1 commit intoclaude/implement-orchestration-8uiwSfrom Feb 22, 2026
Merged
Conversation
Copilot
AI
changed the title
[WIP] Implement Impact Metrics and supporting infrastructure
Fix 36 high-severity log injection (cs/log-forging) vulnerabilities
Feb 21, 2026
|
No reviewable files after applying ignore patterns. |
6b1a230
into
claude/implement-orchestration-8uiwS
4 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
User-controlled values (process IDs, names, tenant IDs, etc.) were flowing unsanitized into
ILoggercalls across multiple layers, enabling log forging attacks (CodeQLcs/log-forging).Changes
LogSanitizerutility (src/Shared/Utilities/LogSanitizer.cs) —Sanitize(string?)strips all control characters (newlines, carriage returns, etc.) with an allocation-free fast path for clean stringsApplied
Sanitize()to all 8 flagged files:InMemoryAuditLoggingAdapter—entry.EntryId,entry.ProcessId,processIdInMemoryCognitiveDebtAdapter—processId,phaseIdInMemoryPhaseConditionAdapter—processId,phaseIdCognitiveSandwichController— allprocessIdandtargetPhaseIdroute parametersCognitiveSandwichEngine—processId,process.Name,phaseId,nextPhase.Name,reason.ReasonConvenerController—ideaId,tenantIdDiscoverChampionsUseCase—request.TenantId,request.SkillFilterCommunityPulseService—request.TenantId,request.ChannelIdEnum values intentionally excluded —
EventType(an enum) cannot contain control characters; wrapping it caused a build error that was correctedRelated Issues
Architecture Layer
Checklist
dotnet buildpasses withTreatWarningsAsErrors)dotnet test)Test Plan
CodeQL re-scan on the branch after applying
Sanitize()— all 36cs/log-forgingalerts resolve. Enum-typed arguments (EventType) verified to compile without sanitization.Screenshots
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.