mirror of
https://github.com/github/codeql.git
synced 2026-05-16 12:17:07 +02:00
Compare commits
461 Commits
codeql-cli
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a84332ac15 | ||
|
|
0c274849be | ||
|
|
ab0b492429 | ||
|
|
8abd3b93c9 | ||
|
|
cfa175357b | ||
|
|
b0e23a73d2 | ||
|
|
0b808e1170 | ||
|
|
5508b1576f | ||
|
|
911e59caef | ||
|
|
ff5c0b40f1 | ||
|
|
a5a1312e51 | ||
|
|
2608db9fd9 | ||
|
|
f9e7f90896 | ||
|
|
31386f566c | ||
|
|
e9822f67ee | ||
|
|
994b27bdbd | ||
|
|
a720e258ac | ||
|
|
8b977ef8e1 | ||
|
|
caa9b04ad8 | ||
|
|
91a46f0340 | ||
|
|
37e1e3c879 | ||
|
|
70f3fd1158 | ||
|
|
9abfaca98c | ||
|
|
38473f9e0b | ||
|
|
c7c6e45254 | ||
|
|
c0efc52cc7 | ||
|
|
5c16b0faf9 | ||
|
|
7854a534fd | ||
|
|
76a1a87c41 | ||
|
|
9062bba168 | ||
|
|
e709650449 | ||
|
|
513c7bb30b | ||
|
|
9c958a420a | ||
|
|
2e9de7878b | ||
|
|
c5ae315dbe | ||
|
|
592c7c0437 | ||
|
|
c0798f7b1d | ||
|
|
cac7262a45 | ||
|
|
6b65866ff4 | ||
|
|
73a210a442 | ||
|
|
0aaa7d0631 | ||
|
|
f212efbe5b | ||
|
|
aa1d322fe7 | ||
|
|
151a332f0a | ||
|
|
974e7cc319 | ||
|
|
f91482810d | ||
|
|
ec8ff6ff68 | ||
|
|
b94ab8d186 | ||
|
|
3ef4a5836c | ||
|
|
8f9d5c5217 | ||
|
|
60d6429b5d | ||
|
|
9f6bd88171 | ||
|
|
a5ef036465 | ||
|
|
93e05db394 | ||
|
|
ed9477aac9 | ||
|
|
4e47f7706d | ||
|
|
e2874ac252 | ||
|
|
15936a5f8d | ||
|
|
7bd27b83e0 | ||
|
|
9a1c2da5d9 | ||
|
|
36554d160c | ||
|
|
5a4dee50f7 | ||
|
|
638dc9380c | ||
|
|
fdef477138 | ||
|
|
81e1ab7aab | ||
|
|
8cc6d788c5 | ||
|
|
26e13055c8 | ||
|
|
33e89ea123 | ||
|
|
9a2b7bac8f | ||
|
|
048411e168 | ||
|
|
2802819170 | ||
|
|
a1447075e8 | ||
|
|
cd457a7d6b | ||
|
|
4e12a8c8d2 | ||
|
|
0210c970f2 | ||
|
|
b027ac3658 | ||
|
|
26af52897d | ||
|
|
af6e921da5 | ||
|
|
6f643a3604 | ||
|
|
a4df96aad6 | ||
|
|
f9240e7058 | ||
|
|
6b6df374fa | ||
|
|
f9e42ac443 | ||
|
|
e0d663f79b | ||
|
|
33fc767782 | ||
|
|
072166ba88 | ||
|
|
48785a0a76 | ||
|
|
e8553c7449 | ||
|
|
33035dbfc8 | ||
|
|
f2ea3b98d8 | ||
|
|
427b73ec9d | ||
|
|
7aa3fd859a | ||
|
|
957c89b478 | ||
|
|
9a94836974 | ||
|
|
a0a0e9e9a7 | ||
|
|
60dcf88b50 | ||
|
|
82bbdee832 | ||
|
|
9ad431dea1 | ||
|
|
cc28ff9a48 | ||
|
|
6e580446fd | ||
|
|
4c5548363c | ||
|
|
8a9e53cc58 | ||
|
|
04f587190e | ||
|
|
e6f587e761 | ||
|
|
2d2b690b5d | ||
|
|
52b02a0581 | ||
|
|
00fb11b028 | ||
|
|
6a8f9a950c | ||
|
|
ebc759d830 | ||
|
|
7610277199 | ||
|
|
6a95251206 | ||
|
|
88e1d86c27 | ||
|
|
4c1461ad5b | ||
|
|
f9f1349a0d | ||
|
|
39b6cf9468 | ||
|
|
b67ebd11e0 | ||
|
|
467394123c | ||
|
|
02f5fe9a42 | ||
|
|
04a8ef0f81 | ||
|
|
f663eccf66 | ||
|
|
80ccdcc696 | ||
|
|
224934645e | ||
|
|
038f9a2c2f | ||
|
|
c7904b12c8 | ||
|
|
17fded4aa5 | ||
|
|
77cdafd55e | ||
|
|
1c20e78593 | ||
|
|
5546025f12 | ||
|
|
1f3a8319ed | ||
|
|
49e5886a06 | ||
|
|
c10a05f26a | ||
|
|
8710e63011 | ||
|
|
dbc9d0de4a | ||
|
|
9194cdad9c | ||
|
|
7050241a54 | ||
|
|
62a0a3e384 | ||
|
|
3ad2d8ca3d | ||
|
|
21a0d1444f | ||
|
|
e012981e5b | ||
|
|
351e9cc914 | ||
|
|
439a67a3fe | ||
|
|
5fbba0e9fe | ||
|
|
d3df5ce110 | ||
|
|
bafa892116 | ||
|
|
119994b59f | ||
|
|
b0bc0fdd61 | ||
|
|
154d213fd2 | ||
|
|
4fd02220c7 | ||
|
|
4446f42846 | ||
|
|
a291548fd8 | ||
|
|
87c35e6401 | ||
|
|
ff8ab191d1 | ||
|
|
77807c83f8 | ||
|
|
e0421dbf53 | ||
|
|
bedadc9f04 | ||
|
|
55b83ca22a | ||
|
|
de96b5acfd | ||
|
|
80d5e27b46 | ||
|
|
e1cd708c75 | ||
|
|
65f647a8c0 | ||
|
|
9a7eb8dfb9 | ||
|
|
6ecdf3fe32 | ||
|
|
4042bbec5b | ||
|
|
936f0c650c | ||
|
|
31e06bc0a9 | ||
|
|
dc34b10cb6 | ||
|
|
a6c7f27fc1 | ||
|
|
ed6cdfc227 | ||
|
|
9345c44e0f | ||
|
|
c88a22ccf8 | ||
|
|
2545f06b52 | ||
|
|
83c7a33e53 | ||
|
|
90741b15e2 | ||
|
|
fb438bf512 | ||
|
|
e5d219a039 | ||
|
|
72d21a9a56 | ||
|
|
7ef9e1b939 | ||
|
|
a473fdb709 | ||
|
|
fed42d655f | ||
|
|
03d70b9f94 | ||
|
|
e29770c2b5 | ||
|
|
28a6ff208c | ||
|
|
e14b654e8a | ||
|
|
51e2a5418b | ||
|
|
75162bb9eb | ||
|
|
49d014cbac | ||
|
|
d27ee86242 | ||
|
|
0192ffab07 | ||
|
|
99b5cecb18 | ||
|
|
99023f8b59 | ||
|
|
b6c464281b | ||
|
|
d4a32476da | ||
|
|
6c42418faf | ||
|
|
cbe207ab65 | ||
|
|
d792e11b7f | ||
|
|
77639817fe | ||
|
|
68be006a29 | ||
|
|
96d6ee61ff | ||
|
|
bfd3683b0b | ||
|
|
c95083b176 | ||
|
|
dfd85c321c | ||
|
|
c2beef1900 | ||
|
|
25a8aa97b2 | ||
|
|
691aeb0815 | ||
|
|
a05e191518 | ||
|
|
e069c9c2ee | ||
|
|
bb18bb084c | ||
|
|
6f774470b3 | ||
|
|
18b06f1cf4 | ||
|
|
1b87140ce7 | ||
|
|
29dd56f83f | ||
|
|
0bc23c3af1 | ||
|
|
f634b328ee | ||
|
|
fa8c1d6226 | ||
|
|
1ba9601257 | ||
|
|
67aa342fe5 | ||
|
|
b07d2fb7d7 | ||
|
|
c59d6cb2a7 | ||
|
|
f28d5d2f59 | ||
|
|
86d8e362a1 | ||
|
|
2805f788ee | ||
|
|
e29efc7d2c | ||
|
|
615ae41e67 | ||
|
|
ae81f3a00f | ||
|
|
ed857ad6e0 | ||
|
|
a6d1ccae8e | ||
|
|
831b4d6ceb | ||
|
|
9bd4f65463 | ||
|
|
5ff4b43732 | ||
|
|
ca0c2746fc | ||
|
|
b7e3e6c5ca | ||
|
|
597f3fa727 | ||
|
|
6f888f1544 | ||
|
|
8372a37f74 | ||
|
|
c0a1dd0524 | ||
|
|
e6df1d8d8a | ||
|
|
1ee6d631c6 | ||
|
|
8369c926b1 | ||
|
|
1dfe30deaf | ||
|
|
21fb44d0ba | ||
|
|
b95a8aa378 | ||
|
|
c53b2f589b | ||
|
|
4dad62c481 | ||
|
|
365b419b5e | ||
|
|
132dc1fa26 | ||
|
|
cce5f06086 | ||
|
|
17c45fcd75 | ||
|
|
9898e21ce7 | ||
|
|
fdbaba896f | ||
|
|
8215737db9 | ||
|
|
439e37a198 | ||
|
|
d22381a943 | ||
|
|
2886127535 | ||
|
|
81a00134aa | ||
|
|
cafb73a7a0 | ||
|
|
d5b690caf8 | ||
|
|
870ce1be5c | ||
|
|
dbd851e64d | ||
|
|
81d7fc2611 | ||
|
|
e3fa8b031b | ||
|
|
9692671213 | ||
|
|
909d9cb805 | ||
|
|
2e94b09e6f | ||
|
|
24edae5e74 | ||
|
|
f1a9637d1f | ||
|
|
a6dba9eb25 | ||
|
|
f15d53f3b9 | ||
|
|
0daefb778b | ||
|
|
be8c35ad8c | ||
|
|
710c1ba050 | ||
|
|
8e26fa1c81 | ||
|
|
7f12fb7352 | ||
|
|
a6e052b2a0 | ||
|
|
073529a951 | ||
|
|
07cb9803f0 | ||
|
|
6ec250951a | ||
|
|
cbc12324bb | ||
|
|
9fbe447428 | ||
|
|
f3f3ee6e81 | ||
|
|
01baa6e3ae | ||
|
|
e2fcaeb46a | ||
|
|
bdf0c8ff5a | ||
|
|
43ebcb68f0 | ||
|
|
44dd2f008b | ||
|
|
2729bfe379 | ||
|
|
13e8976494 | ||
|
|
8ce38a5dfb | ||
|
|
77f0de89ec | ||
|
|
ae89b2ee79 | ||
|
|
82c99a594d | ||
|
|
083909ee3b | ||
|
|
25d232b815 | ||
|
|
c64223ae56 | ||
|
|
cb21044900 | ||
|
|
eee5b067b3 | ||
|
|
14efb4502b | ||
|
|
bf960b8c76 | ||
|
|
081ad03b4b | ||
|
|
7b897add22 | ||
|
|
9f19791d8c | ||
|
|
61f1ef877f | ||
|
|
18da5f61cd | ||
|
|
14dd72b3b1 | ||
|
|
90ae086822 | ||
|
|
1a84b2b555 | ||
|
|
076b020dc4 | ||
|
|
f50bbdb9af | ||
|
|
71fa2166ee | ||
|
|
d6abd4c72d | ||
|
|
57eaed4dcc | ||
|
|
6ebf4ee394 | ||
|
|
39cd86a48e | ||
|
|
4b8e4b40af | ||
|
|
e60275c4de | ||
|
|
b0c31badc2 | ||
|
|
ae7904f0c8 | ||
|
|
bbd60031b1 | ||
|
|
145d3242a6 | ||
|
|
bca51a986c | ||
|
|
62f15d0166 | ||
|
|
a44883486a | ||
|
|
0866e8dc21 | ||
|
|
d60a30d1f2 | ||
|
|
da88268943 | ||
|
|
af32ae2ba5 | ||
|
|
b47afafe8e | ||
|
|
3a13f77058 | ||
|
|
424b7decb1 | ||
|
|
91f9f23138 | ||
|
|
f912731cd4 | ||
|
|
af794ed3c0 | ||
|
|
07e97e20d8 | ||
|
|
6efb21314a | ||
|
|
c91b5b3c2e | ||
|
|
8b93ce2747 | ||
|
|
2d6197fd7d | ||
|
|
f826262f1d | ||
|
|
6d10b1582f | ||
|
|
1055084305 | ||
|
|
dc0e7d4988 | ||
|
|
8060d2ff24 | ||
|
|
921d93e427 | ||
|
|
dba1b7539f | ||
|
|
77da545ab4 | ||
|
|
0062eb1209 | ||
|
|
67c0515d3c | ||
|
|
58e9bad0a0 | ||
|
|
a2a4e8288e | ||
|
|
9de02b7ae6 | ||
|
|
2429e7b792 | ||
|
|
c336a1595d | ||
|
|
7f2a13bc7a | ||
|
|
abd08440a1 | ||
|
|
d5ded932d3 | ||
|
|
b108e173a5 | ||
|
|
b6f50f5992 | ||
|
|
3ceb96a45f | ||
|
|
e928c224ae | ||
|
|
a0bab539bb | ||
|
|
9f310c20f3 | ||
|
|
92d205d1a8 | ||
|
|
c6f641eac4 | ||
|
|
6d4a3974ce | ||
|
|
6099c5d034 | ||
|
|
63d20a54d4 | ||
|
|
dca7046d8c | ||
|
|
1c8b90e9b1 | ||
|
|
7c9dd05edd | ||
|
|
73695db668 | ||
|
|
ac23e16786 | ||
|
|
dc36609743 | ||
|
|
e3b88cbad3 | ||
|
|
dd2440086f | ||
|
|
08aced85ba | ||
|
|
6c83ec6e61 | ||
|
|
6c675fcede | ||
|
|
81532c7ce6 | ||
|
|
efddfab564 | ||
|
|
73cc54c10d | ||
|
|
69c150d5f6 | ||
|
|
82d9d46fde | ||
|
|
5a7b1b91e0 | ||
|
|
2c16cb46ad | ||
|
|
ed4e2bc5b9 | ||
|
|
589e1e5c19 | ||
|
|
c9e5dbda78 | ||
|
|
a342efca0e | ||
|
|
1233d81523 | ||
|
|
f79ffe792e | ||
|
|
87f2e21ae9 | ||
|
|
6321482a46 | ||
|
|
8081d4602b | ||
|
|
2ecf086333 | ||
|
|
76d165e71e | ||
|
|
8f17b73796 | ||
|
|
6d4e8bfcb2 | ||
|
|
a2a0c087e1 | ||
|
|
c86ba38a4e | ||
|
|
415330d5eb | ||
|
|
05e3073165 | ||
|
|
ef9136c053 | ||
|
|
f02ccd36cc | ||
|
|
8b1ecf05c9 | ||
|
|
15790aa00c | ||
|
|
de900fc3b5 | ||
|
|
fc5b3562c3 | ||
|
|
90b64616f7 | ||
|
|
91d4cf6624 | ||
|
|
97086c3cc9 | ||
|
|
4b5ff0b89e | ||
|
|
47915328e6 | ||
|
|
cff07342f5 | ||
|
|
88160ef2e2 | ||
|
|
dfe05599d3 | ||
|
|
d5c9fd1085 | ||
|
|
452913f336 | ||
|
|
aaf9bb2e9e | ||
|
|
2d5a1840f4 | ||
|
|
bbd403dbc3 | ||
|
|
bfbd0f77e8 | ||
|
|
1d9c0ae388 | ||
|
|
371bc3012e | ||
|
|
a7d4b00d06 | ||
|
|
a69581966b | ||
|
|
a997d9f80c | ||
|
|
773881f333 | ||
|
|
88256eeee8 | ||
|
|
e90243c348 | ||
|
|
49cc931f92 | ||
|
|
5d589093cf | ||
|
|
a5c99f9693 | ||
|
|
6010640cea | ||
|
|
1a6670a6bb | ||
|
|
43fe411585 | ||
|
|
093eb57ad0 | ||
|
|
ac88b73b65 | ||
|
|
700d56f3ab | ||
|
|
b1790335c0 | ||
|
|
ff978d1a8c | ||
|
|
9cf9a36d0d | ||
|
|
13a4141cc6 | ||
|
|
b878ae3f21 | ||
|
|
03f6bdbdd2 | ||
|
|
b85b02abb4 | ||
|
|
61976e3ef0 | ||
|
|
88aaff863b | ||
|
|
6ffed8523c | ||
|
|
035b83c0e4 | ||
|
|
0b6c416fd4 | ||
|
|
a53cffc121 | ||
|
|
93a594e9c0 | ||
|
|
b49c6dcbd4 | ||
|
|
258a53e146 | ||
|
|
46ef0204ef | ||
|
|
345b842edc | ||
|
|
f338ded349 | ||
|
|
20cfe29199 | ||
|
|
9ff4ed286f | ||
|
|
4f79d6a2de | ||
|
|
389630a95d | ||
|
|
c9fcdf3e80 |
2
.github/workflows/mad_modelDiff.yml
vendored
2
.github/workflows/mad_modelDiff.yml
vendored
@@ -70,7 +70,7 @@ jobs:
|
||||
SHORTNAME=`basename $DATABASE`
|
||||
python misc/scripts/models-as-data/generate_mad.py --language java --with-summaries --with-sinks $DATABASE $SHORTNAME/$QL_VARIANT
|
||||
mkdir -p $MODELS/$SHORTNAME
|
||||
mv java/ql/lib/ext/generated/$SHORTNAME/$QL_VARIANT $MODELS/$SHORTNAME
|
||||
mv java/ql/lib/ext/generated/modelgenerator/$SHORTNAME/$QL_VARIANT $MODELS/$SHORTNAME
|
||||
cd ..
|
||||
}
|
||||
|
||||
|
||||
2
.github/workflows/python-tooling.yml
vendored
2
.github/workflows/python-tooling.yml
vendored
@@ -5,7 +5,7 @@ on:
|
||||
paths:
|
||||
- "misc/bazel/**"
|
||||
- "misc/codegen/**"
|
||||
- "misc/scripts/models-as-data/bulk_generate_mad.py"
|
||||
- "misc/scripts/models-as-data/*.py"
|
||||
- "*.bazel*"
|
||||
- .github/workflows/codegen.yml
|
||||
- .pre-commit-config.yaml
|
||||
|
||||
442
Cargo.lock
generated
442
Cargo.lock
generated
@@ -140,6 +140,26 @@ version = "0.22.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
|
||||
|
||||
[[package]]
|
||||
name = "bindgen"
|
||||
version = "0.72.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895"
|
||||
dependencies = [
|
||||
"bitflags 2.9.4",
|
||||
"cexpr",
|
||||
"clang-sys",
|
||||
"itertools 0.12.1",
|
||||
"log 0.4.28",
|
||||
"prettyplease",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"regex",
|
||||
"rustc-hash 2.1.1",
|
||||
"shlex",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.3.2"
|
||||
@@ -240,9 +260,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.2.37"
|
||||
version = "1.2.61"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "65193589c6404eb80b450d618eaf9a2cafaaafd57ecce47370519ef674a7bd44"
|
||||
checksum = "d16d90359e986641506914ba71350897565610e87ce0ad9e6f28569db3dd5c6d"
|
||||
dependencies = [
|
||||
"find-msvc-tools",
|
||||
"jobserver",
|
||||
@@ -250,6 +270,15 @@ dependencies = [
|
||||
"shlex",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cexpr"
|
||||
version = "0.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
|
||||
dependencies = [
|
||||
"nom",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
version = "1.0.3"
|
||||
@@ -328,7 +357,7 @@ dependencies = [
|
||||
"chalk-derive 0.103.0",
|
||||
"chalk-ir 0.103.0",
|
||||
"ena",
|
||||
"indexmap 2.11.4",
|
||||
"indexmap 2.14.0",
|
||||
"itertools 0.12.1",
|
||||
"petgraph",
|
||||
"rustc-hash 1.1.0",
|
||||
@@ -349,6 +378,17 @@ dependencies = [
|
||||
"windows-link 0.2.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clang-sys"
|
||||
version = "1.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4"
|
||||
dependencies = [
|
||||
"glob",
|
||||
"libc",
|
||||
"libloading",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "4.5.48"
|
||||
@@ -416,6 +456,7 @@ dependencies = [
|
||||
"tree-sitter",
|
||||
"tree-sitter-json",
|
||||
"tree-sitter-ql",
|
||||
"yeast",
|
||||
"zstd",
|
||||
]
|
||||
|
||||
@@ -437,6 +478,25 @@ dependencies = [
|
||||
"tree-sitter-ruby",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "codeql-extractor-unified"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"codeql-extractor",
|
||||
"encoding",
|
||||
"lazy_static",
|
||||
"rayon",
|
||||
"regex",
|
||||
"serde_json",
|
||||
"tracing",
|
||||
"tracing-subscriber",
|
||||
"tree-sitter",
|
||||
"tree-sitter-embedded-template",
|
||||
"tree-sitter-swift",
|
||||
"yeast",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "codeql-rust"
|
||||
version = "0.1.0"
|
||||
@@ -485,6 +545,15 @@ version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
|
||||
|
||||
[[package]]
|
||||
name = "convert_case"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "baaaa0ecca5b51987b9423ccdc971514dd8b0bb7b4060b983d3664dad3f1f89f"
|
||||
dependencies = [
|
||||
"unicode-segmentation",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "core-foundation-sys"
|
||||
version = "0.8.7"
|
||||
@@ -738,6 +807,12 @@ dependencies = [
|
||||
"typeid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fastrand"
|
||||
version = "2.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6"
|
||||
|
||||
[[package]]
|
||||
name = "figment"
|
||||
version = "0.10.19"
|
||||
@@ -754,9 +829,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "find-msvc-tools"
|
||||
version = "0.1.1"
|
||||
version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7fd99930f64d146689264c637b5af2f0233a933bef0d8570e2526bf9e083192d"
|
||||
checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"
|
||||
|
||||
[[package]]
|
||||
name = "fixedbitset"
|
||||
@@ -786,6 +861,12 @@ version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
|
||||
|
||||
[[package]]
|
||||
name = "foldhash"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
|
||||
|
||||
[[package]]
|
||||
name = "form_urlencoded"
|
||||
version = "1.2.2"
|
||||
@@ -870,9 +951,26 @@ checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"
|
||||
dependencies = [
|
||||
"allocator-api2",
|
||||
"equivalent",
|
||||
"foldhash",
|
||||
"foldhash 0.1.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.16.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
|
||||
dependencies = [
|
||||
"allocator-api2",
|
||||
"equivalent",
|
||||
"foldhash 0.2.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.17.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
|
||||
|
||||
[[package]]
|
||||
name = "hashlink"
|
||||
version = "0.10.0"
|
||||
@@ -1059,16 +1157,25 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "indexmap"
|
||||
version = "2.11.4"
|
||||
version = "2.14.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4b0f83760fb341a774ed326568e19f5a863af4a952def8c39f9ab92fd95b88e5"
|
||||
checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9"
|
||||
dependencies = [
|
||||
"equivalent",
|
||||
"hashbrown 0.15.5",
|
||||
"hashbrown 0.17.1",
|
||||
"serde",
|
||||
"serde_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "indoc"
|
||||
version = "2.0.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
|
||||
dependencies = [
|
||||
"rustversion",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "inlinable_string"
|
||||
version = "0.1.15"
|
||||
@@ -1198,6 +1305,16 @@ version = "0.2.175"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543"
|
||||
|
||||
[[package]]
|
||||
name = "libloading"
|
||||
version = "0.8.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"windows-link 0.2.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "line-index"
|
||||
version = "0.1.2"
|
||||
@@ -1263,6 +1380,12 @@ dependencies = [
|
||||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "minimal-lexical"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
|
||||
|
||||
[[package]]
|
||||
name = "miniz_oxide"
|
||||
version = "0.8.9"
|
||||
@@ -1309,6 +1432,16 @@ version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451"
|
||||
|
||||
[[package]]
|
||||
name = "nom"
|
||||
version = "7.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
"minimal-lexical",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "notify"
|
||||
version = "8.2.0"
|
||||
@@ -1436,6 +1569,12 @@ dependencies = [
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pathdiff"
|
||||
version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3"
|
||||
|
||||
[[package]]
|
||||
name = "pear"
|
||||
version = "0.2.9"
|
||||
@@ -1491,7 +1630,36 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db"
|
||||
dependencies = [
|
||||
"fixedbitset",
|
||||
"indexmap 2.11.4",
|
||||
"indexmap 2.14.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "phf"
|
||||
version = "0.13.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf"
|
||||
dependencies = [
|
||||
"phf_shared",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "phf_generator"
|
||||
version = "0.13.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737"
|
||||
dependencies = [
|
||||
"fastrand",
|
||||
"phf_shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "phf_shared"
|
||||
version = "0.13.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266"
|
||||
dependencies = [
|
||||
"siphasher",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1536,6 +1704,25 @@ dependencies = [
|
||||
"zerocopy",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "prettyplease"
|
||||
version = "0.2.37"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro-crate"
|
||||
version = "3.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f"
|
||||
dependencies = [
|
||||
"toml_edit 0.25.11+spec-1.1.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.101"
|
||||
@@ -1667,7 +1854,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e876bb2c3e52a8d4e6684526a2d4e81f9d028b939ee4dc5dc775fe10deb44d59"
|
||||
dependencies = [
|
||||
"dashmap",
|
||||
"indexmap 2.11.4",
|
||||
"indexmap 2.14.0",
|
||||
"la-arena",
|
||||
"ra_ap_cfg",
|
||||
"ra_ap_intern",
|
||||
@@ -1709,7 +1896,7 @@ checksum = "ebffdc134eccabc17209d7760cfff7fd12ed18ab6e21188c5e084b97aa38504c"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"either",
|
||||
"indexmap 2.11.4",
|
||||
"indexmap 2.14.0",
|
||||
"itertools 0.14.0",
|
||||
"ra_ap_base_db",
|
||||
"ra_ap_cfg",
|
||||
@@ -1739,7 +1926,7 @@ dependencies = [
|
||||
"drop_bomb",
|
||||
"either",
|
||||
"fst",
|
||||
"indexmap 2.11.4",
|
||||
"indexmap 2.14.0",
|
||||
"itertools 0.14.0",
|
||||
"la-arena",
|
||||
"ra-ap-rustc_abi",
|
||||
@@ -1808,7 +1995,7 @@ dependencies = [
|
||||
"cov-mark",
|
||||
"either",
|
||||
"ena",
|
||||
"indexmap 2.11.4",
|
||||
"indexmap 2.14.0",
|
||||
"itertools 0.14.0",
|
||||
"la-arena",
|
||||
"oorandom",
|
||||
@@ -1846,7 +2033,7 @@ dependencies = [
|
||||
"crossbeam-channel",
|
||||
"either",
|
||||
"fst",
|
||||
"indexmap 2.11.4",
|
||||
"indexmap 2.14.0",
|
||||
"itertools 0.14.0",
|
||||
"line-index",
|
||||
"memchr",
|
||||
@@ -1948,7 +2135,7 @@ version = "0.0.301"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "45db9e2df587d56f0738afa89fb2c100ff7c1e9cbe49e07f6a8b62342832211b"
|
||||
dependencies = [
|
||||
"indexmap 2.11.4",
|
||||
"indexmap 2.14.0",
|
||||
"ra_ap_intern",
|
||||
"ra_ap_paths",
|
||||
"ra_ap_span",
|
||||
@@ -2107,7 +2294,7 @@ checksum = "6c174d6b9b7a7f54687df7e00c3e75ed6f082a7943a9afb1d54f33c0c12773de"
|
||||
dependencies = [
|
||||
"crossbeam-channel",
|
||||
"fst",
|
||||
"indexmap 2.11.4",
|
||||
"indexmap 2.14.0",
|
||||
"nohash-hasher",
|
||||
"ra_ap_paths",
|
||||
"ra_ap_stdx",
|
||||
@@ -2239,6 +2426,15 @@ version = "0.8.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001"
|
||||
|
||||
[[package]]
|
||||
name = "relative-path"
|
||||
version = "2.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bca40a312222d8ba74837cb474edef44b37f561da5f773981007a10bbaa992b0"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rowan"
|
||||
version = "0.15.15"
|
||||
@@ -2252,6 +2448,57 @@ dependencies = [
|
||||
"text-size",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rquickjs"
|
||||
version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a135375fbac5ba723bb6a48f432a72f81539cedde422f0121a86c7c4e96d8e0d"
|
||||
dependencies = [
|
||||
"rquickjs-core",
|
||||
"rquickjs-macro",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rquickjs-core"
|
||||
version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bccb7121a123865c8ace4dea42e7ed84d78b90cbaf4ca32c59849d8d210c9672"
|
||||
dependencies = [
|
||||
"hashbrown 0.16.1",
|
||||
"phf",
|
||||
"relative-path",
|
||||
"rquickjs-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rquickjs-macro"
|
||||
version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "89f93602cc3112c7f30bf5f29e722784232138692c7df4c52ebbac7e035d900d"
|
||||
dependencies = [
|
||||
"convert_case",
|
||||
"fnv",
|
||||
"ident_case",
|
||||
"indexmap 2.14.0",
|
||||
"phf_generator",
|
||||
"phf_shared",
|
||||
"proc-macro-crate",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"rquickjs-core",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rquickjs-sys"
|
||||
version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "57b1b6528590d4d65dc86b5159eae2d0219709546644c66408b2441696d1d725"
|
||||
dependencies = [
|
||||
"bindgen",
|
||||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rust-extractor-macros"
|
||||
version = "0.1.0"
|
||||
@@ -2317,7 +2564,7 @@ dependencies = [
|
||||
"crossbeam-utils",
|
||||
"hashbrown 0.15.5",
|
||||
"hashlink",
|
||||
"indexmap 2.11.4",
|
||||
"indexmap 2.14.0",
|
||||
"intrusive-collections",
|
||||
"papaya",
|
||||
"parking_lot",
|
||||
@@ -2406,11 +2653,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "semver"
|
||||
version = "1.0.26"
|
||||
version = "1.0.28"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0"
|
||||
checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2470,7 +2718,7 @@ version = "1.0.145"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c"
|
||||
dependencies = [
|
||||
"indexmap 2.11.4",
|
||||
"indexmap 2.14.0",
|
||||
"itoa",
|
||||
"memchr",
|
||||
"ryu",
|
||||
@@ -2506,7 +2754,7 @@ dependencies = [
|
||||
"chrono",
|
||||
"hex",
|
||||
"indexmap 1.9.3",
|
||||
"indexmap 2.11.4",
|
||||
"indexmap 2.14.0",
|
||||
"schemars 0.9.0",
|
||||
"schemars 1.0.4",
|
||||
"serde",
|
||||
@@ -2534,7 +2782,7 @@ version = "0.9.34+deprecated"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47"
|
||||
dependencies = [
|
||||
"indexmap 2.11.4",
|
||||
"indexmap 2.14.0",
|
||||
"itoa",
|
||||
"ryu",
|
||||
"serde",
|
||||
@@ -2556,6 +2804,18 @@ version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
||||
|
||||
[[package]]
|
||||
name = "siphasher"
|
||||
version = "1.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649"
|
||||
|
||||
[[package]]
|
||||
name = "smallbitvec"
|
||||
version = "2.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9b0e903ee191d8f7a8fbf0d712c3a1699d19e04ceba5ad1eb673053c7d938a09"
|
||||
|
||||
[[package]]
|
||||
name = "smallvec"
|
||||
version = "1.15.1"
|
||||
@@ -2632,18 +2892,18 @@ checksum = "144f754d318415ac792f9d69fc87abbbfc043ce2ef041c60f16ad828f638717d"
|
||||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
version = "2.0.16"
|
||||
version = "2.0.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0"
|
||||
checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
|
||||
dependencies = [
|
||||
"thiserror-impl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror-impl"
|
||||
version = "2.0.16"
|
||||
version = "2.0.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960"
|
||||
checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -2708,7 +2968,7 @@ dependencies = [
|
||||
"serde",
|
||||
"serde_spanned 0.6.9",
|
||||
"toml_datetime 0.6.11",
|
||||
"toml_edit",
|
||||
"toml_edit 0.22.27",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2717,13 +2977,13 @@ version = "0.9.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "00e5e5d9bf2475ac9d4f0d9edab68cc573dc2fd644b0dba36b0c30a92dd9eaa0"
|
||||
dependencies = [
|
||||
"indexmap 2.11.4",
|
||||
"indexmap 2.14.0",
|
||||
"serde_core",
|
||||
"serde_spanned 1.0.2",
|
||||
"toml_datetime 0.7.2",
|
||||
"toml_parser",
|
||||
"toml_writer",
|
||||
"winnow",
|
||||
"winnow 0.7.13",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2744,27 +3004,48 @@ dependencies = [
|
||||
"serde_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml_datetime"
|
||||
version = "1.1.1+spec-1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7"
|
||||
dependencies = [
|
||||
"serde_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml_edit"
|
||||
version = "0.22.27"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a"
|
||||
dependencies = [
|
||||
"indexmap 2.11.4",
|
||||
"indexmap 2.14.0",
|
||||
"serde",
|
||||
"serde_spanned 0.6.9",
|
||||
"toml_datetime 0.6.11",
|
||||
"toml_write",
|
||||
"winnow",
|
||||
"winnow 0.7.13",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml_edit"
|
||||
version = "0.25.11+spec-1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0b59c4d22ed448339746c59b905d24568fcbb3ab65a500494f7b8c3e97739f2b"
|
||||
dependencies = [
|
||||
"indexmap 2.14.0",
|
||||
"toml_datetime 1.1.1+spec-1.1.0",
|
||||
"toml_parser",
|
||||
"winnow 1.0.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml_parser"
|
||||
version = "1.0.3"
|
||||
version = "1.1.2+spec-1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4cf893c33be71572e0e9aa6dd15e6677937abd686b066eac3f8cd3531688a627"
|
||||
checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526"
|
||||
dependencies = [
|
||||
"winnow",
|
||||
"winnow 1.0.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2779,6 +3060,12 @@ version = "1.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d163a63c116ce562a22cda521fcc4d79152e7aba014456fb5eb442f6d6a10109"
|
||||
|
||||
[[package]]
|
||||
name = "topological-sort"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ea68304e134ecd095ac6c3574494fc62b909f416c4fca77e440530221e549d3d"
|
||||
|
||||
[[package]]
|
||||
name = "tracing"
|
||||
version = "0.1.41"
|
||||
@@ -2853,9 +3140,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tree-sitter"
|
||||
version = "0.25.9"
|
||||
version = "0.26.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ccd2a058a86cfece0bf96f7cce1021efef9c8ed0e892ab74639173e5ed7a34fa"
|
||||
checksum = "887bd495d0582c5e3e0d8ece2233666169fa56a9644d172fc22ad179ab2d0538"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"regex",
|
||||
@@ -2875,6 +3162,30 @@ dependencies = [
|
||||
"tree-sitter-language",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tree-sitter-generate"
|
||||
version = "0.26.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c3fb2e1bdb1d5f9d23cd5fa68cf98b3bedbd223c92a2edd60bbcf30bcf7180a5"
|
||||
dependencies = [
|
||||
"bitflags 2.9.4",
|
||||
"dunce",
|
||||
"indexmap 2.14.0",
|
||||
"indoc",
|
||||
"log 0.4.28",
|
||||
"pathdiff",
|
||||
"regex",
|
||||
"regex-syntax",
|
||||
"rquickjs",
|
||||
"rustc-hash 2.1.1",
|
||||
"semver",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"smallbitvec",
|
||||
"thiserror",
|
||||
"topological-sort",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tree-sitter-json"
|
||||
version = "0.24.8"
|
||||
@@ -2891,6 +3202,16 @@ version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c4013970217383f67b18aef68f6fb2e8d409bc5755227092d32efb0422ba24b8"
|
||||
|
||||
[[package]]
|
||||
name = "tree-sitter-python"
|
||||
version = "0.23.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3d065aaa27f3aaceaf60c1f0e0ac09e1cb9eb8ed28e7bcdaa52129cffc7f4b04"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"tree-sitter-language",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tree-sitter-ql"
|
||||
version = "0.23.1"
|
||||
@@ -2911,6 +3232,15 @@ dependencies = [
|
||||
"tree-sitter-language",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tree-sitter-swift"
|
||||
version = "0.7.2"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"tree-sitter-generate",
|
||||
"tree-sitter-language",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "triomphe"
|
||||
version = "0.1.14"
|
||||
@@ -2960,6 +3290,12 @@ version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-segmentation"
|
||||
version = "1.13.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-xid"
|
||||
version = "0.2.6"
|
||||
@@ -3349,6 +3685,15 @@ dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winnow"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2ee1708bef14716a11bae175f579062d4554d95be2c6829f518df847b7b3fdd0"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wit-bindgen"
|
||||
version = "0.45.1"
|
||||
@@ -3367,6 +3712,29 @@ version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049"
|
||||
|
||||
[[package]]
|
||||
name = "yeast"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_yaml",
|
||||
"tree-sitter",
|
||||
"tree-sitter-python",
|
||||
"tree-sitter-ruby",
|
||||
"yeast-macros",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "yeast-macros"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "yoke"
|
||||
version = "0.8.0"
|
||||
|
||||
@@ -4,7 +4,11 @@
|
||||
resolver = "2"
|
||||
members = [
|
||||
"shared/tree-sitter-extractor",
|
||||
"shared/yeast",
|
||||
"shared/yeast-macros",
|
||||
"ruby/extractor",
|
||||
"unified/extractor",
|
||||
"unified/extractor/tree-sitter-swift",
|
||||
"rust/extractor",
|
||||
"rust/extractor/macros",
|
||||
"rust/ast-generator",
|
||||
|
||||
@@ -102,6 +102,7 @@ use_repo(
|
||||
tree_sitter_extractors_deps,
|
||||
"vendor_ts__anyhow-1.0.100",
|
||||
"vendor_ts__argfile-0.2.1",
|
||||
"vendor_ts__cc-1.2.61",
|
||||
"vendor_ts__chalk-ir-0.104.0",
|
||||
"vendor_ts__chrono-0.4.42",
|
||||
"vendor_ts__clap-4.5.48",
|
||||
@@ -141,14 +142,18 @@ use_repo(
|
||||
"vendor_ts__serde-1.0.228",
|
||||
"vendor_ts__serde_json-1.0.145",
|
||||
"vendor_ts__serde_with-3.14.1",
|
||||
"vendor_ts__serde_yaml-0.9.34-deprecated",
|
||||
"vendor_ts__syn-2.0.106",
|
||||
"vendor_ts__toml-0.9.7",
|
||||
"vendor_ts__tracing-0.1.41",
|
||||
"vendor_ts__tracing-flame-0.2.0",
|
||||
"vendor_ts__tracing-subscriber-0.3.20",
|
||||
"vendor_ts__tree-sitter-0.25.9",
|
||||
"vendor_ts__tree-sitter-0.26.8",
|
||||
"vendor_ts__tree-sitter-embedded-template-0.25.0",
|
||||
"vendor_ts__tree-sitter-generate-0.26.8",
|
||||
"vendor_ts__tree-sitter-json-0.24.8",
|
||||
"vendor_ts__tree-sitter-language-0.1.5",
|
||||
"vendor_ts__tree-sitter-python-0.23.6",
|
||||
"vendor_ts__tree-sitter-ql-0.23.1",
|
||||
"vendor_ts__tree-sitter-ruby-0.23.1",
|
||||
"vendor_ts__triomphe-0.1.14",
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
## 0.4.35
|
||||
|
||||
No user-facing changes.
|
||||
|
||||
## 0.4.34
|
||||
|
||||
### Minor Analysis Improvements
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
category: minorAnalysis
|
||||
---
|
||||
* Altered 2 patterns in the `poisonable_steps` modelling. Extra sinks are detected in the following cases: scripts executed via python modules and `go run` in directories are detected as potential mechanisms of injection. For the go execution pattern, the pattern is updated to now ignore flags that occur between go and the specific command. This change may lead to more results being detected by the following queries: `actions/untrusted-checkout/high`, `actions/untrusted-checkout/critical`, `actions/untrusted-checkout-toctou/high`, `actions/untrusted-checkout-toctou/critical`, `actions/cache-poisoning/poisonable-step`, `actions/cache-poisoning/direct-cache` and `actions/artifact-poisoning/path-traversal`.
|
||||
3
actions/ql/lib/change-notes/released/0.4.35.md
Normal file
3
actions/ql/lib/change-notes/released/0.4.35.md
Normal file
@@ -0,0 +1,3 @@
|
||||
## 0.4.35
|
||||
|
||||
No user-facing changes.
|
||||
@@ -1,2 +1,2 @@
|
||||
---
|
||||
lastReleaseVersion: 0.4.34
|
||||
lastReleaseVersion: 0.4.35
|
||||
|
||||
@@ -70,7 +70,7 @@ extensions:
|
||||
- ["(source|sh|bash|zsh|fish)\\s+([^\\s]+)\\b", 2]
|
||||
- ["(node)\\s+([^\\s]+)(\\.js|\\.ts)\\b", 2]
|
||||
- ["(python[\\d\\.]*)\\s+([^\\s]+)\\.py\\b", 2]
|
||||
- ["(python[\\d\\.]*)\\s+-m\\s+([A-Za-z_][\\w\\.]*)\\b", 2] # eg: pythonX -m anything(dir or file)
|
||||
- ["(ruby)\\s+([^\\s]+)\\.rb\\b", 2]
|
||||
- ["(go)\\s+(generate|run)\\s+([^\\s]+)\\.go\\b", 3]
|
||||
- ["(go)\\s+(generate|run)(?:\\s+-[^\\s]+)*\\s+([^\\s]+)", 3]
|
||||
- ["(dotnet)\\s+([^\\s]+)\\.csproj\\b", 2]
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: codeql/actions-all
|
||||
version: 0.4.34
|
||||
version: 0.4.36-dev
|
||||
library: true
|
||||
warnOnImplicitThis: true
|
||||
dependencies:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
## 0.6.27
|
||||
|
||||
No user-facing changes.
|
||||
|
||||
## 0.6.26
|
||||
|
||||
### Major Analysis Improvements
|
||||
@@ -173,7 +177,7 @@ No user-facing changes.
|
||||
* `actions/if-expression-always-true/critical`
|
||||
* `actions/if-expression-always-true/high`
|
||||
* `actions/unnecessary-use-of-advanced-config`
|
||||
|
||||
|
||||
* The following query has been moved from the `code-scanning` suite to the `security-extended`
|
||||
suite. Any existing alerts for this query will be closed automatically unless the analysis is
|
||||
configured to use the `security-extended` suite.
|
||||
|
||||
@@ -1,6 +1,35 @@
|
||||
## Overview
|
||||
|
||||
GitHub workflows can be triggered through various repository events, including incoming pull requests (PRs) or comments on Issues/PRs. A potentially dangerous misuse of the triggers such as `pull_request_target` or `issue_comment` followed by an explicit checkout of untrusted code (Pull Request HEAD) may lead to repository compromise if untrusted code gets executed (e.g., due to a modified build script) in a privileged job.
|
||||
GitHub workflows can be triggered through various repository events, including incoming pull requests (PRs) or comments on Issues/PRs. Under certain conditions described below, attackers can take over a repository by opening malicious PRs from forks. The attacks can result in malicious code execution causing unauthorized changes to the repository or exfiltration of repository secrets and a compromise of connected systems.
|
||||
|
||||
## Workflow Security Model
|
||||
|
||||
In GitHub Actions, there is a distinction between unprivileged and privileged workflows. For example, a workflow with a `pull_request` trigger is unprivileged while a workflow with `pull_request_target` is privileged.
|
||||
|
||||
This is relevant especially for PRs from forks. Normal PRs can only be submitted by people who have write access to a repository, while PRs from forks can be submitted by anyone.
|
||||
|
||||
On a PR from a fork, an unprivileged `pull_request` workflow has only limited capabilities but a privileged `pull_request_target` workflow is much more dangerous. A privileged workflow:
|
||||
|
||||
* Runs in the context of the base repository
|
||||
* Has access to organization and repository secrets (e.g., API keys, deployment tokens)
|
||||
* Has a read/write `GITHUB_TOKEN` by default
|
||||
* Can access private resources
|
||||
|
||||
Certain triggers automatically grant a workflow elevated privileges:
|
||||
|
||||
* `pull_request_target` as described above
|
||||
* `workflow_run`: Triggered when another workflow completes.
|
||||
* `issue_comment`: Triggered when a comment is made on an issue or PR.
|
||||
|
||||
## Attack Details
|
||||
|
||||
* A repository has a privileged workflow
|
||||
* An attacker forks the repository and adds malicious code (e.g., in the build script)
|
||||
* The attacker opens a PR from the fork, and, if needed, comments on the PR
|
||||
* The workflow in the base repository checks out the forked code
|
||||
* The workflow runs, (e.g. the build script etc.), which contains the malicious code
|
||||
|
||||
Please note that not only build scripts can be malicious code vectors. There is a large number of other possibilities. Some of them are listed in the [LOTP](https://boostsecurityio.github.io/lotp/) catalog.
|
||||
|
||||
## Recommendation
|
||||
|
||||
@@ -133,3 +162,5 @@ jobs:
|
||||
## References
|
||||
|
||||
- GitHub Security Lab Research: [Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/).
|
||||
- Mitigating risks of untrusted checkout: [GitHub Docs](https://docs.github.com/en/enterprise-cloud@latest/actions/reference/security/secure-use#mitigating-the-risks-of-untrusted-code-checkout).
|
||||
- Living Off the Pipeline: [LOTP](https://boostsecurityio.github.io/lotp/).
|
||||
|
||||
@@ -1,6 +1,35 @@
|
||||
## Overview
|
||||
|
||||
GitHub workflows can be triggered through various repository events, including incoming pull requests (PRs) or comments on Issues/PRs. A potentially dangerous misuse of the triggers such as `pull_request_target` or `issue_comment` followed by an explicit checkout of untrusted code (Pull Request HEAD) may lead to repository compromise if untrusted code gets executed (e.g., due to a modified build script) in a privileged job.
|
||||
GitHub workflows can be triggered through various repository events, including incoming pull requests (PRs) or comments on Issues/PRs. Under certain conditions described below, attackers can take over a repository by opening malicious PRs from forks. The attacks can result in malicious code execution causing unauthorized changes to the repository or exfiltration of repository secrets and a compromise of connected systems.
|
||||
|
||||
## Workflow Security Model
|
||||
|
||||
In GitHub Actions, there is a distinction between unprivileged and privileged workflows. For example, a workflow with a `pull_request` trigger is unprivileged while a workflow with `pull_request_target` is privileged.
|
||||
|
||||
This is relevant especially for PRs from forks. Normal PRs can only be submitted by people who have write access to a repository, while PRs from forks can be submitted by anyone.
|
||||
|
||||
On a PR from a fork, an unprivileged `pull_request` workflow has only limited capabilities but a privileged `pull_request_target` workflow is much more dangerous. A privileged workflow:
|
||||
|
||||
* Runs in the context of the base repository
|
||||
* Has access to organization and repository secrets (e.g., API keys, deployment tokens)
|
||||
* Has a read/write `GITHUB_TOKEN` by default
|
||||
* Can access private resources
|
||||
|
||||
Certain triggers automatically grant a workflow elevated privileges:
|
||||
|
||||
* `pull_request_target` as described above
|
||||
* `workflow_run`: Triggered when another workflow completes.
|
||||
* `issue_comment`: Triggered when a comment is made on an issue or PR.
|
||||
|
||||
## Attack Details
|
||||
|
||||
* A repository has a privileged workflow
|
||||
* An attacker forks the repository and adds malicious code (e.g., in the build script)
|
||||
* The attacker opens a PR from the fork, and, if needed, comments on the PR
|
||||
* The workflow in the base repository checks out the forked code
|
||||
* The workflow runs, (e.g. the build script etc.), which contains the malicious code
|
||||
|
||||
Please note that not only build scripts can be malicious code vectors. There is a large number of other possibilities. Some of them are listed in the [LOTP](https://boostsecurityio.github.io/lotp/) catalog.
|
||||
|
||||
## Recommendation
|
||||
|
||||
@@ -133,3 +162,5 @@ jobs:
|
||||
## References
|
||||
|
||||
- GitHub Security Lab Research: [Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/).
|
||||
- Mitigating risks of untrusted checkout: [GitHub Docs](https://docs.github.com/en/enterprise-cloud@latest/actions/reference/security/secure-use#mitigating-the-risks-of-untrusted-code-checkout).
|
||||
- Living Off the Pipeline: [LOTP](https://boostsecurityio.github.io/lotp/).
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @name Checkout of untrusted code in trusted context
|
||||
* @name Checkout of untrusted code in privileged context without privileged context use
|
||||
* @description Privileged workflows have read/write access to the base repository and access to secrets.
|
||||
* By explicitly checking out and running the build script from a fork the untrusted code is running in an environment
|
||||
* that is able to push to the base repository and to access secrets.
|
||||
|
||||
@@ -1,6 +1,35 @@
|
||||
## Overview
|
||||
|
||||
GitHub workflows can be triggered through various repository events, including incoming pull requests (PRs) or comments on Issues/PRs. A potentially dangerous misuse of the triggers such as `pull_request_target` or `issue_comment` followed by an explicit checkout of untrusted code (Pull Request HEAD) may lead to repository compromise if untrusted code gets executed (e.g., due to a modified build script) in a privileged job.
|
||||
GitHub workflows can be triggered through various repository events, including incoming pull requests (PRs) or comments on Issues/PRs. Under certain conditions described below, attackers can take over a repository by opening malicious PRs from forks. The attacks can result in malicious code execution causing unauthorized changes to the repository or exfiltration of repository secrets and a compromise of connected systems.
|
||||
|
||||
## Workflow Security Model
|
||||
|
||||
In GitHub Actions, there is a distinction between unprivileged and privileged workflows. For example, a workflow with a `pull_request` trigger is unprivileged while a workflow with `pull_request_target` is privileged.
|
||||
|
||||
This is relevant especially for PRs from forks. Normal PRs can only be submitted by people who have write access to a repository, while PRs from forks can be submitted by anyone.
|
||||
|
||||
On a PR from a fork, an unprivileged `pull_request` workflow has only limited capabilities but a privileged `pull_request_target` workflow is much more dangerous. A privileged workflow:
|
||||
|
||||
* Runs in the context of the base repository
|
||||
* Has access to organization and repository secrets (e.g., API keys, deployment tokens)
|
||||
* Has a read/write `GITHUB_TOKEN` by default
|
||||
* Can access private resources
|
||||
|
||||
Certain triggers automatically grant a workflow elevated privileges:
|
||||
|
||||
* `pull_request_target` as described above
|
||||
* `workflow_run`: Triggered when another workflow completes.
|
||||
* `issue_comment`: Triggered when a comment is made on an issue or PR.
|
||||
|
||||
## Attack Details
|
||||
|
||||
* A repository has a privileged workflow
|
||||
* An attacker forks the repository and adds malicious code (e.g., in the build script)
|
||||
* The attacker opens a PR from the fork, and, if needed, comments on the PR
|
||||
* The workflow in the base repository checks out the forked code
|
||||
* The workflow runs, (e.g. the build script etc.), which contains the malicious code
|
||||
|
||||
Please note that not only build scripts can be malicious code vectors. There is a large number of other possibilities. Some of them are listed in the [LOTP](https://boostsecurityio.github.io/lotp/) catalog.
|
||||
|
||||
## Recommendation
|
||||
|
||||
@@ -133,3 +162,5 @@ jobs:
|
||||
## References
|
||||
|
||||
- GitHub Security Lab Research: [Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/).
|
||||
- Mitigating risks of untrusted checkout: [GitHub Docs](https://docs.github.com/en/enterprise-cloud@latest/actions/reference/security/secure-use#mitigating-the-risks-of-untrusted-code-checkout).
|
||||
- Living Off the Pipeline: [LOTP](https://boostsecurityio.github.io/lotp/).
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
category: fix
|
||||
---
|
||||
* Fixed help file descriptions for queries: `actions/untrusted-checkout/critical`, `actions/untrusted-checkout/high`, `actions/untrusted-checkout/medium`. Previously the messages were unclear as to why and how the vulnerabilities could occur.
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
category: queryMetadata
|
||||
---
|
||||
* Adjusted the name of `actions/untrusted-checkout/high` to more clearly describe which parts of the scenario are in a privileged context.
|
||||
3
actions/ql/src/change-notes/released/0.6.27.md
Normal file
3
actions/ql/src/change-notes/released/0.6.27.md
Normal file
@@ -0,0 +1,3 @@
|
||||
## 0.6.27
|
||||
|
||||
No user-facing changes.
|
||||
@@ -1,2 +1,2 @@
|
||||
---
|
||||
lastReleaseVersion: 0.6.26
|
||||
lastReleaseVersion: 0.6.27
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: codeql/actions-queries
|
||||
version: 0.6.26
|
||||
version: 0.6.28-dev
|
||||
library: false
|
||||
warnOnImplicitThis: true
|
||||
groups: [actions, queries]
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
## 10.1.0
|
||||
|
||||
### New Features
|
||||
|
||||
* A new predicate `getSwitchCase` was added to the `SwitchStmt` class, which yields the `n`th `case` statement from a `switch` statement.
|
||||
* Data flow barriers and barrier guards can now be added using data extensions. For more information see [Customizing library models for C and C++](https://codeql.github.com/docs/codeql-language-guides/customizing-library-models-for-cpp/).
|
||||
|
||||
### Minor Analysis Improvements
|
||||
|
||||
* Added taint flow models for the `Strsafe.h` header from the Windows SDK.
|
||||
|
||||
## 10.0.0
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
10
cpp/ql/lib/change-notes/released/10.1.0.md
Normal file
10
cpp/ql/lib/change-notes/released/10.1.0.md
Normal file
@@ -0,0 +1,10 @@
|
||||
## 10.1.0
|
||||
|
||||
### New Features
|
||||
|
||||
* A new predicate `getSwitchCase` was added to the `SwitchStmt` class, which yields the `n`th `case` statement from a `switch` statement.
|
||||
* Data flow barriers and barrier guards can now be added using data extensions. For more information see [Customizing library models for C and C++](https://codeql.github.com/docs/codeql-language-guides/customizing-library-models-for-cpp/).
|
||||
|
||||
### Minor Analysis Improvements
|
||||
|
||||
* Added taint flow models for the `Strsafe.h` header from the Windows SDK.
|
||||
@@ -1,2 +1,2 @@
|
||||
---
|
||||
lastReleaseVersion: 10.0.0
|
||||
lastReleaseVersion: 10.1.0
|
||||
|
||||
94
cpp/ql/lib/ext/Strsafe.model.yml
Normal file
94
cpp/ql/lib/ext/Strsafe.model.yml
Normal file
@@ -0,0 +1,94 @@
|
||||
# Models for strsafe.h safe string functions
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/cpp-all
|
||||
extensible: sourceModel
|
||||
data: # namespace, type, subtypes, name, signature, ext, output, kind, provenance
|
||||
# StringCchGets: (pszDest, cchDest)
|
||||
- ["", "", False, "StringCchGetsA", "", "", "Argument[*0]", "local", "manual"]
|
||||
- ["", "", False, "StringCchGetsW", "", "", "Argument[*0]", "local", "manual"]
|
||||
# StringCbGets: (pszDest, cbDest)
|
||||
- ["", "", False, "StringCbGetsA", "", "", "Argument[*0]", "local", "manual"]
|
||||
- ["", "", False, "StringCbGetsW", "", "", "Argument[*0]", "local", "manual"]
|
||||
# StringCchGetsEx: (pszDest, cchDest, ppszDestEnd, pcchRemaining, dwFlags)
|
||||
- ["", "", False, "StringCchGetsExA", "", "", "Argument[*0]", "local", "manual"]
|
||||
- ["", "", False, "StringCchGetsExW", "", "", "Argument[*0]", "local", "manual"]
|
||||
# StringCbGetsEx: (pszDest, cbDest, ppszDestEnd, pcbRemaining, dwFlags)
|
||||
- ["", "", False, "StringCbGetsExA", "", "", "Argument[*0]", "local", "manual"]
|
||||
- ["", "", False, "StringCbGetsExW", "", "", "Argument[*0]", "local", "manual"]
|
||||
- addsTo:
|
||||
pack: codeql/cpp-all
|
||||
extensible: summaryModel
|
||||
data: # namespace, type, subtypes, name, signature, ext, input, output, kind, provenance
|
||||
# StringCchCopy: (pszDest, cchDest, pszSrc)
|
||||
- ["", "", False, "StringCchCopyA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
- ["", "", False, "StringCchCopyW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
# StringCbCopy: (pszDest, cbDest, pszSrc)
|
||||
- ["", "", False, "StringCbCopyA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
- ["", "", False, "StringCbCopyW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
# StringCchCopyEx: (pszDest, cchDest, pszSrc, ppszDestEnd, pcchRemaining, dwFlags)
|
||||
- ["", "", False, "StringCchCopyExA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
- ["", "", False, "StringCchCopyExW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
# StringCbCopyEx: (pszDest, cbDest, pszSrc, ppszDestEnd, pcbRemaining, dwFlags)
|
||||
- ["", "", False, "StringCbCopyExA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
- ["", "", False, "StringCbCopyExW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
# StringCchCopyN: (pszDest, cchDest, pszSrc, cchToCopy)
|
||||
- ["", "", False, "StringCchCopyNA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
- ["", "", False, "StringCchCopyNW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
# StringCbCopyN: (pszDest, cbDest, pszSrc, cbToCopy)
|
||||
- ["", "", False, "StringCbCopyNA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
- ["", "", False, "StringCbCopyNW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
# StringCchCopyNEx: (pszDest, cchDest, pszSrc, cchToCopy, ppszDestEnd, pcchRemaining, dwFlags)
|
||||
- ["", "", False, "StringCchCopyNExA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
- ["", "", False, "StringCchCopyNExW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
# StringCbCopyNEx: (pszDest, cbDest, pszSrc, cbToCopy, ppszDestEnd, pcbRemaining, dwFlags)
|
||||
- ["", "", False, "StringCbCopyNExA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
- ["", "", False, "StringCbCopyNExW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
# StringCchCat: (pszDest, cchDest, pszSrc)
|
||||
- ["", "", False, "StringCchCatA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
- ["", "", False, "StringCchCatW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
# StringCbCat: (pszDest, cbDest, pszSrc)
|
||||
- ["", "", False, "StringCbCatA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
- ["", "", False, "StringCbCatW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
# StringCchCatEx: (pszDest, cchDest, pszSrc, ppszDestEnd, pcchRemaining, dwFlags)
|
||||
- ["", "", False, "StringCchCatExA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
- ["", "", False, "StringCchCatExW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
# StringCbCatEx: (pszDest, cbDest, pszSrc, ppszDestEnd, pcbRemaining, dwFlags)
|
||||
- ["", "", False, "StringCbCatExA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
- ["", "", False, "StringCbCatExW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
# StringCchCatN: (pszDest, cchDest, pszSrc, cchToAppend)
|
||||
- ["", "", False, "StringCchCatNA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
- ["", "", False, "StringCchCatNW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
# StringCbCatN: (pszDest, cbDest, pszSrc, cbToAppend)
|
||||
- ["", "", False, "StringCbCatNA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
- ["", "", False, "StringCbCatNW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
# StringCchCatNEx: (pszDest, cchDest, pszSrc, cchToAppend, ppszDestEnd, pcchRemaining, dwFlags)
|
||||
- ["", "", False, "StringCchCatNExA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
- ["", "", False, "StringCchCatNExW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
# StringCbCatNEx: (pszDest, cbDest, pszSrc, cbToAppend, ppszDestEnd, pcbRemaining, dwFlags)
|
||||
- ["", "", False, "StringCbCatNExA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
- ["", "", False, "StringCbCatNExW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
# StringCchPrintf: (pszDest, cchDest, pszFormat, ...)
|
||||
- ["", "", False, "StringCchPrintfA", "", "", "Argument[*2..8]", "Argument[*0]", "taint", "manual"]
|
||||
- ["", "", False, "StringCchPrintfW", "", "", "Argument[*2..8]", "Argument[*0]", "taint", "manual"]
|
||||
# StringCbPrintf: (pszDest, cbDest, pszFormat, ...)
|
||||
- ["", "", False, "StringCbPrintfA", "", "", "Argument[*2..8]", "Argument[*0]", "taint", "manual"]
|
||||
- ["", "", False, "StringCbPrintfW", "", "", "Argument[*2..8]", "Argument[*0]", "taint", "manual"]
|
||||
# StringCchPrintfEx: (pszDest, cchDest, ppszDestEnd, pcchRemaining, dwFlags, pszFormat, ...)
|
||||
- ["", "", False, "StringCchPrintfExA", "", "", "Argument[*5..11]", "Argument[*0]", "taint", "manual"]
|
||||
- ["", "", False, "StringCchPrintfExW", "", "", "Argument[*5..11]", "Argument[*0]", "taint", "manual"]
|
||||
# StringCbPrintfEx: (pszDest, cbDest, ppszDestEnd, pcbRemaining, dwFlags, pszFormat, ...)
|
||||
- ["", "", False, "StringCbPrintfExA", "", "", "Argument[*5..11]", "Argument[*0]", "taint", "manual"]
|
||||
- ["", "", False, "StringCbPrintfExW", "", "", "Argument[*5..11]", "Argument[*0]", "taint", "manual"]
|
||||
# StringCchVPrintf: (pszDest, cchDest, pszFormat, argList)
|
||||
- ["", "", False, "StringCchVPrintfA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
- ["", "", False, "StringCchVPrintfW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
# StringCbVPrintf: (pszDest, cbDest, pszFormat, argList)
|
||||
- ["", "", False, "StringCbVPrintfA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
- ["", "", False, "StringCbVPrintfW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
|
||||
# StringCchVPrintfEx: (pszDest, cchDest, ppszDestEnd, pcchRemaining, dwFlags, pszFormat, argList)
|
||||
- ["", "", False, "StringCchVPrintfExA", "", "", "Argument[*5]", "Argument[*0]", "taint", "manual"]
|
||||
- ["", "", False, "StringCchVPrintfExW", "", "", "Argument[*5]", "Argument[*0]", "taint", "manual"]
|
||||
# StringCbVPrintfEx: (pszDest, cbDest, ppszDestEnd, pcbRemaining, dwFlags, pszFormat, argList)
|
||||
- ["", "", False, "StringCbVPrintfExA", "", "", "Argument[*5]", "Argument[*0]", "taint", "manual"]
|
||||
- ["", "", False, "StringCbVPrintfExW", "", "", "Argument[*5]", "Argument[*0]", "taint", "manual"]
|
||||
@@ -1,5 +1,5 @@
|
||||
name: codeql/cpp-all
|
||||
version: 10.0.0
|
||||
version: 10.1.1-dev
|
||||
groups: cpp
|
||||
dbscheme: semmlecode.cpp.dbscheme
|
||||
extractor: cpp
|
||||
|
||||
@@ -18,7 +18,7 @@ class Namespace extends @namespace {
|
||||
if namespacembrs(_, this)
|
||||
then
|
||||
exists(Namespace ns |
|
||||
namespacembrs(ns, this) and
|
||||
namespacembrs(ns, pragma[only_bind_out](this)) and
|
||||
result = ns.getQualifiedName() + "::" + this.getName()
|
||||
)
|
||||
else result = this.getName()
|
||||
@@ -37,7 +37,7 @@ class Namespace extends @namespace {
|
||||
string getAQualifierForMembers() {
|
||||
if namespacembrs(_, this)
|
||||
then
|
||||
exists(Namespace ns | namespacembrs(ns, this) |
|
||||
exists(Namespace ns | namespacembrs(ns, pragma[only_bind_out](this)) |
|
||||
result = ns.getAQualifierForMembers() + "::" + this.getName()
|
||||
or
|
||||
// If this is an inline namespace, its members are also visible in any
|
||||
|
||||
@@ -114,6 +114,7 @@ private predicate parseArgument(string arg, string s, int i, Opcode opcode) {
|
||||
|
||||
private Element getAChildScope(Element scope) { result.getParentScope() = scope }
|
||||
|
||||
pragma[nomagic]
|
||||
private predicate hasAVariable(MacroInvocation mi, Stmt s, Element scope) {
|
||||
assertion0(mi, s, _) and
|
||||
s.getParent() = scope
|
||||
@@ -121,15 +122,32 @@ private predicate hasAVariable(MacroInvocation mi, Stmt s, Element scope) {
|
||||
hasAVariable(mi, s, getAChildScope(scope))
|
||||
}
|
||||
|
||||
private LocalScopeVariable getVariable(MacroInvocation mi, int i) {
|
||||
exists(string operand, string arg, Stmt s |
|
||||
private predicate hasParentScope(Variable v, Element scope) { v.getParentScope() = scope }
|
||||
|
||||
pragma[nomagic]
|
||||
private predicate hasAssertionOperand(MacroInvocation mi, int i, Stmt s, string operand) {
|
||||
exists(string arg |
|
||||
assertion0(mi, s, arg) and
|
||||
parseArgument(arg, operand, i, _) and
|
||||
parseArgument(arg, operand, i, _)
|
||||
)
|
||||
}
|
||||
|
||||
pragma[nomagic]
|
||||
private predicate hasNameAndParentScope(string name, Element scope, Variable v) {
|
||||
v.hasName(name) and
|
||||
hasParentScope(v, scope)
|
||||
}
|
||||
|
||||
pragma[nomagic]
|
||||
private LocalScopeVariable getVariable(MacroInvocation mi, int i) {
|
||||
exists(string name, Stmt s |
|
||||
hasAssertionOperand(mi, i, s, name) and
|
||||
result =
|
||||
unique(Variable v |
|
||||
unique(Variable v, Element parentScope |
|
||||
hasAssertionOperand(mi, _, s, name) and
|
||||
v.getLocation().getStartLine() < s.getLocation().getStartLine() and
|
||||
hasAVariable(mi, s, v.getParentScope()) and
|
||||
v.hasName(operand)
|
||||
hasAVariable(mi, s, parentScope) and
|
||||
hasNameAndParentScope(name, parentScope, v)
|
||||
|
|
||||
v
|
||||
)
|
||||
|
||||
@@ -1412,9 +1412,9 @@ private int indexOfSwitchCaseRank(BlockStmt b, int rnk) {
|
||||
* switch (i)
|
||||
* {
|
||||
* case 5:
|
||||
* ...
|
||||
* ...
|
||||
* default:
|
||||
* ...
|
||||
* ...
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
@@ -1516,8 +1516,10 @@ class SwitchCase extends Stmt, @stmt_switch_case {
|
||||
* which has result `default:`, which has no result.
|
||||
*/
|
||||
SwitchCase getNextSwitchCase() {
|
||||
result.getSwitchStmt() = this.getSwitchStmt() and
|
||||
result.getChildNum() = this.getChildNum() + 1
|
||||
exists(SwitchStmt s, int n |
|
||||
this = s.getSwitchCase(n) and
|
||||
result = s.getSwitchCase(n + 1)
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1707,9 +1709,9 @@ class SwitchCase extends Stmt, @stmt_switch_case {
|
||||
* switch (i)
|
||||
* {
|
||||
* case 5:
|
||||
* ...
|
||||
* ...
|
||||
* default:
|
||||
* ...
|
||||
* ...
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
@@ -1731,9 +1733,9 @@ class DefaultCase extends SwitchCase {
|
||||
* switch (i)
|
||||
* {
|
||||
* case 5:
|
||||
* ...
|
||||
* ...
|
||||
* default:
|
||||
* ...
|
||||
* ...
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
@@ -1768,10 +1770,10 @@ class SwitchStmt extends ConditionalStmt, @stmt_switch {
|
||||
* For example, for
|
||||
* ```
|
||||
* switch(i) {
|
||||
* case 1:
|
||||
* case 2:
|
||||
* case 1:
|
||||
* case 2:
|
||||
* break;
|
||||
* default:
|
||||
* default:
|
||||
* break;
|
||||
* }
|
||||
* ```
|
||||
@@ -1790,20 +1792,20 @@ class SwitchStmt extends ConditionalStmt, @stmt_switch {
|
||||
* For example, for
|
||||
* ```
|
||||
* switch(i) {
|
||||
* case 1:
|
||||
* case 2:
|
||||
* case 1:
|
||||
* case 2:
|
||||
* break;
|
||||
* default:
|
||||
* default:
|
||||
* break;
|
||||
* }
|
||||
* ```
|
||||
* the result is
|
||||
* ```
|
||||
* {
|
||||
* case 1:
|
||||
* case 2:
|
||||
* case 1:
|
||||
* case 2:
|
||||
* break;
|
||||
* default:
|
||||
* default:
|
||||
* break;
|
||||
* }
|
||||
* ```
|
||||
@@ -1816,10 +1818,10 @@ class SwitchStmt extends ConditionalStmt, @stmt_switch {
|
||||
* For example, for
|
||||
* ```
|
||||
* switch(i) {
|
||||
* case 1:
|
||||
* case 2:
|
||||
* case 1:
|
||||
* case 2:
|
||||
* break;
|
||||
* default:
|
||||
* default:
|
||||
* break;
|
||||
* }
|
||||
* ```
|
||||
@@ -1827,6 +1829,23 @@ class SwitchStmt extends ConditionalStmt, @stmt_switch {
|
||||
*/
|
||||
SwitchCase getASwitchCase() { switch_case(underlyingElement(this), _, unresolveElement(result)) }
|
||||
|
||||
/**
|
||||
* Gets the `n`th 'switch case' statement of this 'switch' statement, where
|
||||
* `n` is 0-based.
|
||||
*
|
||||
* For example, for
|
||||
* ```
|
||||
* switch(i) {
|
||||
* case 5:
|
||||
* case 6:
|
||||
* default:
|
||||
* } * ```
|
||||
* 0 yields `case 5:`, 1 yields `case 6:`, and 2 yields `default:`.
|
||||
*/
|
||||
SwitchCase getSwitchCase(int n) {
|
||||
switch_case(underlyingElement(this), n, unresolveElement(result))
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the 'default case' statement of this 'switch' statement,
|
||||
* if any.
|
||||
@@ -1834,18 +1853,18 @@ class SwitchStmt extends ConditionalStmt, @stmt_switch {
|
||||
* For example, for
|
||||
* ```
|
||||
* switch(i) {
|
||||
* case 1:
|
||||
* case 2:
|
||||
* case 1:
|
||||
* case 2:
|
||||
* break;
|
||||
* default:
|
||||
* default:
|
||||
* break;
|
||||
* }
|
||||
* ```
|
||||
* the result is `default:`, but there is no result for
|
||||
* ```
|
||||
* switch(i) {
|
||||
* case 1:
|
||||
* case 2:
|
||||
* case 1:
|
||||
* case 2:
|
||||
* break;
|
||||
* }
|
||||
* ```
|
||||
@@ -1858,18 +1877,18 @@ class SwitchStmt extends ConditionalStmt, @stmt_switch {
|
||||
* For example, this holds for
|
||||
* ```
|
||||
* switch(i) {
|
||||
* case 1:
|
||||
* case 2:
|
||||
* case 1:
|
||||
* case 2:
|
||||
* break;
|
||||
* default:
|
||||
* default:
|
||||
* break;
|
||||
* }
|
||||
* ```
|
||||
* but not for
|
||||
* ```
|
||||
* switch(i) {
|
||||
* case 1:
|
||||
* case 2:
|
||||
* case 1:
|
||||
* case 2:
|
||||
* break;
|
||||
* }
|
||||
* ```
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
## 1.6.2
|
||||
|
||||
No user-facing changes.
|
||||
|
||||
## 1.6.1
|
||||
|
||||
### Minor Analysis Improvements
|
||||
@@ -7,7 +11,7 @@
|
||||
* The "Multiplication result converted to larger type" (`cpp/integer-multiplication-cast-to-long`) query has been upgraded to `high` precision. This query will now run in the default code scanning suite.
|
||||
* The "Suspicious add with sizeof" (`cpp/suspicious-add-sizeof`) query has been upgraded to `high` precision. This query will now run in the default code scanning suite.
|
||||
* The "Wrong type of arguments to formatting function" (`cpp/wrong-type-format-argument`) query has been upgraded to `high` precision. This query will now run in the default code scanning suite.
|
||||
* The "Implicit function declaration" (`cpp/implicit-function-declaration`) query has been upgraded to `high` precision. However, for `build mode: none` databases, it no longer produces any results. The results in this mode were found to be very noisy and fundamentally imprecise.
|
||||
* The "Implicit function declaration" (`cpp/implicit-function-declaration`) query has been upgraded to `high` precision. However, for `build-mode: none` databases, it no longer produces any results. The results in this mode were found to be very noisy and fundamentally imprecise.
|
||||
|
||||
## 1.6.0
|
||||
|
||||
@@ -366,7 +370,7 @@ No user-facing changes.
|
||||
### Minor Analysis Improvements
|
||||
|
||||
* The "non-constant format string" query (`cpp/non-constant-format`) has been updated to produce fewer false positives.
|
||||
* Added dataflow models for the `gettext` function variants.
|
||||
* Added dataflow models for the `gettext` function variants.
|
||||
|
||||
## 0.9.4
|
||||
|
||||
|
||||
@@ -227,6 +227,30 @@ class IgnorableUnaryBitwiseOperation extends IgnorableOperation instanceof Unary
|
||||
class IgnorableAssignmentBitwiseOperation extends IgnorableOperation instanceof AssignBitwiseOperation
|
||||
{ }
|
||||
|
||||
class YearFieldAssignmentNode extends DataFlow::Node {
|
||||
YearFieldAccess access;
|
||||
|
||||
YearFieldAssignmentNode() {
|
||||
exists(Function f |
|
||||
f = this.getEnclosingCallable().getUnderlyingCallable() and not f instanceof IgnorableFunction
|
||||
|
|
||||
this.asDefinition().(Assignment).getLValue() = access
|
||||
or
|
||||
this.asDefinition().(CrementOperation).getOperand() = access
|
||||
or
|
||||
exists(Call c | c.getAnArgument() = access and this.asDefiningArgument() = access)
|
||||
or
|
||||
exists(Call c, AddressOfExpr aoe |
|
||||
c.getAnArgument() = aoe and
|
||||
aoe.getOperand() = access and
|
||||
this.asDefiningArgument() = aoe
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
YearFieldAccess getYearFieldAccess() { result = access }
|
||||
}
|
||||
|
||||
/**
|
||||
* An arithmetic operation where one of the operands is a pointer or char type, ignore it
|
||||
*/
|
||||
@@ -287,24 +311,7 @@ predicate isOperationSourceCandidate(Expr e) {
|
||||
}
|
||||
|
||||
/**
|
||||
* A data flow that tracks an ignorable operation (such as a bitwise operation) to an operation source, so we may disqualify it.
|
||||
*/
|
||||
module IgnorableOperationToOperationSourceCandidateConfig implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr() instanceof IgnorableOperation }
|
||||
|
||||
predicate isSink(DataFlow::Node n) { isOperationSourceCandidate(n.asExpr()) }
|
||||
|
||||
// looking for sources and sinks in the same function
|
||||
DataFlow::FlowFeature getAFeature() {
|
||||
result instanceof DataFlow::FeatureEqualSourceSinkCallContext
|
||||
}
|
||||
}
|
||||
|
||||
module IgnorableOperationToOperationSourceCandidateFlow =
|
||||
TaintTracking::Global<IgnorableOperationToOperationSourceCandidateConfig>;
|
||||
|
||||
/**
|
||||
* The set of all expressions which is a candidate expression and also does not flow from to to some ignorable expression (eg. bitwise op)
|
||||
* The set of all expressions that are candidate expression.
|
||||
* ```
|
||||
* a = something <<< 2;
|
||||
* myDate.year = a + 1; // invalid
|
||||
@@ -314,49 +321,16 @@ module IgnorableOperationToOperationSourceCandidateFlow =
|
||||
* ```
|
||||
*/
|
||||
class OperationSource extends Expr {
|
||||
OperationSource() {
|
||||
isOperationSourceCandidate(this) and
|
||||
// If the candidate came from an ignorable operation, ignore the candidate
|
||||
// NOTE: we cannot easily flow the candidate to an ignorable operation as that can
|
||||
// be tricky in practice, e.g., a mod operation on a year would be part of a leap year check
|
||||
// but a mod operation ending in a year is more indicative of something to ignore (a conversion)
|
||||
not exists(IgnorableOperationToOperationSourceCandidateFlow::PathNode sink |
|
||||
sink.getNode().asExpr() = this and
|
||||
sink.isSink()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
class YearFieldAssignmentNode extends DataFlow::Node {
|
||||
YearFieldAccess access;
|
||||
|
||||
YearFieldAssignmentNode() {
|
||||
exists(Function f |
|
||||
f = this.getEnclosingCallable().getUnderlyingCallable() and not f instanceof IgnorableFunction
|
||||
) and
|
||||
(
|
||||
this.asDefinition().(Assignment).getLValue() = access
|
||||
or
|
||||
this.asDefinition().(CrementOperation).getOperand() = access
|
||||
or
|
||||
exists(Call c | c.getAnArgument() = access and this.asDefiningArgument() = access)
|
||||
or
|
||||
exists(Call c, AddressOfExpr aoe |
|
||||
c.getAnArgument() = aoe and
|
||||
aoe.getOperand() = access and
|
||||
this.asDefiningArgument() = aoe
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
YearFieldAccess getYearFieldAccess() { result = access }
|
||||
OperationSource() { isOperationSourceCandidate(this) }
|
||||
}
|
||||
|
||||
/**
|
||||
* A DataFlow configuration for identifying flows from an identified source
|
||||
* to the Year field of a date object.
|
||||
* An initial DataFlow configuration for identifying flows from an identified source
|
||||
* to the Year field of a date object. This is used to restrict the sinks of
|
||||
* `IgnorableOperationToOperationSourceCandidateConfig` and the sinks of the
|
||||
* final `OperationToYearAssignmentConfig`.
|
||||
*/
|
||||
module OperationToYearAssignmentConfig implements DataFlow::ConfigSig {
|
||||
module OperationToYearAssignmentConfig0 implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr() instanceof OperationSource }
|
||||
|
||||
predicate isSink(DataFlow::Node n) {
|
||||
@@ -411,6 +385,62 @@ module OperationToYearAssignmentConfig implements DataFlow::ConfigSig {
|
||||
predicate isBarrierOut(DataFlow::Node n) { isSink(n) }
|
||||
}
|
||||
|
||||
module OperationToYearAssignmentFlow0 = TaintTracking::Global<OperationToYearAssignmentConfig0>;
|
||||
|
||||
predicate yearAssignmentFlowsFromSource(DataFlow::Node source, DataFlow::Node sink) {
|
||||
OperationToYearAssignmentFlow0::flow(source, sink)
|
||||
}
|
||||
|
||||
/**
|
||||
* A data flow that tracks an ignorable operation (such as a bitwise operation) to an operation source, so we may disqualify it.
|
||||
* Sinks are restricted to operation source candidates that have a flow to a year assignment in `OperationToYearAssignmentFlow0`.
|
||||
*/
|
||||
module IgnorableOperationToOperationSourceCandidateConfig implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr() instanceof IgnorableOperation }
|
||||
|
||||
predicate isSink(DataFlow::Node n) {
|
||||
isOperationSourceCandidate(n.asExpr()) and
|
||||
yearAssignmentFlowsFromSource(n, _)
|
||||
}
|
||||
|
||||
// looking for sources and sinks in the same function
|
||||
DataFlow::FlowFeature getAFeature() {
|
||||
result instanceof DataFlow::FeatureEqualSourceSinkCallContext
|
||||
}
|
||||
}
|
||||
|
||||
module IgnorableOperationToOperationSourceCandidateFlow =
|
||||
TaintTracking::Global<IgnorableOperationToOperationSourceCandidateConfig>;
|
||||
|
||||
/**
|
||||
* The final DataFlow configuration that refines `OperationToYearAssignmentConfig0` by
|
||||
* additionally filtering out operation sources that flow from an ignorable operation
|
||||
* (via `IgnorableOperationToOperationSourceCandidateFlow`).
|
||||
*/
|
||||
module OperationToYearAssignmentConfig implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node n) { yearAssignmentFlowsFromSource(n, _) }
|
||||
|
||||
predicate isSink(DataFlow::Node n) {
|
||||
exists(DataFlow::Node operation |
|
||||
yearAssignmentFlowsFromSource(operation, n) and
|
||||
// If the candidate came from an ignorable operation, ignore the candidate
|
||||
// NOTE: we cannot easily flow the candidate to an ignorable operation as that can
|
||||
// be tricky in practice, e.g., a mod operation on a year would be part of a leap year check
|
||||
// but a mod operation ending in a year is more indicative of something to ignore (a conversion)
|
||||
not exists(IgnorableOperationToOperationSourceCandidateFlow::PathNode sink |
|
||||
sink.getNode() = operation and
|
||||
sink.isSink()
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
predicate isBarrier(DataFlow::Node n) { OperationToYearAssignmentConfig0::isBarrier(n) }
|
||||
|
||||
predicate isBarrierIn(DataFlow::Node n) { isSource(n) }
|
||||
|
||||
predicate isBarrierOut(DataFlow::Node n) { isSink(n) }
|
||||
}
|
||||
|
||||
module OperationToYearAssignmentFlow = TaintTracking::Global<OperationToYearAssignmentConfig>;
|
||||
|
||||
predicate isLeapYearCheckSink(DataFlow::Node sink) {
|
||||
|
||||
@@ -14,7 +14,7 @@ function may behave unpredictably.</p>
|
||||
<p>This may indicate a misspelled function name, or that the required header containing
|
||||
the function declaration has not been included.</p>
|
||||
|
||||
<p>Note: This query is not compatible with <code>build mode: none</code> databases, and produces
|
||||
<p>Note: This query is not compatible with <code>build-mode: none</code> databases, and produces
|
||||
no results on those databases.</p>
|
||||
|
||||
</overview>
|
||||
|
||||
@@ -18,7 +18,7 @@ import TooManyArguments
|
||||
import semmle.code.cpp.commons.Exclusions
|
||||
|
||||
/*
|
||||
* This query is not compatible with build mode: none databases, and produces
|
||||
* This query is not compatible with build-mode: none databases, and produces
|
||||
* no results on those databases.
|
||||
*/
|
||||
|
||||
|
||||
@@ -7,4 +7,4 @@
|
||||
* The "Multiplication result converted to larger type" (`cpp/integer-multiplication-cast-to-long`) query has been upgraded to `high` precision. This query will now run in the default code scanning suite.
|
||||
* The "Suspicious add with sizeof" (`cpp/suspicious-add-sizeof`) query has been upgraded to `high` precision. This query will now run in the default code scanning suite.
|
||||
* The "Wrong type of arguments to formatting function" (`cpp/wrong-type-format-argument`) query has been upgraded to `high` precision. This query will now run in the default code scanning suite.
|
||||
* The "Implicit function declaration" (`cpp/implicit-function-declaration`) query has been upgraded to `high` precision. However, for `build mode: none` databases, it no longer produces any results. The results in this mode were found to be very noisy and fundamentally imprecise.
|
||||
* The "Implicit function declaration" (`cpp/implicit-function-declaration`) query has been upgraded to `high` precision. However, for `build-mode: none` databases, it no longer produces any results. The results in this mode were found to be very noisy and fundamentally imprecise.
|
||||
|
||||
3
cpp/ql/src/change-notes/released/1.6.2.md
Normal file
3
cpp/ql/src/change-notes/released/1.6.2.md
Normal file
@@ -0,0 +1,3 @@
|
||||
## 1.6.2
|
||||
|
||||
No user-facing changes.
|
||||
@@ -1,2 +1,2 @@
|
||||
---
|
||||
lastReleaseVersion: 1.6.1
|
||||
lastReleaseVersion: 1.6.2
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: codeql/cpp-queries
|
||||
version: 1.6.1
|
||||
version: 1.6.3-dev
|
||||
groups:
|
||||
- cpp
|
||||
- queries
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
| complex.c:3:23:3:51 | __builtin_complex | file://:0:0:0:0 | _Complex double | complex.c:3:41:3:44 | real | file://:0:0:0:0 | double | complex.c:3:47:3:50 | imag | file://:0:0:0:0 | double |
|
||||
| complex.c:4:23:4:57 | __builtin_complex | file://:0:0:0:0 | _Complex double | complex.c:4:41:4:47 | 2.71828000000000003 | file://:0:0:0:0 | double | complex.c:4:50:4:56 | 3.141589999999999883 | file://:0:0:0:0 | double |
|
||||
| complex.c:4:23:4:57 | __builtin_complex | file://:0:0:0:0 | _Complex double | complex.c:4:41:4:47 | 2.71828 | file://:0:0:0:0 | double | complex.c:4:50:4:56 | 3.14159 | file://:0:0:0:0 | double |
|
||||
| complex.c:8:22:8:52 | __builtin_complex | file://:0:0:0:0 | _Complex float | complex.c:8:40:8:44 | realf | file://:0:0:0:0 | float | complex.c:8:47:8:51 | imagf | file://:0:0:0:0 | float |
|
||||
| complex.c:9:22:9:52 | __builtin_complex | file://:0:0:0:0 | _Complex float | complex.c:9:40:9:44 | 1.230000019 | file://:0:0:0:0 | float | complex.c:9:47:9:51 | 4.559999943 | file://:0:0:0:0 | float |
|
||||
| complex.c:9:22:9:52 | __builtin_complex | file://:0:0:0:0 | _Complex float | complex.c:9:40:9:44 | 1.23 | file://:0:0:0:0 | float | complex.c:9:47:9:51 | 4.56 | file://:0:0:0:0 | float |
|
||||
|
||||
@@ -298,16 +298,16 @@
|
||||
| test.c:182:8:182:34 | ! ... | ! ... == 1 when ! ... is true |
|
||||
| test.c:182:8:182:34 | ! ... | ... && ... != 0 when ! ... is false |
|
||||
| test.c:182:8:182:34 | ! ... | ... && ... == 0 when ! ... is true |
|
||||
| test.c:182:10:182:20 | ... >= ... | 9.999999999999999547e-07 < foo+1 when ... >= ... is true |
|
||||
| test.c:182:10:182:20 | ... >= ... | 9.999999999999999547e-07 >= foo+1 when ... >= ... is false |
|
||||
| test.c:182:10:182:20 | ... >= ... | 1.0E-6 < foo+1 when ... >= ... is true |
|
||||
| test.c:182:10:182:20 | ... >= ... | 1.0E-6 >= foo+1 when ... >= ... is false |
|
||||
| test.c:182:10:182:20 | ... >= ... | ... >= ... != 0 when ... >= ... is true |
|
||||
| test.c:182:10:182:20 | ... >= ... | ... >= ... != 1 when ... >= ... is false |
|
||||
| test.c:182:10:182:20 | ... >= ... | ... >= ... == 0 when ... >= ... is false |
|
||||
| test.c:182:10:182:20 | ... >= ... | ... >= ... == 1 when ... >= ... is true |
|
||||
| test.c:182:10:182:20 | ... >= ... | foo < 9.999999999999999547e-07+0 when ... >= ... is false |
|
||||
| test.c:182:10:182:20 | ... >= ... | foo >= 9.999999999999999547e-07+0 when ... >= ... is true |
|
||||
| test.c:182:10:182:20 | ... >= ... | foo < 1.0E-6+0 when ... >= ... is false |
|
||||
| test.c:182:10:182:20 | ... >= ... | foo >= 1.0E-6+0 when ... >= ... is true |
|
||||
| test.c:182:10:182:33 | ... && ... | 1.0 >= foo+1 when ... && ... is true |
|
||||
| test.c:182:10:182:33 | ... && ... | 9.999999999999999547e-07 < foo+1 when ... && ... is true |
|
||||
| test.c:182:10:182:33 | ... && ... | 1.0E-6 < foo+1 when ... && ... is true |
|
||||
| test.c:182:10:182:33 | ... && ... | ! ... != 0 when ... && ... is false |
|
||||
| test.c:182:10:182:33 | ... && ... | ! ... != 1 when ... && ... is true |
|
||||
| test.c:182:10:182:33 | ... && ... | ! ... == 0 when ... && ... is true |
|
||||
@@ -319,7 +319,7 @@
|
||||
| test.c:182:10:182:33 | ... && ... | ... >= ... != 0 when ... && ... is true |
|
||||
| test.c:182:10:182:33 | ... && ... | ... >= ... == 1 when ... && ... is true |
|
||||
| test.c:182:10:182:33 | ... && ... | foo < 1.0+0 when ... && ... is true |
|
||||
| test.c:182:10:182:33 | ... && ... | foo >= 9.999999999999999547e-07+0 when ... && ... is true |
|
||||
| test.c:182:10:182:33 | ... && ... | foo >= 1.0E-6+0 when ... && ... is true |
|
||||
| test.c:182:25:182:33 | ... < ... | 1.0 < foo+1 when ... < ... is false |
|
||||
| test.c:182:25:182:33 | ... < ... | 1.0 >= foo+1 when ... < ... is true |
|
||||
| test.c:182:25:182:33 | ... < ... | ... < ... != 0 when ... < ... is true |
|
||||
|
||||
@@ -169,12 +169,12 @@ binary
|
||||
| test.c:176:8:176:15 | ! ... | test.c:176:14:176:14 | b | < | test.c:176:10:176:10 | a | 1 | test.c:176:18:178:5 | { ... } |
|
||||
| test.c:176:10:176:14 | ... < ... | test.c:176:10:176:10 | a | >= | test.c:176:14:176:14 | b | 0 | test.c:176:18:178:5 | { ... } |
|
||||
| test.c:176:10:176:14 | ... < ... | test.c:176:14:176:14 | b | < | test.c:176:10:176:10 | a | 1 | test.c:176:18:178:5 | { ... } |
|
||||
| test.c:182:10:182:20 | ... >= ... | test.c:182:10:182:12 | foo | >= | test.c:182:17:182:20 | 9.999999999999999547e-07 | 0 | test.c:181:25:182:20 | { ... } |
|
||||
| test.c:182:10:182:20 | ... >= ... | test.c:182:10:182:12 | foo | >= | test.c:182:17:182:20 | 9.999999999999999547e-07 | 0 | test.c:182:25:182:33 | foo |
|
||||
| test.c:182:10:182:20 | ... >= ... | test.c:182:17:182:20 | 9.999999999999999547e-07 | < | test.c:182:10:182:12 | foo | 1 | test.c:181:25:182:20 | { ... } |
|
||||
| test.c:182:10:182:20 | ... >= ... | test.c:182:17:182:20 | 9.999999999999999547e-07 | < | test.c:182:10:182:12 | foo | 1 | test.c:182:25:182:33 | foo |
|
||||
| test.c:182:10:182:33 | ... && ... | test.c:182:10:182:12 | foo | >= | test.c:182:17:182:20 | 9.999999999999999547e-07 | 0 | test.c:181:25:182:20 | { ... } |
|
||||
| test.c:182:10:182:33 | ... && ... | test.c:182:17:182:20 | 9.999999999999999547e-07 | < | test.c:182:10:182:12 | foo | 1 | test.c:181:25:182:20 | { ... } |
|
||||
| test.c:182:10:182:20 | ... >= ... | test.c:182:10:182:12 | foo | >= | test.c:182:17:182:20 | 1.0E-6 | 0 | test.c:181:25:182:20 | { ... } |
|
||||
| test.c:182:10:182:20 | ... >= ... | test.c:182:10:182:12 | foo | >= | test.c:182:17:182:20 | 1.0E-6 | 0 | test.c:182:25:182:33 | foo |
|
||||
| test.c:182:10:182:20 | ... >= ... | test.c:182:17:182:20 | 1.0E-6 | < | test.c:182:10:182:12 | foo | 1 | test.c:181:25:182:20 | { ... } |
|
||||
| test.c:182:10:182:20 | ... >= ... | test.c:182:17:182:20 | 1.0E-6 | < | test.c:182:10:182:12 | foo | 1 | test.c:182:25:182:33 | foo |
|
||||
| test.c:182:10:182:33 | ... && ... | test.c:182:10:182:12 | foo | >= | test.c:182:17:182:20 | 1.0E-6 | 0 | test.c:181:25:182:20 | { ... } |
|
||||
| test.c:182:10:182:33 | ... && ... | test.c:182:17:182:20 | 1.0E-6 | < | test.c:182:10:182:12 | foo | 1 | test.c:181:25:182:20 | { ... } |
|
||||
| test.c:182:10:182:33 | ... && ... | test.c:182:25:182:27 | foo | < | test.c:182:31:182:33 | 1.0 | 0 | test.c:181:25:182:20 | { ... } |
|
||||
| test.c:182:10:182:33 | ... && ... | test.c:182:31:182:33 | 1.0 | >= | test.c:182:25:182:27 | foo | 1 | test.c:181:25:182:20 | { ... } |
|
||||
| test.c:182:25:182:33 | ... < ... | test.c:182:25:182:27 | foo | < | test.c:182:31:182:33 | 1.0 | 0 | test.c:181:25:182:20 | { ... } |
|
||||
|
||||
@@ -115,3 +115,19 @@ void test_zmc(void *socket) {
|
||||
// ...
|
||||
}
|
||||
}
|
||||
|
||||
long StringCchGetsA(char *, size_t);
|
||||
long StringCchGetsExA(char *, size_t, char **, size_t *, unsigned long);
|
||||
|
||||
void test_strsafe_gets() {
|
||||
{
|
||||
char dest[256] = {0};
|
||||
StringCchGetsA(dest, sizeof(dest)); // $ local_source
|
||||
}
|
||||
{
|
||||
char dest[256] = {0};
|
||||
char *end;
|
||||
size_t remaining;
|
||||
StringCchGetsExA(dest, sizeof(dest), &end, &remaining, 0); // $ local_source
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8008,6 +8008,174 @@ WARNING: module 'TaintTracking' has been deprecated and may be removed in future
|
||||
| taint.cpp:866:26:866:34 | ref arg & ... | taint.cpp:866:27:866:34 | size_out [inner post update] | |
|
||||
| taint.cpp:866:27:866:34 | size_out | taint.cpp:866:26:866:34 | & ... | |
|
||||
| taint.cpp:867:8:867:8 | p | taint.cpp:867:7:867:8 | * ... | TAINT |
|
||||
| taint.cpp:892:17:892:31 | call to indirect_source | taint.cpp:897:38:897:43 | source | |
|
||||
| taint.cpp:892:17:892:31 | call to indirect_source | taint.cpp:907:37:907:42 | source | |
|
||||
| taint.cpp:892:17:892:31 | call to indirect_source | taint.cpp:914:40:914:45 | source | |
|
||||
| taint.cpp:892:17:892:31 | call to indirect_source | taint.cpp:919:39:919:44 | source | |
|
||||
| taint.cpp:892:17:892:31 | call to indirect_source | taint.cpp:926:41:926:46 | source | |
|
||||
| taint.cpp:892:17:892:31 | call to indirect_source | taint.cpp:931:37:931:42 | source | |
|
||||
| taint.cpp:892:17:892:31 | call to indirect_source | taint.cpp:941:36:941:41 | source | |
|
||||
| taint.cpp:892:17:892:31 | call to indirect_source | taint.cpp:948:39:948:44 | source | |
|
||||
| taint.cpp:892:17:892:31 | call to indirect_source | taint.cpp:953:38:953:43 | source | |
|
||||
| taint.cpp:892:17:892:31 | call to indirect_source | taint.cpp:960:40:960:45 | source | |
|
||||
| taint.cpp:892:17:892:31 | call to indirect_source | taint.cpp:965:46:965:51 | source | |
|
||||
| taint.cpp:892:17:892:31 | call to indirect_source | taint.cpp:975:45:975:50 | source | |
|
||||
| taint.cpp:892:17:892:31 | call to indirect_source | taint.cpp:982:69:982:74 | source | |
|
||||
| taint.cpp:893:32:893:46 | call to indirect_source | taint.cpp:902:38:902:44 | wsource | |
|
||||
| taint.cpp:893:32:893:46 | call to indirect_source | taint.cpp:936:37:936:43 | wsource | |
|
||||
| taint.cpp:893:32:893:46 | call to indirect_source | taint.cpp:970:47:970:53 | wsource | |
|
||||
| taint.cpp:896:19:896:22 | {...} | taint.cpp:897:18:897:21 | dest | |
|
||||
| taint.cpp:896:19:896:22 | {...} | taint.cpp:897:31:897:34 | dest | |
|
||||
| taint.cpp:896:19:896:22 | {...} | taint.cpp:898:9:898:12 | dest | |
|
||||
| taint.cpp:896:21:896:21 | 0 | taint.cpp:896:19:896:22 | {...} | TAINT |
|
||||
| taint.cpp:897:18:897:21 | ref arg dest | taint.cpp:898:9:898:12 | dest | |
|
||||
| taint.cpp:898:9:898:12 | dest | taint.cpp:898:8:898:12 | * ... | |
|
||||
| taint.cpp:901:22:901:25 | {...} | taint.cpp:902:18:902:21 | dest | |
|
||||
| taint.cpp:901:22:901:25 | {...} | taint.cpp:902:31:902:34 | dest | |
|
||||
| taint.cpp:901:22:901:25 | {...} | taint.cpp:903:9:903:12 | dest | |
|
||||
| taint.cpp:901:24:901:24 | 0 | taint.cpp:901:22:901:25 | {...} | TAINT |
|
||||
| taint.cpp:902:18:902:21 | ref arg dest | taint.cpp:903:9:903:12 | dest | |
|
||||
| taint.cpp:903:9:903:12 | dest | taint.cpp:903:8:903:12 | * ... | |
|
||||
| taint.cpp:906:19:906:22 | {...} | taint.cpp:907:17:907:20 | dest | |
|
||||
| taint.cpp:906:19:906:22 | {...} | taint.cpp:907:30:907:33 | dest | |
|
||||
| taint.cpp:906:19:906:22 | {...} | taint.cpp:908:9:908:12 | dest | |
|
||||
| taint.cpp:906:21:906:21 | 0 | taint.cpp:906:19:906:22 | {...} | TAINT |
|
||||
| taint.cpp:907:17:907:20 | ref arg dest | taint.cpp:908:9:908:12 | dest | |
|
||||
| taint.cpp:908:9:908:12 | dest | taint.cpp:908:8:908:12 | * ... | |
|
||||
| taint.cpp:911:19:911:22 | {...} | taint.cpp:914:20:914:23 | dest | |
|
||||
| taint.cpp:911:19:911:22 | {...} | taint.cpp:914:33:914:36 | dest | |
|
||||
| taint.cpp:911:19:911:22 | {...} | taint.cpp:915:9:915:12 | dest | |
|
||||
| taint.cpp:911:21:911:21 | 0 | taint.cpp:911:19:911:22 | {...} | TAINT |
|
||||
| taint.cpp:912:9:912:11 | end | taint.cpp:914:49:914:51 | end | |
|
||||
| taint.cpp:913:10:913:18 | remaining | taint.cpp:914:55:914:63 | remaining | |
|
||||
| taint.cpp:914:20:914:23 | ref arg dest | taint.cpp:915:9:915:12 | dest | |
|
||||
| taint.cpp:914:48:914:51 | ref arg & ... | taint.cpp:914:49:914:51 | end [inner post update] | |
|
||||
| taint.cpp:914:49:914:51 | end | taint.cpp:914:48:914:51 | & ... | |
|
||||
| taint.cpp:914:54:914:63 | ref arg & ... | taint.cpp:914:55:914:63 | remaining [inner post update] | |
|
||||
| taint.cpp:914:55:914:63 | remaining | taint.cpp:914:54:914:63 | & ... | |
|
||||
| taint.cpp:915:9:915:12 | dest | taint.cpp:915:8:915:12 | * ... | |
|
||||
| taint.cpp:918:19:918:22 | {...} | taint.cpp:919:19:919:22 | dest | |
|
||||
| taint.cpp:918:19:918:22 | {...} | taint.cpp:919:32:919:35 | dest | |
|
||||
| taint.cpp:918:19:918:22 | {...} | taint.cpp:920:9:920:12 | dest | |
|
||||
| taint.cpp:918:21:918:21 | 0 | taint.cpp:918:19:918:22 | {...} | TAINT |
|
||||
| taint.cpp:919:19:919:22 | ref arg dest | taint.cpp:920:9:920:12 | dest | |
|
||||
| taint.cpp:920:9:920:12 | dest | taint.cpp:920:8:920:12 | * ... | |
|
||||
| taint.cpp:923:19:923:22 | {...} | taint.cpp:926:21:926:24 | dest | |
|
||||
| taint.cpp:923:19:923:22 | {...} | taint.cpp:926:34:926:37 | dest | |
|
||||
| taint.cpp:923:19:923:22 | {...} | taint.cpp:927:8:927:11 | dest | |
|
||||
| taint.cpp:923:21:923:21 | 0 | taint.cpp:923:19:923:22 | {...} | TAINT |
|
||||
| taint.cpp:924:9:924:11 | end | taint.cpp:926:55:926:57 | end | |
|
||||
| taint.cpp:925:10:925:18 | remaining | taint.cpp:926:61:926:69 | remaining | |
|
||||
| taint.cpp:926:21:926:24 | ref arg dest | taint.cpp:927:8:927:11 | dest | |
|
||||
| taint.cpp:926:54:926:57 | ref arg & ... | taint.cpp:926:55:926:57 | end [inner post update] | |
|
||||
| taint.cpp:926:55:926:57 | end | taint.cpp:926:54:926:57 | & ... | |
|
||||
| taint.cpp:926:60:926:69 | ref arg & ... | taint.cpp:926:61:926:69 | remaining [inner post update] | |
|
||||
| taint.cpp:926:61:926:69 | remaining | taint.cpp:926:60:926:69 | & ... | |
|
||||
| taint.cpp:930:20:930:27 | prefix | taint.cpp:931:17:931:20 | dest | |
|
||||
| taint.cpp:930:20:930:27 | prefix | taint.cpp:931:30:931:33 | dest | |
|
||||
| taint.cpp:930:20:930:27 | prefix | taint.cpp:932:9:932:12 | dest | |
|
||||
| taint.cpp:931:17:931:20 | ref arg dest | taint.cpp:932:9:932:12 | dest | |
|
||||
| taint.cpp:932:9:932:12 | dest | taint.cpp:932:8:932:12 | * ... | |
|
||||
| taint.cpp:935:23:935:31 | prefix | taint.cpp:936:17:936:20 | dest | |
|
||||
| taint.cpp:935:23:935:31 | prefix | taint.cpp:936:30:936:33 | dest | |
|
||||
| taint.cpp:935:23:935:31 | prefix | taint.cpp:937:9:937:12 | dest | |
|
||||
| taint.cpp:936:17:936:20 | ref arg dest | taint.cpp:937:9:937:12 | dest | |
|
||||
| taint.cpp:937:9:937:12 | dest | taint.cpp:937:8:937:12 | * ... | |
|
||||
| taint.cpp:940:20:940:27 | prefix | taint.cpp:941:16:941:19 | dest | |
|
||||
| taint.cpp:940:20:940:27 | prefix | taint.cpp:941:29:941:32 | dest | |
|
||||
| taint.cpp:940:20:940:27 | prefix | taint.cpp:942:9:942:12 | dest | |
|
||||
| taint.cpp:941:16:941:19 | ref arg dest | taint.cpp:942:9:942:12 | dest | |
|
||||
| taint.cpp:942:9:942:12 | dest | taint.cpp:942:8:942:12 | * ... | |
|
||||
| taint.cpp:945:20:945:27 | prefix | taint.cpp:948:19:948:22 | dest | |
|
||||
| taint.cpp:945:20:945:27 | prefix | taint.cpp:948:32:948:35 | dest | |
|
||||
| taint.cpp:945:20:945:27 | prefix | taint.cpp:949:9:949:12 | dest | |
|
||||
| taint.cpp:946:9:946:11 | end | taint.cpp:948:48:948:50 | end | |
|
||||
| taint.cpp:947:10:947:18 | remaining | taint.cpp:948:54:948:62 | remaining | |
|
||||
| taint.cpp:948:19:948:22 | ref arg dest | taint.cpp:949:9:949:12 | dest | |
|
||||
| taint.cpp:948:47:948:50 | ref arg & ... | taint.cpp:948:48:948:50 | end [inner post update] | |
|
||||
| taint.cpp:948:48:948:50 | end | taint.cpp:948:47:948:50 | & ... | |
|
||||
| taint.cpp:948:53:948:62 | ref arg & ... | taint.cpp:948:54:948:62 | remaining [inner post update] | |
|
||||
| taint.cpp:948:54:948:62 | remaining | taint.cpp:948:53:948:62 | & ... | |
|
||||
| taint.cpp:949:9:949:12 | dest | taint.cpp:949:8:949:12 | * ... | |
|
||||
| taint.cpp:952:20:952:27 | prefix | taint.cpp:953:18:953:21 | dest | |
|
||||
| taint.cpp:952:20:952:27 | prefix | taint.cpp:953:31:953:34 | dest | |
|
||||
| taint.cpp:952:20:952:27 | prefix | taint.cpp:954:9:954:12 | dest | |
|
||||
| taint.cpp:953:18:953:21 | ref arg dest | taint.cpp:954:9:954:12 | dest | |
|
||||
| taint.cpp:954:9:954:12 | dest | taint.cpp:954:8:954:12 | * ... | |
|
||||
| taint.cpp:957:20:957:27 | prefix | taint.cpp:960:20:960:23 | dest | |
|
||||
| taint.cpp:957:20:957:27 | prefix | taint.cpp:960:33:960:36 | dest | |
|
||||
| taint.cpp:957:20:957:27 | prefix | taint.cpp:961:9:961:12 | dest | |
|
||||
| taint.cpp:958:9:958:11 | end | taint.cpp:960:54:960:56 | end | |
|
||||
| taint.cpp:959:10:959:18 | remaining | taint.cpp:960:60:960:68 | remaining | |
|
||||
| taint.cpp:960:20:960:23 | ref arg dest | taint.cpp:961:9:961:12 | dest | |
|
||||
| taint.cpp:960:53:960:56 | ref arg & ... | taint.cpp:960:54:960:56 | end [inner post update] | |
|
||||
| taint.cpp:960:54:960:56 | end | taint.cpp:960:53:960:56 | & ... | |
|
||||
| taint.cpp:960:59:960:68 | ref arg & ... | taint.cpp:960:60:960:68 | remaining [inner post update] | |
|
||||
| taint.cpp:960:60:960:68 | remaining | taint.cpp:960:59:960:68 | & ... | |
|
||||
| taint.cpp:961:9:961:12 | dest | taint.cpp:961:8:961:12 | * ... | |
|
||||
| taint.cpp:964:19:964:22 | {...} | taint.cpp:965:20:965:23 | dest | |
|
||||
| taint.cpp:964:19:964:22 | {...} | taint.cpp:965:33:965:36 | dest | |
|
||||
| taint.cpp:964:19:964:22 | {...} | taint.cpp:966:9:966:12 | dest | |
|
||||
| taint.cpp:964:21:964:21 | 0 | taint.cpp:964:19:964:22 | {...} | TAINT |
|
||||
| taint.cpp:965:20:965:23 | ref arg dest | taint.cpp:966:9:966:12 | dest | |
|
||||
| taint.cpp:965:40:965:43 | %s | taint.cpp:965:20:965:23 | ref arg dest | TAINT |
|
||||
| taint.cpp:965:46:965:51 | ref arg source | taint.cpp:975:45:975:50 | source | |
|
||||
| taint.cpp:965:46:965:51 | ref arg source | taint.cpp:982:69:982:74 | source | |
|
||||
| taint.cpp:965:46:965:51 | source | taint.cpp:965:20:965:23 | ref arg dest | TAINT |
|
||||
| taint.cpp:966:9:966:12 | dest | taint.cpp:966:8:966:12 | * ... | |
|
||||
| taint.cpp:969:22:969:25 | {...} | taint.cpp:970:20:970:23 | dest | |
|
||||
| taint.cpp:969:22:969:25 | {...} | taint.cpp:970:33:970:36 | dest | |
|
||||
| taint.cpp:969:22:969:25 | {...} | taint.cpp:971:9:971:12 | dest | |
|
||||
| taint.cpp:969:24:969:24 | 0 | taint.cpp:969:22:969:25 | {...} | TAINT |
|
||||
| taint.cpp:970:20:970:23 | ref arg dest | taint.cpp:971:9:971:12 | dest | |
|
||||
| taint.cpp:970:40:970:44 | %s | taint.cpp:970:20:970:23 | ref arg dest | TAINT |
|
||||
| taint.cpp:970:47:970:53 | wsource | taint.cpp:970:20:970:23 | ref arg dest | TAINT |
|
||||
| taint.cpp:971:9:971:12 | dest | taint.cpp:971:8:971:12 | * ... | |
|
||||
| taint.cpp:974:19:974:22 | {...} | taint.cpp:975:19:975:22 | dest | |
|
||||
| taint.cpp:974:19:974:22 | {...} | taint.cpp:975:32:975:35 | dest | |
|
||||
| taint.cpp:974:19:974:22 | {...} | taint.cpp:976:9:976:12 | dest | |
|
||||
| taint.cpp:974:21:974:21 | 0 | taint.cpp:974:19:974:22 | {...} | TAINT |
|
||||
| taint.cpp:975:19:975:22 | ref arg dest | taint.cpp:976:9:976:12 | dest | |
|
||||
| taint.cpp:975:39:975:42 | %s | taint.cpp:975:19:975:22 | ref arg dest | TAINT |
|
||||
| taint.cpp:975:45:975:50 | ref arg source | taint.cpp:982:69:982:74 | source | |
|
||||
| taint.cpp:975:45:975:50 | source | taint.cpp:975:19:975:22 | ref arg dest | TAINT |
|
||||
| taint.cpp:976:9:976:12 | dest | taint.cpp:976:8:976:12 | * ... | |
|
||||
| taint.cpp:979:19:979:22 | {...} | taint.cpp:982:22:982:25 | dest | |
|
||||
| taint.cpp:979:19:979:22 | {...} | taint.cpp:982:35:982:38 | dest | |
|
||||
| taint.cpp:979:19:979:22 | {...} | taint.cpp:983:9:983:12 | dest | |
|
||||
| taint.cpp:979:21:979:21 | 0 | taint.cpp:979:19:979:22 | {...} | TAINT |
|
||||
| taint.cpp:980:9:980:11 | end | taint.cpp:982:43:982:45 | end | |
|
||||
| taint.cpp:981:10:981:18 | remaining | taint.cpp:982:49:982:57 | remaining | |
|
||||
| taint.cpp:982:22:982:25 | ref arg dest | taint.cpp:983:9:983:12 | dest | |
|
||||
| taint.cpp:982:42:982:45 | ref arg & ... | taint.cpp:982:43:982:45 | end [inner post update] | |
|
||||
| taint.cpp:982:43:982:45 | end | taint.cpp:982:42:982:45 | & ... | |
|
||||
| taint.cpp:982:48:982:57 | ref arg & ... | taint.cpp:982:49:982:57 | remaining [inner post update] | |
|
||||
| taint.cpp:982:49:982:57 | remaining | taint.cpp:982:48:982:57 | & ... | |
|
||||
| taint.cpp:982:63:982:66 | %s | taint.cpp:982:22:982:25 | ref arg dest | TAINT |
|
||||
| taint.cpp:982:69:982:74 | source | taint.cpp:982:22:982:25 | ref arg dest | TAINT |
|
||||
| taint.cpp:983:9:983:12 | dest | taint.cpp:983:8:983:12 | * ... | |
|
||||
| taint.cpp:986:19:986:22 | {...} | taint.cpp:988:20:988:23 | dest | |
|
||||
| taint.cpp:986:19:986:22 | {...} | taint.cpp:988:33:988:36 | dest | |
|
||||
| taint.cpp:986:19:986:22 | {...} | taint.cpp:989:9:989:12 | dest | |
|
||||
| taint.cpp:986:21:986:21 | 0 | taint.cpp:986:19:986:22 | {...} | TAINT |
|
||||
| taint.cpp:987:15:987:29 | call to indirect_source | taint.cpp:988:40:988:42 | fmt | |
|
||||
| taint.cpp:988:20:988:23 | ref arg dest | taint.cpp:989:9:989:12 | dest | |
|
||||
| taint.cpp:988:40:988:42 | fmt | taint.cpp:988:20:988:23 | ref arg dest | TAINT |
|
||||
| taint.cpp:989:9:989:12 | dest | taint.cpp:989:8:989:12 | * ... | |
|
||||
| taint.cpp:992:19:992:22 | {...} | taint.cpp:993:20:993:23 | dest | |
|
||||
| taint.cpp:992:19:992:22 | {...} | taint.cpp:993:33:993:36 | dest | |
|
||||
| taint.cpp:992:19:992:22 | {...} | taint.cpp:994:9:994:12 | dest | |
|
||||
| taint.cpp:992:21:992:21 | 0 | taint.cpp:992:19:992:22 | {...} | TAINT |
|
||||
| taint.cpp:993:20:993:23 | ref arg dest | taint.cpp:994:9:994:12 | dest | |
|
||||
| taint.cpp:993:40:993:43 | %d | taint.cpp:993:20:993:23 | ref arg dest | TAINT |
|
||||
| taint.cpp:993:46:993:47 | 42 | taint.cpp:993:20:993:23 | ref arg dest | TAINT |
|
||||
| taint.cpp:994:9:994:12 | dest | taint.cpp:994:8:994:12 | * ... | |
|
||||
| taint.cpp:997:19:997:22 | {...} | taint.cpp:998:18:998:21 | dest | |
|
||||
| taint.cpp:997:19:997:22 | {...} | taint.cpp:998:31:998:34 | dest | |
|
||||
| taint.cpp:997:19:997:22 | {...} | taint.cpp:999:9:999:12 | dest | |
|
||||
| taint.cpp:997:21:997:21 | 0 | taint.cpp:997:19:997:22 | {...} | TAINT |
|
||||
| taint.cpp:998:18:998:21 | ref arg dest | taint.cpp:999:9:999:12 | dest | |
|
||||
| taint.cpp:999:9:999:12 | dest | taint.cpp:999:8:999:12 | * ... | |
|
||||
| thread.cpp:10:27:10:27 | s | thread.cpp:10:27:10:27 | s | |
|
||||
| thread.cpp:10:27:10:27 | s | thread.cpp:11:8:11:8 | s | |
|
||||
| thread.cpp:14:26:14:26 | s | thread.cpp:15:8:15:8 | s | |
|
||||
|
||||
@@ -866,3 +866,136 @@ void test_iconv(size_t size) {
|
||||
iconv(0, &s, &size, &p, &size_out);
|
||||
sink(*p); // $ ast,ir
|
||||
}
|
||||
|
||||
using va_list = void*;
|
||||
|
||||
long StringCchCopyA(char *, size_t, const char *);
|
||||
long StringCchCopyW(wchar_t *, size_t, const wchar_t *);
|
||||
long StringCbCopyA(char *, size_t, const char *);
|
||||
long StringCchCopyExA(char *, size_t, const char *, char **, size_t *, unsigned long);
|
||||
long StringCchCopyNA(char *, size_t, const char *, size_t);
|
||||
long StringCchCopyNExA(char *, size_t, const char *, size_t, char **, size_t *, unsigned long);
|
||||
long StringCchCatA(char *, size_t, const char *);
|
||||
long StringCchCatW(wchar_t *, size_t, const wchar_t *);
|
||||
long StringCbCatA(char *, size_t, const char *);
|
||||
long StringCchCatExA(char *, size_t, const char *, char **, size_t *, unsigned long);
|
||||
long StringCchCatNA(char *, size_t, const char *, size_t);
|
||||
long StringCchCatNExA(char *, size_t, const char *, size_t, char **, size_t *, unsigned long);
|
||||
long StringCchPrintfA(char *, size_t, const char *, ...);
|
||||
long StringCchPrintfW(wchar_t *, size_t, const wchar_t *, ...);
|
||||
long StringCbPrintfA(char *, size_t, const char *, ...);
|
||||
long StringCchPrintfExA(char *, size_t, char **, size_t *, unsigned long, const char *, ...);
|
||||
long StringCchVPrintfA(char *, size_t, const char *, va_list);
|
||||
long StringCchVPrintfExA(char *, size_t, char **, size_t *, unsigned long, const char *, va_list);
|
||||
|
||||
void test_strsafe() {
|
||||
char *source = indirect_source();
|
||||
wchar_t *wsource = (wchar_t *)indirect_source();
|
||||
|
||||
{
|
||||
char dest[256] = {0};
|
||||
StringCchCopyA(dest, sizeof(dest), source);
|
||||
sink(*dest); // $ ir MISSING: ast
|
||||
}
|
||||
{
|
||||
wchar_t dest[256] = {0};
|
||||
StringCchCopyW(dest, sizeof(dest), wsource);
|
||||
sink(*dest); // $ ir MISSING: ast
|
||||
}
|
||||
{
|
||||
char dest[256] = {0};
|
||||
StringCbCopyA(dest, sizeof(dest), source);
|
||||
sink(*dest); // $ ir MISSING: ast
|
||||
}
|
||||
{
|
||||
char dest[256] = {0};
|
||||
char *end;
|
||||
size_t remaining;
|
||||
StringCchCopyExA(dest, sizeof(dest), source, &end, &remaining, 0);
|
||||
sink(*dest); // $ ir MISSING: ast
|
||||
}
|
||||
{
|
||||
char dest[256] = {0};
|
||||
StringCchCopyNA(dest, sizeof(dest), source, 128);
|
||||
sink(*dest); // $ ir MISSING: ast
|
||||
}
|
||||
{
|
||||
char dest[256] = {0};
|
||||
char *end;
|
||||
size_t remaining;
|
||||
StringCchCopyNExA(dest, sizeof(dest), source, 128, &end, &remaining, 0);
|
||||
sink(dest); // $ ir MISSING: ast
|
||||
}
|
||||
{
|
||||
char dest[256] = "prefix";
|
||||
StringCchCatA(dest, sizeof(dest), source);
|
||||
sink(*dest); // $ ir MISSING: ast
|
||||
}
|
||||
{
|
||||
wchar_t dest[256] = L"prefix";
|
||||
StringCchCatW(dest, sizeof(dest), wsource);
|
||||
sink(*dest); // $ ir MISSING: ast
|
||||
}
|
||||
{
|
||||
char dest[256] = "prefix";
|
||||
StringCbCatA(dest, sizeof(dest), source);
|
||||
sink(*dest); // $ ir MISSING: ast
|
||||
}
|
||||
{
|
||||
char dest[256] = "prefix";
|
||||
char *end;
|
||||
size_t remaining;
|
||||
StringCchCatExA(dest, sizeof(dest), source, &end, &remaining, 0);
|
||||
sink(*dest); // $ ir MISSING: ast
|
||||
}
|
||||
{
|
||||
char dest[256] = "prefix";
|
||||
StringCchCatNA(dest, sizeof(dest), source, 128);
|
||||
sink(*dest); // $ ir MISSING: ast
|
||||
}
|
||||
{
|
||||
char dest[256] = "prefix";
|
||||
char *end;
|
||||
size_t remaining;
|
||||
StringCchCatNExA(dest, sizeof(dest), source, 128, &end, &remaining, 0);
|
||||
sink(*dest); // $ ir MISSING: ast
|
||||
}
|
||||
{
|
||||
char dest[256] = {0};
|
||||
StringCchPrintfA(dest, sizeof(dest), "%s", source);
|
||||
sink(*dest); // $ ir MISSING: ast
|
||||
}
|
||||
{
|
||||
wchar_t dest[256] = {0};
|
||||
StringCchPrintfW(dest, sizeof(dest), L"%s", wsource);
|
||||
sink(*dest); // $ ir MISSING: ast
|
||||
}
|
||||
{
|
||||
char dest[256] = {0};
|
||||
StringCbPrintfA(dest, sizeof(dest), "%s", source);
|
||||
sink(*dest); // $ ir MISSING: ast
|
||||
}
|
||||
{
|
||||
char dest[256] = {0};
|
||||
char *end;
|
||||
size_t remaining;
|
||||
StringCchPrintfExA(dest, sizeof(dest), &end, &remaining, 0, "%s", source);
|
||||
sink(*dest); // $ ir MISSING: ast
|
||||
}
|
||||
{
|
||||
char dest[256] = {0};
|
||||
char *fmt = indirect_source();
|
||||
StringCchPrintfA(dest, sizeof(dest), fmt);
|
||||
sink(*dest); // $ ir MISSING: ast
|
||||
}
|
||||
{
|
||||
char dest[256] = {0};
|
||||
StringCchPrintfA(dest, sizeof(dest), "%d", 42);
|
||||
sink(*dest); // clean
|
||||
}
|
||||
{
|
||||
char dest[256] = {0};
|
||||
StringCchCopyA(dest, sizeof(dest), "hello");
|
||||
sink(*dest); // clean
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28044,6 +28044,118 @@ getParameterTypeName
|
||||
| taint.cpp:859:8:859:12 | iconv | 4 | unsigned long * |
|
||||
| taint.cpp:861:6:861:15 | test_iconv | 0 | size_t |
|
||||
| taint.cpp:861:6:861:15 | test_iconv | 0 | unsigned long |
|
||||
| taint.cpp:872:6:872:19 | StringCchCopyA | 0 | char * |
|
||||
| taint.cpp:872:6:872:19 | StringCchCopyA | 1 | size_t |
|
||||
| taint.cpp:872:6:872:19 | StringCchCopyA | 1 | unsigned long |
|
||||
| taint.cpp:872:6:872:19 | StringCchCopyA | 2 | const char * |
|
||||
| taint.cpp:873:6:873:19 | StringCchCopyW | 0 | wchar_t * |
|
||||
| taint.cpp:873:6:873:19 | StringCchCopyW | 1 | size_t |
|
||||
| taint.cpp:873:6:873:19 | StringCchCopyW | 1 | unsigned long |
|
||||
| taint.cpp:873:6:873:19 | StringCchCopyW | 2 | const wchar_t * |
|
||||
| taint.cpp:874:6:874:18 | StringCbCopyA | 0 | char * |
|
||||
| taint.cpp:874:6:874:18 | StringCbCopyA | 1 | size_t |
|
||||
| taint.cpp:874:6:874:18 | StringCbCopyA | 1 | unsigned long |
|
||||
| taint.cpp:874:6:874:18 | StringCbCopyA | 2 | const char * |
|
||||
| taint.cpp:875:6:875:21 | StringCchCopyExA | 0 | char * |
|
||||
| taint.cpp:875:6:875:21 | StringCchCopyExA | 1 | size_t |
|
||||
| taint.cpp:875:6:875:21 | StringCchCopyExA | 1 | unsigned long |
|
||||
| taint.cpp:875:6:875:21 | StringCchCopyExA | 2 | const char * |
|
||||
| taint.cpp:875:6:875:21 | StringCchCopyExA | 3 | char ** |
|
||||
| taint.cpp:875:6:875:21 | StringCchCopyExA | 4 | size_t * |
|
||||
| taint.cpp:875:6:875:21 | StringCchCopyExA | 4 | unsigned long * |
|
||||
| taint.cpp:875:6:875:21 | StringCchCopyExA | 5 | unsigned long |
|
||||
| taint.cpp:876:6:876:20 | StringCchCopyNA | 0 | char * |
|
||||
| taint.cpp:876:6:876:20 | StringCchCopyNA | 1 | size_t |
|
||||
| taint.cpp:876:6:876:20 | StringCchCopyNA | 1 | unsigned long |
|
||||
| taint.cpp:876:6:876:20 | StringCchCopyNA | 2 | const char * |
|
||||
| taint.cpp:876:6:876:20 | StringCchCopyNA | 3 | size_t |
|
||||
| taint.cpp:876:6:876:20 | StringCchCopyNA | 3 | unsigned long |
|
||||
| taint.cpp:877:6:877:22 | StringCchCopyNExA | 0 | char * |
|
||||
| taint.cpp:877:6:877:22 | StringCchCopyNExA | 1 | size_t |
|
||||
| taint.cpp:877:6:877:22 | StringCchCopyNExA | 1 | unsigned long |
|
||||
| taint.cpp:877:6:877:22 | StringCchCopyNExA | 2 | const char * |
|
||||
| taint.cpp:877:6:877:22 | StringCchCopyNExA | 3 | size_t |
|
||||
| taint.cpp:877:6:877:22 | StringCchCopyNExA | 3 | unsigned long |
|
||||
| taint.cpp:877:6:877:22 | StringCchCopyNExA | 4 | char ** |
|
||||
| taint.cpp:877:6:877:22 | StringCchCopyNExA | 5 | size_t * |
|
||||
| taint.cpp:877:6:877:22 | StringCchCopyNExA | 5 | unsigned long * |
|
||||
| taint.cpp:877:6:877:22 | StringCchCopyNExA | 6 | unsigned long |
|
||||
| taint.cpp:878:6:878:18 | StringCchCatA | 0 | char * |
|
||||
| taint.cpp:878:6:878:18 | StringCchCatA | 1 | size_t |
|
||||
| taint.cpp:878:6:878:18 | StringCchCatA | 1 | unsigned long |
|
||||
| taint.cpp:878:6:878:18 | StringCchCatA | 2 | const char * |
|
||||
| taint.cpp:879:6:879:18 | StringCchCatW | 0 | wchar_t * |
|
||||
| taint.cpp:879:6:879:18 | StringCchCatW | 1 | size_t |
|
||||
| taint.cpp:879:6:879:18 | StringCchCatW | 1 | unsigned long |
|
||||
| taint.cpp:879:6:879:18 | StringCchCatW | 2 | const wchar_t * |
|
||||
| taint.cpp:880:6:880:17 | StringCbCatA | 0 | char * |
|
||||
| taint.cpp:880:6:880:17 | StringCbCatA | 1 | size_t |
|
||||
| taint.cpp:880:6:880:17 | StringCbCatA | 1 | unsigned long |
|
||||
| taint.cpp:880:6:880:17 | StringCbCatA | 2 | const char * |
|
||||
| taint.cpp:881:6:881:20 | StringCchCatExA | 0 | char * |
|
||||
| taint.cpp:881:6:881:20 | StringCchCatExA | 1 | size_t |
|
||||
| taint.cpp:881:6:881:20 | StringCchCatExA | 1 | unsigned long |
|
||||
| taint.cpp:881:6:881:20 | StringCchCatExA | 2 | const char * |
|
||||
| taint.cpp:881:6:881:20 | StringCchCatExA | 3 | char ** |
|
||||
| taint.cpp:881:6:881:20 | StringCchCatExA | 4 | size_t * |
|
||||
| taint.cpp:881:6:881:20 | StringCchCatExA | 4 | unsigned long * |
|
||||
| taint.cpp:881:6:881:20 | StringCchCatExA | 5 | unsigned long |
|
||||
| taint.cpp:882:6:882:19 | StringCchCatNA | 0 | char * |
|
||||
| taint.cpp:882:6:882:19 | StringCchCatNA | 1 | size_t |
|
||||
| taint.cpp:882:6:882:19 | StringCchCatNA | 1 | unsigned long |
|
||||
| taint.cpp:882:6:882:19 | StringCchCatNA | 2 | const char * |
|
||||
| taint.cpp:882:6:882:19 | StringCchCatNA | 3 | size_t |
|
||||
| taint.cpp:882:6:882:19 | StringCchCatNA | 3 | unsigned long |
|
||||
| taint.cpp:883:6:883:21 | StringCchCatNExA | 0 | char * |
|
||||
| taint.cpp:883:6:883:21 | StringCchCatNExA | 1 | size_t |
|
||||
| taint.cpp:883:6:883:21 | StringCchCatNExA | 1 | unsigned long |
|
||||
| taint.cpp:883:6:883:21 | StringCchCatNExA | 2 | const char * |
|
||||
| taint.cpp:883:6:883:21 | StringCchCatNExA | 3 | size_t |
|
||||
| taint.cpp:883:6:883:21 | StringCchCatNExA | 3 | unsigned long |
|
||||
| taint.cpp:883:6:883:21 | StringCchCatNExA | 4 | char ** |
|
||||
| taint.cpp:883:6:883:21 | StringCchCatNExA | 5 | size_t * |
|
||||
| taint.cpp:883:6:883:21 | StringCchCatNExA | 5 | unsigned long * |
|
||||
| taint.cpp:883:6:883:21 | StringCchCatNExA | 6 | unsigned long |
|
||||
| taint.cpp:884:6:884:21 | StringCchPrintfA | 0 | char * |
|
||||
| taint.cpp:884:6:884:21 | StringCchPrintfA | 1 | size_t |
|
||||
| taint.cpp:884:6:884:21 | StringCchPrintfA | 1 | unsigned long |
|
||||
| taint.cpp:884:6:884:21 | StringCchPrintfA | 2 | const char * |
|
||||
| taint.cpp:884:6:884:21 | StringCchPrintfA | 3 | ... |
|
||||
| taint.cpp:885:6:885:21 | StringCchPrintfW | 0 | wchar_t * |
|
||||
| taint.cpp:885:6:885:21 | StringCchPrintfW | 1 | size_t |
|
||||
| taint.cpp:885:6:885:21 | StringCchPrintfW | 1 | unsigned long |
|
||||
| taint.cpp:885:6:885:21 | StringCchPrintfW | 2 | const wchar_t * |
|
||||
| taint.cpp:885:6:885:21 | StringCchPrintfW | 3 | ... |
|
||||
| taint.cpp:886:6:886:20 | StringCbPrintfA | 0 | char * |
|
||||
| taint.cpp:886:6:886:20 | StringCbPrintfA | 1 | size_t |
|
||||
| taint.cpp:886:6:886:20 | StringCbPrintfA | 1 | unsigned long |
|
||||
| taint.cpp:886:6:886:20 | StringCbPrintfA | 2 | const char * |
|
||||
| taint.cpp:886:6:886:20 | StringCbPrintfA | 3 | ... |
|
||||
| taint.cpp:887:6:887:23 | StringCchPrintfExA | 0 | char * |
|
||||
| taint.cpp:887:6:887:23 | StringCchPrintfExA | 1 | size_t |
|
||||
| taint.cpp:887:6:887:23 | StringCchPrintfExA | 1 | unsigned long |
|
||||
| taint.cpp:887:6:887:23 | StringCchPrintfExA | 2 | char ** |
|
||||
| taint.cpp:887:6:887:23 | StringCchPrintfExA | 3 | size_t * |
|
||||
| taint.cpp:887:6:887:23 | StringCchPrintfExA | 3 | unsigned long * |
|
||||
| taint.cpp:887:6:887:23 | StringCchPrintfExA | 4 | unsigned long |
|
||||
| taint.cpp:887:6:887:23 | StringCchPrintfExA | 5 | const char * |
|
||||
| taint.cpp:887:6:887:23 | StringCchPrintfExA | 6 | ... |
|
||||
| taint.cpp:888:6:888:22 | StringCchVPrintfA | 0 | char * |
|
||||
| taint.cpp:888:6:888:22 | StringCchVPrintfA | 1 | size_t |
|
||||
| taint.cpp:888:6:888:22 | StringCchVPrintfA | 1 | unsigned long |
|
||||
| taint.cpp:888:6:888:22 | StringCchVPrintfA | 2 | const char * |
|
||||
| taint.cpp:888:6:888:22 | StringCchVPrintfA | 3 | va_list |
|
||||
| taint.cpp:888:6:888:22 | StringCchVPrintfA | 3 | void * |
|
||||
| taint.cpp:889:6:889:24 | StringCchVPrintfExA | 0 | char * |
|
||||
| taint.cpp:889:6:889:24 | StringCchVPrintfExA | 1 | size_t |
|
||||
| taint.cpp:889:6:889:24 | StringCchVPrintfExA | 1 | unsigned long |
|
||||
| taint.cpp:889:6:889:24 | StringCchVPrintfExA | 2 | char ** |
|
||||
| taint.cpp:889:6:889:24 | StringCchVPrintfExA | 3 | size_t * |
|
||||
| taint.cpp:889:6:889:24 | StringCchVPrintfExA | 3 | unsigned long * |
|
||||
| taint.cpp:889:6:889:24 | StringCchVPrintfExA | 4 | unsigned long |
|
||||
| taint.cpp:889:6:889:24 | StringCchVPrintfExA | 5 | const char * |
|
||||
| taint.cpp:889:6:889:24 | StringCchVPrintfExA | 6 | va_list |
|
||||
| taint.cpp:889:6:889:24 | StringCchVPrintfExA | 6 | void * |
|
||||
| thread.cpp:4:6:4:9 | sink | 0 | int |
|
||||
| thread.cpp:6:8:6:8 | operator= | 0 | S && |
|
||||
| thread.cpp:6:8:6:8 | operator= | 0 | const S & |
|
||||
|
||||
@@ -25796,9 +25796,9 @@ ir.cpp:
|
||||
# 2919| getExpr(): [FunctionCall] call to VariableTemplateFunc
|
||||
# 2919| Type = [DoubleType] double
|
||||
# 2919| ValueCategory = prvalue
|
||||
# 2919| getArgument(0): [Literal] 2.299999999999999822
|
||||
# 2919| getArgument(0): [Literal] 2.3
|
||||
# 2919| Type = [DoubleType] double
|
||||
# 2919| Value = [Literal] 2.299999999999999822
|
||||
# 2919| Value = [Literal] 2.3
|
||||
# 2919| ValueCategory = prvalue
|
||||
# 2919| getExpr().getFullyConverted(): [CStyleCast] (int)...
|
||||
# 2919| Conversion = [FloatingPointToIntegralConversion] floating point to integral conversion
|
||||
|
||||
@@ -12954,21 +12954,21 @@ ir.cpp:
|
||||
|
||||
# 1592| double StructuredBindingTupleRefGet::d
|
||||
# 1592| Block 0
|
||||
# 1592| v1592_1(void) = EnterFunction :
|
||||
# 1592| m1592_2(unknown) = AliasedDefinition :
|
||||
# 1592| m1592_3(unknown) = InitializeNonLocal :
|
||||
# 1592| m1592_4(unknown) = Chi : total:m1592_2, partial:m1592_3
|
||||
# 1592| r1592_5(glval<unknown>) = VariableAddress[#this] :
|
||||
# 1592| m1592_6(glval<StructuredBindingTupleRefGet>) = InitializeParameter[#this] : &:r1592_5
|
||||
# 1592| r1592_7(glval<StructuredBindingTupleRefGet>) = Load[#this] : &:r1592_5, m1592_6
|
||||
# 1592| m1592_8(StructuredBindingTupleRefGet) = InitializeIndirection[#this] : &:r1592_7
|
||||
# 1592| r1592_9(glval<double>) = FieldAddress[d] : r1592_7
|
||||
# 1592| r1592_10(double) = Constant[2.200000000000000178] :
|
||||
# 1592| m1592_11(double) = Store[?] : &:r1592_9, r1592_10
|
||||
# 1592| m1592_12(unknown) = Chi : total:m1592_8, partial:m1592_11
|
||||
# 1592| v1592_13(void) = ReturnVoid :
|
||||
# 1592| v1592_14(void) = AliasedUse : m1592_3
|
||||
# 1592| v1592_15(void) = ExitFunction :
|
||||
# 1592| v1592_1(void) = EnterFunction :
|
||||
# 1592| m1592_2(unknown) = AliasedDefinition :
|
||||
# 1592| m1592_3(unknown) = InitializeNonLocal :
|
||||
# 1592| m1592_4(unknown) = Chi : total:m1592_2, partial:m1592_3
|
||||
# 1592| r1592_5(glval<unknown>) = VariableAddress[#this] :
|
||||
# 1592| m1592_6(glval<StructuredBindingTupleRefGet>) = InitializeParameter[#this] : &:r1592_5
|
||||
# 1592| r1592_7(glval<StructuredBindingTupleRefGet>) = Load[#this] : &:r1592_5, m1592_6
|
||||
# 1592| m1592_8(StructuredBindingTupleRefGet) = InitializeIndirection[#this] : &:r1592_7
|
||||
# 1592| r1592_9(glval<double>) = FieldAddress[d] : r1592_7
|
||||
# 1592| r1592_10(double) = Constant[2.2] :
|
||||
# 1592| m1592_11(double) = Store[?] : &:r1592_9, r1592_10
|
||||
# 1592| m1592_12(unknown) = Chi : total:m1592_8, partial:m1592_11
|
||||
# 1592| v1592_13(void) = ReturnVoid :
|
||||
# 1592| v1592_14(void) = AliasedUse : m1592_3
|
||||
# 1592| v1592_15(void) = ExitFunction :
|
||||
|
||||
# 1593| int& StructuredBindingTupleRefGet::r
|
||||
# 1593| Block 0
|
||||
@@ -21761,7 +21761,7 @@ ir.cpp:
|
||||
# 2919| m2919_2(unknown) = AliasedDefinition :
|
||||
# 2919| r2919_3(glval<int>) = VariableAddress[VariableTemplateFuncUse] :
|
||||
# 2919| r2919_4(glval<unknown>) = FunctionAddress[VariableTemplateFunc] :
|
||||
# 2919| r2919_5(double) = Constant[2.299999999999999822] :
|
||||
# 2919| r2919_5(double) = Constant[2.3] :
|
||||
# 2919| r2919_6(double) = Call[VariableTemplateFunc] : func:r2919_4, 0:r2919_5
|
||||
# 2919| m2919_7(unknown) = ^CallSideEffect : ~m2919_2
|
||||
# 2919| m2919_8(unknown) = Chi : total:m2919_2, partial:m2919_7
|
||||
|
||||
@@ -11861,19 +11861,19 @@ ir.cpp:
|
||||
|
||||
# 1592| double StructuredBindingTupleRefGet::d
|
||||
# 1592| Block 0
|
||||
# 1592| v1592_1(void) = EnterFunction :
|
||||
# 1592| mu1592_2(unknown) = AliasedDefinition :
|
||||
# 1592| mu1592_3(unknown) = InitializeNonLocal :
|
||||
# 1592| r1592_4(glval<unknown>) = VariableAddress[#this] :
|
||||
# 1592| mu1592_5(glval<StructuredBindingTupleRefGet>) = InitializeParameter[#this] : &:r1592_4
|
||||
# 1592| r1592_6(glval<StructuredBindingTupleRefGet>) = Load[#this] : &:r1592_4, ~m?
|
||||
# 1592| mu1592_7(StructuredBindingTupleRefGet) = InitializeIndirection[#this] : &:r1592_6
|
||||
# 1592| r1592_8(glval<double>) = FieldAddress[d] : r1592_6
|
||||
# 1592| r1592_9(double) = Constant[2.200000000000000178] :
|
||||
# 1592| mu1592_10(double) = Store[?] : &:r1592_8, r1592_9
|
||||
# 1592| v1592_11(void) = ReturnVoid :
|
||||
# 1592| v1592_12(void) = AliasedUse : ~m?
|
||||
# 1592| v1592_13(void) = ExitFunction :
|
||||
# 1592| v1592_1(void) = EnterFunction :
|
||||
# 1592| mu1592_2(unknown) = AliasedDefinition :
|
||||
# 1592| mu1592_3(unknown) = InitializeNonLocal :
|
||||
# 1592| r1592_4(glval<unknown>) = VariableAddress[#this] :
|
||||
# 1592| mu1592_5(glval<StructuredBindingTupleRefGet>) = InitializeParameter[#this] : &:r1592_4
|
||||
# 1592| r1592_6(glval<StructuredBindingTupleRefGet>) = Load[#this] : &:r1592_4, ~m?
|
||||
# 1592| mu1592_7(StructuredBindingTupleRefGet) = InitializeIndirection[#this] : &:r1592_6
|
||||
# 1592| r1592_8(glval<double>) = FieldAddress[d] : r1592_6
|
||||
# 1592| r1592_9(double) = Constant[2.2] :
|
||||
# 1592| mu1592_10(double) = Store[?] : &:r1592_8, r1592_9
|
||||
# 1592| v1592_11(void) = ReturnVoid :
|
||||
# 1592| v1592_12(void) = AliasedUse : ~m?
|
||||
# 1592| v1592_13(void) = ExitFunction :
|
||||
|
||||
# 1593| int& StructuredBindingTupleRefGet::r
|
||||
# 1593| Block 0
|
||||
@@ -19768,7 +19768,7 @@ ir.cpp:
|
||||
# 2919| mu2919_2(unknown) = AliasedDefinition :
|
||||
# 2919| r2919_3(glval<int>) = VariableAddress[VariableTemplateFuncUse] :
|
||||
# 2919| r2919_4(glval<unknown>) = FunctionAddress[VariableTemplateFunc] :
|
||||
# 2919| r2919_5(double) = Constant[2.299999999999999822] :
|
||||
# 2919| r2919_5(double) = Constant[2.3] :
|
||||
# 2919| r2919_6(double) = Call[VariableTemplateFunc] : func:r2919_4, 0:r2919_5
|
||||
# 2919| mu2919_7(unknown) = ^CallSideEffect : ~m?
|
||||
# 2919| r2919_8(int) = Convert : r2919_6
|
||||
|
||||
@@ -1293,12 +1293,12 @@ estimateNrOfBounds
|
||||
| test.c:415:26:415:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:415:30:415:30 | q | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:415:30:415:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:415:34:415:43 | 0.4743882700000000008 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:415:47:415:56 | 0.1433388700000000071 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:415:60:415:69 | 0.3527920299999999787 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:415:73:415:82 | 0.3920645799999999959 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:415:86:415:95 | 0.2154022499999999896 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:415:99:415:108 | 0.4049680500000000238 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:415:34:415:43 | 0.47438827 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:415:47:415:56 | 0.14333887 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:415:60:415:69 | 0.35279203 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:415:73:415:82 | 0.39206458 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:415:86:415:95 | 0.21540225 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:415:99:415:108 | 0.40496805 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:416:14:416:14 | m | 2.0 | 1.0 | 1.0 |
|
||||
| test.c:416:14:416:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:416:18:416:18 | n | 3.0 | 1.0 | 1.0 |
|
||||
@@ -1309,12 +1309,12 @@ estimateNrOfBounds
|
||||
| test.c:416:26:416:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:416:30:416:30 | q | 3.0 | 1.0 | 1.0 |
|
||||
| test.c:416:30:416:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:416:34:416:43 | 0.3418334800000000229 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:416:47:416:56 | 0.3533464000000000049 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:416:60:416:69 | 0.2224785300000000077 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:416:73:416:82 | 0.326618929999999974 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:416:86:416:95 | 0.5927046500000000551 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:416:99:416:108 | 0.5297741000000000255 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:416:34:416:43 | 0.34183348 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:416:47:416:56 | 0.3533464 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:416:60:416:69 | 0.22247853 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:416:73:416:82 | 0.32661893 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:416:86:416:95 | 0.59270465 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:416:99:416:108 | 0.5297741 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:417:14:417:14 | m | 3.5 | 1.0 | 1.0 |
|
||||
| test.c:417:14:417:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:417:18:417:18 | n | 8.0 | 1.0 | 1.0 |
|
||||
@@ -1325,12 +1325,12 @@ estimateNrOfBounds
|
||||
| test.c:417:26:417:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:417:30:417:30 | q | 8.0 | 1.0 | 1.0 |
|
||||
| test.c:417:30:417:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:417:34:417:43 | 0.774296030000000024 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:417:47:417:56 | 0.3147808400000000062 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:417:60:417:69 | 0.3123551399999999756 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:417:73:417:82 | 0.05121255999999999725 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:417:86:417:95 | 0.7931074500000000471 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:417:99:417:108 | 0.6798145100000000385 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:417:34:417:43 | 0.77429603 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:417:47:417:56 | 0.31478084 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:417:60:417:69 | 0.31235514 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:417:73:417:82 | 0.05121256 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:417:86:417:95 | 0.79310745 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:417:99:417:108 | 0.67981451 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:418:14:418:14 | m | 5.75 | 1.0 | 1.0 |
|
||||
| test.c:418:14:418:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:418:18:418:18 | n | 20.5 | 1.0 | 1.0 |
|
||||
@@ -1341,12 +1341,12 @@ estimateNrOfBounds
|
||||
| test.c:418:26:418:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:418:30:418:30 | q | 20.5 | 1.0 | 1.0 |
|
||||
| test.c:418:30:418:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:418:34:418:43 | 0.4472955599999999809 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:418:47:418:56 | 0.8059920200000000312 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:418:60:418:69 | 0.9899726199999999698 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:418:73:418:82 | 0.5995273199999999747 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:418:86:418:95 | 0.3697694799999999837 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:418:99:418:108 | 0.8386683499999999514 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:418:34:418:43 | 0.44729556 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:418:47:418:56 | 0.80599202 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:418:60:418:69 | 0.98997262 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:418:73:418:82 | 0.59952732 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:418:86:418:95 | 0.36976948 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:418:99:418:108 | 0.83866835 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:419:14:419:14 | m | 9.125 | 1.0 | 1.0 |
|
||||
| test.c:419:14:419:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:419:18:419:18 | n | 51.75 | 1.0 | 1.0 |
|
||||
@@ -1357,12 +1357,12 @@ estimateNrOfBounds
|
||||
| test.c:419:26:419:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:419:30:419:30 | q | 51.75 | 1.0 | 1.0 |
|
||||
| test.c:419:30:419:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:419:34:419:43 | 0.4931182800000000199 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:419:47:419:56 | 0.9038991100000000056 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:419:60:419:69 | 0.1059771199999999941 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:419:73:419:82 | 0.2177842600000000073 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:419:86:419:95 | 0.7248596600000000167 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:419:99:419:108 | 0.6873487400000000136 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:419:34:419:43 | 0.49311828 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:419:47:419:56 | 0.90389911 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:419:60:419:69 | 0.10597712 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:419:73:419:82 | 0.21778426 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:419:86:419:95 | 0.72485966 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:419:99:419:108 | 0.68734874 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:420:14:420:14 | m | 14.1875 | 1.0 | 1.0 |
|
||||
| test.c:420:14:420:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:420:18:420:18 | n | 129.875 | 1.0 | 1.0 |
|
||||
@@ -1373,12 +1373,12 @@ estimateNrOfBounds
|
||||
| test.c:420:26:420:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:420:30:420:30 | q | 129.875 | 1.0 | 1.0 |
|
||||
| test.c:420:30:420:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:420:34:420:43 | 0.4745284799999999747 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:420:47:420:56 | 0.107866500000000004 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:420:60:420:69 | 0.1188457599999999947 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:420:73:420:82 | 0.7616405200000000431 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:420:86:420:95 | 0.3480889200000000239 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:420:99:420:108 | 0.584408649999999974 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:420:34:420:43 | 0.47452848 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:420:47:420:56 | 0.1078665 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:420:60:420:69 | 0.11884576 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:420:73:420:82 | 0.76164052 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:420:86:420:95 | 0.34808892 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:420:99:420:108 | 0.58440865 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:421:14:421:14 | m | 21.78125 | 1.0 | 1.0 |
|
||||
| test.c:421:14:421:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:421:18:421:18 | n | 325.1875 | 1.0 | 1.0 |
|
||||
@@ -1390,11 +1390,11 @@ estimateNrOfBounds
|
||||
| test.c:421:30:421:30 | q | 325.1875 | 1.0 | 1.0 |
|
||||
| test.c:421:30:421:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:421:34:421:43 | 0.02524326 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:421:47:421:56 | 0.8290504600000000446 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:421:60:421:69 | 0.95823075000000002 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:421:73:421:82 | 0.1251655799999999985 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:421:86:421:95 | 0.8523517900000000536 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:421:99:421:108 | 0.3623238400000000081 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:421:47:421:56 | 0.82905046 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:421:60:421:69 | 0.95823075 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:421:73:421:82 | 0.12516558 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:421:86:421:95 | 0.85235179 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:421:99:421:108 | 0.36232384 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:422:14:422:14 | m | 33.171875 | 1.0 | 1.0 |
|
||||
| test.c:422:14:422:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:422:18:422:18 | n | 813.46875 | 1.0 | 1.0 |
|
||||
@@ -1405,12 +1405,12 @@ estimateNrOfBounds
|
||||
| test.c:422:26:422:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:422:30:422:30 | q | 813.46875 | 1.0 | 1.0 |
|
||||
| test.c:422:30:422:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:422:34:422:43 | 0.3870862600000000153 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:422:47:422:56 | 0.3287604399999999871 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:422:60:422:69 | 0.1496348500000000137 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:422:73:422:82 | 0.4504110800000000192 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:422:86:422:95 | 0.4864090899999999884 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:422:99:422:108 | 0.8433127200000000157 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:422:34:422:43 | 0.38708626 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:422:47:422:56 | 0.32876044 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:422:60:422:69 | 0.14963485 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:422:73:422:82 | 0.45041108 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:422:86:422:95 | 0.48640909 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:422:99:422:108 | 0.84331272 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:423:14:423:14 | m | 50.2578125 | 1.0 | 1.0 |
|
||||
| test.c:423:14:423:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:423:18:423:18 | n | 2034.171875 | 1.0 | 1.0 |
|
||||
@@ -1421,12 +1421,12 @@ estimateNrOfBounds
|
||||
| test.c:423:26:423:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:423:30:423:30 | q | 2034.171875 | 1.0 | 1.0 |
|
||||
| test.c:423:30:423:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:423:34:423:43 | 0.1575506299999999971 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:423:47:423:56 | 0.7708683299999999905 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:423:60:423:69 | 0.2642848099999999811 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:423:73:423:82 | 0.1480050800000000111 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:423:86:423:95 | 0.374281430000000026 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:423:99:423:108 | 0.05328182000000000057 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:423:34:423:43 | 0.15755063 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:423:47:423:56 | 0.77086833 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:423:60:423:69 | 0.26428481 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:423:73:423:82 | 0.14800508 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:423:86:423:95 | 0.37428143 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:423:99:423:108 | 0.05328182 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:424:14:424:14 | m | 75.88671875 | 1.0 | 1.0 |
|
||||
| test.c:424:14:424:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:424:18:424:18 | n | 5085.9296875 | 1.0 | 1.0 |
|
||||
@@ -1437,12 +1437,12 @@ estimateNrOfBounds
|
||||
| test.c:424:26:424:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:424:30:424:30 | q | 5085.9296875 | 1.0 | 1.0 |
|
||||
| test.c:424:30:424:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:424:34:424:43 | 0.4173653600000000186 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:424:47:424:56 | 0.7682662799999999681 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:424:60:424:69 | 0.2764323799999999776 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:424:73:424:82 | 0.5567927400000000082 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:424:86:424:95 | 0.3946885700000000163 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:424:99:424:108 | 0.6907214400000000198 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:424:34:424:43 | 0.41736536 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:424:47:424:56 | 0.76826628 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:424:60:424:69 | 0.27643238 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:424:73:424:82 | 0.55679274 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:424:86:424:95 | 0.39468857 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:424:99:424:108 | 0.69072144 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:425:14:425:14 | m | 114.330078125 | 1.0 | 1.0 |
|
||||
| test.c:425:14:425:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:425:18:425:18 | n | 12715.32421875 | 1.0 | 1.0 |
|
||||
@@ -1453,12 +1453,12 @@ estimateNrOfBounds
|
||||
| test.c:425:26:425:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:425:30:425:30 | q | 12715.32421875 | 1.0 | 1.0 |
|
||||
| test.c:425:30:425:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:425:34:425:43 | 0.8895534499999999678 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:425:47:425:56 | 0.2990482400000000207 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:425:60:425:69 | 0.7624258299999999711 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:425:73:425:82 | 0.2051910999999999874 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:425:86:425:95 | 0.8874555899999999609 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:425:99:425:108 | 0.8137279800000000174 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:425:34:425:43 | 0.88955345 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:425:47:425:56 | 0.29904824 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:425:60:425:69 | 0.76242583 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:425:73:425:82 | 0.2051911 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:425:86:425:95 | 0.88745559 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:425:99:425:108 | 0.81372798 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:426:14:426:14 | m | 171.9951171875 | 1.0 | 1.0 |
|
||||
| test.c:426:14:426:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:426:18:426:18 | n | 31788.810546875 | 1.0 | 1.0 |
|
||||
@@ -1469,12 +1469,12 @@ estimateNrOfBounds
|
||||
| test.c:426:26:426:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:426:30:426:30 | q | 31788.810546875 | 1.0 | 1.0 |
|
||||
| test.c:426:30:426:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:426:34:426:43 | 0.4218627600000000033 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:426:47:426:56 | 0.5384335799999999672 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:426:60:426:69 | 0.4499667900000000054 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:426:73:426:82 | 0.1320411400000000013 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:426:86:426:95 | 0.5203124099999999475 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:426:99:426:108 | 0.4276264699999999808 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:426:34:426:43 | 0.42186276 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:426:47:426:56 | 0.53843358 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:426:60:426:69 | 0.44996679 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:426:73:426:82 | 0.13204114 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:426:86:426:95 | 0.52031241 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:426:99:426:108 | 0.42762647 | 1.0 | -1.0 | -1.0 |
|
||||
| test.c:432:19:432:19 | a | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:432:19:432:23 | ... + ... | 1.0 | 1.0 | 1.0 |
|
||||
| test.c:432:19:432:27 | ... + ... | 1.0 | 1.0 | 1.0 |
|
||||
|
||||
@@ -11,8 +11,13 @@ edges
|
||||
| nested.cpp:86:19:86:46 | *call to __builtin_alloca | nested.cpp:87:18:87:20 | *fmt | provenance | |
|
||||
| test.cpp:46:27:46:30 | **argv | test.cpp:130:20:130:26 | *access to array | provenance | |
|
||||
| test.cpp:167:31:167:34 | *data | test.cpp:170:12:170:14 | *res | provenance | DataFlowFunction |
|
||||
| test.cpp:179:6:179:21 | [summary param] *2 in StringCchPrintfW | test.cpp:179:6:179:21 | [summary param] *0 in StringCchPrintfW [Return] | provenance | MaD:403 |
|
||||
| test.cpp:193:32:193:34 | *str | test.cpp:195:31:195:33 | *str | provenance | |
|
||||
| test.cpp:193:32:193:34 | *str | test.cpp:195:31:195:33 | *str | provenance | |
|
||||
| test.cpp:193:32:193:34 | *str | test.cpp:197:11:197:14 | *wstr | provenance | TaintFunction |
|
||||
| test.cpp:195:20:195:23 | StringCchPrintfW output argument | test.cpp:197:11:197:14 | *wstr | provenance | |
|
||||
| test.cpp:195:31:195:33 | *str | test.cpp:179:6:179:21 | [summary param] *2 in StringCchPrintfW | provenance | |
|
||||
| test.cpp:195:31:195:33 | *str | test.cpp:195:20:195:23 | StringCchPrintfW output argument | provenance | MaD:403 |
|
||||
| test.cpp:204:25:204:36 | *call to get_string | test.cpp:204:25:204:36 | *call to get_string | provenance | |
|
||||
| test.cpp:204:25:204:36 | *call to get_string | test.cpp:205:12:205:20 | *... + ... | provenance | |
|
||||
| test.cpp:204:25:204:36 | *call to get_string | test.cpp:206:12:206:16 | *hello | provenance | |
|
||||
@@ -55,7 +60,11 @@ nodes
|
||||
| test.cpp:130:20:130:26 | *access to array | semmle.label | *access to array |
|
||||
| test.cpp:167:31:167:34 | *data | semmle.label | *data |
|
||||
| test.cpp:170:12:170:14 | *res | semmle.label | *res |
|
||||
| test.cpp:179:6:179:21 | [summary param] *0 in StringCchPrintfW [Return] | semmle.label | [summary param] *0 in StringCchPrintfW [Return] |
|
||||
| test.cpp:179:6:179:21 | [summary param] *2 in StringCchPrintfW | semmle.label | [summary param] *2 in StringCchPrintfW |
|
||||
| test.cpp:193:32:193:34 | *str | semmle.label | *str |
|
||||
| test.cpp:195:20:195:23 | StringCchPrintfW output argument | semmle.label | StringCchPrintfW output argument |
|
||||
| test.cpp:195:31:195:33 | *str | semmle.label | *str |
|
||||
| test.cpp:195:31:195:33 | *str | semmle.label | *str |
|
||||
| test.cpp:197:11:197:14 | *wstr | semmle.label | *wstr |
|
||||
| test.cpp:204:25:204:36 | *call to get_string | semmle.label | *call to get_string |
|
||||
@@ -88,6 +97,7 @@ nodes
|
||||
| test.cpp:245:25:245:36 | *call to get_string | semmle.label | *call to get_string |
|
||||
| test.cpp:247:12:247:16 | *hello | semmle.label | *hello |
|
||||
subpaths
|
||||
| test.cpp:195:31:195:33 | *str | test.cpp:179:6:179:21 | [summary param] *2 in StringCchPrintfW | test.cpp:179:6:179:21 | [summary param] *0 in StringCchPrintfW [Return] | test.cpp:195:20:195:23 | StringCchPrintfW output argument |
|
||||
#select
|
||||
| NonConstantFormat.c:30:10:30:16 | *access to array | NonConstantFormat.c:28:27:28:30 | **argv | NonConstantFormat.c:30:10:30:16 | *access to array | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | NonConstantFormat.c:30:3:30:8 | call to printf | printf |
|
||||
| NonConstantFormat.c:41:9:41:45 | *call to any_random_function | NonConstantFormat.c:41:9:41:45 | *call to any_random_function | NonConstantFormat.c:41:9:41:45 | *call to any_random_function | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | NonConstantFormat.c:41:2:41:7 | call to printf | printf |
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
| test.c:33:3:33:19 | call to not_yet_declared2 | Calling $@: argument $@ of type $@ is incompatible with parameter $@. | test.c:77:6:77:22 | not_yet_declared2 | not_yet_declared2 | test.c:33:21:33:22 | ca | ca | file://:0:0:0:0 | int[4] | int[4] | test.c:77:24:77:26 | (unnamed parameter 0) | int (unnamed parameter 0) |
|
||||
| test.c:41:3:41:29 | call to declared_empty_defined_with | Calling $@: argument $@ of type $@ is incompatible with parameter $@. | test.c:78:6:78:32 | declared_empty_defined_with | declared_empty_defined_with | test.c:41:31:41:32 | & ... | & ... | file://:0:0:0:0 | int * | int * | test.c:78:38:78:38 | x | int x |
|
||||
| test.c:45:3:45:27 | call to not_declared_defined_with | Calling $@: argument $@ of type $@ is incompatible with parameter $@. | test.c:81:6:81:30 | not_declared_defined_with | not_declared_defined_with | test.c:45:29:45:31 | 4 | 4 | file://:0:0:0:0 | long long | long long | test.c:81:36:81:36 | x | int x |
|
||||
| test.c:45:3:45:27 | call to not_declared_defined_with | Calling $@: argument $@ of type $@ is incompatible with parameter $@. | test.c:81:6:81:30 | not_declared_defined_with | not_declared_defined_with | test.c:45:37:45:42 | 2500000000.0 | 2500000000.0 | file://:0:0:0:0 | float | float | test.c:81:50:81:50 | z | int z |
|
||||
| test.c:48:3:48:24 | call to declared_with_pointers | Calling $@: argument $@ of type $@ is incompatible with parameter $@. | test.c:5:6:5:27 | declared_with_pointers | declared_with_pointers | test.c:48:26:48:31 | 3500000000000000.0 | 3500000000000000.0 | file://:0:0:0:0 | double | double | test.c:93:34:93:34 | x | int * x |
|
||||
| test.c:45:3:45:27 | call to not_declared_defined_with | Calling $@: argument $@ of type $@ is incompatible with parameter $@. | test.c:81:6:81:30 | not_declared_defined_with | not_declared_defined_with | test.c:45:37:45:42 | 2.5E9 | 2.5E9 | file://:0:0:0:0 | float | float | test.c:81:50:81:50 | z | int z |
|
||||
| test.c:48:3:48:24 | call to declared_with_pointers | Calling $@: argument $@ of type $@ is incompatible with parameter $@. | test.c:5:6:5:27 | declared_with_pointers | declared_with_pointers | test.c:48:26:48:31 | 3.5E15 | 3.5E15 | file://:0:0:0:0 | double | double | test.c:93:34:93:34 | x | int * x |
|
||||
| test.c:48:3:48:24 | call to declared_with_pointers | Calling $@: argument $@ of type $@ is incompatible with parameter $@. | test.c:5:6:5:27 | declared_with_pointers | declared_with_pointers | test.c:48:34:48:34 | 0 | 0 | file://:0:0:0:0 | int | int | test.c:93:43:93:43 | y | void * y |
|
||||
| test.c:48:3:48:24 | call to declared_with_pointers | Calling $@: argument $@ of type $@ is incompatible with parameter $@. | test.c:93:6:93:27 | declared_with_pointers | declared_with_pointers | test.c:48:26:48:31 | 3500000000000000.0 | 3500000000000000.0 | file://:0:0:0:0 | double | double | test.c:93:34:93:34 | x | int * x |
|
||||
| test.c:48:3:48:24 | call to declared_with_pointers | Calling $@: argument $@ of type $@ is incompatible with parameter $@. | test.c:93:6:93:27 | declared_with_pointers | declared_with_pointers | test.c:48:26:48:31 | 3.5E15 | 3.5E15 | file://:0:0:0:0 | double | double | test.c:93:34:93:34 | x | int * x |
|
||||
| test.c:48:3:48:24 | call to declared_with_pointers | Calling $@: argument $@ of type $@ is incompatible with parameter $@. | test.c:93:6:93:27 | declared_with_pointers | declared_with_pointers | test.c:48:34:48:34 | 0 | 0 | file://:0:0:0:0 | int | int | test.c:93:43:93:43 | y | void * y |
|
||||
| test.c:50:3:50:21 | call to declared_with_array | Calling $@: argument $@ of type $@ is incompatible with parameter $@. | test.c:6:6:6:24 | declared_with_array | declared_with_array | test.c:50:23:50:24 | & ... | & ... | file://:0:0:0:0 | int * | int * | test.c:94:31:94:31 | a | char[6] a |
|
||||
| test.c:50:3:50:21 | call to declared_with_array | Calling $@: argument $@ of type $@ is incompatible with parameter $@. | test.c:94:6:94:24 | declared_with_array | declared_with_array | test.c:50:23:50:24 | & ... | & ... | file://:0:0:0:0 | int * | int * | test.c:94:31:94:31 | a | char[6] a |
|
||||
@@ -15,4 +15,4 @@
|
||||
| test.c:58:3:58:24 | call to defined_with_long_long | Calling $@: argument $@ of type $@ is incompatible with parameter $@. | test.c:104:11:104:32 | defined_with_long_long | defined_with_long_long | test.c:58:26:58:28 | 99 | 99 | file://:0:0:0:0 | int | int | test.c:104:44:104:45 | ll | long long ll |
|
||||
| test.c:59:3:59:24 | call to defined_with_long_long | Calling $@: argument $@ of type $@ is incompatible with parameter $@. | test.c:104:11:104:32 | defined_with_long_long | defined_with_long_long | test.c:59:26:59:26 | 3 | 3 | file://:0:0:0:0 | int | int | test.c:104:44:104:45 | ll | long long ll |
|
||||
| test.c:61:3:61:21 | call to defined_with_double | Calling $@: argument $@ of type $@ is incompatible with parameter $@. | test.c:100:8:100:26 | defined_with_double | defined_with_double | test.c:61:23:61:25 | 2 | 2 | file://:0:0:0:0 | long long | long long | test.c:100:35:100:35 | d | double d |
|
||||
| test.c:62:3:62:24 | call to defined_with_long_long | Calling $@: argument $@ of type $@ is incompatible with parameter $@. | test.c:104:11:104:32 | defined_with_long_long | defined_with_long_long | test.c:62:26:62:31 | 3500000000000000.0 | 3500000000000000.0 | file://:0:0:0:0 | double | double | test.c:104:44:104:45 | ll | long long ll |
|
||||
| test.c:62:3:62:24 | call to defined_with_long_long | Calling $@: argument $@ of type $@ is incompatible with parameter $@. | test.c:104:11:104:32 | defined_with_long_long | defined_with_long_long | test.c:62:26:62:31 | 3.5E15 | 3.5E15 | file://:0:0:0:0 | double | double | test.c:104:44:104:45 | ll | long long ll |
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,2 @@
|
||||
description: Remove `@parameter` from `@control_flow_element`
|
||||
compatibility: full
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,2 @@
|
||||
description: Remove @assign_op_call_expr from @qualifiable_expr.
|
||||
compatibility: full
|
||||
@@ -95,9 +95,9 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
args += " /p:EnableWindowsTargeting=true";
|
||||
}
|
||||
|
||||
if (restoreSettings.ExtraArgs is not null)
|
||||
if (restoreSettings.NugetSources is not null)
|
||||
{
|
||||
args += $" {restoreSettings.ExtraArgs}";
|
||||
args += $" {restoreSettings.NugetSources}";
|
||||
}
|
||||
|
||||
return args;
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
IList<string> GetNugetFeedsFromFolder(string folderPath);
|
||||
}
|
||||
|
||||
public record class RestoreSettings(string File, string PackageDirectory, bool ForceDotnetRefAssemblyFetching, string? ExtraArgs = null, string? PathToNugetConfig = null, bool ForceReevaluation = false, bool TargetWindows = false);
|
||||
public record class RestoreSettings(string File, string PackageDirectory, bool ForceDotnetRefAssemblyFetching, string? NugetSources = null, string? PathToNugetConfig = null, bool ForceReevaluation = false, bool TargetWindows = false);
|
||||
|
||||
public partial record class RestoreResult(bool Success, IList<string> Output)
|
||||
{
|
||||
@@ -33,6 +33,9 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
private readonly Lazy<bool> hasNugetNoStablePackageVersionError = new(() => Output.Any(s => s.Contains("NU1103")));
|
||||
public bool HasNugetNoStablePackageVersionError => hasNugetNoStablePackageVersionError.Value;
|
||||
|
||||
private readonly Lazy<bool> hasNugetPackageMissingError = new(() => Output.Any(s => s.Contains("NU1101")));
|
||||
public bool HasNugetPackageMissingError => hasNugetPackageMissingError.Value;
|
||||
|
||||
private static IEnumerable<string> GetFirstGroupOnMatch(Regex regex, IEnumerable<string> lines) =>
|
||||
lines
|
||||
.Select(line => regex.Match(line))
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
/// <summary>
|
||||
/// Create the package manager for a specified source tree.
|
||||
/// </summary>
|
||||
public NugetExeWrapper(FileProvider fileProvider, DependencyDirectory packageDirectory, Semmle.Util.Logging.ILogger logger)
|
||||
public NugetExeWrapper(FileProvider fileProvider, DependencyDirectory packageDirectory, Semmle.Util.Logging.ILogger logger, Func<bool> useDefaultFeed)
|
||||
{
|
||||
this.fileProvider = fileProvider;
|
||||
this.packageDirectory = packageDirectory;
|
||||
@@ -43,7 +43,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
{
|
||||
logger.LogInfo($"Found packages.config files, trying to use nuget.exe for package restore");
|
||||
nugetExe = ResolveNugetExe();
|
||||
if (HasNoPackageSource())
|
||||
if (HasNoPackageSource() && useDefaultFeed())
|
||||
{
|
||||
// We only modify or add a top level nuget.config file
|
||||
nugetConfigPath = Path.Combine(fileProvider.SourceDir.FullName, "nuget.config");
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
@@ -27,8 +28,12 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
private readonly IDiagnosticsWriter diagnosticsWriter;
|
||||
private readonly DependencyDirectory legacyPackageDirectory;
|
||||
private readonly DependencyDirectory missingPackageDirectory;
|
||||
private readonly DependencyDirectory emptyPackageDirectory;
|
||||
private readonly ILogger logger;
|
||||
private readonly ICompilationInfoContainer compilationInfoContainer;
|
||||
private readonly bool checkNugetFeedResponsiveness = EnvironmentVariables.GetBooleanOptOut(EnvironmentVariableNames.CheckNugetFeedResponsiveness);
|
||||
private readonly ImmutableHashSet<string> privateRegistryFeeds;
|
||||
private readonly bool hasPrivateRegistryFeeds;
|
||||
|
||||
public DependencyDirectory PackageDirectory { get; }
|
||||
|
||||
@@ -45,6 +50,8 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
this.fileContent = fileContent;
|
||||
this.dotnet = dotnet;
|
||||
this.dependabotProxy = dependabotProxy;
|
||||
this.privateRegistryFeeds = dependabotProxy?.RegistryURLs.ToImmutableHashSet() ?? [];
|
||||
this.hasPrivateRegistryFeeds = privateRegistryFeeds.Count > 0;
|
||||
this.diagnosticsWriter = diagnosticsWriter;
|
||||
this.logger = logger;
|
||||
this.compilationInfoContainer = compilationInfoContainer;
|
||||
@@ -52,6 +59,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
PackageDirectory = new DependencyDirectory("packages", "package", logger);
|
||||
legacyPackageDirectory = new DependencyDirectory("legacypackages", "legacy package", logger);
|
||||
missingPackageDirectory = new DependencyDirectory("missingpackages", "missing package", logger);
|
||||
emptyPackageDirectory = new DependencyDirectory("empty", "empty package", logger);
|
||||
}
|
||||
|
||||
public string? TryRestore(string package)
|
||||
@@ -110,25 +118,50 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
public HashSet<AssemblyLookupLocation> Restore()
|
||||
{
|
||||
var assemblyLookupLocations = new HashSet<AssemblyLookupLocation>();
|
||||
var checkNugetFeedResponsiveness = EnvironmentVariables.GetBooleanOptOut(EnvironmentVariableNames.CheckNugetFeedResponsiveness);
|
||||
logger.LogInfo($"Checking NuGet feed responsiveness: {checkNugetFeedResponsiveness}");
|
||||
compilationInfoContainer.CompilationInfos.Add(("NuGet feed responsiveness checked", checkNugetFeedResponsiveness ? "1" : "0"));
|
||||
|
||||
HashSet<string>? explicitFeeds = null;
|
||||
HashSet<string>? allFeeds = null;
|
||||
HashSet<string> explicitFeeds = [];
|
||||
HashSet<string> reachableFeeds = [];
|
||||
|
||||
try
|
||||
{
|
||||
if (checkNugetFeedResponsiveness && !CheckFeeds(out explicitFeeds, out allFeeds))
|
||||
// Find feeds that are configured in NuGet.config files and divide them into ones that
|
||||
// are explicitly configured for the project or by a private registry, and "all feeds"
|
||||
// (including inherited ones) from other locations on the host outside of the working directory.
|
||||
(explicitFeeds, var allFeeds) = GetAllFeeds();
|
||||
|
||||
if (checkNugetFeedResponsiveness)
|
||||
{
|
||||
// todo: we could also check the reachability of the inherited nuget feeds, but to use those in the fallback we would need to handle authentication too.
|
||||
var unresponsiveMissingPackageLocation = DownloadMissingPackagesFromSpecificFeeds([], explicitFeeds);
|
||||
return unresponsiveMissingPackageLocation is null
|
||||
? []
|
||||
: [unresponsiveMissingPackageLocation];
|
||||
var inheritedFeeds = allFeeds.Except(explicitFeeds).ToHashSet();
|
||||
|
||||
if (inheritedFeeds.Count > 0)
|
||||
{
|
||||
compilationInfoContainer.CompilationInfos.Add(("Inherited NuGet feed count", inheritedFeeds.Count.ToString()));
|
||||
}
|
||||
|
||||
var timeout = CheckSpecifiedFeeds(explicitFeeds, out var reachableExplicitFeeds);
|
||||
reachableFeeds.UnionWith(reachableExplicitFeeds);
|
||||
|
||||
var allExplicitReachable = explicitFeeds.Count == reachableExplicitFeeds.Count;
|
||||
EmitUnreachableFeedsDiagnostics(allExplicitReachable);
|
||||
|
||||
if (timeout)
|
||||
{
|
||||
// If we experience a timeout, we use this fallback.
|
||||
// todo: we could also check the reachability of the inherited nuget feeds, but to use those in the fallback we would need to handle authentication too.
|
||||
var unresponsiveMissingPackageLocation = DownloadMissingPackagesFromSpecificFeeds([], explicitFeeds);
|
||||
return unresponsiveMissingPackageLocation is null
|
||||
? []
|
||||
: [unresponsiveMissingPackageLocation];
|
||||
}
|
||||
|
||||
// Inherited feeds should only be used, if they are indeed reachable (as they may be environment specific).
|
||||
CheckSpecifiedFeeds(inheritedFeeds, out var reachableInheritedFeeds);
|
||||
reachableFeeds.UnionWith(reachableInheritedFeeds);
|
||||
}
|
||||
|
||||
using (var nuget = new NugetExeWrapper(fileProvider, legacyPackageDirectory, logger))
|
||||
using (var nuget = new NugetExeWrapper(fileProvider, legacyPackageDirectory, logger, IsDefaultFeedReachable))
|
||||
{
|
||||
var count = nuget.InstallPackages();
|
||||
|
||||
@@ -167,9 +200,10 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
logger.LogError($"Failed to restore NuGet packages with nuget.exe: {exc.Message}");
|
||||
}
|
||||
|
||||
var restoredProjects = RestoreSolutions(out var container);
|
||||
// Restore project dependencies with `dotnet restore`.
|
||||
var restoredProjects = RestoreSolutions(reachableFeeds, out var container);
|
||||
var projects = fileProvider.Projects.Except(restoredProjects);
|
||||
RestoreProjects(projects, allFeeds, out var containers);
|
||||
RestoreProjects(projects, reachableFeeds, out var containers);
|
||||
|
||||
var dependencies = containers.Flatten(container);
|
||||
|
||||
@@ -192,6 +226,53 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
return assemblyLookupLocations;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tests which of the feeds given by <paramref name="feedsToCheck"/> are reachable.
|
||||
/// </summary>
|
||||
/// <param name="feedsToCheck">The feeds to check.</param>
|
||||
/// <param name="isFallback">Whether the feeds are fallback feeds or not.</param>
|
||||
/// <param name="isTimeout">Whether a timeout occurred while checking the feeds.</param>
|
||||
/// <returns>The list of feeds that could be reached.</returns>
|
||||
private List<string> GetReachableNuGetFeeds(HashSet<string> feedsToCheck, bool isFallback, out bool isTimeout)
|
||||
{
|
||||
var fallbackStr = isFallback ? "fallback " : "";
|
||||
logger.LogInfo($"Checking {fallbackStr}NuGet feed reachability on feeds: {string.Join(", ", feedsToCheck.OrderBy(f => f))}");
|
||||
|
||||
var (initialTimeout, tryCount) = GetFeedRequestSettings(isFallback);
|
||||
var timeout = false;
|
||||
var reachableFeeds = feedsToCheck
|
||||
.Where(feed =>
|
||||
{
|
||||
var reachable = IsFeedReachable(feed, initialTimeout, tryCount, out var feedTimeout);
|
||||
timeout |= feedTimeout;
|
||||
return reachable;
|
||||
})
|
||||
.ToList();
|
||||
|
||||
if (reachableFeeds.Count == 0)
|
||||
{
|
||||
logger.LogWarning($"No {fallbackStr}NuGet feeds are reachable.");
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.LogInfo($"Reachable {fallbackStr}NuGet feeds: {string.Join(", ", reachableFeeds.OrderBy(f => f))}");
|
||||
}
|
||||
|
||||
isTimeout = timeout;
|
||||
return reachableFeeds;
|
||||
}
|
||||
|
||||
private bool IsDefaultFeedReachable()
|
||||
{
|
||||
if (checkNugetFeedResponsiveness)
|
||||
{
|
||||
var (initialTimeout, tryCount) = GetFeedRequestSettings(isFallback: false);
|
||||
return IsFeedReachable(PublicNugetOrgFeed, initialTimeout, tryCount, out var _);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private List<string> GetReachableFallbackNugetFeeds(HashSet<string>? feedsFromNugetConfigs)
|
||||
{
|
||||
var fallbackFeeds = EnvironmentVariables.GetURLs(EnvironmentVariableNames.FallbackNugetFeeds).ToHashSet();
|
||||
@@ -212,17 +293,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
}
|
||||
}
|
||||
|
||||
logger.LogInfo($"Checking fallback NuGet feed reachability on feeds: {string.Join(", ", fallbackFeeds.OrderBy(f => f))}");
|
||||
var (initialTimeout, tryCount) = GetFeedRequestSettings(isFallback: true);
|
||||
var reachableFallbackFeeds = fallbackFeeds.Where(feed => IsFeedReachable(feed, initialTimeout, tryCount, allowExceptions: false)).ToList();
|
||||
if (reachableFallbackFeeds.Count == 0)
|
||||
{
|
||||
logger.LogWarning("No fallback NuGet feeds are reachable.");
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.LogInfo($"Reachable fallback NuGet feeds: {string.Join(", ", reachableFallbackFeeds.OrderBy(f => f))}");
|
||||
}
|
||||
var reachableFallbackFeeds = GetReachableNuGetFeeds(fallbackFeeds, isFallback: true, out var _);
|
||||
|
||||
compilationInfoContainer.CompilationInfos.Add(("Reachable fallback NuGet feed count", reachableFallbackFeeds.Count.ToString()));
|
||||
|
||||
@@ -237,10 +308,12 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
/// Populates dependencies with the relevant dependencies from the assets files generated by the restore.
|
||||
/// Returns a list of projects that are up to date with respect to restore.
|
||||
/// </summary>
|
||||
private IEnumerable<string> RestoreSolutions(out DependencyContainer dependencies)
|
||||
private IEnumerable<string> RestoreSolutions(HashSet<string> reachableFeeds, out DependencyContainer dependencies)
|
||||
{
|
||||
var successCount = 0;
|
||||
var nugetSourceFailures = 0;
|
||||
var nugetMissingPackageFailures = 0;
|
||||
|
||||
var assets = new Assets(logger);
|
||||
|
||||
var isWindows = fileContent.UseWindowsForms || fileContent.UseWpf;
|
||||
@@ -248,7 +321,8 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
var projects = fileProvider.Solutions.SelectMany(solution =>
|
||||
{
|
||||
logger.LogInfo($"Restoring solution {solution}...");
|
||||
var res = dotnet.Restore(new(solution, PackageDirectory.DirInfo.FullName, ForceDotnetRefAssemblyFetching: true, TargetWindows: isWindows));
|
||||
var nugetSources = MakeRestoreSourcesArgument(solution, reachableFeeds);
|
||||
var res = dotnet.Restore(new(solution, PackageDirectory.DirInfo.FullName, ForceDotnetRefAssemblyFetching: true, NugetSources: nugetSources, TargetWindows: isWindows));
|
||||
if (res.Success)
|
||||
{
|
||||
successCount++;
|
||||
@@ -257,51 +331,84 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
{
|
||||
nugetSourceFailures++;
|
||||
}
|
||||
if (res.HasNugetPackageMissingError)
|
||||
{
|
||||
nugetMissingPackageFailures++;
|
||||
}
|
||||
assets.AddDependenciesRange(res.AssetsFilePaths);
|
||||
return res.RestoredProjects;
|
||||
}).ToList();
|
||||
dependencies = assets.Dependencies;
|
||||
compilationInfoContainer.CompilationInfos.Add(("Successfully restored solution files", successCount.ToString()));
|
||||
compilationInfoContainer.CompilationInfos.Add(("Failed solution restore with package source error", nugetSourceFailures.ToString()));
|
||||
compilationInfoContainer.CompilationInfos.Add(("Failed solution restore with missing package error", nugetMissingPackageFailures.ToString()));
|
||||
compilationInfoContainer.CompilationInfos.Add(("Restored projects through solution files", projects.Count.ToString()));
|
||||
return projects;
|
||||
}
|
||||
|
||||
private string FeedsToRestoreArgument(IEnumerable<string> feeds)
|
||||
{
|
||||
// If there are no feeds, we want to override any default feeds that `dotnet restore` would use by passing a dummy source argument.
|
||||
if (!feeds.Any())
|
||||
{
|
||||
return $" -s \"{emptyPackageDirectory.DirInfo.FullName}\"";
|
||||
}
|
||||
|
||||
// Add package sources. If any are present, they override all sources specified in
|
||||
// the configuration file(s).
|
||||
var feedArgs = new StringBuilder();
|
||||
foreach (var feed in feeds)
|
||||
{
|
||||
feedArgs.Append($" -s \"{feed}\"");
|
||||
}
|
||||
|
||||
return feedArgs.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructs the list of NuGet sources to use for this restore.
|
||||
/// (1) Use the feeds we get from `dotnet nuget list source`
|
||||
/// (2) Use private registries, if they are configured
|
||||
/// </summary>
|
||||
/// <param name="path">Path to project/solution</param>
|
||||
/// <param name="reachableFeeds">The set of reachable NuGet feeds.</param>
|
||||
/// <returns>A string representing the NuGet sources argument for the restore command.</returns>
|
||||
private string? MakeRestoreSourcesArgument(string path, HashSet<string> reachableFeeds)
|
||||
{
|
||||
// Do not construct an set of explicit NuGet sources to use for restore.
|
||||
if (!checkNugetFeedResponsiveness && !hasPrivateRegistryFeeds)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
// Find the path specific feeds.
|
||||
var folder = GetDirectoryName(path);
|
||||
var feedsToConsider = folder is not null ? GetFeeds(() => dotnet.GetNugetFeedsFromFolder(folder)).ToHashSet() : [];
|
||||
|
||||
if (hasPrivateRegistryFeeds)
|
||||
{
|
||||
feedsToConsider.UnionWith(privateRegistryFeeds);
|
||||
}
|
||||
|
||||
var feedsToUse = checkNugetFeedResponsiveness
|
||||
? feedsToConsider.Where(reachableFeeds.Contains)
|
||||
: feedsToConsider;
|
||||
|
||||
return FeedsToRestoreArgument(feedsToUse);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Executes `dotnet restore` on all projects in projects.
|
||||
/// This is done in parallel for performance reasons.
|
||||
/// Populates dependencies with the relative paths to the assets files generated by the restore.
|
||||
/// </summary>
|
||||
/// <param name="projects">A list of paths to project files.</param>
|
||||
private void RestoreProjects(IEnumerable<string> projects, HashSet<string>? configuredSources, out ConcurrentBag<DependencyContainer> dependencies)
|
||||
/// <param name="reachableFeeds">The set of reachable NuGet feeds.</param>
|
||||
private void RestoreProjects(IEnumerable<string> projects, HashSet<string> reachableFeeds, out ConcurrentBag<DependencyContainer> dependencies)
|
||||
{
|
||||
// Conservatively, we only set this to a non-null value if a Dependabot proxy is enabled.
|
||||
// This ensures that we continue to get the old behaviour where feeds are taken from
|
||||
// `nuget.config` files instead of the command-line arguments.
|
||||
string? extraArgs = null;
|
||||
|
||||
if (this.dependabotProxy is not null)
|
||||
{
|
||||
// If the Dependabot proxy is configured, then our main goal is to make `dotnet` aware
|
||||
// of the private registry feeds. However, since providing them as command-line arguments
|
||||
// to `dotnet` ignores other feeds that may be configured, we also need to add the feeds
|
||||
// we have discovered from analysing `nuget.config` files.
|
||||
var sources = configuredSources ?? new();
|
||||
this.dependabotProxy.RegistryURLs.ForEach(url => sources.Add(url));
|
||||
|
||||
// Add package sources. If any are present, they override all sources specified in
|
||||
// the configuration file(s).
|
||||
var feedArgs = new StringBuilder();
|
||||
foreach (string source in sources)
|
||||
{
|
||||
feedArgs.Append($" -s {source}");
|
||||
}
|
||||
|
||||
extraArgs = feedArgs.ToString();
|
||||
}
|
||||
|
||||
var successCount = 0;
|
||||
var nugetSourceFailures = 0;
|
||||
var nugetMissingPackageFailures = 0;
|
||||
ConcurrentBag<DependencyContainer> collectedDependencies = [];
|
||||
|
||||
var isWindows = fileContent.UseWindowsForms || fileContent.UseWpf;
|
||||
@@ -314,7 +421,8 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
foreach (var project in projectGroup)
|
||||
{
|
||||
logger.LogInfo($"Restoring project {project}...");
|
||||
var res = dotnet.Restore(new(project, PackageDirectory.DirInfo.FullName, ForceDotnetRefAssemblyFetching: true, extraArgs, TargetWindows: isWindows));
|
||||
var nugetSources = MakeRestoreSourcesArgument(project, reachableFeeds);
|
||||
var res = dotnet.Restore(new(project, PackageDirectory.DirInfo.FullName, ForceDotnetRefAssemblyFetching: true, NugetSources: nugetSources, TargetWindows: isWindows));
|
||||
assets.AddDependenciesRange(res.AssetsFilePaths);
|
||||
lock (sync)
|
||||
{
|
||||
@@ -326,6 +434,10 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
{
|
||||
nugetSourceFailures++;
|
||||
}
|
||||
if (res.HasNugetPackageMissingError)
|
||||
{
|
||||
nugetMissingPackageFailures++;
|
||||
}
|
||||
}
|
||||
}
|
||||
collectedDependencies.Add(assets.Dependencies);
|
||||
@@ -333,6 +445,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
dependencies = collectedDependencies;
|
||||
compilationInfoContainer.CompilationInfos.Add(("Successfully restored project files", successCount.ToString()));
|
||||
compilationInfoContainer.CompilationInfos.Add(("Failed project restore with package source error", nugetSourceFailures.ToString()));
|
||||
compilationInfoContainer.CompilationInfos.Add(("Failed project restore with missing package error", nugetMissingPackageFailures.ToString()));
|
||||
}
|
||||
|
||||
private AssemblyLookupLocation? DownloadMissingPackagesFromSpecificFeeds(IEnumerable<string> usedPackageNames, HashSet<string>? feedsFromNugetConfigs)
|
||||
@@ -623,28 +736,22 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
}
|
||||
}
|
||||
|
||||
private static async Task ExecuteGetRequest(string address, HttpClient httpClient, CancellationToken cancellationToken)
|
||||
private static async Task<HttpResponseMessage> ExecuteGetRequest(string address, HttpClient httpClient, CancellationToken cancellationToken)
|
||||
{
|
||||
using var stream = await httpClient.GetStreamAsync(address, cancellationToken);
|
||||
var buffer = new byte[1024];
|
||||
int bytesRead;
|
||||
while ((bytesRead = stream.Read(buffer, 0, buffer.Length)) > 0)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
return await httpClient.GetAsync(address, HttpCompletionOption.ResponseHeadersRead, cancellationToken);
|
||||
}
|
||||
|
||||
private bool IsFeedReachable(string feed, int timeoutMilliSeconds, int tryCount, bool allowExceptions = true)
|
||||
private bool IsFeedReachable(string feed, int timeoutMilliSeconds, int tryCount, out bool isTimeout)
|
||||
{
|
||||
logger.LogInfo($"Checking if NuGet feed '{feed}' is reachable...");
|
||||
|
||||
// Configure the HttpClient to be aware of the Dependabot Proxy, if used.
|
||||
HttpClientHandler httpClientHandler = new();
|
||||
if (this.dependabotProxy != null)
|
||||
if (dependabotProxy != null)
|
||||
{
|
||||
httpClientHandler.Proxy = new WebProxy(this.dependabotProxy.Address);
|
||||
httpClientHandler.Proxy = new WebProxy(dependabotProxy.Address);
|
||||
|
||||
if (this.dependabotProxy.Certificate != null)
|
||||
if (dependabotProxy.Certificate != null)
|
||||
{
|
||||
httpClientHandler.ServerCertificateCustomValidationCallback = (message, cert, chain, _) =>
|
||||
{
|
||||
@@ -659,7 +766,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
return false;
|
||||
}
|
||||
chain.ChainPolicy.TrustMode = X509ChainTrustMode.CustomRootTrust;
|
||||
chain.ChainPolicy.CustomTrustStore.Add(this.dependabotProxy.Certificate);
|
||||
chain.ChainPolicy.CustomTrustStore.Add(dependabotProxy.Certificate);
|
||||
return chain.Build(cert);
|
||||
};
|
||||
}
|
||||
@@ -667,13 +774,17 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
|
||||
using HttpClient client = new(httpClientHandler);
|
||||
|
||||
isTimeout = false;
|
||||
|
||||
for (var i = 0; i < tryCount; i++)
|
||||
{
|
||||
using var cts = new CancellationTokenSource();
|
||||
cts.CancelAfter(timeoutMilliSeconds);
|
||||
try
|
||||
{
|
||||
ExecuteGetRequest(feed, client, cts.Token).GetAwaiter().GetResult();
|
||||
logger.LogInfo($"Attempt {i + 1}/{tryCount} to reach NuGet feed '{feed}'.");
|
||||
using var response = ExecuteGetRequest(feed, client, cts.Token).GetAwaiter().GetResult();
|
||||
response.EnsureSuccessStatusCode();
|
||||
logger.LogInfo($"Querying NuGet feed '{feed}' succeeded.");
|
||||
return true;
|
||||
}
|
||||
@@ -688,14 +799,13 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
continue;
|
||||
}
|
||||
|
||||
// We're only interested in timeouts.
|
||||
var start = allowExceptions ? "Considering" : "Not considering";
|
||||
logger.LogInfo($"Querying NuGet feed '{feed}' failed in a timely manner. {start} the feed for use. The reason for the failure: {exc.Message}");
|
||||
return allowExceptions;
|
||||
logger.LogInfo($"Querying NuGet feed '{feed}' failed. The reason for the failure: {exc.Message}");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
logger.LogWarning($"Didn't receive answer from NuGet feed '{feed}'. Tried it {tryCount} times.");
|
||||
isTimeout = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -719,42 +829,10 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks that we can connect to all NuGet feeds that are explicitly configured in configuration files
|
||||
/// as well as any private package registry feeds that are configured.
|
||||
/// Retrieves a list of excluded NuGet feeds from the corresponding environment variable.
|
||||
/// </summary>
|
||||
/// <param name="explicitFeeds">Outputs the set of explicit feeds.</param>
|
||||
/// <param name="allFeeds">Outputs the set of all feeds (explicit and inherited).</param>
|
||||
/// <returns>True if all feeds are reachable or false otherwise.</returns>
|
||||
private bool CheckFeeds(out HashSet<string> explicitFeeds, out HashSet<string> allFeeds)
|
||||
private HashSet<string> GetExcludedFeeds()
|
||||
{
|
||||
(explicitFeeds, allFeeds) = GetAllFeeds();
|
||||
HashSet<string> feedsToCheck = explicitFeeds;
|
||||
|
||||
// If private package registries are configured for C#, then check those
|
||||
// in addition to the ones that are configured in `nuget.config` files.
|
||||
this.dependabotProxy?.RegistryURLs.ForEach(url => feedsToCheck.Add(url));
|
||||
|
||||
var allFeedsReachable = this.CheckSpecifiedFeeds(feedsToCheck);
|
||||
|
||||
var inheritedFeeds = allFeeds.Except(explicitFeeds).ToHashSet();
|
||||
if (inheritedFeeds.Count > 0)
|
||||
{
|
||||
logger.LogInfo($"Inherited NuGet feeds (not checked for reachability): {string.Join(", ", inheritedFeeds.OrderBy(f => f))}");
|
||||
compilationInfoContainer.CompilationInfos.Add(("Inherited NuGet feed count", inheritedFeeds.Count.ToString()));
|
||||
}
|
||||
|
||||
return allFeedsReachable;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks that we can connect to the specified NuGet feeds.
|
||||
/// </summary>
|
||||
/// <param name="feeds">The set of package feeds to check.</param>
|
||||
/// <returns>True if all feeds are reachable or false otherwise.</returns>
|
||||
private bool CheckSpecifiedFeeds(HashSet<string> feeds)
|
||||
{
|
||||
logger.LogInfo("Checking that NuGet feeds are reachable...");
|
||||
|
||||
var excludedFeeds = EnvironmentVariables.GetURLs(EnvironmentVariableNames.ExcludedNugetFeedsFromResponsivenessCheck)
|
||||
.ToHashSet();
|
||||
|
||||
@@ -763,9 +841,49 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
logger.LogInfo($"Excluded NuGet feeds from responsiveness check: {string.Join(", ", excludedFeeds.OrderBy(f => f))}");
|
||||
}
|
||||
|
||||
var (initialTimeout, tryCount) = GetFeedRequestSettings(isFallback: false);
|
||||
return excludedFeeds;
|
||||
}
|
||||
|
||||
var allFeedsReachable = feeds.All(feed => excludedFeeds.Contains(feed) || IsFeedReachable(feed, initialTimeout, tryCount));
|
||||
/// <summary>
|
||||
/// Checks that we can connect to the specified NuGet feeds.
|
||||
/// </summary>
|
||||
/// <param name="feeds">The set of package feeds to check.</param>
|
||||
/// <param name="reachableFeeds">The list of feeds that were reachable.</param>
|
||||
/// <returns>
|
||||
/// True if there is a timeout when trying to reach the feeds (excluding any feeds that are configured
|
||||
/// to be excluded from the check) or false otherwise.
|
||||
/// </returns>
|
||||
private bool CheckSpecifiedFeeds(HashSet<string> feeds, out HashSet<string> reachableFeeds)
|
||||
{
|
||||
// Exclude any feeds from the feed check that are configured by the corresponding environment variable.
|
||||
// These feeds are always assumed to be reachable.
|
||||
var excludedFeeds = GetExcludedFeeds();
|
||||
|
||||
HashSet<string> feedsToCheck = feeds.Where(feed =>
|
||||
{
|
||||
if (excludedFeeds.Contains(feed))
|
||||
{
|
||||
logger.LogInfo($"Not checking reachability of NuGet feed '{feed}' as it is in the list of excluded feeds.");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}).ToHashSet();
|
||||
|
||||
reachableFeeds = GetReachableNuGetFeeds(feedsToCheck, isFallback: false, out var isTimeout).ToHashSet();
|
||||
|
||||
// Always consider feeds excluded for the reachability check as reachable.
|
||||
reachableFeeds.UnionWith(feeds.Where(feed => excludedFeeds.Contains(feed)));
|
||||
|
||||
return isTimeout;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// If <paramref name="allFeedsReachable"/> is `false`, logs this and emits a diagnostic.
|
||||
/// Adds a `CompilationInfos` entry either way.
|
||||
/// </summary>
|
||||
/// <param name="allFeedsReachable">Whether all feeds were reachable or not.</param>
|
||||
private void EmitUnreachableFeedsDiagnostics(bool allFeedsReachable)
|
||||
{
|
||||
if (!allFeedsReachable)
|
||||
{
|
||||
logger.LogWarning("Found unreachable NuGet feed in C# analysis with build-mode 'none'. This may cause missing dependencies in the analysis.");
|
||||
@@ -779,8 +897,6 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
));
|
||||
}
|
||||
compilationInfoContainer.CompilationInfos.Add(("All NuGet feeds reachable", allFeedsReachable ? "1" : "0"));
|
||||
|
||||
return allFeedsReachable;
|
||||
}
|
||||
|
||||
private IEnumerable<string> GetFeeds(Func<IList<string>> getNugetFeeds)
|
||||
@@ -811,6 +927,19 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
}
|
||||
}
|
||||
|
||||
private string? GetDirectoryName(string path)
|
||||
{
|
||||
try
|
||||
{
|
||||
return new FileInfo(path).Directory?.FullName;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.LogWarning($"Failed to get directory of '{path}': {exc}");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private (HashSet<string> explicitFeeds, HashSet<string> allFeeds) GetAllFeeds()
|
||||
{
|
||||
var nugetConfigs = fileProvider.NugetConfigs;
|
||||
@@ -828,11 +957,11 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
|
||||
if (invalidNugetConfigs.Count() > 0)
|
||||
{
|
||||
this.logger.LogWarning(string.Format(
|
||||
logger.LogWarning(string.Format(
|
||||
"Found incorrectly named NuGet configuration files: {0}",
|
||||
string.Join(", ", invalidNugetConfigs)
|
||||
));
|
||||
this.diagnosticsWriter.AddEntry(new DiagnosticMessage(
|
||||
diagnosticsWriter.AddEntry(new DiagnosticMessage(
|
||||
Language.CSharp,
|
||||
"buildless/case-sensitive-nuget-config",
|
||||
"Found NuGet configuration files which are not correctly named",
|
||||
@@ -864,41 +993,33 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
logger.LogDebug("No NuGet feeds found in nuget.config files.");
|
||||
}
|
||||
|
||||
// todo: this could be improved.
|
||||
HashSet<string>? allFeeds = null;
|
||||
// If private package registries are configured for C#, then consider those
|
||||
// in addition to the ones that are configured in `nuget.config` files.
|
||||
if (hasPrivateRegistryFeeds)
|
||||
{
|
||||
logger.LogInfo($"Found {privateRegistryFeeds.Count} private registry feeds configured for C#: {string.Join(", ", privateRegistryFeeds.OrderBy(f => f))}");
|
||||
explicitFeeds.UnionWith(privateRegistryFeeds);
|
||||
}
|
||||
|
||||
HashSet<string> allFeeds = [];
|
||||
|
||||
// Add all explicitFeeds to the set of all feeds.
|
||||
allFeeds.UnionWith(explicitFeeds);
|
||||
|
||||
// Obtain the list of feeds from the root source directory.
|
||||
// If a NuGet file is present it will be respected, otherwise we will just get the machine/environment specific feeds.
|
||||
var nugetFeedsFromRoot = GetFeeds(() => dotnet.GetNugetFeedsFromFolder(fileProvider.SourceDir.FullName));
|
||||
allFeeds.UnionWith(nugetFeedsFromRoot);
|
||||
|
||||
if (nugetConfigs.Count > 0)
|
||||
{
|
||||
// We don't have to get the feeds from each of the folders from below, it would be enought to check the folders that recursively contain the others.
|
||||
allFeeds = nugetConfigs
|
||||
.Select(config =>
|
||||
{
|
||||
try
|
||||
{
|
||||
return new FileInfo(config).Directory?.FullName;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.LogWarning($"Failed to get directory of '{config}': {exc}");
|
||||
}
|
||||
return null;
|
||||
})
|
||||
var nugetConfigFeeds = nugetConfigs
|
||||
.Select(GetDirectoryName)
|
||||
.Where(folder => folder != null)
|
||||
.SelectMany(folder => GetFeeds(() => dotnet.GetNugetFeedsFromFolder(folder!)))
|
||||
.ToHashSet();
|
||||
|
||||
// If we have discovered any explicit feeds, then we also expect these to be in the set of all feeds.
|
||||
// Normally, it is a safe assumption to make that `GetNugetFeedsFromFolder` will include the feeds configured
|
||||
// in a NuGet configuration file in the given directory. There is one exception: on a system with case-sensitive
|
||||
// file systems, we may discover a configuration file such as `Nuget.Config` which is not recognised by `dotnet nuget`.
|
||||
// In that case, our call to `GetNugetFeeds` will retrieve the feeds from that file (because it is accepted when
|
||||
// provided explicitly as `--configfile` argument), but the call to `GetNugetFeedsFromFolder` will not.
|
||||
allFeeds.UnionWith(explicitFeeds);
|
||||
}
|
||||
else
|
||||
{
|
||||
// If we haven't found any `nuget.config` files, then obtain a list of feeds from the root source directory.
|
||||
allFeeds = GetFeeds(() => dotnet.GetNugetFeedsFromFolder(this.fileProvider.SourceDir.FullName)).ToHashSet();
|
||||
allFeeds.UnionWith(nugetConfigFeeds);
|
||||
}
|
||||
|
||||
logger.LogInfo($"Found {allFeeds.Count} NuGet feeds (with inherited ones) in nuget.config files: {string.Join(", ", allFeeds.OrderBy(f => f))}");
|
||||
@@ -923,6 +1044,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
PackageDirectory?.Dispose();
|
||||
legacyPackageDirectory?.Dispose();
|
||||
missingPackageDirectory?.Dispose();
|
||||
emptyPackageDirectory?.Dispose();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Text.RegularExpressions;
|
||||
using Microsoft.CodeAnalysis;
|
||||
|
||||
@@ -18,114 +20,68 @@ namespace Semmle.Extraction.CSharp.Util
|
||||
return symbol.CanBeReferencedByName ? name : name.Substring(symbol.Name.LastIndexOf('.') + 1);
|
||||
}
|
||||
|
||||
private static readonly ReadOnlyDictionary<string, string> methodToOperator = new(new Dictionary<string, string>
|
||||
{
|
||||
{ "op_LogicalNot", "!" },
|
||||
{ "op_BitwiseAnd", "&" },
|
||||
{ "op_Equality", "==" },
|
||||
{ "op_Inequality", "!=" },
|
||||
{ "op_UnaryPlus", "+" },
|
||||
{ "op_Addition", "+" },
|
||||
{ "op_UnaryNegation", "-" },
|
||||
{ "op_Subtraction", "-" },
|
||||
{ "op_Multiply", "*" },
|
||||
{ "op_Multiplication", "*" },
|
||||
{ "op_Division", "/" },
|
||||
{ "op_Modulus", "%" },
|
||||
{ "op_GreaterThan", ">" },
|
||||
{ "op_GreaterThanOrEqual", ">=" },
|
||||
{ "op_LessThan", "<" },
|
||||
{ "op_LessThanOrEqual", "<=" },
|
||||
{ "op_Decrement", "--" },
|
||||
{ "op_Increment", "++" },
|
||||
{ "op_Implicit", "implicit conversion" },
|
||||
{ "op_Explicit", "explicit conversion" },
|
||||
{ "op_OnesComplement", "~" },
|
||||
{ "op_RightShift", ">>" },
|
||||
{ "op_UnsignedRightShift", ">>>" },
|
||||
{ "op_LeftShift", "<<" },
|
||||
{ "op_BitwiseOr", "|" },
|
||||
{ "op_ExclusiveOr", "^" },
|
||||
{ "op_True", "true" },
|
||||
{ "op_False", "false" }
|
||||
});
|
||||
|
||||
/// <summary>
|
||||
/// Convert an operator method name in to a symbolic name.
|
||||
/// A return value indicates whether the conversion succeeded.
|
||||
/// </summary>
|
||||
public static bool TryGetOperatorSymbol(this ISymbol symbol, out string operatorName)
|
||||
{
|
||||
static bool TryGetOperatorSymbolFromName(string methodName, out string operatorName)
|
||||
var methodName = symbol.GetName(useMetadataName: false);
|
||||
|
||||
// Most common use-case.
|
||||
if (methodToOperator.TryGetValue(methodName, out var opName))
|
||||
{
|
||||
var success = true;
|
||||
switch (methodName)
|
||||
{
|
||||
case "op_LogicalNot":
|
||||
operatorName = "!";
|
||||
break;
|
||||
case "op_BitwiseAnd":
|
||||
operatorName = "&";
|
||||
break;
|
||||
case "op_Equality":
|
||||
operatorName = "==";
|
||||
break;
|
||||
case "op_Inequality":
|
||||
operatorName = "!=";
|
||||
break;
|
||||
case "op_UnaryPlus":
|
||||
case "op_Addition":
|
||||
operatorName = "+";
|
||||
break;
|
||||
case "op_UnaryNegation":
|
||||
case "op_Subtraction":
|
||||
operatorName = "-";
|
||||
break;
|
||||
case "op_Multiply":
|
||||
operatorName = "*";
|
||||
break;
|
||||
case "op_Division":
|
||||
operatorName = "/";
|
||||
break;
|
||||
case "op_Modulus":
|
||||
operatorName = "%";
|
||||
break;
|
||||
case "op_GreaterThan":
|
||||
operatorName = ">";
|
||||
break;
|
||||
case "op_GreaterThanOrEqual":
|
||||
operatorName = ">=";
|
||||
break;
|
||||
case "op_LessThan":
|
||||
operatorName = "<";
|
||||
break;
|
||||
case "op_LessThanOrEqual":
|
||||
operatorName = "<=";
|
||||
break;
|
||||
case "op_Decrement":
|
||||
operatorName = "--";
|
||||
break;
|
||||
case "op_Increment":
|
||||
operatorName = "++";
|
||||
break;
|
||||
case "op_Implicit":
|
||||
operatorName = "implicit conversion";
|
||||
break;
|
||||
case "op_Explicit":
|
||||
operatorName = "explicit conversion";
|
||||
break;
|
||||
case "op_OnesComplement":
|
||||
operatorName = "~";
|
||||
break;
|
||||
case "op_RightShift":
|
||||
operatorName = ">>";
|
||||
break;
|
||||
case "op_UnsignedRightShift":
|
||||
operatorName = ">>>";
|
||||
break;
|
||||
case "op_LeftShift":
|
||||
operatorName = "<<";
|
||||
break;
|
||||
case "op_BitwiseOr":
|
||||
operatorName = "|";
|
||||
break;
|
||||
case "op_ExclusiveOr":
|
||||
operatorName = "^";
|
||||
break;
|
||||
case "op_True":
|
||||
operatorName = "true";
|
||||
break;
|
||||
case "op_False":
|
||||
operatorName = "false";
|
||||
break;
|
||||
default:
|
||||
var match = CheckedRegex().Match(methodName);
|
||||
if (match.Success)
|
||||
{
|
||||
TryGetOperatorSymbolFromName($"op_{match.Groups[1]}", out var uncheckedName);
|
||||
operatorName = $"checked {uncheckedName}";
|
||||
break;
|
||||
}
|
||||
operatorName = methodName;
|
||||
success = false;
|
||||
break;
|
||||
}
|
||||
return success;
|
||||
operatorName = opName;
|
||||
return true;
|
||||
}
|
||||
|
||||
var methodName = symbol.GetName(useMetadataName: false);
|
||||
return TryGetOperatorSymbolFromName(methodName, out operatorName);
|
||||
// Attempt to parse using a regexp.
|
||||
var match = OperatorRegex().Match(methodName);
|
||||
if (match.Success && methodToOperator.TryGetValue($"op_{match.Groups[2]}", out var rawOperatorName))
|
||||
{
|
||||
var prefix = match.Groups[1].Success ? "checked " : "";
|
||||
var postfix = match.Groups[3].Success ? "=" : "";
|
||||
operatorName = $"{prefix}{rawOperatorName}{postfix}";
|
||||
return true;
|
||||
}
|
||||
|
||||
operatorName = methodName;
|
||||
return false;
|
||||
}
|
||||
|
||||
[GeneratedRegex("^op_Checked(.*)$")]
|
||||
private static partial Regex CheckedRegex();
|
||||
[GeneratedRegex("^op_(Checked)?(.*?)(Assignment)?$")]
|
||||
private static partial Regex OperatorRegex();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -228,6 +228,41 @@ namespace Semmle.Extraction.CSharp.Entities
|
||||
return Literal.CreateGenerated(cx, parent, childIndex, type, defaultValue, location);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Given an expression syntax node, attempt to resolve the target method symbol for it.
|
||||
/// The operation takes extension methods into account.
|
||||
/// </summary>
|
||||
/// <param name="node">The expression syntax node.</param>
|
||||
/// <returns>Returns the target method symbol, or null if it cannot be resolved.</returns>
|
||||
protected IMethodSymbol? GetTargetSymbol(ExpressionSyntax node)
|
||||
{
|
||||
var si = Context.GetSymbolInfo(node);
|
||||
if (si.Symbol is ISymbol symbol)
|
||||
{
|
||||
var method = symbol as IMethodSymbol;
|
||||
// Case for compiler-generated extension methods.
|
||||
return method?.TryGetExtensionMethod() ?? method;
|
||||
}
|
||||
|
||||
if (si.CandidateReason == CandidateReason.OverloadResolutionFailure && node is InvocationExpressionSyntax syntax)
|
||||
{
|
||||
// This seems to be a bug in Roslyn
|
||||
// For some reason, typeof(X).InvokeMember(...) fails to resolve the correct
|
||||
// InvokeMember() method, even though the number of parameters clearly identifies the correct method
|
||||
|
||||
var candidates = si.CandidateSymbols
|
||||
.OfType<IMethodSymbol>()
|
||||
.Where(method => method.Parameters.Length >= syntax.ArgumentList.Arguments.Count)
|
||||
.Where(method => method.Parameters.Count(p => !p.HasExplicitDefaultValue) <= syntax.ArgumentList.Arguments.Count);
|
||||
|
||||
return Context.ExtractionContext.IsStandalone ?
|
||||
candidates.FirstOrDefault() :
|
||||
candidates.SingleOrDefault();
|
||||
}
|
||||
|
||||
return si.Symbol as IMethodSymbol;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adapt the operator kind depending on whether it's a dynamic call or a user-operator call.
|
||||
/// </summary>
|
||||
@@ -244,10 +279,10 @@ namespace Semmle.Extraction.CSharp.Entities
|
||||
/// name if available.
|
||||
/// </summary>
|
||||
/// <param name="node">The expression.</param>
|
||||
public void OperatorCall(TextWriter trapFile, ExpressionSyntax node)
|
||||
public void AddOperatorCall(TextWriter trapFile, ExpressionSyntax node)
|
||||
{
|
||||
var @operator = Context.GetSymbolInfo(node);
|
||||
if (@operator.Symbol is IMethodSymbol method)
|
||||
var @operator = GetTargetSymbol(node);
|
||||
if (@operator is IMethodSymbol method)
|
||||
{
|
||||
var callType = GetCallType(Context, node);
|
||||
if (callType == CallType.Dynamic)
|
||||
|
||||
@@ -24,10 +24,9 @@ namespace Semmle.Extraction.CSharp.Entities.Expressions
|
||||
{
|
||||
Create(Context, Syntax.Left, this, 0);
|
||||
Create(Context, Syntax.Right, this, 1);
|
||||
|
||||
if (Kind != ExprKind.SIMPLE_ASSIGN && Kind != ExprKind.ASSIGN_COALESCE)
|
||||
{
|
||||
OperatorCall(trapFile, Syntax);
|
||||
AddOperatorCall(trapFile, Syntax);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Semmle.Extraction.CSharp.Entities.Expressions
|
||||
|
||||
protected override void PopulateExpression(TextWriter trapFile)
|
||||
{
|
||||
OperatorCall(trapFile, Syntax);
|
||||
AddOperatorCall(trapFile, Syntax);
|
||||
CreateDeferred(Context, Syntax.Left, 0);
|
||||
CreateDeferred(Context, Syntax.Right, 1);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Semmle.Extraction.CSharp.Entities.Expressions
|
||||
else
|
||||
{
|
||||
// Type conversion
|
||||
OperatorCall(trapFile, Syntax);
|
||||
AddOperatorCall(trapFile, Syntax);
|
||||
TypeMention.Create(Context, Syntax.Type, this, Type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace Semmle.Extraction.CSharp.Entities.Expressions
|
||||
|
||||
var child = -1;
|
||||
string? memberName = null;
|
||||
var target = TargetSymbol;
|
||||
var target = GetTargetSymbol(Syntax);
|
||||
switch (Syntax.Expression)
|
||||
{
|
||||
case MemberAccessExpressionSyntax memberAccess when IsValidMemberAccessKind():
|
||||
@@ -129,39 +129,6 @@ namespace Semmle.Extraction.CSharp.Entities.Expressions
|
||||
method.TryGetExtensionMethod()?.MethodKind == MethodKind.UserDefinedOperator;
|
||||
}
|
||||
|
||||
public IMethodSymbol? TargetSymbol
|
||||
{
|
||||
get
|
||||
{
|
||||
var si = SymbolInfo;
|
||||
|
||||
if (si.Symbol is ISymbol symbol)
|
||||
{
|
||||
var method = symbol as IMethodSymbol;
|
||||
// Case for compiler-generated extension methods.
|
||||
return method?.TryGetExtensionMethod() ?? method;
|
||||
}
|
||||
|
||||
if (si.CandidateReason == CandidateReason.OverloadResolutionFailure)
|
||||
{
|
||||
// This seems to be a bug in Roslyn
|
||||
// For some reason, typeof(X).InvokeMember(...) fails to resolve the correct
|
||||
// InvokeMember() method, even though the number of parameters clearly identifies the correct method
|
||||
|
||||
var candidates = si.CandidateSymbols
|
||||
.OfType<IMethodSymbol>()
|
||||
.Where(method => method.Parameters.Length >= Syntax.ArgumentList.Arguments.Count)
|
||||
.Where(method => method.Parameters.Count(p => !p.HasExplicitDefaultValue) <= Syntax.ArgumentList.Arguments.Count);
|
||||
|
||||
return Context.ExtractionContext.IsStandalone ?
|
||||
candidates.FirstOrDefault() :
|
||||
candidates.SingleOrDefault();
|
||||
}
|
||||
|
||||
return si.Symbol as IMethodSymbol;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool IsDelegateLikeCall(ExpressionNodeInfo info)
|
||||
{
|
||||
return IsDelegateLikeCall(info, symbol => IsFunctionPointer(symbol) || IsDelegateInvoke(symbol));
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Semmle.Extraction.CSharp.Entities.Expressions
|
||||
if ((operatorKind == ExprKind.POST_INCR || operatorKind == ExprKind.POST_DECR) &&
|
||||
Kind == ExprKind.OPERATOR_INVOCATION)
|
||||
{
|
||||
OperatorCall(trapFile, Syntax);
|
||||
AddOperatorCall(trapFile, Syntax);
|
||||
trapFile.mutator_invocation_mode(this, 2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Semmle.Extraction.CSharp.Entities.Expressions
|
||||
protected override void PopulateExpression(TextWriter trapFile)
|
||||
{
|
||||
Create(Context, Syntax.Operand, this, 0);
|
||||
OperatorCall(trapFile, Syntax);
|
||||
AddOperatorCall(trapFile, Syntax);
|
||||
|
||||
if ((operatorKind == ExprKind.PRE_INCR || operatorKind == ExprKind.PRE_DECR) &&
|
||||
Kind == ExprKind.OPERATOR_INVOCATION)
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
## 1.7.66
|
||||
|
||||
No user-facing changes.
|
||||
|
||||
## 1.7.65
|
||||
|
||||
No user-facing changes.
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
## 1.7.66
|
||||
|
||||
No user-facing changes.
|
||||
@@ -1,2 +1,2 @@
|
||||
---
|
||||
lastReleaseVersion: 1.7.65
|
||||
lastReleaseVersion: 1.7.66
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: codeql/csharp-solorigate-all
|
||||
version: 1.7.65
|
||||
version: 1.7.67-dev
|
||||
groups:
|
||||
- csharp
|
||||
- solorigate
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
## 1.7.66
|
||||
|
||||
No user-facing changes.
|
||||
|
||||
## 1.7.65
|
||||
|
||||
No user-facing changes.
|
||||
|
||||
@@ -13,11 +13,13 @@ import csharp
|
||||
import Solorigate
|
||||
import experimental.code.csharp.Cryptography.NonCryptographicHashes
|
||||
|
||||
ControlFlowNode loopExitNode(LoopStmt loop) { result.isAfter(loop) }
|
||||
|
||||
from Variable v, Literal l, LoopStmt loop, Expr additional_xor
|
||||
where
|
||||
maybeUsedInFnvFunction(v, _, _, loop) and
|
||||
exists(BitwiseXorOperation xor2 | xor2.getAnOperand() = l and additional_xor = xor2 |
|
||||
loop.getAControlFlowExitNode().getASuccessor*() = xor2.getAControlFlowNode() and
|
||||
loopExitNode(loop).getASuccessor*() = xor2.getControlFlowNode() and
|
||||
xor2.getAnOperand() = v.getAnAccess()
|
||||
)
|
||||
select l, "This literal is used in an $@ after an FNV-like hash calculation with variable $@.",
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
## 1.7.66
|
||||
|
||||
No user-facing changes.
|
||||
@@ -1,2 +1,2 @@
|
||||
---
|
||||
lastReleaseVersion: 1.7.65
|
||||
lastReleaseVersion: 1.7.66
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: codeql/csharp-solorigate-queries
|
||||
version: 1.7.65
|
||||
version: 1.7.67-dev
|
||||
groups:
|
||||
- csharp
|
||||
- solorigate
|
||||
|
||||
@@ -1,5 +1,2 @@
|
||||
import csharp
|
||||
import semmle.code.csharp.controlflow.internal.Completion
|
||||
import ControlFlow
|
||||
import semmle.code.csharp.controlflow.internal.ControlFlowGraphImpl::Consistency
|
||||
import semmle.code.csharp.controlflow.internal.Splitting
|
||||
import ControlFlow::Consistency
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import csharp
|
||||
private import semmle.code.csharp.controlflow.internal.ControlFlowGraphImpl as ControlFlowGraphImpl
|
||||
private import semmle.code.csharp.dataflow.internal.DataFlowImplSpecific
|
||||
private import semmle.code.csharp.dataflow.internal.TaintTrackingImplSpecific
|
||||
private import codeql.dataflow.internal.DataFlowImplConsistency
|
||||
@@ -7,20 +6,6 @@ private import codeql.dataflow.internal.DataFlowImplConsistency
|
||||
private module Input implements InputSig<Location, CsharpDataFlow> {
|
||||
private import CsharpDataFlow
|
||||
|
||||
private predicate isStaticAssignable(Assignable a) { a.(Modifiable).isStatic() }
|
||||
|
||||
predicate uniqueEnclosingCallableExclude(Node node) {
|
||||
// TODO: Remove once static initializers are folded into the
|
||||
// static constructors
|
||||
isStaticAssignable(ControlFlowGraphImpl::getNodeCfgScope(node.getControlFlowNode()))
|
||||
}
|
||||
|
||||
predicate uniqueCallEnclosingCallableExclude(DataFlowCall call) {
|
||||
// TODO: Remove once static initializers are folded into the
|
||||
// static constructors
|
||||
isStaticAssignable(ControlFlowGraphImpl::getNodeCfgScope(call.getControlFlowNode()))
|
||||
}
|
||||
|
||||
predicate uniqueNodeLocationExclude(Node n) {
|
||||
// Methods with multiple implementations
|
||||
n instanceof ParameterNode
|
||||
@@ -70,17 +55,14 @@ private module Input implements InputSig<Location, CsharpDataFlow> {
|
||||
init.getInitializer().getNumberOfChildren() > 1
|
||||
)
|
||||
or
|
||||
exists(ControlFlow::Nodes::ElementNode cfn, ControlFlow::Nodes::Split split |
|
||||
exists(arg.asExprAtNode(cfn))
|
||||
|
|
||||
split = cfn.getASplit() and
|
||||
not split = call.getControlFlowNode().getASplit()
|
||||
or
|
||||
split = call.getControlFlowNode().getASplit() and
|
||||
not split = cfn.getASplit()
|
||||
)
|
||||
or
|
||||
call.(NonDelegateDataFlowCall).getDispatchCall().isReflection()
|
||||
or
|
||||
// Exclude calls that are both getter and setter calls, as they share the same argument nodes.
|
||||
exists(AccessorCall ac |
|
||||
call.(NonDelegateDataFlowCall).getDispatchCall().getCall() = ac and
|
||||
ac instanceof AssignableRead and
|
||||
ac instanceof AssignableWrite
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,8 +7,8 @@ query predicate localDeclWithSsaDef(LocalVariableDeclExpr d) {
|
||||
// Local variables in C# must be initialized before every use, so uninitialized
|
||||
// local variables should not have an SSA definition, as that would imply that
|
||||
// the declaration is live (can reach a use without passing through a definition)
|
||||
exists(ExplicitDefinition def |
|
||||
d = def.getADefinition().(AssignableDefinitions::LocalVariableDefinition).getDeclaration()
|
||||
exists(SsaExplicitWrite def |
|
||||
d = def.getDefinition().(AssignableDefinitions::LocalVariableDefinition).getDeclaration()
|
||||
|
|
||||
not d = any(ForeachStmt fs).getVariableDeclExpr() and
|
||||
not d = any(SpecificCatchClause scc).getVariableDeclExpr() and
|
||||
|
||||
@@ -1,13 +1,6 @@
|
||||
import csharp
|
||||
import semmle.code.csharp.dataflow.internal.DataFlowPrivate::VariableCapture::Flow::ConsistencyChecks
|
||||
private import semmle.code.csharp.dataflow.internal.DataFlowPrivate::VariableCapture::Flow::ConsistencyChecks as ConsistencyChecks
|
||||
private import semmle.code.csharp.controlflow.BasicBlocks
|
||||
private import semmle.code.csharp.controlflow.internal.ControlFlowGraphImpl
|
||||
|
||||
query predicate uniqueEnclosingCallable(BasicBlock bb, string msg) {
|
||||
ConsistencyChecks::uniqueEnclosingCallable(bb, msg) and
|
||||
getNodeCfgScope(bb.getFirstNode()) instanceof Callable
|
||||
}
|
||||
|
||||
query predicate consistencyOverview(string msg, int n) { none() }
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
| All NuGet feeds reachable | 1.0 |
|
||||
| Failed project restore with missing package error | 0.0 |
|
||||
| Failed project restore with package source error | 0.0 |
|
||||
| Failed solution restore with missing package error | 0.0 |
|
||||
| Failed solution restore with package source error | 0.0 |
|
||||
| Inherited NuGet feed count | 1.0 |
|
||||
| NuGet feed responsiveness checked | 1.0 |
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
| All NuGet feeds reachable | 1.0 |
|
||||
| Failed project restore with missing package error | 0.0 |
|
||||
| Failed project restore with package source error | 0.0 |
|
||||
| Failed solution restore with missing package error | 0.0 |
|
||||
| Failed solution restore with package source error | 0.0 |
|
||||
| Inherited NuGet feed count | 1.0 |
|
||||
| NuGet feed responsiveness checked | 1.0 |
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
| All NuGet feeds reachable | 1.0 |
|
||||
| Failed project restore with missing package error | 0.0 |
|
||||
| Failed project restore with package source error | 0.0 |
|
||||
| Failed solution restore with missing package error | 0.0 |
|
||||
| Failed solution restore with package source error | 0.0 |
|
||||
| Inherited NuGet feed count | 1.0 |
|
||||
| NuGet feed responsiveness checked | 1.0 |
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
| test-db/working/packages/newtonsoft.json/13.0.4/lib/net6.0/Newtonsoft.Json.dll:0:0:0:0 | Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed |
|
||||
@@ -0,0 +1,5 @@
|
||||
import csharp
|
||||
|
||||
from Assembly a
|
||||
where exists(a.getFile().getAbsolutePath().indexOf("newtonsoft.json"))
|
||||
select a
|
||||
@@ -0,0 +1,22 @@
|
||||
| All NuGet feeds reachable | 1.0 |
|
||||
| Failed project restore with missing package error | 0.0 |
|
||||
| Failed project restore with package source error | 0.0 |
|
||||
| Failed solution restore with missing package error | 0.0 |
|
||||
| Failed solution restore with package source error | 0.0 |
|
||||
| Inherited NuGet feed count | 1.0 |
|
||||
| NuGet feed responsiveness checked | 1.0 |
|
||||
| Project files on filesystem | 1.0 |
|
||||
| Reachable fallback NuGet feed count | 1.0 |
|
||||
| Resolved assembly conflicts | 0.0 |
|
||||
| Resource extraction enabled | 0.0 |
|
||||
| Restored .NET framework variants | 1.0 |
|
||||
| Restored projects through solution files | 0.0 |
|
||||
| Solution files on filesystem | 0.0 |
|
||||
| Source files generated | 0.0 |
|
||||
| Source files on filesystem | 1.0 |
|
||||
| Successfully restored project files | 1.0 |
|
||||
| Successfully restored solution files | 0.0 |
|
||||
| Unresolved references | 0.0 |
|
||||
| UseWPF set | 0.0 |
|
||||
| UseWindowsForms set | 0.0 |
|
||||
| WebView extraction enabled | 1.0 |
|
||||
@@ -0,0 +1,15 @@
|
||||
import csharp
|
||||
import semmle.code.csharp.commons.Diagnostics
|
||||
|
||||
query predicate compilationInfo(string key, float value) {
|
||||
key != "Resolved references" and
|
||||
not key.matches("Compiler diagnostic count for%") and
|
||||
exists(Compilation c, string infoKey, string infoValue | infoValue = c.getInfo(infoKey) |
|
||||
key = infoKey and
|
||||
value = infoValue.toFloat()
|
||||
or
|
||||
not exists(infoValue.toFloat()) and
|
||||
key = infoKey + ": " + infoValue and
|
||||
value = 1
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<clear />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"sdk": {
|
||||
"version": "10.0.201"
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user