Analyze Attachments
Analyze Attachments provides a set of utilities for inspecting, manipulating, and extracting information from file attachments.
Analyze Attachments is a Swimlane Turbine connector designed to streamline the management and analysis of file attachments within security workflows. It provides a comprehensive set of actions to extract metadata, calculate hashes, determine file types, check file integrity, and perform zip/unzip operationsβall without writing code. By integrating Analyze Attachments, Swimlane Turbine users can automate file handling tasks, enrich incident investigations, and ensure efficient processing of attachments in playbooks. This enables faster, more reliable, and scalable automation for security operations teams.
Capabilities
This connector provides the following capabilities:
- Get Attachment Name
- Get Attachment Extension
- Hash Attachment
- Is Empty
- Is Zipfile
- Get Size
- Zip
- Unzip
- Write
- Get Mimetype
Actions
Get Attachment Name
Retrieve the name of an attachment in Analyze Attachments using the provided attachment input.
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
attachment | object | Required | Attachment |
attachment.file | string | Optional | Parameter for Get Attachment Name |
attachment.file_name | string | Optional | Name of the resource |
Input Example
{"attachment":{"file":"string","file_name":"Example Name"}}
Output
Parameter | Type | Description |
|---|---|---|
attachment_name | string | Name of the attachment |
Output Example
{"attachment_name":"string"}
Get Extension
Retrieve the file extension from a specified attachment name in Analyze Attachments.
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
attachment | object | Required | Attachment |
attachment.file | string | Optional | Parameter for Get Extension |
attachment.file_name | string | Optional | Name of the resource |
Input Example
{"attachment":{"file":"string","file_name":"Example Name"}}
Output
Parameter | Type | Description |
|---|---|---|
extension | string | Extension of the attachment name |
Output Example
{"extension":"string"}
Hash Attachment
Generate a hash value for an attachment using specified algorithms by providing the attachment as input.
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
attachment | object | Required | Attachment |
attachment.file | string | Optional | Parameter for Hash Attachment |
attachment.file_name | string | Optional | Name of the resource |
algorithm | string | Optional | The hash algorithm |
Input Example
{"attachment":{"file":"string","file_name":"Example Name"},"algorithm":"MD5"}
Output
Parameter | Type | Description |
|---|---|---|
hash | string | Hash of the file |
Output Example
{"hash":"string"}
Is Empty
Determine whether a provided attachment is empty, returning True if it is and False otherwise.
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
attachment | object | Required | Attachment |
attachment.file | string | Optional | Parameter for Is Empty |
attachment.file_name | string | Optional | Name of the resource |
Input Example
{"attachment":{"file":"string","file_name":"Example Name"}}
Output
Parameter | Type | Description |
|---|---|---|
is_empty | boolean | True if the attachment is empty. |
Output Example
{"is_empty":true}
Get Mimetype & Encoding
Identify the mimetype and encoding of an attachment file in Analyze Attachments using the provided attachment input.
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
attachment | object | Required | Attachment |
attachment.file | string | Optional | Parameter for Get Mimetype & Encoding |
attachment.file_name | string | Optional | Name of the resource |
Input Example
{"attachment":{"file":"string","file_name":"Example Name"}}
Output
Parameter | Type | Description |
|---|---|---|
type | string | Type of the attachment |
encoding | string | Encoding of the attachment |
Output Example
{"type":"string","encoding":"string"}
Get Size
Return the size of a specified attachment in bytes based on the provided attachment input.
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
attachment | object | Required | Attachment |
attachment.file | string | Optional | Parameter for Get Size |
attachment.file_name | string | Optional | Name of the resource |
Input Example
{"attachment":{"file":"string","file_name":"Example Name"}}
Output
Parameter | Type | Description |
|---|---|---|
size | number | Size of attachment in bytes |
Output Example
{"size":123}
Unzip Attachment
Extract attachments from a provided zip file for further analysis. Requires an attachment input.
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
attachment | object | Required | Attachment zip to extract. |
attachment.file | string | Optional | Parameter for Unzip Attachment |
attachment.file_name | string | Optional | Name of the resource |
password | string | Optional | Password of the zipfile. |
Input Example
{"attachment":{"file":"string","file_name":"Example Name"},"password":"string"}
Output
Parameter | Type | Description |
|---|---|---|
attachments | array | Array of attachments extracted from the zipfile. |
attachments.file | string | Output field: attachments.file |
attachments.file_name | string | Name of the resource |
Output Example
{"attachments":[]}
Write Attachment
Write specified text to an attachment and return the updated attachment using the provided attachment name and text.
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
attachment_name | string | Required | Name of the attachment. |
text | string | Required | Text to write to the attachment. |
Input Example
{"attachment_name":"Example Name","text":"string"}
Output
Parameter | Type | Description |
|---|---|---|
attachment | object | Output field: attachment |
attachment.file | string | Output field: attachment.file |
attachment.file_name | string | Name of the resource |
Output Example
{"attachment":{"file":"string","file_name":"Example Name"}}
Zip Attachments
Retrieve the size of specified attachments in bytes using Analyze Attachments by providing the attachments and attachment name as inputs.
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
attachments | array | Required | Array of attachments extracted from the zipfile. |
attachments.file | string | Optional | Parameter for Zip Attachments |
attachments.file_name | string | Optional | Name of the resource |
attachment_name | string | Required | Name for the new zipfile. |
password | string | Optional | Password to protect the zipfile. |
compression | number | Optional | Number between 1 to 9, 1 (more fast) <---> 9 (more compress) |
Input Example
{"attachments":[{"file":"string","file_name":"Example Name"}],"attachment_name":"Example Name","password":"string","compression":1}
Output
Parameter | Type | Description |
|---|---|---|
zip | object | Output field: zip |
zip.file | string | Output field: zip.file |
zip.file_name | string | Name of the resource |
Output Example
{"zip":{"file":"string","file_name":"Example Name"}}
Response Headers
Header | Description | Example |
|---|---|---|
Content-Type | The media type of the resource | application/json |
Date | The date and time at which the message was originated | Thu, 01 Jan 2024 00:00:00 GMT |