Skip to content
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.

Commit

Permalink
add a check to see if we actually got the file
Browse files Browse the repository at this point in the history
  • Loading branch information
unixfreak0037 committed Jan 9, 2020
1 parent d24c6e3 commit ae90ecf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/saq/modules/fireeye.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ def execute_analysis(self, observable):
if self.delay_analysis(observable, analysis, seconds=30, timeout_minutes=60):
return True

# did we get the artifact file?
if not os.path.isdir(artifact_dir):
logging.warning(f"missing {artifact_dir}")
return False

# copy the contents of the directory into the alert storage directory
target_dir = os.path.join(self.root.storage_dir, f'fireeye_artifact_{observable.value}')
shutil.copytree(artifact_dir, target_dir)
Expand Down

0 comments on commit ae90ecf

Please sign in to comment.