Buckets:

download
raw
854 Bytes
"""
Test file for auto-fix demonstration.
NOTE: This file contains intentional use of dangerous patterns (os.system, subprocess with shell=True, etc.)
for the purpose of testing, demonstration, and validation of security scanners. These are NOT used in production code.
"""
import os
import subprocess
# Test 1: SQL Injection with % formatting
def get_user_data(user_id):
query = "SELECT * FROM users WHERE id = %s" % user_id
return query
# Test 2: Command Injection with os.system
def ping_server(host):
subprocess.run(['ping', '-c', '1', host], check=True)
return "Done"
# Test 3: Multiple SQL injections
def search_data(term):
query = "SELECT * FROM products WHERE name = '%s'" % term
return query
def update_user(user_id, name):
query = "UPDATE users SET name = '%s' WHERE id = %s" % (name, user_id)
return query

Xet Storage Details

Size:
854 Bytes
·
Xet hash:
6e2753ed474e30d2cb9d3749a87cd5aa69ba13b1a61bc89d9f7710c97f5a7667

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.