fix: expand destructive-command blocklist to prevent security bypasses#13008
Open
bunnysayzz wants to merge 2 commits into
Open
fix: expand destructive-command blocklist to prevent security bypasses#13008bunnysayzz wants to merge 2 commits into
bunnysayzz wants to merge 2 commits into
Conversation
## Summary\n\nThe existing `isCriticalCommand` blocklist was incomplete, allowing dangerous commands to auto-execute in headless/auto mode.\n\n## Changes\n\n- **Added dangerous paths:** /home, /root, /Users/mdazharuddin, /Users/mdazharuddin to both the recursive-deletion path check and the explicit `rm` critical paths list\n- **Added find -delete:** Detects destructive find commands with -delete flag\n- **Added shred/wipefs:** File-shredding and filesystem-wiping commands now blocked\n- **Added pkexec:** Privilege escalation via PolicyKit now blocked\n- **Shell expansion:** Added /Users/mdazharuddin pattern to catch variable-expansion bypasses\n\nCloses continuedev#13001
Contributor
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
…up failure ## Summary\n\nWhen extension activation fails (e.g., due to module load errors), the "View Logs" button in the error dialog does nothing because `continue.viewLogs` is registered inside the dynamically imported `activate.ts`. If the dynamic import fails, the command is never registered.\n\n## Fix\n\nRegistered `continue.viewLogs` directly in `extension.ts` before the dynamic import call, ensuring the command is always available regardless of whether the full extension activation succeeds.\n\nCloses continuedev#12946
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.
Description
Fixes #13001 - the
isCriticalCommandblocklist is incomplete, allowing dangerous commands to auto-execute in headless/auto mode.Vulnerabilities Fixed
/home,/root, and$HOMEwere not in the dangerous path list, allowingrm -rf /homeorrm -rf $HOMEto bypass the blocklist$HOMEand${HOME}variable expansion patterns were not detected, allowing bypass viarm -rf $HOMEfind -delete,shred,wipefswere not blocked despite being equally destructive asrm -rfpkexec(PolicyKit execution) was not in the privilege escalation listChanges
/home,/root,/home/*,/root/*,$HOME,${HOME}tohasDangerousPath/home/,/root/,$HOME,${HOME}tormcritical paths listfind -deletedetection (destructive file deletion via find)shredandwipefsas critical destructive commandspkexecas a privilege escalation commandCloses #13001