Skip to content

fix: expand destructive-command blocklist to prevent security bypasses#13008

Open
bunnysayzz wants to merge 2 commits into
continuedev:mainfrom
bunnysayzz:main
Open

fix: expand destructive-command blocklist to prevent security bypasses#13008
bunnysayzz wants to merge 2 commits into
continuedev:mainfrom
bunnysayzz:main

Conversation

@bunnysayzz

Copy link
Copy Markdown

Description

Fixes #13001 - the isCriticalCommand blocklist is incomplete, allowing dangerous commands to auto-execute in headless/auto mode.

Vulnerabilities Fixed

  1. Missing critical paths: /home, /root, and $HOME were not in the dangerous path list, allowing rm -rf /home or rm -rf $HOME to bypass the blocklist
  2. Shell expansion bypass: $HOME and ${HOME} variable expansion patterns were not detected, allowing bypass via rm -rf $HOME
  3. Missing destructive commands: find -delete, shred, wipefs were not blocked despite being equally destructive as rm -rf
  4. Missing privilege escalation: pkexec (PolicyKit execution) was not in the privilege escalation list

Changes

  • Added /home, /root, /home/*, /root/*, $HOME, ${HOME} to hasDangerousPath
  • Added /home/, /root/, $HOME, ${HOME} to rm critical paths list
  • Added find -delete detection (destructive file deletion via find)
  • Added shred and wipefs as critical destructive commands
  • Added pkexec as a privilege escalation command

Closes #13001

## 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
@bunnysayzz
bunnysayzz requested a review from a team as a code owner July 22, 2026 05:00
@bunnysayzz
bunnysayzz requested review from sestinj and removed request for a team July 22, 2026 05:00
@github-actions

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incomplete destructive-command blocklist allows auto-execution of filesystem-destroying commands in headless/auto mode

1 participant