Skip to content

Change invoked script to compile CDS in code_scanning.yml #213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4229a97
Update the dependencies to CodeQL CLI 2.22.2.
lcartey Jul 30, 2025
6f1567c
Update UI5 test dependencies
lcartey Jul 30, 2025
6ca2c51
Update qlt.conf.json to 2.22.2
lcartey Jul 30, 2025
2f48d3c
Address incompatibility introduced in CodeQL PR #19445.
lcartey Aug 1, 2025
cf3ade2
Merge branch 'main' into lcartey/update-dependencies
jeongsoolee09 Aug 4, 2025
6740358
Merge branch 'main' into lcartey/update-dependencies
data-douser Aug 5, 2025
efc798d
Test swapping out cds compilation script
jeongsoolee09 Aug 6, 2025
7624662
Test swapping out bundle version to 2.22.3
jeongsoolee09 Aug 6, 2025
16bd53a
ouch
jeongsoolee09 Aug 6, 2025
fd2b88b
Test swapping out bundle version to 2.22.0
jeongsoolee09 Aug 6, 2025
854dffd
Switch the codeql bundle to 2.20.5
jeongsoolee09 Aug 11, 2025
7e97f63
Switch the codeql bundle to 2.20.6
jeongsoolee09 Aug 11, 2025
d611f30
Switch the codeql bundle to 2.20.7
jeongsoolee09 Aug 11, 2025
2f28ef9
Switch the codeql bundle to 2.20.8
jeongsoolee09 Aug 11, 2025
93f9d31
Switch the codeql bundle to 2.20.9
jeongsoolee09 Aug 11, 2025
db1d156
Switch the codeql bundle to 2.21.0
jeongsoolee09 Aug 11, 2025
9e21900
Switch the codeql bundle to 2.21.1
jeongsoolee09 Aug 11, 2025
1bfa2f5
Switch the codeql bundle to 2.21.2
jeongsoolee09 Aug 11, 2025
2524592
Switch the codeql bundle to 2.21.3
jeongsoolee09 Aug 11, 2025
767d52d
Switch the codeql bundle to 2.21.4
jeongsoolee09 Aug 11, 2025
d91b766
Switch the codeql bundle to 2.21.5
jeongsoolee09 Aug 11, 2025
f163a0f
Switch the codeql bundle to 2.21.6
jeongsoolee09 Aug 11, 2025
af904da
Switch the codeql bundle to 2.21.7
jeongsoolee09 Aug 11, 2025
4b8a024
Switch the codeql bundle to 2.21.8
jeongsoolee09 Aug 11, 2025
711675e
Switch the codeql bundle to 2.21.9
jeongsoolee09 Aug 11, 2025
5058f0f
Switch the codeql bundle to 2.22.0
jeongsoolee09 Aug 11, 2025
12440c4
Switch the codeql bundle to 2.22.1
jeongsoolee09 Aug 11, 2025
ccb86bb
Merge branch 'main' into jeongsoolee09/troubleshoot-2.22.2
data-douser Aug 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/code_scanning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ jobs:
languages: javascript
config-file: ./.github/codeql/codeql-config.yaml
db-location: ${{ runner.temp }}/codeql-database
tools: https://github.com/github/codeql-action/releases/download/${{env.BUNDLE_VERSION}}/codeql-bundle-linux64.tar.gz
# tools: https://github.com/github/codeql-action/releases/download/${{env.BUNDLE_VERSION}}/codeql-bundle-linux64.tar.gz
tools: https://github.com/github/codeql-action/releases/download/codeql-bundle-v2.22.1/codeql-bundle-linux64.tar.gz
debug: true

- name: Run CDS extractor
Expand All @@ -56,6 +57,7 @@ jobs:
export CODEQL_DIST="$(dirname "${{ steps.initialize-codeql.outputs.codeql-path }}")"
export CODEQL_EXTRACTOR_JAVASCRIPT_WIP_DATABASE="${{ runner.temp }}/codeql-database/javascript"
${{ github.workspace }}/scripts/compile-cds.sh
# ${{ github.workspace }}/extractors/cds/tools/workflow/cds-compilation-for-actions.sh

