Skip to content

[New] Remove Selected AI Extension - #163

Open
Mikaayenson wants to merge 16 commits into
elastic:mainfrom
Mikaayenson:feat/remove-selected-ai-extension
Open

Mikaayenson wants to merge 16 commits into
elastic:mainfrom
Mikaayenson:feat/remove-selected-ai-extension

Conversation

@Mikaayenson

@Mikaayenson Mikaayenson commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

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.

remove-selected-ai-extension__outcome-step

@Mikaayenson
Mikaayenson requested a review from a team as a code owner November 21, 2026 04:41
@github-actions
github-actions Bot requested a review from shahargl November 21, 2026 04:41

@shahargl shahargl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Comment thread .gitignore Resolved
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.
@Mikaayenson Mikaayenson self-assigned this Dec 2, 2026
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.
@Mikaayenson
Mikaayenson requested a review from shahargl December 2, 2026 00:55
Prefer alert host.os.type over inputs.os_type so trailing-backslash
normalization stays consistent with the uninstall path.
@Mikaayenson
Mikaayenson enabled auto-merge (squash) December 2, 2026 01:46
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.

2 participants