@@ -68,6 +68,7 @@ class MultiImageProjectManager():
6868
6969 def __init__ (self , args ):
7070 self .debug = args .debug
71+ self .binary = args .binary
7172 self .log_config ()
7273 self .base_url = args .base_url
7374 with open (args .token_file , 'r' ) as tf :
@@ -412,7 +413,7 @@ def scan_container_images(self):
412413 parent_version ,
413414 detect_options ,
414415 hub = hub ,
415- binary = False
416+ binary = self . binary
416417 )
417418 child ['scan_results' ] = results
418419 except Exception :
@@ -449,14 +450,21 @@ def parse_command_args():
449450 parser .add_argument ("-str" , "--string-to-put-in-front-of-subproject-name" , required = False , help = "Prefix string for subproject names" )
450451 parser .add_argument ("-d" , "--debug" , action = 'store_true' , help = "Set debug output on" )
451452 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" )
452454 return parser .parse_args ()
453455
454456def main ():
457+ from datetime import datetime
458+ timestamp = datetime .now ().strftime ("%Y-%m-%d_%H%M%S" )
455459 args = parse_command_args ()
456460 mipm = MultiImageProjectManager (args )
457461 logging .info (f"Parsed { len (mipm .project_data ['subprojects' ])} projects from specification data" )
458462 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 )
460468
461469if __name__ == "__main__" :
462470 sys .exit (main ())
0 commit comments