Virus detection

Detect viruses and malware in your files using Workflows.

Overview

Virus detection is part of the Filestack’s workflows platform. Using this mechanism you can detect infected content in files your users upload asynchronously immediately after file hit the storage.

Task Configuration

Visit Creating Workflows Tutorial to learn how you can use Workflows UI to configure your tasks and logic between them.

Virus detection task is available under Intelligence tasks category.

Parameters

Task Name string Unique name of the task. It will be included in the webhook response and can be used to build logic below.

Logic

Virus detection task returns following response to the workflow:

{
  "infected": true,
  "infections_list": [
	"content.malicious.ait-trojan-nymeria-315"
  ]
}

Parameters

infected boolean Indicates whether the file is infected or not.
infections_list array of strings List of strings with names of any malware found in the file, if the file is not infected list will be empty.

Based on the task’s response you can build logic that tells the workflow how dependent tasks should be executed. For example, if you would like to run another task if a virus was detected you can use following rule:

infected eq true

In Workflows UI this command would look like in the example below:

Visit Creating Workflows Tutorial to learn how you can use Workflows UI to configure your tasks and logic between them.

Webhook

Below you can find an example webhook payload for a virus detection task

  • no virus detected
{
  "workflow": "687227d2-5f84-44a0-b20b-1c29a1deb2ab",
  "createdAt": "2019-01-23T03:30:55.400729934Z",
  "updatedAt": "2019-01-23T03:30:57.437268735Z",
  "sources": [
    "VJQTvCboRVivuJ2BDKgd"
  ],
  "results": {
    "virus_detection_1548213592150": {
      "data": {
        "infected": false,
        "infections_list": []
      }
    }
	[ subsequent workflow tasks ]
  },
  "status": "Finished"
}
  • virus detected
{
  "workflow": "687227d2-5f84-44a0-b20b-1c29a1deb2ab",
  "createdAt": "2019-01-23T03:30:55.400729934Z",
  "updatedAt": "2019-01-23T03:30:57.437268735Z",
  "sources": [
    "VJQTvCboRVivuJ2BDKgd"
  ],
  "results": {
    "virus_detection_1548213592150": {
      "data": {
        "infected": true,
        "infections_list": [
		  "content.malicious.ait-trojan-nymeria-315"
		]
      }
    }
	[ subsequent workflow tasks ]
  },
  "status": "Finished"
}

Please visit the webhooks documentation page to see full payload of the webhook.