mirror of
https://github.com/github/codeql.git
synced 2025-12-18 09:43:15 +01:00
23 lines
573 B
Python
23 lines
573 B
Python
TAINTED_STRING = "TAINTED_STRING"
|
|
TAINTED_BYTES = b"TAINTED_BYTES"
|
|
TAINTED_LIST = ["tainted-{}".format(i) for i in range(5)]
|
|
TAINTED_DICT = {"name": TAINTED_STRING, "some key": "foo"}
|
|
|
|
NOT_TAINTED = "NOT_TAINTED"
|
|
|
|
# Use this to force expressions to be tainted
|
|
def taint(*args):
|
|
pass
|
|
|
|
|
|
def ensure_tainted(*args):
|
|
print("- ensure_tainted")
|
|
for i, arg in enumerate(args):
|
|
print("arg {}: {!r}".format(i, arg))
|
|
|
|
|
|
def ensure_not_tainted(*args):
|
|
print("- ensure_not_tainted")
|
|
for i, arg in enumerate(args):
|
|
print("arg {}: {!r}".format(i, arg))
|