Skip to content

Uploaded and commit the python file from assignment 1.#1

Open
shuarob wants to merge 1 commit intomainfrom
master
Open

Uploaded and commit the python file from assignment 1.#1
shuarob wants to merge 1 commit intomainfrom
master

Conversation

@shuarob
Copy link
Owner

@shuarob shuarob commented Nov 4, 2025

No description provided.

return user_input

def send_email(to, subject, body):
os.system(f'echo {body} | mail -s "{subject}" {to}')

Check failure

Code scanning / Bandit

Starting a process with a shell, possible injection detected, security issue. Error

Starting a process with a shell, possible injection detected, security issue.

def get_data():
url = 'http://insecure-api.com/get-data'
data = urlopen(url).read().decode()

Check warning

Code scanning / Bandit

Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected. Warning

Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.
return data

def save_to_db(data):
query = f"INSERT INTO mytable (column1, column2) VALUES ('{data}', 'Another Value')"

Check warning

Code scanning / Bandit

Possible SQL injection vector through string-based query construction. Warning

Possible SQL injection vector through string-based query construction.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant