[Bug]: Opening a file on Windows spawns powershell -EncodedCommand, which AVG and Avast block as malware
维护者通常 1 天内回复
评估
- 难度
- 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
- On Windows 11 with AVG (or Avast, same engine) and its Behavior Shield on, open T3 Code.
- 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
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pingdotgg/t3code 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
pingdotgg/t3code#31718 · 1 条评论 ·
维护者通常 1 天内回复
-
[Bug]: Redesign tab bars ignore clicks on Linux: hidden chat layers keep window drag regions可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
needs more info
难度 2/5 1-3 小时 新手友好度 79/100
pingdotgg/t3code#30685 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
pingdotgg/t3code#30228 · 3 条评论 ·
维护者通常 1 天内回复
相似的 Issue
-
bug needs-triage potential-regression
难度 2/5 1-3 小时 新手友好度 78/100
aws/aws-sdk-js-v3#8408 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
colinhacks/zod#6743 ·
维护者通常 1 天内回复
-
[BUG] Packing list: the weight field drops digits on a slow connection and saves the wrong weight未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 79/100
openai/openai-node#3124 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 73/100
anthropics/anthropic-sdk-typescript#1296 ·
维护者通常 8 天内回复