---
title: Scan File
slug: homologacao-atmosphere/RF3F-scan-file
description: Learn how to perform a YARA rule scan on a file using this script. Simply provide the file path as a parameter, with an optional file read timeout. Utilizing parameters from the YARA module, this document also provides an example of how to use the script 
createdAt: 2022-08-01T17:42:24.000Z
---

## Resumo

- Executa o scan de regras YARA em um arquivo.

## Parâmetros

| **Parâmetro**       | **Requerido** | **Tipo** | **Escolhas \| Valor Padrão** | **Comentários**                       |
| ------------------- | ------------- | -------- | ---------------------------- | ------------------------------------- |
| file\_path          | Sim           | string   |                              | Caminho do arquivo a ser escaneado.   |
| file\_read\_timeout |               | int      | Default: 60                  | Tempo limite para leitura de arquivo. |

Utiliza parâmetros do módulo [](https://docs.simonops.com/homologacao-atmosphere/shell)[YARA](/yara).

## Exemplos

```yaml
- name: Executa o scan em um arquivo específico.
  yara_scan_file:
    file_path: /Users/Teste/some_script.sh
    rules:
        hexExample: |
          /* This will match any file containing "hello" anywhere. */
          rule AsciiExample {
            strings:$ascii_string = "hello"
            condition:$ascii_string
          }$ascii_string
        }
    register: result
```

## Valores retornados

| **Chave**        | **Tipo** | **Retornado quando** | **Descrição**     |
| ---------------- | -------- | -------------------- | ----------------- |
| scan\_detection  | string   | Sempre               | Saída da execução |

