Merge branch 'master' into fix-630

This commit is contained in:
Moritz Raabe
2021-06-28 11:32:27 +02:00
17 changed files with 99 additions and 57 deletions

View File

@@ -96,9 +96,12 @@ def get_capa_results(args):
capabilities (dict): the matched capabilities and their result objects
"""
rules, sigpaths, format, path = args
should_save_workspace = os.environ.get("CAPA_SAVE_WORKSPACE") not in ("0", "no", "NO", "n", None)
logger.info("computing capa results for: %s", path)
try:
extractor = capa.main.get_extractor(path, format, capa.main.BACKEND_VIV, sigpaths, disable_progress=True)
extractor = capa.main.get_extractor(
path, format, capa.main.BACKEND_VIV, sigpaths, should_save_workspace, disable_progress=True
)
except capa.main.UnsupportedFormatError:
# i'm 100% sure if multiprocessing will reliably raise exceptions across process boundaries.
# so instead, return an object with explicit success/failure status.