mirror of
https://github.com/github/codeql.git
synced 2026-01-04 10:10:20 +01:00
I took the bits from ql/test/library-tests/taint/ that seemed easy to port. I left out namedtuple for now, but it is part of internal tracking ticket, so won't be forgotten.
16 lines
469 B
Python
16 lines
469 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"}
|
|
|
|
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))
|