mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Python: replace dataflow-test location in files
This commit is contained in:
@@ -362,7 +362,7 @@
|
|||||||
"java/ql/lib/semmle/code/java/security/internal/EncryptionKeySizes.qll"
|
"java/ql/lib/semmle/code/java/security/internal/EncryptionKeySizes.qll"
|
||||||
],
|
],
|
||||||
"Python model summaries test extension": [
|
"Python model summaries test extension": [
|
||||||
"python/ql/test/experimental/dataflow/model-summaries/InlineTaintTest.ext.yml",
|
"python/ql/test/library-tests/dataflow/model-summaries/InlineTaintTest.ext.yml",
|
||||||
"python/ql/test/experimental/dataflow/model-summaries/NormalDataflowTest.ext.yml"
|
"python/ql/test/library-tests/dataflow/model-summaries/NormalDataflowTest.ext.yml"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ private module SensitiveDataModeling {
|
|||||||
*/
|
*/
|
||||||
DataFlow::Node sensitiveLookupStringConst(SensitiveDataClassification classification) {
|
DataFlow::Node sensitiveLookupStringConst(SensitiveDataClassification classification) {
|
||||||
// Note: If this is implemented with type-tracking, we will get cross-talk as
|
// Note: If this is implemented with type-tracking, we will get cross-talk as
|
||||||
// illustrated in python/ql/test/experimental/dataflow/sensitive-data/test.py
|
// illustrated in python/ql/test/library-tests/dataflow/sensitive-data/test.py
|
||||||
exists(DataFlow::LocalSourceNode source |
|
exists(DataFlow::LocalSourceNode source |
|
||||||
source.asExpr().(StringLiteral).getText() = sensitiveString(classification) and
|
source.asExpr().(StringLiteral).getText() = sensitiveString(classification) and
|
||||||
source.flowsTo(result)
|
source.flowsTo(result)
|
||||||
|
|||||||
@@ -638,7 +638,7 @@ newtype TContent =
|
|||||||
// name = any(AccessPathToken a).getAnArgument("Attribute")
|
// name = any(AccessPathToken a).getAnArgument("Attribute")
|
||||||
// instead we use a qltest to alert if we write a new summary in QL that uses an
|
// instead we use a qltest to alert if we write a new summary in QL that uses an
|
||||||
// attribute -- see
|
// attribute -- see
|
||||||
// python/ql/test/experimental/dataflow/summaries-checks/missing-attribute-content.ql
|
// python/ql/test/library-tests/dataflow/summaries-checks/missing-attribute-content.ql
|
||||||
attr in ["re", "string", "pattern"]
|
attr in ["re", "string", "pattern"]
|
||||||
or
|
or
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
# A thorough covering of methods in that document is found in classes.py.
|
# A thorough covering of methods in that document is found in classes.py.
|
||||||
#
|
#
|
||||||
# Intended sources should be the variable `SOURCE` and intended sinks should be
|
# Intended sources should be the variable `SOURCE` and intended sinks should be
|
||||||
# arguments to the function `SINK` (see python/ql/test/experimental/dataflow/testConfig.qll).
|
# arguments to the function `SINK` (see python/ql/test/library-tests/dataflow/testConfig.qll).
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# Headings refer to https://docs.python.org/3/reference/expressions.html,
|
# Headings refer to https://docs.python.org/3/reference/expressions.html,
|
||||||
# and are selected whenever they incur dataflow.
|
# and are selected whenever they incur dataflow.
|
||||||
# Intended sources should be the variable `SOURCE` and intended sinks should be
|
# Intended sources should be the variable `SOURCE` and intended sinks should be
|
||||||
# arguments to the function `SINK` (see python/ql/test/experimental/dataflow/testConfig.qll).
|
# arguments to the function `SINK` (see python/ql/test/library-tests/dataflow/testConfig.qll).
|
||||||
#
|
#
|
||||||
# Functions whose name ends with "_with_local_flow" will also be tested for local flow.
|
# Functions whose name ends with "_with_local_flow" will also be tested for local flow.
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import base64
|
import base64
|
||||||
|
|
||||||
# TODO: These tests should be merged with python/ql/test/experimental/dataflow/tainttracking/defaultAdditionalTaintStep-py3/test_string.py
|
# TODO: These tests should be merged with python/ql/test/library-tests/dataflow/tainttracking/defaultAdditionalTaintStep-py3/test_string.py
|
||||||
base64.a85decode(payload) # $ decodeInput=payload decodeOutput=base64.a85decode(..) decodeFormat=Ascii85
|
base64.a85decode(payload) # $ decodeInput=payload decodeOutput=base64.a85decode(..) decodeFormat=Ascii85
|
||||||
base64.b85decode(payload) # $ decodeInput=payload decodeOutput=base64.b85decode(..) decodeFormat=Base85
|
base64.b85decode(payload) # $ decodeInput=payload decodeOutput=base64.b85decode(..) decodeFormat=Base85
|
||||||
base64.decodebytes(payload) # $ decodeInput=payload decodeOutput=base64.decodebytes(..) decodeFormat=Base64
|
base64.decodebytes(payload) # $ decodeInput=payload decodeOutput=base64.decodebytes(..) decodeFormat=Base64
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import base64
|
import base64
|
||||||
|
|
||||||
# TODO: These tests should be merged with python/ql/test/experimental/dataflow/tainttracking/defaultAdditionalTaintStep-py3/test_string.py
|
# TODO: These tests should be merged with python/ql/test/library-tests/dataflow/tainttracking/defaultAdditionalTaintStep-py3/test_string.py
|
||||||
base64.a85encode(bs) # $ encodeInput=bs encodeOutput=base64.a85encode(..) encodeFormat=Ascii85
|
base64.a85encode(bs) # $ encodeInput=bs encodeOutput=base64.a85encode(..) encodeFormat=Ascii85
|
||||||
base64.b85encode(bs)# $ encodeInput=bs encodeOutput=base64.b85encode(..) encodeFormat=Base85
|
base64.b85encode(bs)# $ encodeInput=bs encodeOutput=base64.b85encode(..) encodeFormat=Base85
|
||||||
base64.encodebytes(bs)# $ encodeInput=bs encodeOutput=base64.encodebytes(..) encodeFormat=Base64
|
base64.encodebytes(bs)# $ encodeInput=bs encodeOutput=base64.encodebytes(..) encodeFormat=Base64
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ marshal.loads(payload) # $ decodeInput=payload decodeOutput=marshal.loads(..) d
|
|||||||
shelve.open(filepath) # $ decodeInput=filepath decodeOutput=shelve.open(..) decodeFormat=pickle decodeMayExecuteInput getAPathArgument=filepath
|
shelve.open(filepath) # $ decodeInput=filepath decodeOutput=shelve.open(..) decodeFormat=pickle decodeMayExecuteInput getAPathArgument=filepath
|
||||||
shelve.open(filename=filepath) # $ decodeInput=filepath decodeOutput=shelve.open(..) decodeFormat=pickle decodeMayExecuteInput getAPathArgument=filepath
|
shelve.open(filename=filepath) # $ decodeInput=filepath decodeOutput=shelve.open(..) decodeFormat=pickle decodeMayExecuteInput getAPathArgument=filepath
|
||||||
|
|
||||||
# TODO: These tests should be merged with python/ql/test/experimental/dataflow/tainttracking/defaultAdditionalTaintStep/test_string.py
|
# TODO: These tests should be merged with python/ql/test/library-tests/dataflow/tainttracking/defaultAdditionalTaintStep/test_string.py
|
||||||
base64.b64decode(payload) # $ decodeInput=payload decodeOutput=base64.b64decode(..) decodeFormat=Base64
|
base64.b64decode(payload) # $ decodeInput=payload decodeOutput=base64.b64decode(..) decodeFormat=Base64
|
||||||
base64.standard_b64decode(payload) # $ decodeInput=payload decodeOutput=base64.standard_b64decode(..) decodeFormat=Base64
|
base64.standard_b64decode(payload) # $ decodeInput=payload decodeOutput=base64.standard_b64decode(..) decodeFormat=Base64
|
||||||
base64.urlsafe_b64decode(payload) # $ decodeInput=payload decodeOutput=base64.urlsafe_b64decode(..) decodeFormat=Base64
|
base64.urlsafe_b64decode(payload) # $ decodeInput=payload decodeOutput=base64.urlsafe_b64decode(..) decodeFormat=Base64
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import base64
|
|||||||
pickle.dumps(obj) # $ MISSING: encodeInput=obj encodeOutput=pickle.dumps(..) encodeFormat=pickle encodeMayExecuteInput
|
pickle.dumps(obj) # $ MISSING: encodeInput=obj encodeOutput=pickle.dumps(..) encodeFormat=pickle encodeMayExecuteInput
|
||||||
marshal.dumps(obj) # $ MISSING: encodeInput=obj encodeOutput=marshal.dumps(..) encodeFormat=marshal encodeMayExecuteInput
|
marshal.dumps(obj) # $ MISSING: encodeInput=obj encodeOutput=marshal.dumps(..) encodeFormat=marshal encodeMayExecuteInput
|
||||||
|
|
||||||
# TODO: These tests should be merged with python/ql/test/experimental/dataflow/tainttracking/defaultAdditionalTaintStep/test_string.py
|
# TODO: These tests should be merged with python/ql/test/library-tests/dataflow/tainttracking/defaultAdditionalTaintStep/test_string.py
|
||||||
base64.b64encode(bs) # $ encodeInput=bs encodeOutput=base64.b64encode(..) encodeFormat=Base64
|
base64.b64encode(bs) # $ encodeInput=bs encodeOutput=base64.b64encode(..) encodeFormat=Base64
|
||||||
base64.standard_b64encode(bs) # $ encodeInput=bs encodeOutput=base64.standard_b64encode(..) encodeFormat=Base64
|
base64.standard_b64encode(bs) # $ encodeInput=bs encodeOutput=base64.standard_b64encode(..) encodeFormat=Base64
|
||||||
base64.urlsafe_b64encode(bs) # $ encodeInput=bs encodeOutput=base64.urlsafe_b64encode(..) encodeFormat=Base64
|
base64.urlsafe_b64encode(bs) # $ encodeInput=bs encodeOutput=base64.urlsafe_b64encode(..) encodeFormat=Base64
|
||||||
|
|||||||
Reference in New Issue
Block a user