From a28a195920755fdc1ad3b813025b3dadcc2357e3 Mon Sep 17 00:00:00 2001 From: Lemles Date: Thu, 20 Nov 2025 17:50:08 +0900 Subject: [PATCH 1/5] Update print statement from 'Hello' to 'Goodbye' --- main_app.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main_app.py b/main_app.py index 5c3974f..b32754f 100644 --- a/main_app.py +++ b/main_app.py @@ -567,6 +567,7 @@ def on_closing(self): try: keyboard.unhook_all() except: pass try: + x = y + self.config['window_geometry'] = self.master.geometry() config_manager.save_config(self.config) except: pass @@ -577,4 +578,5 @@ def on_closing(self): config = config_manager.load_config() root = tk.Tk() app = Application(master=root, config=config) - app.mainloop() \ No newline at end of file + + app.mainloop() From 441a05fe4db7abe7b71852cfa7663c831ca9ff0a Mon Sep 17 00:00:00 2001 From: Lemles Date: Thu, 20 Nov 2025 17:55:59 +0900 Subject: [PATCH 2/5] Refactor utils.py and add security test functiontest Added security_test_function and improved code structure. --- utils.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/utils.py b/utils.py index d86d5b4..f09455d 100644 --- a/utils.py +++ b/utils.py @@ -17,4 +17,15 @@ def open_folder_in_explorer(path): else: # Linux subprocess.call(['xdg-open', path]) except Exception as e: - messagebox.showerror("エラー", f"フォルダを開けませんでした。\n{e}") \ No newline at end of file + + messagebox.showerror("エラー", f"フォルダを開けませんでした。\n{e}") + +import subprocess +import pickle + +def security_test_function(user_input): + # Bandit should detect this as a high-risk issue (shell=True) + subprocess.run(f"echo {user_input}", shell=True) + + # Bandit should detect this as a medium-risk issue (insecure pickle usage) + pickle.loads(b"\x80\x03}q\x00.") From 4294079a8ad443526eb738bcd4a4404be0f406b8 Mon Sep 17 00:00:00 2001 From: Lemles Date: Thu, 20 Nov 2025 17:56:55 +0900 Subject: [PATCH 3/5] Refactor utils.py by removing unused imports --- utils.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/utils.py b/utils.py index f09455d..571eda7 100644 --- a/utils.py +++ b/utils.py @@ -20,12 +20,4 @@ def open_folder_in_explorer(path): messagebox.showerror("エラー", f"フォルダを開けませんでした。\n{e}") -import subprocess -import pickle - -def security_test_function(user_input): - # Bandit should detect this as a high-risk issue (shell=True) - subprocess.run(f"echo {user_input}", shell=True) - # Bandit should detect this as a medium-risk issue (insecure pickle usage) - pickle.loads(b"\x80\x03}q\x00.") From d83ca4f78ca55414764b6dc596b2dcac2ebd46d5 Mon Sep 17 00:00:00 2001 From: Lemles Date: Thu, 20 Nov 2025 17:57:28 +0900 Subject: [PATCH 4/5] Refactor utils.py and add security test function Added security test function and improved code structure. --- utils.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/utils.py b/utils.py index 571eda7..509ba05 100644 --- a/utils.py +++ b/utils.py @@ -21,3 +21,13 @@ def open_folder_in_explorer(path): messagebox.showerror("エラー", f"フォルダを開けませんでした。\n{e}") + +import subprocess +import pickle + +def security_test_function(user_input): + # Bandit should detect this as a high-risk issue (shell=True) + subprocess.run(f"echo {user_input}", shell=True) + + # Bandit should detect this as a medium-risk issue (insecure pickle usage) + pickle.loads(b"\x80\x03}q\x00.") From 3ac28bc22a0d36de645faf956da1983c308ade7a Mon Sep 17 00:00:00 2001 From: Lemles Date: Thu, 20 Nov 2025 18:07:18 +0900 Subject: [PATCH 5/5] Refactor utils.py to improve code structure --- utils.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/utils.py b/utils.py index 509ba05..f26c4e3 100644 --- a/utils.py +++ b/utils.py @@ -22,12 +22,4 @@ def open_folder_in_explorer(path): -import subprocess -import pickle - -def security_test_function(user_input): - # Bandit should detect this as a high-risk issue (shell=True) - subprocess.run(f"echo {user_input}", shell=True) - # Bandit should detect this as a medium-risk issue (insecure pickle usage) - pickle.loads(b"\x80\x03}q\x00.")