Skip to content

Commit 4afd465

Browse files
committed
Replace location in external file
1 parent e1e8443 commit 4afd465

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ 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")
30+
}
31+
2732
CdlKind kind;
2833
string name;
2934

javascript/frameworks/cap/src/bad-authn-authz/EntityExposedWithoutAuthn/EntityExposedWithoutAuthn.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ where
2727
cdlElement instanceof CdlElementWithoutJsAuthn and
2828
cdlElement instanceof CdlElementWithoutCdsAuthn
2929
select cdlElement,
30-
"This " + getClickableText(cdlElement) + " is exposed without any authentication."
30+
"The " + getClickableText(cdlElement) + " `" + cdlElement.getName() +
31+
"` is exposed without any authentication."

0 commit comments

Comments
 (0)