Skip to content

Commit

Permalink
fix: yara_script path moved to module extra vars. #3085
Browse files Browse the repository at this point in the history
  • Loading branch information
mauromalara committed Jul 20, 2022
1 parent 0abc978 commit df2a57b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@

- name: Copy the Yara script
copy:
src: "{{ YARA_SCRIPT }}"
src: "{{ yara_script }}"
dest: /var/ossec/active-response/bin/
owner: root
group: wazuh
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
- name: Run Yara scan to detect malware
description: Test the detection of a trojaned file
configuration_parameters:
YARA_SCRIPT: CUSTOM_YARA_SCRIPT_PATH
MALWARE_DOWNLOADER_SCRIPT: CUSTOM_MALWARE_SCRIPT_PATH
metadata:
rule.id: 108001
Expand Down
12 changes: 6 additions & 6 deletions tests/end_to_end/test_yara_integration/test_yara_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
malware_downloader_script = os.path.join(test_data_path, 'configuration', 'malware_downloader.sh')

# Update configuration with custom paths
configurations = config.update_configuration_template(configurations,
['CUSTOM_YARA_SCRIPT_PATH', 'CUSTOM_MALWARE_SCRIPT_PATH'],
[yara_script, malware_downloader_script])
configurations = config.update_configuration_template(configurations, ['CUSTOM_MALWARE_SCRIPT_PATH'],
[malware_downloader_script])
configuration_extra_vars = {'yara_script': yara_script}


@pytest.mark.parametrize('configuration,metadata', zip(configurations, configuration_metadata), ids=cases_ids)
Expand Down Expand Up @@ -71,9 +71,9 @@ def test_yara_integration(configure_environment, configuration, metadata, get_da
}
},
{
"term": {
"timestamp": f"{raised_alert_timestamp}"
}
"term": {
"timestamp": f"{raised_alert_timestamp}"
}
}
])

Expand Down

0 comments on commit df2a57b

Please sign in to comment.