Skip to content

Windows Defender falsely flags new releases as trojans #3415

Closed

Description

@riatzukiza

Summary
Recent OpenCode Windows release assets are being flagged by Windows Defender with ML/heuristic signatures (e.g. Trojan:Script/Wacatac.C!ml, Program:Script/Wacapew.A!ml). Based on prior reports and cross-checks, this appears to be a recurring false positive, not evidence of compromise.

Affected / reports

Hypothesis
This is a heuristic / ML false positive common to bundled CLI/GUI binaries (compression/packing, embedded resources, or unsigned artifacts) and often “goes away” after Defender definition updates. No evidence of compromise has been presented.

What we’ll do

  • Publish checksums (SHA256) for all release assets.
  • Code-sign Windows artifacts (Authenticode; timestamped) to reduce AV false positives.
  • Generate an SBOM (CycloneDX) and attach to releases.
  • Avoid packers (e.g., UPX) for Windows release builds if used.
  • Add CI AV scans for every release: Windows Defender (Windows runner), ClamAV (Linux runner), and OWASP Dependency-Check for dependencies. If any scanner flags, CI will fail and post logs.
  • Submit false positives to Microsoft with SHA256 + sample upload whenever a Defender flag occurs.
  • Track detections in this issue with dates, signatures, engine/sig versions, and hashes.

How to verify locally (Windows)

# 1) Hash
Get-FileHash -Algorithm SHA256 .\opencode-windows-x64.zip

# 2) Signature (if EXE/MSI)
Get-AuthenticodeSignature .\OpenCodeSetup.exe | Format-List *

# 3) Defender versions
Get-MpComputerStatus | Select AMEngineVersion, AntivirusSignatureVersion

# 4) Re-scan file to reproduce
"$env:ProgramFiles\Windows Defender\MpCmdRun.exe" -Scan -ScanType 3 -File .\OpenCodeSetup.exe

References

Activity

  1. github-actions commented on Oct 24, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. Sacquer commented on Oct 25, 2025

    @Sacquer

    Don't know if it's any help, but I encountered it on a Debian machine running wdavdaemon (#3388, maybe should've written it here)

  3. riatzukiza commented on Oct 26, 2025

    @riatzukiza
    ContributorAuthor

    Don't know if it's any help, but I encountered it on a Debian machine running wdavdaemon (#3388, maybe should've written it here)

    It would help me figure this out if you could take a look at this pr on my fork and look at the defender workflow specifically. I have no idea what I'm doing with defender, but I have the other workflows working as secondary verification that there aren't any viruses so we could automaticly compile a report to send off to microsoft to get ahead of user's experiencing the false positives.
    @Sacquer

  4. Sacquer commented on Oct 27, 2025

    @Sacquer

    Sadly I don't think I'm much of help here, don't use Windows or PowerShell @riatzukiza 😿 .

  5. Tyler-widd commented on Oct 30, 2025

    @Tyler-widd

    Workaround -
    Settings
    Virus & threat protection
    Image

    Protection history

    Image

    Find the opencode entry
    Select allow on device

    Image
  6. Sacquer commented on Oct 30, 2025

    @Sacquer

    Think you might be able to tell the daemon to ignore certain directories as well, for those that run in daemon mode, i.e. without a UI.

  7. jimroberts-tamu commented on Dec 17, 2025

    @jimroberts-tamu

    I believe that the problem is that the installer does not have a publisher and in turn Windows marks the uninstaller EXE as "Blocked".

    As a workaround you can right click on the uninstaller in Explorer and there will be a check box for "Unblock". Check that, click OK.

    The root cause though is that the uninstaller is missing a publisher.

    Edit: This is most likely the same issue that you will encounter when running the when you are prompted to upgrade to 1.0.164.

  8. Xavier-Burger commented on Jan 10, 2026

    @Xavier-Burger

    Interesting that this occurs on much older versions still.

    I danced with this issue today for v1.1.12, and found I could get windows to shut up after explicitely installing 1.1.8. Not sure why this version specifically is working for me.

    I was testing versions on my work machine, where I don't have the luxury of allowing threats.

    Heres my steps for getting it to work (for my setup, wezterm, powershell, opencode via npm -g):

    #7655 (comment)

  9. Mirrowel commented on Jan 11, 2026

    @Mirrowel

    This is a common windows defender L. This can trigger for archives with no binaries whatsoever.

    WIndows defender is nothing but trouble - disable it.

  10. Makishima commented on Jan 11, 2026

    @Makishima

    @riatzukiza Just to be fair, could you please upload the file to https://www.virustotal.com/gui/home/upload?

  11. nUser0 commented on Jan 12, 2026

    @nUser0

    The suspicious file is blocked, but the open code function works normally. It means that the dll it releases is not necessary?

  12. nUser0 commented on Jan 12, 2026

    @nUser0

    It seems that the result of blocked files is that automated tests cannot run?

  13. rekram1-node commented on Jan 12, 2026

    @rekram1-node
    Collaborator

    I think we need code signing to prevent this

  14. github-actions commented on Mar 28, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

  15. Hona commented on Mar 29, 2026

    @Hona
    Member

    As of OpenCode v1.3.4 across the CLI + Desktop apps, we have full code signing - so there should be no more warnings.

    Please let me know otherwise

    Image
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions