Skip to content

Commit 86b2b79

Browse files
esbenaStephan Brandauer
authored andcommitted
improve access path strings
1 parent e0870e0 commit 86b2b79

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • javascript/ql/experimental/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ private module SyntacticUtilities {
473473
then result = "import(" + getSimpleImportPath(e) + ")"
474474
else
475475
if e instanceof AwaitExpr
476-
then result = getSimpleAccessPath(e.(AwaitExpr).getOperand().flow()) + ".then()"
476+
then result = "(await " + getSimpleAccessPath(e.(AwaitExpr).getOperand().flow()) + ")"
477477
else
478478
if node instanceof DataFlow::PropRead
479479
then
@@ -492,7 +492,7 @@ private module SyntacticUtilities {
492492
if exists(i.getImportedPath().getValue())
493493
then
494494
exists(string p | p = i.getImportedPath().getValue() |
495-
if p.matches(".%") then result = p else result = "!" // hide absolute imports from the ML training
495+
if p.matches(".%") then result = "\"p\"" else result = "!" // hide absolute imports from the ML training
496496
)
497497
else result = "?"
498498
}

0 commit comments

Comments
 (0)