[Bug]: Opening a file on Windows spawns powershell -EncodedCommand, which AVG and Avast block as malware

未关闭 适合新手
#30,954 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@juliusmarminge 已经在做这个了。

开始于 2026年11月4日。

  • #30997 来自 @juliusmarminge —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
67/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
electron, node.js, typescript
领域
desktop

调研方向

从桌面应用区域(apps/desktop)开始,追踪在 Windows 上点击本地文件链接时如何调用 npm 包 open。检查 Electron’s shell.openPath() 的行为,以及应用如何处理其结果;报告将其确定为建议的替代方案。完成标准是本地文件能在默认应用中打开,且不会使用 -EncodedCommand 启动 PowerShell。

由索引模型根据 Issue 内容生成。

描述

Before submitting
  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.
Area

apps/desktop

Steps to reproduce
  1. On Windows 11 with AVG (or Avast, same engine) and its Behavior Shield on, open T3 Code.
  2. In a thread, click a link to a local file (in my case a PDF in the workspace) so the app opens it in the default viewer.
Expected behavior

The file opens in its default app.

Actual behavior

The file does not open. AVG's Behavior Shield kills powershell.exe and shows "Threat secured: IDP.HELU.PSE96 - Command line detection", process C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe.

The cause is in the desktop bundle (resources/app.asar): files are opened with the open npm package, which on Windows spawns

powershell -NoProfile -NonInteractive –ExecutionPolicy Bypass -EncodedCommand <base64 of: Start "<path>">

An encoded command that also bypasses the execution policy is a classic malware pattern, so behavior-based antivirus engines flag it. Several AVG, Avast and Norton forum threads show the same IDP.HELU.PSE family firing on tools that spawn PowerShell this way.

Timing on my machine: Windows PowerShell 5.1 console start (Microsoft-Windows-PowerShell/Operational, event 40961) at 18:10:39, AVG detection at 18:10:49, no other detections that day. The file itself is clean.

Suggested fix: on Windows, open files with Electron's shell.openPath() (ShellExecute, no PowerShell process) instead of the open package.

Impact

Major degradation or frequent failure

Version or commit

T3 Code (Beta) desktop 0.1.7

Environment

Windows 11 Pro 10.0.26200, AVG Antivirus with Behavior Shield on

Logs or stack traces
AVG: Threat name IDP.HELU.PSE96 - Command line detection
     Process C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
     Detected by Behavior Shield, Status Blocked
Workaround

Open the file from File Explorer instead of clicking it in T3 Code.

主要语言
TypeScript
星标
24.8k
派生
6.4k
平均合并
20 小时 2 分钟
30 天内合并 PR
164

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

pingdotgg/t3code 的其他 Issue

查看 pingdotgg/t3code 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。