- name: Perform CodeQL Analysis
id: analyze
Expand Down
24 changes: 13 additions & 11 deletions javascript/frameworks/cap/lib/codeql-pack.lock.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
---
lockVersion: 1.0.0
dependencies:
codeql/concepts:
version: 0.0.1
codeql/dataflow:
version: 2.0.0
version: 2.0.11
codeql/javascript-all:
version: 2.4.0
version: 2.6.7
codeql/mad:
version: 1.0.16
version: 1.0.27
codeql/regex:
version: 1.0.16
version: 1.0.27
codeql/ssa:
version: 1.0.16
version: 2.0.3
codeql/threat-models:
version: 1.0.16
version: 1.0.27
codeql/tutorial:
version: 1.0.16
version: 1.0.27
codeql/typetracking:
version: 2.0.0
version: 2.0.11
codeql/util:
version: 2.0.3
version: 2.0.14
codeql/xml:
version: 1.0.16
version: 1.0.27
codeql/yaml:
version: 1.0.16
version: 1.0.27
compiled: false
24 changes: 13 additions & 11 deletions javascript/frameworks/cap/src/codeql-pack.lock.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
---
lockVersion: 1.0.0
dependencies:
codeql/concepts:
version: 0.0.1
codeql/dataflow:
version: 2.0.0
version: 2.0.11
codeql/javascript-all:
version: 2.4.0
version: 2.6.7
codeql/mad:
version: 1.0.16
version: 1.0.27
codeql/regex:
version: 1.0.16
version: 1.0.27
codeql/ssa:
version: 1.0.16
version: 2.0.3
codeql/threat-models:
version: 1.0.16
version: 1.0.27
codeql/tutorial:
version: 1.0.16
version: 1.0.27
codeql/typetracking:
version: 2.0.0
version: 2.0.11
codeql/util:
version: 2.0.3
version: 2.0.14
codeql/xml:
version: 1.0.16
version: 1.0.27
codeql/yaml:
version: 1.0.16
version: 1.0.27
compiled: false
24 changes: 13 additions & 11 deletions javascript/frameworks/cap/test/codeql-pack.lock.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
---
lockVersion: 1.0.0
dependencies:
codeql/concepts:
version: 0.0.1
codeql/dataflow:
version: 2.0.0
version: 2.0.11
codeql/javascript-all:
version: 2.4.0
version: 2.6.7
codeql/mad:
version: 1.0.16
version: 1.0.27
codeql/regex:
version: 1.0.16
version: 1.0.27
codeql/ssa:
version: 1.0.16
version: 2.0.3
codeql/threat-models:
version: 1.0.16
version: 1.0.27
codeql/tutorial:
version: 1.0.16
version: 1.0.27
codeql/typetracking:
version: 2.0.0
version: 2.0.11
codeql/util:
version: 2.0.3
version: 2.0.14
codeql/xml:
version: 1.0.16
version: 1.0.27
codeql/yaml:
version: 1.0.16
version: 1.0.27
compiled: false
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import advanced_security.javascript.frameworks.ui5.UI5View
import advanced_security.javascript.frameworks.ui5.RemoteFlowSources
import advanced_security.javascript.frameworks.ui5.dataflow.FlowSteps
private import StdLibDataFlow::DataFlow::PathGraph as DataFlowPathGraph
private import PatchDataFlow

/**
* A statically visible part of a local model's content that has a binding path referring to it in a control declaration acting as an HTML injection sink.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/**
* This file patches an incompatibility introduced into the standard data flow library between
* class DataFlow::Configurations and `summmaryModels` added in models-as-data files, and likely
* introduced in this PR: https://github.com/github/codeql/pull/19445/files.
*/

import javascript
import semmle.javascript.dataflow.internal.FlowSummaryPrivate
private import semmle.javascript.frameworks.data.internal.ApiGraphModels as Shared

/**
* Holds if `path` is an input or output spec for a summary with the given `base` node.
*/
pragma[nomagic]
private predicate relevantInputOutputPath(API::InvokeNode base, AccessPath inputOrOutput) {
exists(string type, string input, string output, string path |
ModelOutput::resolvedSummaryBase(type, path, base) and
ModelOutput::relevantSummaryModel(type, path, input, output, _, _) and
inputOrOutput = [input, output]
)
}

/**
* Gets the API node for the first `n` tokens of the given input/output path, evaluated relative to `baseNode`.
*/
private API::Node getNodeFromInputOutputPath(API::InvokeNode baseNode, AccessPath path, int n) {
relevantInputOutputPath(baseNode, path) and
(
n = 1 and
result = Shared::getSuccessorFromInvoke(baseNode, path.getToken(0))
or
result =
Shared::getSuccessorFromNode(getNodeFromInputOutputPath(baseNode, path, n - 1),
path.getToken(n - 1))
)
}

/**
* Gets the API node for the given input/output path, evaluated relative to `baseNode`.
*/
private API::Node getNodeFromInputOutputPath(API::InvokeNode baseNode, AccessPath path) {
result = getNodeFromInputOutputPath(baseNode, path, path.getNumToken())
}

private predicate summaryStep(API::Node pred, API::Node succ, string kind) {
exists(string type, string path, API::InvokeNode base, AccessPath input, AccessPath output |
ModelOutput::relevantSummaryModel(type, path, input, output, kind, _) and
ModelOutput::resolvedSummaryBase(type, path, base) and
pred = getNodeFromInputOutputPath(base, input) and
succ = getNodeFromInputOutputPath(base, output)
)
}

