Skip to content

Commit 9845134

Browse files
committed
try using hasLocationInfo
1 parent 90ceb4c commit 9845134

File tree

1 file changed

+8
-3
lines changed
  • javascript/frameworks/cap/lib/advanced_security/javascript/frameworks/cap

1 file changed

+8
-3
lines changed

javascript/frameworks/cap/lib/advanced_security/javascript/frameworks/cap/CDL.qll

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,14 @@ class CdlDefinition extends JsonObject {
2424
}
2525

2626
abstract class CdlElement extends JsonObject {
27-
string getURL() {
28-
result =
29-
"file://" + this.getFile().getAbsolutePath().regexpReplaceAll(".cds.json$", ".cds:0:0:0:0")
27+
predicate hasLocationInfo(string path, int sl, int sc, int el, int ec) {
28+
exists(Location loc | loc = this.getLocation() |
29+
path = loc.getFile().getAbsolutePath().regexpReplaceAll(".cds.json$", ".cds") and
30+
sl = 0 and
31+
sc = 0 and
32+
el = 0 and
33+
ec = 0
34+
)
3035
}
3136

3237
CdlKind kind;

0 commit comments

Comments
 (0)