From a0eb2da7de34aee23f7cf61fba6b4d5a3e22b623 Mon Sep 17 00:00:00 2001 From: ben-AI-cybersec Date: Mon, 18 Nov 2024 19:37:38 +1000 Subject: [PATCH 1/2] test of security scanner --- test_vulnerability.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test_vulnerability.py b/test_vulnerability.py index a655cfa..00c00ce 100644 --- a/test_vulnerability.py +++ b/test_vulnerability.py @@ -2,9 +2,11 @@ # This is an example of a potential security vulnerability SECRET_KEY = "hardcoded_secret_key" +username = 'BensPassword' +password = 'BensUsername' def insecure_function(user_input): # This is an example of potential SQL injection query = f"SELECT * FROM users WHERE username = '{user_input}'" # Execute query (this is just an example, don't actually do this!) - return query #sadadssa \ No newline at end of file + return query #sadadssa From c03dd44eac02410b5fe45993583f9a7c6bbc9064 Mon Sep 17 00:00:00 2001 From: ben-AI-cybersec Date: Tue, 19 Nov 2024 20:06:38 +1000 Subject: [PATCH 2/2] testing Amir's script --- OWASPtop10.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OWASPtop10.py b/OWASPtop10.py index fe60d86..2e89f61 100644 --- a/OWASPtop10.py +++ b/OWASPtop10.py @@ -1,4 +1,5 @@ # Test file with intentional security vulnerabilities +# Test some other stuff # SQL Injection vulnerability def unsafe_sql_query(user_input): @@ -28,4 +29,4 @@ def unsafe_file_access(filename): def unsafe_request(url): import requests response = requests.get(url + "/admin") - return response.text \ No newline at end of file + return response.text