Skip to content

fix(malware): remove hardcoded signatures to prevent AV false positives#106

Merged
dbfx merged 3 commits intomainfrom
fix/remove-bundled-malware-sigs
Mar 29, 2026
Merged

fix(malware): remove hardcoded signatures to prevent AV false positives#106
dbfx merged 3 commits intomainfrom
fix/remove-bundled-malware-sigs

Conversation

@dbfx
Copy link
Copy Markdown
Contributor

@dbfx dbfx commented Mar 29, 2026

Summary

  • Removes 188 hardcoded malware signature regex patterns and hash lookups from the binary that were triggering Avira EXP/YAV.Minerva false positives
  • Removes build-time YARA rule bundling (prefetch:rules, extraResources) — rules are now downloaded from the cloud on first launch instead of shipped in the installer
  • Reduces initial cloud rule check delay from 30s to 5s so signatures are available quickly after first install

Why

AV heuristic engines (Avira confirmed, likely others) scan our binary and see malware name strings like XMRig, CobaltStrike, Emotet, WannaCry etc. baked into the code. They flag the app as containing exploit patterns rather than recognizing it as a tool that detects malware. Moving all signature data to cloud-downloaded YARA rules eliminates these strings from the binary entirely.

What changed

File Change
malware-scanner.ipc.ts Removed KNOWN_MALWARE_PATTERNS (188 entries), KNOWN_MALWARE_HASHES, and the regex fallback scan path. Kept SUSPICIOUS_FILENAMES (process name heuristics — won't trigger AV).
yara-rules-store.ts Removed getBundledRulesDir/getBundledRulePaths, simplified getAllRulePaths() to cloud-only, reduced first check from 30s → 5s
electron-builder.yml Removed resources/yara-rules from extraResources
package.json Removed prefetch:rules from all package:* build scripts
shared/types.ts Updated YaraRulesInfo: removed bundledRules, 'bundled' source, 'regex-fallback' engine; added 'pending' engine state
MalwareScannerPage.tsx Removed bundled source/count display
locales/*/malware.json Removed dbSourceBundled, updated dbRuleFilesCounts to cloud-only format
Test files Removed KNOWN_MALWARE_PATTERNS tests and bundled-vs-cached merge tests

Test plan

  • All 1926 tests pass (86 test files)
  • Build succeeds (electron-vite build)
  • Verify first-launch downloads rules within ~5s and YARA engine compiles
  • Verify scan works with cloud rules (signature + heuristic detection)
  • Verify scan gracefully handles no rules yet (skips signatures, runs heuristics)
  • Submit built binary to Avira/VirusTotal to confirm false positive is resolved

🤖 Generated with Claude Code

Hardcoded malware signature strings (188 regex patterns, hash lookups) in the
binary were triggering Avira EXP/YAV.Minerva false positives. Signature
detection now relies entirely on cloud-downloaded YARA rules instead of
bundled patterns shipped with the installer.

- Remove KNOWN_MALWARE_PATTERNS and KNOWN_MALWARE_HASHES from scanner
- Remove regex fallback scan path (YARA engine required for signatures)
- Remove build-time rule fetching (prefetch:rules) and bundled extraResources
- Reduce initial cloud rule check delay from 30s to 5s for fast first-launch
- Update YaraRulesInfo type, UI, and all 30 locale files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

github-actions bot and others added 2 commits March 29, 2026 15:15
- Remove YARA rule fetch step from release workflow (rules are no
  longer bundled, so fetching at build time is a no-op)
- Add proper "from cloud" translations for all 29 non-English locales
  instead of bare {{count}} placeholder
- Update stale comment in fetch-yara-rules.js

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions bot added the ci label Mar 29, 2026
@dbfx dbfx merged commit f1e4d3e into main Mar 29, 2026
10 checks passed
@dbfx dbfx deleted the fix/remove-bundled-malware-sigs branch March 29, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant