Skip to content

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

Open

Description

@ViorelMocanu

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.

Activity

  1. shivamhwp commented on Nov 4, 2026

    @shivamhwp
    Collaborator

    [GPT-6.1 Sol][Codex] on behalf of shivam.

    Could you share the exact click or menu action that triggers this, plus the decoded PowerShell command from that detection, with private paths replaced? A short recording would also help.

    I'm checking the Windows app. In 0.1.7's source, a normal PDF click opens the integrated browser, and opening through File Explorer invokes Explorer directly. Encoded PowerShell is still used for revealing a file and launching the external browser. Identifying which action reached it will let us verify the fix against your failure.

  2. ViorelMocanu commented on Nov 5, 2026

    @ViorelMocanu
    Author

    Right clicking any file, then picking Reveal in File Explorer will open Explorer but will also trigger this AVG popup:

    Image Image

    The command, decoded from T3 Code 0.1.7's externalLauncher.ts (the AVG popup doesn't show it, and process-creation auditing was off, so my Claude rebuilt this from the shipped bundle rather than captured; paths replaced):

    powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -EncodedCommand <base64>
    

    Decoded:

    $ProgressPreference = 'SilentlyContinue'; $folderVerb = (Get-ItemProperty -LiteralPath 'Registry::HKEY_CLASSES_ROOT\Directory\shell' -ErrorAction SilentlyContinue).'(default)'; if ($folderVerb -and $folderVerb -ne 'none') { Invoke-Item -LiteralPath 'C:\path\to\project\tmp' } else { Start-Process 'explorer.exe' -ArgumentList ('/select,"' + 'C:\path\to\project\tmp\t3code-issue-av.md' + '"') }

    HKCR\Directory\shell defaults to none here, so the Start-Process explorer.exe /select, branch runs. Explorer opens; AVG Behavior Shield then blocks powershell.exe as IDP.HELU.PSE96.

    Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions