File tree Expand file tree Collapse file tree 5 files changed +15
-8
lines changed
Expand file tree Collapse file tree 5 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ build-backend = "hatchling.build"
66
77[project ]
88name = " socketsecurity"
9- version = " 2.2.33 "
9+ version = " 2.2.34 "
1010requires-python = " >= 3.10"
1111license = {"file" = " LICENSE" }
1212dependencies = [
Original file line number Diff line number Diff line change 11__author__ = 'socket.dev'
2- __version__ = '2.2.33 '
2+ __version__ = '2.2.34 '
33USER_AGENT = f'SocketPythonCLI/{ __version__ } '
Original file line number Diff line number Diff line change @@ -442,12 +442,13 @@ def empty_head_scan_file() -> List[str]:
442442 Returns:
443443 List containing path to a temporary empty file
444444 """
445- # Create a temporary empty file
446- temp_fd , temp_path = tempfile .mkstemp (suffix = '.empty' , prefix = 'socket_baseline_' )
445+ # Create a temporary directory and then create our specific filename
446+ temp_dir = tempfile .gettempdir ()
447+ temp_path = os .path .join (temp_dir , '.socket.facts.json' )
447448
448- # Close the file descriptor since we just need the path
449- # The file is already created and empty
450- os . close ( temp_fd )
449+ # Create the empty file
450+ with open ( temp_path , 'w' ) as f :
451+ pass # Creates an empty file
451452
452453 log .debug (f"Created temporary empty file for baseline scan: { temp_path } " )
453454 return [temp_path ]
Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ def run_reachability_analysis(
100100 concurrency : Optional [int ] = None ,
101101 additional_params : Optional [List [str ]] = None ,
102102 allow_unverified : bool = False ,
103+ enable_debug : bool = False ,
103104 ) -> Dict [str , Any ]:
104105 """
105106 Run reachability analysis.
@@ -123,6 +124,7 @@ def run_reachability_analysis(
123124 concurrency: Concurrency level for analysis (must be >= 1)
124125 additional_params: Additional parameters to pass to coana CLI
125126 allow_unverified: Disable SSL certificate verification (sets NODE_TLS_REJECT_UNAUTHORIZED=0)
127+ enable_debug: Enable debug mode (passes -d flag to coana CLI)
126128
127129 Returns:
128130 Dict containing scan_id and report_path
@@ -173,6 +175,9 @@ def run_reachability_analysis(
173175 if concurrency :
174176 cmd .extend (["--concurrency" , str (concurrency )])
175177
178+ if enable_debug :
179+ cmd .append ("-d" )
180+
176181 # Add any additional parameters provided by the user
177182 if additional_params :
178183 cmd .extend (additional_params )
Original file line number Diff line number Diff line change @@ -288,7 +288,8 @@ def main_code():
288288 version = config .reach_version ,
289289 concurrency = config .reach_concurrency ,
290290 additional_params = config .reach_additional_params ,
291- allow_unverified = config .allow_unverified
291+ allow_unverified = config .allow_unverified ,
292+ enable_debug = config .enable_debug
292293 )
293294
294295 log .info (f"Reachability analysis completed successfully" )
You can’t perform that action at this time.
0 commit comments