Skip to content

Commit b8d7f52

Browse files
committed
format code
1 parent 6fa9413 commit b8d7f52

File tree

1 file changed

+14
-6
lines changed
  • javascript/ql/experimental/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling

1 file changed

+14
-6
lines changed

javascript/ql/experimental/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling/EndpointFeatures.qll

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ private string getACallBasedTokenFeatureComponent(
102102
//
103103
// would have a callee API name of `mongoose`.
104104
featureName = "calleeApiName" and
105-
exists(API::Node apiNode | AccessPaths::accessPaths(apiNode, false, _, result) and call = apiNode.getInducingNode())
105+
exists(API::Node apiNode |
106+
AccessPaths::accessPaths(apiNode, false, _, result) and call = apiNode.getInducingNode()
107+
)
106108
)
107109
}
108110

@@ -190,12 +192,15 @@ private module AccessPaths {
190192
}
191193

192194
/** Get the access path for the node. This includes structural information like `member`, `param`, and `functionalarg` if `includeStructuralInfo` is true. */
193-
predicate accessPaths(API::Node node, Boolean includeStructuralInfo, string accessPath, string apiName) {
195+
predicate accessPaths(
196+
API::Node node, Boolean includeStructuralInfo, string accessPath, string apiName
197+
) {
194198
//node = API::moduleImport(result)
195199
node = API::moduleImport(apiName) and accessPath = apiName
196200
or
197201
exists(API::Node previousNode, string previousAccessPath |
198-
previousNode.getDepth() < node.getDepth() and accessPaths(previousNode, includeStructuralInfo, previousAccessPath, apiName)
202+
previousNode.getDepth() < node.getDepth() and
203+
accessPaths(previousNode, includeStructuralInfo, previousAccessPath, apiName)
199204
|
200205
// e.g. `new X`, `X()`
201206
node = [previousNode.getInstance(), previousNode.getReturn()] and
@@ -222,7 +227,9 @@ private module AccessPaths {
222227
node = previousNode.getUnknownMember() or
223228
node = previousNode.getMember(any(string s | isNumericString(s)))
224229
) and
225-
if includeStructuralInfo = true then accessPath = previousAccessPath + " member" else accessPath = previousAccessPath
230+
if includeStructuralInfo = true
231+
then accessPath = previousAccessPath + " member"
232+
else accessPath = previousAccessPath
226233
or
227234
// e.g. `x.then(y => ...)`
228235
node = previousNode.getPromised() and
@@ -247,8 +254,9 @@ private module AccessPaths {
247254
index != "-1" and // ignore receiver
248255
if includeStructuralInfo = true
249256
then
250-
accessPath =
251-
previousAccessPath + " functionalarg " + index + " " + callbackName + " param " + paramName
257+
accessPath =
258+
previousAccessPath + " functionalarg " + index + " " + callbackName + " param " +
259+
paramName
252260
else accessPath = previousAccessPath + " " + index + " " + callbackName + " " + paramName
253261
)
254262
)

0 commit comments

Comments
 (0)