Skip to content

Commit

Permalink
update summary message
Browse files Browse the repository at this point in the history
  • Loading branch information
aarontp committed Nov 16, 2023
1 parent d006957 commit 185a961
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions turbinia/workers/containerd.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ def run(self, evidence, result):
f'Found {len(container_ids)} containers: {", ".join(container_ids)}')

# 2. Add containers as evidences
new_evidence = []
for container in containers:
namespace = container.get('Namespace')
container_id = container.get('ID')
Expand Down Expand Up @@ -251,17 +252,16 @@ def run(self, evidence, result):
container_evidence = ContainerdContainer(
namespace=namespace, container_id=container_id,
image_name=image_short, pod_name=pod_name)
new_evidence.append(container_evidence.name)

result.add_evidence(container_evidence, evidence.config)
result.log(
f'Adding container evidence {container_evidence.name} '
f'type {container_type}')

summary = (
f'Found {len(container_ids)} containers, added '
f'{len(filtered_container_list)} (filtered out '
f'{len(container_ids) - len(filtered_container_list)}): '
f'{", ".join(filtered_container_list)}')
f'Found {len(container_ids)} containers, added {len(new_evidence)} '
f'(filtered out {len(filtered_container_list)})')
success = True
if filtered_container_list:
report_data.append(
Expand Down

0 comments on commit 185a961

Please sign in to comment.