/**
* Like `ModelOutput::summaryStep` but with API nodes mapped to data-flow nodes.
*/
private predicate summaryStepNodes(DataFlow::Node pred, DataFlow::Node succ, string kind) {
exists(API::Node predNode, API::Node succNode |
summaryStep(predNode, succNode, kind) and
pred = predNode.asSink() and
succ = succNode.asSource()
)
}

/** Data flow steps induced by summary models of kind `value`. */
private class DataFlowStepFromSummary extends DataFlow::SharedFlowStep {
override predicate step(DataFlow::Node pred, DataFlow::Node succ) {
summaryStepNodes(pred, succ, "value")
}
}

/** Taint steps induced by summary models of kind `taint`. */
private class TaintStepFromSummary extends TaintTracking::SharedTaintStep {
override predicate step(DataFlow::Node pred, DataFlow::Node succ) {
summaryStepNodes(pred, succ, "taint")
}
}
24 changes: 13 additions & 11 deletions javascript/frameworks/ui5/lib/codeql-pack.lock.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
---
lockVersion: 1.0.0
dependencies:
codeql/concepts:
version: 0.0.1
codeql/dataflow:
version: 2.0.0
version: 2.0.11
codeql/javascript-all:
version: 2.4.0
version: 2.6.7
codeql/mad:
version: 1.0.16
version: 1.0.27
codeql/regex:
version: 1.0.16
version: 1.0.27
codeql/ssa:
version: 1.0.16
version: 2.0.3
codeql/threat-models:
version: 1.0.16
version: 1.0.27
codeql/tutorial:
version: 1.0.16
version: 1.0.27
codeql/typetracking:
version: 2.0.0
version: 2.0.11
codeql/util:
version: 2.0.3
version: 2.0.14
codeql/xml:
version: 1.0.16
version: 1.0.27
codeql/yaml:
version: 1.0.16
version: 1.0.27
compiled: false
24 changes: 13 additions & 11 deletions javascript/frameworks/ui5/src/codeql-pack.lock.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
---
lockVersion: 1.0.0
dependencies:
codeql/concepts:
version: 0.0.1
codeql/dataflow:
version: 2.0.0
version: 2.0.11
codeql/javascript-all:
version: 2.4.0
version: 2.6.7
codeql/mad:
version: 1.0.16
version: 1.0.27
codeql/regex:
version: 1.0.16
version: 1.0.27
codeql/ssa:
version: 1.0.16
version: 2.0.3
codeql/threat-models:
version: 1.0.16
version: 1.0.27
codeql/tutorial:
version: 1.0.16
version: 1.0.27
codeql/typetracking:
version: 2.0.0
version: 2.0.11
codeql/util:
version: 2.0.3
version: 2.0.14
codeql/xml:
version: 1.0.16
version: 1.0.27
codeql/yaml:
version: 1.0.16
version: 1.0.27
compiled: false
30 changes: 16 additions & 14 deletions javascript/frameworks/ui5/test/codeql-pack.lock.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
---
lockVersion: 1.0.0
dependencies:
codeql/concepts:
version: 0.0.1
codeql/dataflow:
version: 2.0.0
version: 2.0.11
codeql/javascript-all:
version: 2.4.0
version: 2.6.7
codeql/javascript-queries:
version: 1.4.0
version: 2.0.0
codeql/mad:
version: 1.0.16
version: 1.0.27
codeql/regex:
version: 1.0.16
version: 1.0.27
codeql/ssa:
version: 1.0.16
version: 2.0.3
codeql/suite-helpers:
version: 1.0.16
version: 1.0.27
codeql/threat-models:
version: 1.0.16
version: 1.0.27
codeql/tutorial:
version: 1.0.16
version: 1.0.27
codeql/typetracking:
version: 2.0.0
version: 2.0.11
codeql/typos:
version: 1.0.16
version: 1.0.27
codeql/util:
version: 2.0.3
version: 2.0.14
codeql/xml:
version: 1.0.16
version: 1.0.27
codeql/yaml:
version: 1.0.16
version: 1.0.27
compiled: false
5 changes: 4 additions & 1 deletion javascript/frameworks/ui5/test/qlpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ version: 0.7.0
extractor: javascript
dependencies:
codeql/javascript-all: "^2.4.0"
codeql/javascript-queries: "^1.2.0"
# We use this dependency to run the standard Log Injection query to ensure that
# no overlap occurs with the SAP UI5 queries. We therefore allow any version
# greater than or equal to 1.2.0, as major breaking changes are not a concern.
codeql/javascript-queries: ">1.2.0"
advanced-security/javascript-sap-ui5-queries: "^0.7.0"
advanced-security/javascript-sap-ui5-models: "^0.7.0"
advanced-security/javascript-sap-ui5-all: "^0.7.0"
Loading
Loading