# Malware Scan

> Check a document against the signatures of known malware before you pass it on.

A **Malware Scan** checks a Document against the signatures of known malware: viruses, trojans, malicious Office macros, PDF scripts, phishing. It scans inside archives too. Its Output is a **Verdict**.

<Mermaid
  chart="`
flowchart LR
  A[&#x22;Document<br/><small>e.g. invoice.docx</small>&#x22;] --> B[&#x22;Malware Scan<br/><small>ClamAV</small>&#x22;]
  B --> C[&#x22;Verdict<br/><small>clean, infected or inconclusive</small>&#x22;]
`"
/>

* **On demand**: nothing is scanned unless you ask, and a Verdict changes nothing. An `infected` Document stays in the workspace and every other Job still accepts it: delete it if you do not want it.
* **No language model**: the file is checked, never parsed or read by a model.
* **Any file**: every format you can upload can be scanned.

***

## 🏗️ Configuration

A Malware Scan is a File Operation (see [Jobs](https://docs.axelered.com/jobs_guide)) without configuration: send only the `file` or the `documentId`, no `config`.

It takes no `perimeter`: it always runs inside Axelered's infrastructure, so the [Compliance Guard](https://docs.axelered.com/config_guide#-compliance-guard) never refuses it. It costs one Credit when `done`, whatever its Verdict.

***

## 🔎 Verdict

A done Malware Scan carries its Verdict in `output`:

| Field        | Description                                                                                                                                                                                                |
| :----------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `verdict`    | `clean`: no known malware. `infected`: known malware found. `inconclusive`: part of the file could not be checked, for example an archive or a PDF protected by a password, or an archive nested too deep. |
| `signatures` | The names of the signatures found, empty when `clean`.                                                                                                                                                     |
| `engine`     | The engine and the version of the signature database the file was checked against.                                                                                                                         |

Signatures are updated several times a day, so a Verdict holds for its `engine`: a file `clean` today may be `infected` tomorrow, once its malware is known. Submit a new Malware Scan to check the same Document again.

***

## 🛠️ Scan a Document

For every field and parameter, see the [**Malware Scans reference**](https://docs.axelered.com/reference#malware-scans).

### [Submit a Malware Scan](https://docs.axelered.com/reference/malware-scans/api_create_malware_scans_post)

```bash
curl -X POST "https://idp.axelered.com/malware-scans?wait=30" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@/path/to/invoice.docx"
```

```json
{
  "status": "done",
  "credits": 1,
  "output": {
    "verdict": "infected",
    "signatures": ["Doc.Downloader.Emotet-9876543-0"],
    "engine": "ClamAV 1.4.2/27460/Mon Nov 16 09:00:00 2026"
  }
}
```

### List, Read & Delete

* [**List Malware Scans**](https://docs.axelered.com/reference/malware-scans/api_list_malware_scans_get): newest first, optionally for one Document with `?documentId=`. Lists do not carry the `output`.
* [**Read Malware Scan**](https://docs.axelered.com/reference/malware-scans/api_read_malware_scans__job_id__get): status, credits and Verdict, with optional `wait`.
* [**Delete Malware Scan**](https://docs.axelered.com/reference/malware-scans/api_delete_malware_scans__job_id__delete): hide a Malware Scan. Its Document is kept.
