Repository navigation
[New] Remove Selected AI Extension - #163
Open
Mikaayenson wants to merge 16 commits into
Open
Mikaayenson wants to merge 16 commits into
Mikaayenson wants to merge 16 commits into
Conversation
shahargl
requested changes
Nov 22, 2026
shahargl
left a comment
Contributor
There was a problem hiding this comment.
This template removes one VS Code or Cursor extension from an endpoint using Defend execute. It can be triggered by an alert or run manually, and it runs in audit mode by default. Libra's rounds already fixed most of the input handling. The main remaining problem is that enforce mode never acts on the developer's own extensions, because the CLI runs as SYSTEM/root against that account's profile. Other points: failed or skipped runs still finish as Completed, there's no approval step before an alert sends a SYSTEM-level command, and the catalog description promises more than the workflow checks.
Require user home for --extensions-dir/--user-data-dir, absolute editor binaries, install_source on alerts, analyst approval before enforce, and workflow.fail when removal is not verified.
Require absolute user_home only on enforce (input or alert user.home, never username-derived), include home in concurrency, raise settings timeout for approval, and launch uninstall from Program Files / system paths only.
Strip trailing slashes from concurrency home keys, reject Unix launchers whose symlink target resolves under user-writable paths, document system-wide-only installs, and map shell_code=47 to no_trusted_binary.
Keep trailing backslash significant on Linux/macOS so distinct homes do not collapse into one concurrency key.
Prefer alert host.os.type over inputs.os_type so trailing-backslash normalization stays consistent with the uninstall path.
Mikaayenson
enabled auto-merge (squash)
December 2, 2026 01:46
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.
Use this when incident response must uninstall one user-installed AI editor extension from a developer endpoint. The workflow targets a VS Code-family extension by exact publisher.extension id and profile. Built-in, system, and policy-managed extensions are refused. Start from a security alert or run it manually. Audit by default logs the planned uninstall. Enforce uses Defend execute to run the editor uninstall for that extension on the agent.