@@ -68,6 +68,7 @@ class MultiImageProjectManager():
68
68
69
69
def __init__ (self , args ):
70
70
self .debug = args .debug
71
+ self .binary = args .binary
71
72
self .log_config ()
72
73
self .base_url = args .base_url
73
74
with open (args .token_file , 'r' ) as tf :
@@ -412,7 +413,7 @@ def scan_container_images(self):
412
413
parent_version ,
413
414
detect_options ,
414
415
hub = hub ,
415
- binary = False
416
+ binary = self . binary
416
417
)
417
418
child ['scan_results' ] = results
418
419
except Exception :
@@ -449,14 +450,21 @@ def parse_command_args():
449
450
parser .add_argument ("-str" , "--string-to-put-in-front-of-subproject-name" , required = False , help = "Prefix string for subproject names" )
450
451
parser .add_argument ("-d" , "--debug" , action = 'store_true' , help = "Set debug output on" )
451
452
parser .add_argument ("--strict" , action = 'store_true' , help = "Fail if existing (sub)project versions already exist" )
453
+ parser .add_argument ("--binary" , action = 'store_true' , help = "Use binary scan for analysis" )
452
454
return parser .parse_args ()
453
455
454
456
def main ():
457
+ from datetime import datetime
458
+ timestamp = datetime .now ().strftime ("%Y-%m-%d_%H%M%S" )
455
459
args = parse_command_args ()
456
460
mipm = MultiImageProjectManager (args )
457
461
logging .info (f"Parsed { len (mipm .project_data ['subprojects' ])} projects from specification data" )
458
462
mipm .proceed ()
459
-
463
+ filename_complete = f"{ args .project_name } -{ args .version_name } -{ timestamp } -full.json"
464
+ filename_failures = f"{ args .project_name } -{ args .version_name } -{ timestamp } -failures.json"
465
+ # write full processing log
466
+ with open (filename_complete , "w" ) as f :
467
+ json .dump (mipm .project_data , f , indent = 2 )
460
468
461
469
if __name__ == "__main__" :
462
470
sys .exit (main ())
0 commit comments