Apply suggestions from code review

Co-authored-by: Harry Maclean <hmac@github.com>
This commit is contained in:
Alex Ford
2023-10-26 17:04:51 +01:00
committed by GitHub
parent 16c5edd3ca
commit fef2932f56
3 changed files with 5 additions and 5 deletions

View File

@@ -31,7 +31,7 @@ module Summaries {
predicate summaryModel(string type, string path, string input, string output) { predicate summaryModel(string type, string path, string input, string output) {
exists(DataFlow::MethodNode methodNode, API::Node paramNode | exists(DataFlow::MethodNode methodNode, API::Node paramNode |
methodNode.getLocation().getFile() instanceof Util::RelevantFile and methodNode.getLocation().getFile() instanceof Util::RelevantFile and
paramNode.getAValueReachableFromSource() = methodNode.getAReturnNode() and flow(paramNode.asSource(), methodNode.getAReturnNode()) and
paramNode = getAnyParameterNode(methodNode) paramNode = getAnyParameterNode(methodNode)
| |
Util::pathToMethod(methodNode, type, path) and Util::pathToMethod(methodNode, type, path) and
@@ -59,7 +59,7 @@ module Summaries {
} }
/** /**
* Holds if calls to `(type, path)`, the value referred to by `input` * Holds if in calls to `(type, path)`, the value referred to by `input`
* can flow to the value referred to by `output`. * can flow to the value referred to by `output`.
* *
* `kind` should be either `value` or `taint`, for value-preserving or taint-preserving steps, * `kind` should be either `value` or `taint`, for value-preserving or taint-preserving steps,

View File

@@ -13,7 +13,7 @@ private import Util as Util
*/ */
module Types { module Types {
/** /**
* Holds `node` should be seen as having the given `type`. * Holds if `node` should be seen as having the given `type`.
*/ */
private predicate valueHasTypeName(DataFlow::LocalSourceNode node, string type) { private predicate valueHasTypeName(DataFlow::LocalSourceNode node, string type) {
node.getLocation().getFile() instanceof Util::RelevantFile and node.getLocation().getFile() instanceof Util::RelevantFile and

View File

@@ -1,4 +1,4 @@
#!/usr/bin/python3 #!/usr/bin/env python3
# This script generates a data extensions model for a given library in codeql database form # This script generates a data extensions model for a given library in codeql database form
# Currently only typeModels and summaryModels are generated # Currently only typeModels and summaryModels are generated
@@ -37,7 +37,7 @@ def parse_args():
"-w", "-w",
"--overwrite", "--overwrite",
action="store_true", action="store_true",
help="if provided, use this command to invoke codeql", help="if provided, overwrite the file if it already exists",
) )
return parser.parse_args() return parser.parse_args()