We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
plaso VSS option incorrect
https://github.com/log2timeline/plaso/blob/9cc50c972b257d6cbbea38fa8b39f0bf027e0960/plaso/cli/storage_media_tool.py#L581

^ option should be --no_vss in below location
https://github.com/google/turbinia/blob/86158a95a0b134978628c1680d0997667ec7c935/turbinia/workers/plaso.py#L43

Please check how this will work if recipes pass in the --vss_stores option

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `turbinia/workers/binary_extractor.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 # Copyright 2015 Google Inc.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #      http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 """Task to extract binary files from an evidence object provided."""
16 
17 from __future__ import unicode_literals
18 
19 import logging
20 import json
21 import os
22 import textwrap
23 
24 from turbinia import TurbiniaException
25 from turbinia import config
26 from turbinia.evidence import EvidenceState as state
27 from turbinia.workers import TurbiniaTask
28 from turbinia.evidence import BinaryExtraction
29 
30 
31 class BinaryExtractorTask(TurbiniaTask):
32   """Extract binaries out of evidence and provide JSON file with hashes.
33 
34   Attributes:
35     json_path(str): path to output JSON file.
36     binary_extraction_dir(str): path to extraction directory.
37   """
38 
39   REQUIRED_STATES = [state.ATTACHED]
40 
41   TASK_CONFIG = {
42       # This is an arbitrary path that will be put into a custom artifact
43       # definition so that the files at this path are extracted.  See the path
44       # specification format in the ForensicArtifacts documentation:
45       # https://artifacts.readthedocs.io/en/latest/sources/Format-specification.html
46       'binary_extraction_path': None
47   }
48 
49   def __init__(self, *args, **kwargs):
50     """Initializes BinaryExtractorTask."""
51     super(BinaryExtractorTask, self).__init__(*args, **kwargs)
52     self.json_path = None
53     self.binary_extraction_dir = None
54 
55   def check_extraction(self):
56     """Checks counts for extracted binaries and hashes.
57 
58     Returns:
59       Tuple(
60         binary_cnt(int): Number of extracted binaries.
61         hash_cnt(int): Number of extracted hashes.
62       )
63     """
64 
65     # Check if hashes.json file was generated.
66     if not os.path.exists(self.json_path):
67       raise TurbiniaException(
68           'The file {0:s} was not found. Please ensure you '
69           'have Plaso version 20191203 or greater deployed'.format(
70               self.json_path))
71 
72     with open(self.json_path) as json_file:
73       hashes = json.load(json_file)
74 
75     binary_cnt = sum(
76         len(files) for _, _, files in os.walk(self.binary_extraction_dir)) - 1
77     hash_cnt = len(hashes)
78 
79     return (binary_cnt, hash_cnt)
80 
81   def run(self, evidence, result):
82     """Task that extracts binaries with image_export.py.
83 
84     Args:
85         evidence (Evidence object):  The evidence we will process.
86         result (TurbiniaTaskResult): The object to place task results into.
87 
88     Returns:
89         TurbiniaTaskResult object.
90     """
91 
92     config.LoadConfig()
93     binary_extraction_evidence = BinaryExtraction()
94 
95     binary_extraction_evidence.local_path = self.output_dir
96     binary_extraction_evidence.uncompressed_directory = self.output_dir
97     image_export_log = os.path.join(self.output_dir, 'binary_extraction.log')
98     self.binary_extraction_dir = os.path.join(
99         self.output_dir, 'extracted_binaries')
100     self.json_path = os.path.join(self.binary_extraction_dir, 'hashes.json')
101 
102     cmd = [
103         'image_export.py', '--partitions', 'all', '--volumes', 'all',
104         '--no_vss', '--unattended', '--logfile', image_export_log
105     ]
106 
107     if self.task_config.get('binary_extraction_path'):
108       artifact_dir = os.path.join(self.tmp_dir, 'artifacts')
109       artifact_file = os.path.join(artifact_dir, 'artifacts.yaml')
110       os.mkdir(artifact_dir)
111       binary_extraction_path = self.task_config.get('binary_extraction_path')
112       result.log(
113           'Using custom artifact path {0:s}'.format(binary_extraction_path))
114 
115       artifact_text = textwrap.dedent(
116           """
117           name: TurbiniaCustomArtifact
118           doc: Ad hoc artifact created for file extraction.
119           sources:
120           - type: FILE
121             attributes:
122                 paths: ['{0:s}']
123           """)
124       artifact_text = artifact_text.format(binary_extraction_path)
125 
126       with open(artifact_file, 'wb') as artifact:
127         artifact.write(artifact_text.encode('utf-8'))
128       cmd.extend([
129           '--custom_artifact_definitions', artifact_file, '--artifact_filters',
130           'TurbiniaCustomArtifact'
131       ])
132     else:
133       cmd.extend(['--signatures', 'elf,exe_mz'])
134 
135     if evidence.credentials:
136       for credential_type, credential_data in evidence.credentials:
137         cmd.extend([
138             '--credential', '{0:s}:{1:s}'.format(
139                 credential_type, credential_data)
140         ])
141 
142     if config.DEBUG_TASKS or self.task_config.get('debug_tasks'):
143       cmd.append('-d')
144     cmd.extend(['-w', self.binary_extraction_dir, evidence.local_path])
145 
146     result.log('Running image_export as [{0:s}]'.format(' '.join(cmd)))
147     self.execute(
148         cmd, result, log_files=[image_export_log, self.json_path],
149         new_evidence=[binary_extraction_evidence])
150 
151     try:
152       binary_cnt, hash_cnt = self.check_extraction()
153     except TurbiniaException as exception:
154       message = 'File extraction failed: {0!s}'.format(exception)
155       result.close(self, success=False, status=message)
156       return result
157 
158     status = (
159         'Extracted {0:d} hashes and {1:d} files from the '
160         'evidence.'.format(hash_cnt, binary_cnt))
161 
162     if hash_cnt != binary_cnt:
163       result.log(
164           'Number of extracted binaries is not equal to the number '
165           'of extracted hashes. This might indicate issues with '
166           'image_export.py. Check binary_extraction.log for more '
167           'details.', logging.WARNING)
168 
169     binary_extraction_evidence.compress()
170     result.close(self, success=True, status=status)
171 
172     return result
173
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/turbinia/workers/binary_extractor.py b/turbinia/workers/binary_extractor.py
--- a/turbinia/workers/binary_extractor.py
+++ b/turbinia/workers/binary_extractor.py
@@ -101,7 +101,7 @@
 
     cmd = [
         'image_export.py', '--partitions', 'all', '--volumes', 'all',
-        '--no_vss', '--unattended', '--logfile', image_export_log
+        '--vss_stores', 'none', '--unattended', '--logfile', image_export_log
     ]
 
     if self.task_config.get('binary_extraction_path'):

{"golden_diff": "diff --git a/turbinia/workers/binary_extractor.py b/turbinia/workers/binary_extractor.py\n--- a/turbinia/workers/binary_extractor.py\n+++ b/turbinia/workers/binary_extractor.py\n@@ -101,7 +101,7 @@\n \n     cmd = [\n         'image_export.py', '--partitions', 'all', '--volumes', 'all',\n-        '--no_vss', '--unattended', '--logfile', image_export_log\n+        '--vss_stores', 'none', '--unattended', '--logfile', image_export_log\n     ]\n \n     if self.task_config.get('binary_extraction_path'):\n", "issue": "plaso VSS option incorrect\nhttps://github.com/log2timeline/plaso/blob/9cc50c972b257d6cbbea38fa8b39f0bf027e0960/plaso/cli/storage_media_tool.py#L581\r\n\r\n^ option should be --no_vss in below location\r\nhttps://github.com/google/turbinia/blob/86158a95a0b134978628c1680d0997667ec7c935/turbinia/workers/plaso.py#L43\r\n\r\nPlease check how this will work if recipes pass in the --vss_stores option\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n# Copyright 2015 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\"\"\"Task to extract binary files from an evidence object provided.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport json\nimport os\nimport textwrap\n\nfrom turbinia import TurbiniaException\nfrom turbinia import config\nfrom turbinia.evidence import EvidenceState as state\nfrom turbinia.workers import TurbiniaTask\nfrom turbinia.evidence import BinaryExtraction\n\n\nclass BinaryExtractorTask(TurbiniaTask):\n  \"\"\"Extract binaries out of evidence and provide JSON file with hashes.\n\n  Attributes:\n    json_path(str): path to output JSON file.\n    binary_extraction_dir(str): path to extraction directory.\n  \"\"\"\n\n  REQUIRED_STATES = [state.ATTACHED]\n\n  TASK_CONFIG = {\n      # This is an arbitrary path that will be put into a custom artifact\n      # definition so that the files at this path are extracted.  See the path\n      # specification format in the ForensicArtifacts documentation:\n      # https://artifacts.readthedocs.io/en/latest/sources/Format-specification.html\n      'binary_extraction_path': None\n  }\n\n  def __init__(self, *args, **kwargs):\n    \"\"\"Initializes BinaryExtractorTask.\"\"\"\n    super(BinaryExtractorTask, self).__init__(*args, **kwargs)\n    self.json_path = None\n    self.binary_extraction_dir = None\n\n  def check_extraction(self):\n    \"\"\"Checks counts for extracted binaries and hashes.\n\n    Returns:\n      Tuple(\n        binary_cnt(int): Number of extracted binaries.\n        hash_cnt(int): Number of extracted hashes.\n      )\n    \"\"\"\n\n    # Check if hashes.json file was generated.\n    if not os.path.exists(self.json_path):\n      raise TurbiniaException(\n          'The file {0:s} was not found. Please ensure you '\n          'have Plaso version 20191203 or greater deployed'.format(\n              self.json_path))\n\n    with open(self.json_path) as json_file:\n      hashes = json.load(json_file)\n\n    binary_cnt = sum(\n        len(files) for _, _, files in os.walk(self.binary_extraction_dir)) - 1\n    hash_cnt = len(hashes)\n\n    return (binary_cnt, hash_cnt)\n\n  def run(self, evidence, result):\n    \"\"\"Task that extracts binaries with image_export.py.\n\n    Args:\n        evidence (Evidence object):  The evidence we will process.\n        result (TurbiniaTaskResult): The object to place task results into.\n\n    Returns:\n        TurbiniaTaskResult object.\n    \"\"\"\n\n    config.LoadConfig()\n    binary_extraction_evidence = BinaryExtraction()\n\n    binary_extraction_evidence.local_path = self.output_dir\n    binary_extraction_evidence.uncompressed_directory = self.output_dir\n    image_export_log = os.path.join(self.output_dir, 'binary_extraction.log')\n    self.binary_extraction_dir = os.path.join(\n        self.output_dir, 'extracted_binaries')\n    self.json_path = os.path.join(self.binary_extraction_dir, 'hashes.json')\n\n    cmd = [\n        'image_export.py', '--partitions', 'all', '--volumes', 'all',\n        '--no_vss', '--unattended', '--logfile', image_export_log\n    ]\n\n    if self.task_config.get('binary_extraction_path'):\n      artifact_dir = os.path.join(self.tmp_dir, 'artifacts')\n      artifact_file = os.path.join(artifact_dir, 'artifacts.yaml')\n      os.mkdir(artifact_dir)\n      binary_extraction_path = self.task_config.get('binary_extraction_path')\n      result.log(\n          'Using custom artifact path {0:s}'.format(binary_extraction_path))\n\n      artifact_text = textwrap.dedent(\n          \"\"\"\n          name: TurbiniaCustomArtifact\n          doc: Ad hoc artifact created for file extraction.\n          sources:\n          - type: FILE\n            attributes:\n                paths: ['{0:s}']\n          \"\"\")\n      artifact_text = artifact_text.format(binary_extraction_path)\n\n      with open(artifact_file, 'wb') as artifact:\n        artifact.write(artifact_text.encode('utf-8'))\n      cmd.extend([\n          '--custom_artifact_definitions', artifact_file, '--artifact_filters',\n          'TurbiniaCustomArtifact'\n      ])\n    else:\n      cmd.extend(['--signatures', 'elf,exe_mz'])\n\n    if evidence.credentials:\n      for credential_type, credential_data in evidence.credentials:\n        cmd.extend([\n            '--credential', '{0:s}:{1:s}'.format(\n                credential_type, credential_data)\n        ])\n\n    if config.DEBUG_TASKS or self.task_config.get('debug_tasks'):\n      cmd.append('-d')\n    cmd.extend(['-w', self.binary_extraction_dir, evidence.local_path])\n\n    result.log('Running image_export as [{0:s}]'.format(' '.join(cmd)))\n    self.execute(\n        cmd, result, log_files=[image_export_log, self.json_path],\n        new_evidence=[binary_extraction_evidence])\n\n    try:\n      binary_cnt, hash_cnt = self.check_extraction()\n    except TurbiniaException as exception:\n      message = 'File extraction failed: {0!s}'.format(exception)\n      result.close(self, success=False, status=message)\n      return result\n\n    status = (\n        'Extracted {0:d} hashes and {1:d} files from the '\n        'evidence.'.format(hash_cnt, binary_cnt))\n\n    if hash_cnt != binary_cnt:\n      result.log(\n          'Number of extracted binaries is not equal to the number '\n          'of extracted hashes. This might indicate issues with '\n          'image_export.py. Check binary_extraction.log for more '\n          'details.', logging.WARNING)\n\n    binary_extraction_evidence.compress()\n    result.close(self, success=True, status=status)\n\n    return result\n", "path": "turbinia/workers/binary_extractor.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n# Copyright 2015 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\"\"\"Task to extract binary files from an evidence object provided.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport json\nimport os\nimport textwrap\n\nfrom turbinia import TurbiniaException\nfrom turbinia import config\nfrom turbinia.evidence import EvidenceState as state\nfrom turbinia.workers import TurbiniaTask\nfrom turbinia.evidence import BinaryExtraction\n\n\nclass BinaryExtractorTask(TurbiniaTask):\n  \"\"\"Extract binaries out of evidence and provide JSON file with hashes.\n\n  Attributes:\n    json_path(str): path to output JSON file.\n    binary_extraction_dir(str): path to extraction directory.\n  \"\"\"\n\n  REQUIRED_STATES = [state.ATTACHED]\n\n  TASK_CONFIG = {\n      # This is an arbitrary path that will be put into a custom artifact\n      # definition so that the files at this path are extracted.  See the path\n      # specification format in the ForensicArtifacts documentation:\n      # https://artifacts.readthedocs.io/en/latest/sources/Format-specification.html\n      'binary_extraction_path': None\n  }\n\n  def __init__(self, *args, **kwargs):\n    \"\"\"Initializes BinaryExtractorTask.\"\"\"\n    super(BinaryExtractorTask, self).__init__(*args, **kwargs)\n    self.json_path = None\n    self.binary_extraction_dir = None\n\n  def check_extraction(self):\n    \"\"\"Checks counts for extracted binaries and hashes.\n\n    Returns:\n      Tuple(\n        binary_cnt(int): Number of extracted binaries.\n        hash_cnt(int): Number of extracted hashes.\n      )\n    \"\"\"\n\n    # Check if hashes.json file was generated.\n    if not os.path.exists(self.json_path):\n      raise TurbiniaException(\n          'The file {0:s} was not found. Please ensure you '\n          'have Plaso version 20191203 or greater deployed'.format(\n              self.json_path))\n\n    with open(self.json_path) as json_file:\n      hashes = json.load(json_file)\n\n    binary_cnt = sum(\n        len(files) for _, _, files in os.walk(self.binary_extraction_dir)) - 1\n    hash_cnt = len(hashes)\n\n    return (binary_cnt, hash_cnt)\n\n  def run(self, evidence, result):\n    \"\"\"Task that extracts binaries with image_export.py.\n\n    Args:\n        evidence (Evidence object):  The evidence we will process.\n        result (TurbiniaTaskResult): The object to place task results into.\n\n    Returns:\n        TurbiniaTaskResult object.\n    \"\"\"\n\n    config.LoadConfig()\n    binary_extraction_evidence = BinaryExtraction()\n\n    binary_extraction_evidence.local_path = self.output_dir\n    binary_extraction_evidence.uncompressed_directory = self.output_dir\n    image_export_log = os.path.join(self.output_dir, 'binary_extraction.log')\n    self.binary_extraction_dir = os.path.join(\n        self.output_dir, 'extracted_binaries')\n    self.json_path = os.path.join(self.binary_extraction_dir, 'hashes.json')\n\n    cmd = [\n        'image_export.py', '--partitions', 'all', '--volumes', 'all',\n        '--vss_stores', 'none', '--unattended', '--logfile', image_export_log\n    ]\n\n    if self.task_config.get('binary_extraction_path'):\n      artifact_dir = os.path.join(self.tmp_dir, 'artifacts')\n      artifact_file = os.path.join(artifact_dir, 'artifacts.yaml')\n      os.mkdir(artifact_dir)\n      binary_extraction_path = self.task_config.get('binary_extraction_path')\n      result.log(\n          'Using custom artifact path {0:s}'.format(binary_extraction_path))\n\n      artifact_text = textwrap.dedent(\n          \"\"\"\n          name: TurbiniaCustomArtifact\n          doc: Ad hoc artifact created for file extraction.\n          sources:\n          - type: FILE\n            attributes:\n                paths: ['{0:s}']\n          \"\"\")\n      artifact_text = artifact_text.format(binary_extraction_path)\n\n      with open(artifact_file, 'wb') as artifact:\n        artifact.write(artifact_text.encode('utf-8'))\n      cmd.extend([\n          '--custom_artifact_definitions', artifact_file, '--artifact_filters',\n          'TurbiniaCustomArtifact'\n      ])\n    else:\n      cmd.extend(['--signatures', 'elf,exe_mz'])\n\n    if evidence.credentials:\n      for credential_type, credential_data in evidence.credentials:\n        cmd.extend([\n            '--credential', '{0:s}:{1:s}'.format(\n                credential_type, credential_data)\n        ])\n\n    if config.DEBUG_TASKS or self.task_config.get('debug_tasks'):\n      cmd.append('-d')\n    cmd.extend(['-w', self.binary_extraction_dir, evidence.local_path])\n\n    result.log('Running image_export as [{0:s}]'.format(' '.join(cmd)))\n    self.execute(\n        cmd, result, log_files=[image_export_log, self.json_path],\n        new_evidence=[binary_extraction_evidence])\n\n    try:\n      binary_cnt, hash_cnt = self.check_extraction()\n    except TurbiniaException as exception:\n      message = 'File extraction failed: {0!s}'.format(exception)\n      result.close(self, success=False, status=message)\n      return result\n\n    status = (\n        'Extracted {0:d} hashes and {1:d} files from the '\n        'evidence.'.format(hash_cnt, binary_cnt))\n\n    if hash_cnt != binary_cnt:\n      result.log(\n          'Number of extracted binaries is not equal to the number '\n          'of extracted hashes. This might indicate issues with '\n          'image_export.py. Check binary_extraction.log for more '\n          'details.', logging.WARNING)\n\n    binary_extraction_evidence.compress()\n    result.close(self, success=True, status=status)\n\n    return result\n", "path": "turbinia/workers/binary_extractor.py"}]}