mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Apply suggestions from code review
Co-authored-by: Harry Maclean <hmac@github.com>
This commit is contained in:
@@ -31,7 +31,7 @@ module Summaries {
|
||||
predicate summaryModel(string type, string path, string input, string output) {
|
||||
exists(DataFlow::MethodNode methodNode, API::Node paramNode |
|
||||
methodNode.getLocation().getFile() instanceof Util::RelevantFile and
|
||||
paramNode.getAValueReachableFromSource() = methodNode.getAReturnNode() and
|
||||
flow(paramNode.asSource(), methodNode.getAReturnNode()) and
|
||||
paramNode = getAnyParameterNode(methodNode)
|
||||
|
|
||||
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`.
|
||||
*
|
||||
* `kind` should be either `value` or `taint`, for value-preserving or taint-preserving steps,
|
||||
|
||||
@@ -13,7 +13,7 @@ private import Util as Util
|
||||
*/
|
||||
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) {
|
||||
node.getLocation().getFile() instanceof Util::RelevantFile and
|
||||
|
||||
@@ -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
|
||||
# Currently only typeModels and summaryModels are generated
|
||||
@@ -37,7 +37,7 @@ def parse_args():
|
||||
"-w",
|
||||
"--overwrite",
|
||||
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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user