Skip to content

Commit b3653cc

Browse files
authored
Merge pull request #10216 from hvitved/ssa/shared-lib
SSA: Create a new `codeql/shared-ssa` library pack and move implementation there
2 parents e3948e6 + 9ebabd1 commit b3653cc

File tree

21 files changed

+47
-2667
lines changed

21 files changed

+47
-2667
lines changed

.github/workflows/check-qldoc.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ jobs:
2727
run: |
2828
EXIT_CODE=0
2929
# TODO: remove the swift exception from the regex when we fix generated QLdoc
30-
changed_lib_packs="$(git diff --name-only --diff-filter=ACMRT HEAD^ HEAD | { grep -Po '^(?!swift)[a-z]*/ql/lib' || true; } | sort -u)"
30+
# TODO: remove the shared exception from the regex when coverage of qlpacks without dbschemes is supported
31+
changed_lib_packs="$(git diff --name-only --diff-filter=ACMRT HEAD^ HEAD | { grep -Po '^(?!(swift|shared))[a-z]*/ql/lib' || true; } | sort -u)"
3132
for pack_dir in ${changed_lib_packs}; do
3233
lang="${pack_dir%/ql/lib}"
3334
codeql generate library-doc-coverage --output="${RUNNER_TEMP}/${lang}-current.txt" --dir="${pack_dir}"

.github/workflows/ruby-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ jobs:
9595
uses: ./.github/actions/fetch-codeql
9696
- name: Build Query Pack
9797
run: |
98+
codeql pack create ../shared/ssa --output target/packs
9899
codeql pack create ql/lib --output target/packs
99100
codeql pack install ql/src
100101
codeql pack create ql/src --output target/packs

codeql-workspace.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ provide:
44
- "*/ql/test/qlpack.yml"
55
- "*/ql/examples/qlpack.yml"
66
- "*/ql/consistency-queries/qlpack.yml"
7+
- "shared/*/qlpack.yml"
78
- "cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/tainted/qlpack.yml"
89
- "go/ql/config/legacy-support/qlpack.yml"
910
- "go/build/codeql-extractor-go/codeql-extractor.yml"

config/identical-files.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -461,12 +461,6 @@
461461
"javascript/ql/lib/IDEContextual.qll",
462462
"python/ql/lib/analysis/IDEContextual.qll"
463463
],
464-
"SSA C#": [
465-
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/SsaImplCommon.qll",
466-
"ruby/ql/lib/codeql/ruby/dataflow/internal/SsaImplCommon.qll",
467-
"cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaImplCommon.qll",
468-
"swift/ql/lib/codeql/swift/dataflow/internal/SsaImplCommon.qll"
469-
],
470464
"CryptoAlgorithms Python/JS/Ruby": [
471465
"javascript/ql/lib/semmle/javascript/security/CryptoAlgorithms.qll",
472466
"python/ql/lib/semmle/python/concepts/CryptoAlgorithms.qll",

cpp/ql/lib/qlpack.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ dbscheme: semmlecode.cpp.dbscheme
55
extractor: cpp
66
library: true
77
upgrades: upgrades
8+
dependencies:
9+
codeql/ssa: 0.0.1

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternals.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ private import DataFlowUtil
44
private import DataFlowImplCommon as DataFlowImplCommon
55
private import semmle.code.cpp.models.interfaces.Allocation as Alloc
66
private import semmle.code.cpp.models.interfaces.DataFlow as DataFlow
7-
private import SsaImplCommon as SsaImplCommon
7+
private import codeql.ssa.Ssa as SsaImplCommon
88

99
private module SourceVariables {
1010
private newtype TSourceVariable =

csharp/ql/lib/qlpack.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ dbscheme: semmlecode.csharp.dbscheme
55
extractor: csharp
66
library: true
77
upgrades: upgrades
8+
dependencies:
9+
codeql/ssa: 0.0.1

csharp/ql/lib/semmle/code/cil/internal/SsaImpl.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
private import cil
2-
private import semmle.code.csharp.dataflow.internal.SsaImplCommon as SsaImplCommon
2+
private import codeql.ssa.Ssa as SsaImplCommon
33

44
private module SsaInput implements SsaImplCommon::InputSig {
55
class BasicBlock = CIL::BasicBlock;

csharp/ql/lib/semmle/code/csharp/controlflow/internal/PreSsa.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module PreSsa {
99
private import AssignableDefinitions
1010
private import semmle.code.csharp.controlflow.internal.ControlFlowGraphImpl
1111
private import semmle.code.csharp.controlflow.internal.PreBasicBlocks as PreBasicBlocks
12-
private import semmle.code.csharp.dataflow.internal.SsaImplCommon as SsaImplCommon
12+
private import codeql.ssa.Ssa as SsaImplCommon
1313

1414
private predicate definitionAt(
1515
AssignableDefinition def, SsaInput::BasicBlock bb, int i, SsaInput::SourceVariable v

csharp/ql/lib/semmle/code/csharp/dataflow/internal/BaseSSA.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import csharp
55
*/
66
module BaseSsa {
77
private import AssignableDefinitions
8-
private import semmle.code.csharp.dataflow.internal.SsaImplCommon as SsaImplCommon
8+
private import codeql.ssa.Ssa as SsaImplCommon
99

1010
/**
1111
* Holds if the `i`th node of basic block `bb` is assignable definition `def`,

0 commit comments

Comments
 (0)