Skip to content

Commit efc989f

Browse files
committed
Fix CdlService getImplementation file location
Updates the `getImplementation` predicate of the `CdlService` class within the `CDL.qll` library in order to ensure that CDS-related CodeQL queries are still able to find the `UserDefinedApplicationService` that implements a given `CdlElement`, even when using "project aware" CDS compilation that results in a single `.cds.json` file being created for a given CDS project rather than a 1:1 relationship between each extracted `.cds` file and its `.cds.json` representation.
1 parent 99923e0 commit efc989f

File tree

1 file changed

+2
-2
lines changed
  • javascript/frameworks/cap/lib/advanced_security/javascript/frameworks/cap

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ class CdlService extends CdlElement {
165165
CdlService() { kind = CdlServiceKind(this.getPropStringValue("kind")) }
166166

167167
UserDefinedApplicationService getImplementation() {
168-
result.getFile().getRelativePath().regexpReplaceAll("\\.[^.]+$", ".cds.json") =
169-
this.getFile().getRelativePath()
168+
result.getFile().getRelativePath().regexpReplaceAll("\\.[^.]+$", ".cds") =
169+
this.getPropValue("$location").getPropValue("file").getStringValue()
170170
}
171171

172172
/**

0 commit comments

Comments
 (0)