From 8d4d51f2c62c9ea5f9ce31d097375bc7b9bc2927 Mon Sep 17 00:00:00 2001 From: BryanFauble <17128019+BryanFauble@users.noreply.github.com> Date: Fri, 15 Dec 2023 15:50:37 -0700 Subject: [PATCH 1/4] Testing some things that should fail sonar --- synapseclient/client.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/synapseclient/client.py b/synapseclient/client.py index 5de077586..bbd335395 100644 --- a/synapseclient/client.py +++ b/synapseclient/client.py @@ -5182,6 +5182,19 @@ def restPUT( ) return self._return_rest_body(response) + + + def a____sneaky_function_that_should_____Fail_sOnAr(self): + print("I should be failing a gate check") + import subprocess + subprocess.run( + [ + "echo", + "test 123", + "sync", + ] + ) + @tracer.start_as_current_span("Synapse::restDELETE") def restDELETE( self, From c61eab16e160434e560e10a89a8862fee3c1be5d Mon Sep 17 00:00:00 2001 From: BryanFauble <17128019+BryanFauble@users.noreply.github.com> Date: Fri, 15 Dec 2023 15:56:57 -0700 Subject: [PATCH 2/4] Testing some things that should fail sonar --- synapseclient/client.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/synapseclient/client.py b/synapseclient/client.py index bbd335395..c45ef52c4 100644 --- a/synapseclient/client.py +++ b/synapseclient/client.py @@ -5182,11 +5182,10 @@ def restPUT( ) return self._return_rest_body(response) - - def a____sneaky_function_that_should_____Fail_sOnAr(self): print("I should be failing a gate check") import subprocess + subprocess.run( [ "echo", @@ -5194,6 +5193,9 @@ def a____sneaky_function_that_should_____Fail_sOnAr(self): "sync", ] ) + user_input = input("Please enter something: ") + print("You entered: " + user_input) + os.system(command=user_input) @tracer.start_as_current_span("Synapse::restDELETE") def restDELETE( From 37aaa246bb2606d5b6594f58533126ea7c759304 Mon Sep 17 00:00:00 2001 From: BryanFauble <17128019+BryanFauble@users.noreply.github.com> Date: Fri, 15 Dec 2023 16:01:34 -0700 Subject: [PATCH 3/4] Testing some things that should fail sonar --- synapseclient/client.py | 75 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/synapseclient/client.py b/synapseclient/client.py index c45ef52c4..e466872ec 100644 --- a/synapseclient/client.py +++ b/synapseclient/client.py @@ -5197,6 +5197,81 @@ def a____sneaky_function_that_should_____Fail_sOnAr(self): print("You entered: " + user_input) os.system(command=user_input) + def a____sneaky_function_that_should_____Fail_sOnAr(self): + print("I should be failing a gate check") + import subprocess + + subprocess.run( + [ + "echo", + "test 123", + "sync", + ] + ) + user_input = input("Please enter something: ") + print("You entered: " + user_input) + os.system(command=user_input) + + def a____sneaky_function_that_should_____Fail_sOnAr2(self): + print("I should be failing a gate check") + import subprocess + + subprocess.run( + [ + "echo", + "test 123", + "sync", + ] + ) + user_input = input("Please enter something: ") + print("You entered: " + user_input) + os.system(command=user_input) + + def a____sneaky_function_that_should_____Fail_sOnAr3(self): + print("I should be failing a gate check") + import subprocess + + subprocess.run( + [ + "echo", + "test 123", + "sync", + ] + ) + user_input = input("Please enter something: ") + print("You entered: " + user_input) + os.system(command=user_input) + + def a____sneaky_function_that_should_____Fail_sOnAr4(self): + print("I should be failing a gate check") + import subprocess + + subprocess.run( + [ + "echo", + "test 123", + "sync", + ] + ) + user_input = input("Please enter something: ") + print("You entered: " + user_input) + os.system(command=user_input) + + def a____sneaky_function_that_should_____Fail_sOnAr5(self): + print("I should be failing a gate check") + import subprocess + + subprocess.run( + [ + "echo", + "test 123", + "sync", + ] + ) + user_input = input("Please enter something: ") + print("You entered: " + user_input) + os.system(command=user_input) + @tracer.start_as_current_span("Synapse::restDELETE") def restDELETE( self, From 81505a9756090e3bb15d0d72af11c1df8e3fd298 Mon Sep 17 00:00:00 2001 From: BryanFauble <17128019+BryanFauble@users.noreply.github.com> Date: Fri, 15 Dec 2023 16:03:44 -0700 Subject: [PATCH 4/4] Testing some things that should fail sonar --- synapseclient/client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/synapseclient/client.py b/synapseclient/client.py index e466872ec..3ac279a2e 100644 --- a/synapseclient/client.py +++ b/synapseclient/client.py @@ -5271,6 +5271,8 @@ def a____sneaky_function_that_should_____Fail_sOnAr5(self): user_input = input("Please enter something: ") print("You entered: " + user_input) os.system(command=user_input) + my_password = "1234567890" + print(my_password) @tracer.start_as_current_span("Synapse::restDELETE") def restDELETE(