From 73d65e25c2e4d113f797596cda9aa27560b6c268 Mon Sep 17 00:00:00 2001 From: Lemles Date: Thu, 20 Nov 2025 18:12:55 +0900 Subject: [PATCH] Add security test function for CI scanning Added a security test function to utils.py for CI testing. --- utils.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/utils.py b/utils.py index d86d5b4..82c847f 100644 --- a/utils.py +++ b/utils.py @@ -17,4 +17,14 @@ 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}") + +# === FOR SECURITY SCAN TEST (DO NOT USE) === +import subprocess + +def security_test_function(user_input): + # Bandit should detect this as a high-risk issue (shell=True) + # This line will cause the CI to fail with the new settings. + subprocess.run(f"echo {user_input}", shell=True) +# === END OF TEST CODE ===