We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2ab91d9 + e688530 commit 2bb4aaeCopy full SHA for 2bb4aae
src/main.py
@@ -2,6 +2,7 @@
2
"""This module is the main core of this github action"""
3
4
import os
5
+from shutil import rmtree
6
from lib.detect import detect_target_type
7
from lib.install import install
8
from lib.scan import ScanCommand
@@ -164,6 +165,12 @@
164
165
sbom_format=SBOM_FORMAT,
166
)
167
scan_command.execute()
168
+ # Delete the converted images
169
+ # This is done to avoid errors and scanning again same
170
+ # images when the action is run multiple times
171
+ if os.path.isdir(CONVERT_DIR):
172
+ rmtree(CONVERT_DIR, ignore_errors=True)
173
+ print(f"Deleted {CONVERT_DIR}")
174
175
if VULN_REPORT:
176
generate_vuln_report(OUTPUT_DIR)
0 commit comments