Skip to content

[FEATURE] Read-only malware scanning (ClamAV, YARA, hash lookup) as incident evidence #213

Backlog

Description

@OkiriGabriel

Feature

The threat detector finds miners, reverse shells and download-and-run commands from log text, but nothing checks the files involved. During a security incident, responders need to know whether the binary a container dropped in /tmp is known malware.

Proposal: read-only malware scan as evidence

  • New read-only tool scan_for_malware(target, paths) for a host (over SSH) or a pod (kubectl exec would need approval, so use an ephemeral debug container or a node-level scan instead):
    • ClamAV (clamscan --no-summary --infected -r <paths>) when it's installed on the target,
    • YARA with a curated rules bundle (miners, webshells, common Linux backdoors) shipped with the agent, or YARA_RULES_PATH,
    • hash lookups: SHA-256 of suspicious files checked against VIRUSTOTAL_API_KEY (optional per-org credential) without uploading the files.
  • Targets default to recently changed executables in /tmp, /dev/shm, /var/tmp and the paths named in threat findings.
  • Results attach to the incident as malware_findings (file, hash, signature, engine), and a match raises the incident to critical.
  • Never deletes or quarantines files: removal goes through approval-gated containment ([FEATURE] Approval-gated containment: isolate pod, cordon node, disable key, block IP (evidence first) #168) or a human. Files stay as evidence.
  • Respect the prompt-injection lock: paths come from detector findings, not free text from the alert.

Files

New tools/malware_scan.py, agent/core.py (tool registration), collectors/threat_detector.py, services/org_config.py (VIRUSTOTAL_API_KEY), docs/THREAT_DETECTION.md

Activity

  1. added
    enhancement
    security
    on Nov 26, 2026
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

    enhancementsecurity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions