Remove case normalization from normalizeCommand to close command-bypass vulnerability#90
Merged
NoahCardoza merged 2 commits intofeat/issue-49__phase-2-client-serverfrom Feb 28, 2026
Conversation
…d bypass Co-authored-by: NoahCardoza <10343470+NoahCardoza@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Address feedback on normalization in Phase 2 Client-Server Mode
Remove case normalization from Feb 28, 2026
normalizeCommand to close command-bypass vulnerability
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.
Lowercasing in
normalizeCommandallowed a case-variant command to pass hash verification while the injector executed the original casing — on a case-sensitive filesystem,ECHOandechocan be different executables.Changes
src/core/command-hash.ts— removed.toLowerCase()fromnormalizeCommand; whitespace normalization (trim + collapse) is preserved as it is semantically neutralsrc/__tests__/command-hash.test.ts— removed lowercase-specific test cases; updated round-trip test to reflect case-preserving behavior✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.