# malware

Malware: ClamAV scan/update, YARA rules, suspicious files, webshells, quarantine

Agent View of the PolicyLayer registry record for `malware`. HTML page: https://policylayer.com/tools/defense/malware

## Facts

- Tool: `malware`
- Server: Defense (`defense-mcp-server`) — https://policylayer.com/tools/defense.md
- Install: `npx -y defense-mcp-server`
- Homepage: git+https://github.com/bottobot/defense-mcp-server.git
- Risk category: Execute (High risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 12 (1 required)
- Recommended policy verdict: Rate-limited

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `days` | number | no | Days for recently_modified check |
| `path` | string | no | File or directory path to scan |
| `action` | string | yes | Malware detection action |
| `dry_run` | boolean | no | Preview without executing |
| `file_id` | string | no | Filename in quarantine directory |
| `max_depth` | number | no | Max directory depth |
| `recursive` | boolean | no | Recursively scan directories |
| `check_type` | string | no | Type of suspicious file check |
| `rules_path` | string | no | Path to YARA rules file (.yar/.yara) |
| `search_path` | string | no | Root path to search |
| `target_path` | string | no | File or directory to scan with YARA |
| `max_filesize` | string | no | Maximum file size to scan |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "malware",
    "arguments": {
      "action": "<action>"
    }
  }
}
```

## Why malware is rated High

This tool performs active operations including scanning filesystems, updating AV definitions, applying YARA rules to detect malware, and quarantining files. Quarantine moves/isolates files (potentially irreversible in effect), and scanning/executing detection rules against the live system constitutes external operation execution.

From the tool's own definition: "ClamAV scan/update, YARA rules, suspicious files, webshells, quarantine"

Risk signals: Accepts file system path (path) · High parameter count (15 properties)

## Use case

AI agents invoke malware to trigger actions in Defense. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Defense:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "malware": {
      "limits": [
        {
          "counter": "malware_rate",
          "window": "minute",
          "max": 10,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Defense (30)

- `app_harden` — Execute — https://policylayer.com/tools/defense/app-harden.md
- `container_isolation` — Execute — https://policylayer.com/tools/defense/container-isolation.md
- `crypto` — Execute — https://policylayer.com/tools/defense/crypto.md
- `ebpf` — Execute — https://policylayer.com/tools/defense/ebpf.md
- `firewall` — Execute — https://policylayer.com/tools/defense/firewall.md
- `harden_kernel` — Execute — https://policylayer.com/tools/defense/harden-kernel.md
- `honeypot_manage` — Execute — https://policylayer.com/tools/defense/honeypot-manage.md
- `incident_response` — Execute — https://policylayer.com/tools/defense/incident-response.md
- `sudo_session` — Execute — https://policylayer.com/tools/defense/sudo-session.md
- `vuln_manage` — Execute — https://policylayer.com/tools/defense/vuln-manage.md
- `waf_manage` — Execute — https://policylayer.com/tools/defense/waf-manage.md
- `wireless_security` — Execute — https://policylayer.com/tools/defense/wireless-security.md
- `zero_trust` — Execute — https://policylayer.com/tools/defense/zero-trust.md
- `api_security` — Read — https://policylayer.com/tools/defense/api-security.md
- `cloud_security` — Read — https://policylayer.com/tools/defense/cloud-security.md
- `dns_security` — Read — https://policylayer.com/tools/defense/dns-security.md
- `secrets` — Read — https://policylayer.com/tools/defense/secrets.md
- `access_control` — Write — https://policylayer.com/tools/defense/access-control.md
- `backup` — Write — https://policylayer.com/tools/defense/backup.md
- `compliance` — Write — https://policylayer.com/tools/defense/compliance.md
- `container_docker` — Write — https://policylayer.com/tools/defense/container-docker.md
- `defense_mgmt` — Write — https://policylayer.com/tools/defense/defense-mgmt.md
- `harden_host` — Write — https://policylayer.com/tools/defense/harden-host.md
- `integrity` — Write — https://policylayer.com/tools/defense/integrity.md
- `log_management` — Write — https://policylayer.com/tools/defense/log-management.md
- `network_defense` — Write — https://policylayer.com/tools/defense/network-defense.md
- `patch` — Write — https://policylayer.com/tools/defense/patch.md
- `process_security` — Write — https://policylayer.com/tools/defense/process-security.md
- `supply_chain` — Write — https://policylayer.com/tools/defense/supply-chain.md
- `threat_intel` — Write — https://policylayer.com/tools/defense/threat-intel.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=defense · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/defense
