mirror of
https://github.com/github/codeql-action.git
synced 2025-12-31 03:30:14 +08:00
Compare commits
592 Commits
codeql-bun
...
v3.29.9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
df559355d5 | ||
|
|
53f255b421 | ||
|
|
cc722e476f | ||
|
|
a4cd8fd036 | ||
|
|
542b274f93 | ||
|
|
1a376ca348 | ||
|
|
9f966bbbf5 | ||
|
|
c6dcdfa33a | ||
|
|
821d3bd162 | ||
|
|
bf1dd6901d | ||
|
|
286b9e9d74 | ||
|
|
2d7401b887 | ||
|
|
f45dfa6abd | ||
|
|
efcb415657 | ||
|
|
be99c61783 | ||
|
|
28f2516040 | ||
|
|
916d5bdef0 | ||
|
|
5b6f1d22a1 | ||
|
|
e47147711b | ||
|
|
baac9295dc | ||
|
|
57f4ac5c1b | ||
|
|
8dbcef50df | ||
|
|
ee698cb5ba | ||
|
|
bc9c32ed0b | ||
|
|
ee7cacdb6b | ||
|
|
ed9d057cde | ||
|
|
c47e1541d8 | ||
|
|
9d202e0975 | ||
|
|
ad19982a1f | ||
|
|
a71ebf32ea | ||
|
|
da8dabf356 | ||
|
|
6504a72ad7 | ||
|
|
f3997c21f2 | ||
|
|
1ae99dedc6 | ||
|
|
4474150eef | ||
|
|
84973f707e | ||
|
|
01992a9420 | ||
|
|
5fabbc2b0d | ||
|
|
c9d51abc0b | ||
|
|
1afa0e7463 | ||
|
|
8cec93ae81 | ||
|
|
9ec8453e11 | ||
|
|
76621b61de | ||
|
|
29ac3cefbb | ||
|
|
737cfdebe6 | ||
|
|
679a40d337 | ||
|
|
6fe50b283a | ||
|
|
6bc91d64f6 | ||
|
|
6b4fedca4f | ||
|
|
5794ffcb4a | ||
|
|
bd62bf449c | ||
|
|
2afb4e6f3c | ||
|
|
1fd38a4712 | ||
|
|
bf301d1b77 | ||
|
|
2ee230f7c4 | ||
|
|
3425bf931d | ||
|
|
ddc8e21357 | ||
|
|
afbbdf51df | ||
|
|
e1be6ef300 | ||
|
|
3c7d12c160 | ||
|
|
a4e1a019f5 | ||
|
|
4a32399f5f | ||
|
|
c587f0a77d | ||
|
|
8e6104d51e | ||
|
|
67a6ea72bf | ||
|
|
588ff737e7 | ||
|
|
239ed87059 | ||
|
|
8c8bdce638 | ||
|
|
b7beff905a | ||
|
|
6422cf7859 | ||
|
|
eddeaf42e5 | ||
|
|
739fb03359 | ||
|
|
bb56324516 | ||
|
|
bc90418e92 | ||
|
|
f28436bcbf | ||
|
|
f8c2086872 | ||
|
|
c7884c6fd8 | ||
|
|
a625e1693a | ||
|
|
5e22b5feee | ||
|
|
0d72a5b371 | ||
|
|
43638b10a0 | ||
|
|
1cfc0c2621 | ||
|
|
7b33b610d4 | ||
|
|
e2b6f0f4a3 | ||
|
|
ec8d9c637a | ||
|
|
6db9524876 | ||
|
|
ae2a79254b | ||
|
|
2d082457bf | ||
|
|
594623d72f | ||
|
|
e448add687 | ||
|
|
1b76c0b9c1 | ||
|
|
b1228d060c | ||
|
|
c87fc48ec5 | ||
|
|
9fb8f2d0c2 | ||
|
|
72770345eb | ||
|
|
f5d3601aaa | ||
|
|
06e521573a | ||
|
|
60bf7dfc0e | ||
|
|
f30d00fe8d | ||
|
|
377976a96e | ||
|
|
ea05bf27b6 | ||
|
|
e682065360 | ||
|
|
fa18cc9db4 | ||
|
|
bf692c08e7 | ||
|
|
83e92edc4b | ||
|
|
bbfff2f20a | ||
|
|
cfb8d07200 | ||
|
|
87e59d0f95 | ||
|
|
c481481d7d | ||
|
|
e37c03628f | ||
|
|
563cbbb24d | ||
|
|
443f94c758 | ||
|
|
a5cdb299bc | ||
|
|
5547ed31c9 | ||
|
|
69ccd54e34 | ||
|
|
a3810fa54b | ||
|
|
a28b9b5e2f | ||
|
|
fff9bbe33f | ||
|
|
cfa0a4e416 | ||
|
|
f9d6919415 | ||
|
|
e95a3a9768 | ||
|
|
7273f08caa | ||
|
|
b9b3b12fa2 | ||
|
|
20c7f06b9a | ||
|
|
acdac9e37d | ||
|
|
1a4f45d622 | ||
|
|
297691ddab | ||
|
|
51f77329af | ||
|
|
8e90243ddb | ||
|
|
0521b5facf | ||
|
|
84720e2ef6 | ||
|
|
80a09d7b0b | ||
|
|
8388115dc8 | ||
|
|
401ecaf503 | ||
|
|
45f48a349a | ||
|
|
ab5c0c5fa5 | ||
|
|
cd264d4dcd | ||
|
|
4599055b1e | ||
|
|
fd7ad511e6 | ||
|
|
ac0c9bfe1e | ||
|
|
88d99b3033 | ||
|
|
409486919c | ||
|
|
abbda19c1d | ||
|
|
eb90c18c83 | ||
|
|
12e4b97fba | ||
|
|
264ce42cbb | ||
|
|
d8be08468e | ||
|
|
9b6aeca680 | ||
|
|
a005f73253 | ||
|
|
701df0e49d | ||
|
|
06bb1e016c | ||
|
|
264c5cf3c9 | ||
|
|
4e828ff8d4 | ||
|
|
b3114b8965 | ||
|
|
37264dc0b3 | ||
|
|
5a29823d01 | ||
|
|
5a2327a6fd | ||
|
|
287d421cf3 | ||
|
|
43afe6ec0b | ||
|
|
0f549a757b | ||
|
|
f67ceea75b | ||
|
|
8f2e63676d | ||
|
|
76bf77db0b | ||
|
|
9e7d13dd99 | ||
|
|
2b952be91d | ||
|
|
48ce740f61 | ||
|
|
4749491b98 | ||
|
|
b7a5452764 | ||
|
|
20477a3fe1 | ||
|
|
eefe1b5db9 | ||
|
|
b6332872af | ||
|
|
8e442bc480 | ||
|
|
a7cb1b8b39 | ||
|
|
b195e1bfc6 | ||
|
|
df82387698 | ||
|
|
d6bbdef45e | ||
|
|
210cc9bfa2 | ||
|
|
39b0524b50 | ||
|
|
c3bbcab41b | ||
|
|
e37b293334 | ||
|
|
19075c4376 | ||
|
|
7710ed11e3 | ||
|
|
6a49a8cbce | ||
|
|
3aef4108d1 | ||
|
|
614b64c6ec | ||
|
|
aefb854fe5 | ||
|
|
03a2a17e75 | ||
|
|
07455ed3c3 | ||
|
|
3fb562ddcc | ||
|
|
709cf22a66 | ||
|
|
3eaefb4deb | ||
|
|
e30db30685 | ||
|
|
0d17ea4843 | ||
|
|
38fdaed818 | ||
|
|
37e3c3113a | ||
|
|
15605b194f | ||
|
|
0b8d278f47 | ||
|
|
ca53360d04 | ||
|
|
bbf184bd4c | ||
|
|
b419190c59 | ||
|
|
0c2ac60444 | ||
|
|
6f936b5c2d | ||
|
|
c6a6c1490f | ||
|
|
4e20239e7b | ||
|
|
59d67fc4bf | ||
|
|
b37e7e2c5d | ||
|
|
90d7727554 | ||
|
|
fb771764cb | ||
|
|
d799ff5e6a | ||
|
|
9f70a5fc86 | ||
|
|
55cb6b8b94 | ||
|
|
4bdb7fe04f | ||
|
|
64fce5856f | ||
|
|
fe7205c739 | ||
|
|
4cd7a721f7 | ||
|
|
f4358b38d1 | ||
|
|
f53ec7c550 | ||
|
|
624d0bca90 | ||
|
|
ec836d6b8a | ||
|
|
95a1b7e2bf | ||
|
|
8c5122ea75 | ||
|
|
aafbeb29bc | ||
|
|
6a51e635a5 | ||
|
|
42835b3971 | ||
|
|
2fc04c80cc | ||
|
|
b95402dae1 | ||
|
|
6ca06f41c4 | ||
|
|
d42ce71087 | ||
|
|
b4425372ef | ||
|
|
93e8729640 | ||
|
|
da758dc0cd | ||
|
|
60a2a7d623 | ||
|
|
a336faa497 | ||
|
|
ee8a8c4e0b | ||
|
|
9022c7382c | ||
|
|
b69421388d | ||
|
|
33f84897c3 | ||
|
|
612df8d91c | ||
|
|
dcc1a6637b | ||
|
|
144d3b8f62 | ||
|
|
6881d2cdc1 | ||
|
|
181d5eefc2 | ||
|
|
c77386a9db | ||
|
|
8d43d4ecec | ||
|
|
9281048a40 | ||
|
|
6b83dc33ed | ||
|
|
ca0540d370 | ||
|
|
e9938e34d5 | ||
|
|
4c57370d03 | ||
|
|
2830b750e5 | ||
|
|
aa72ddaead | ||
|
|
65d1e45f0b | ||
|
|
362ebf85da | ||
|
|
10a3e4b17d | ||
|
|
8593ea65e2 | ||
|
|
3e95091e3b | ||
|
|
7b3d150883 | ||
|
|
2e3a72539c | ||
|
|
baf20c9b52 | ||
|
|
39edc492db | ||
|
|
27c4fb1eef | ||
|
|
428aea55f5 | ||
|
|
973250f3d2 | ||
|
|
ad6046ff97 | ||
|
|
9ec0bb9605 | ||
|
|
8ef17824cf | ||
|
|
08955dbc0d | ||
|
|
71dd63398f | ||
|
|
27db6cb5d6 | ||
|
|
768fc170da | ||
|
|
79049d92c6 | ||
|
|
e382508853 | ||
|
|
2c76207fa4 | ||
|
|
83de9b082b | ||
|
|
f3bfb98603 | ||
|
|
2b4afc20b6 | ||
|
|
86f47e8b74 | ||
|
|
9b9286a835 | ||
|
|
af32bc6d6f | ||
|
|
51891595a7 | ||
|
|
f7fbaa019f | ||
|
|
9b02dc2f60 | ||
|
|
7ab92d0295 | ||
|
|
2cae828745 | ||
|
|
6b78c6eca2 | ||
|
|
f7258be256 | ||
|
|
35083eedc1 | ||
|
|
80e2dc47d8 | ||
|
|
2e3b93fe41 | ||
|
|
bbfc5bef5b | ||
|
|
6abacdb184 | ||
|
|
f1834221f2 | ||
|
|
45b3bec064 | ||
|
|
22444a650f | ||
|
|
320f7b0fd6 | ||
|
|
3a7544ea8f | ||
|
|
aba8788d12 | ||
|
|
3963bf423a | ||
|
|
6e22e41a25 | ||
|
|
0cec254fa1 | ||
|
|
6a3692d673 | ||
|
|
9ee60a6e32 | ||
|
|
cce0287569 | ||
|
|
e044b152ab | ||
|
|
46cafbca67 | ||
|
|
fcd0ad43d5 | ||
|
|
c55fb0ab89 | ||
|
|
37a3fcc3af | ||
|
|
7ca4105454 | ||
|
|
286556a968 | ||
|
|
e8ad3afb1e | ||
|
|
0180811a94 | ||
|
|
6b9b66d6f9 | ||
|
|
ac30a39d8c | ||
|
|
66d72553a2 | ||
|
|
65abb79a75 | ||
|
|
0b8d151adc | ||
|
|
f5304e7bf5 | ||
|
|
1764e3d1c2 | ||
|
|
ef36b69c6d | ||
|
|
4cb21ac46b | ||
|
|
dee9f91810 | ||
|
|
3de706a4a3 | ||
|
|
0fb9447fd1 | ||
|
|
6b66390454 | ||
|
|
22b1968d7c | ||
|
|
7e3bc059bb | ||
|
|
f4c96f59d9 | ||
|
|
87c547189e | ||
|
|
f10997b601 | ||
|
|
8f71d47b93 | ||
|
|
ece6bb6fe7 | ||
|
|
3f8ca3519d | ||
|
|
04b73050b2 | ||
|
|
2847b7f7ab | ||
|
|
3c60275a04 | ||
|
|
be30325fa6 | ||
|
|
429b71ea4b | ||
|
|
3d4b4d2241 | ||
|
|
bbab10229f | ||
|
|
de1f97ca1d | ||
|
|
e74e30ba7f | ||
|
|
466d6ce584 | ||
|
|
853b3397ce | ||
|
|
eaadd985c8 | ||
|
|
ce28f5bb42 | ||
|
|
bc251b7932 | ||
|
|
e8799281c8 | ||
|
|
efd43b3097 | ||
|
|
7cb9b16051 | ||
|
|
3855117ba1 | ||
|
|
f5d4e2a7ca | ||
|
|
22deae890c | ||
|
|
df2a830ca4 | ||
|
|
b1e4dc3db5 | ||
|
|
72be4b6df6 | ||
|
|
1eab40885f | ||
|
|
075e08aca6 | ||
|
|
be60d9f5f9 | ||
|
|
a28627ae8f | ||
|
|
fca7ace96b | ||
|
|
1dcd2bebbb | ||
|
|
313daefcef | ||
|
|
55ff016766 | ||
|
|
4a00331d4e | ||
|
|
c0a821da11 | ||
|
|
d6216866b4 | ||
|
|
dc138d4f51 | ||
|
|
a28197c30c | ||
|
|
1d22e8316c | ||
|
|
932be8feda | ||
|
|
e303175b83 | ||
|
|
fa0b6fff20 | ||
|
|
3b57965c44 | ||
|
|
3201e46e26 | ||
|
|
d54c5e2206 | ||
|
|
36121ec458 | ||
|
|
7419bc61b3 | ||
|
|
c7f3c79ac0 | ||
|
|
0be24c0c9a | ||
|
|
fb70a8a3d6 | ||
|
|
7fd62151d9 | ||
|
|
31eae5e821 | ||
|
|
bc02a25f64 | ||
|
|
1a67b5df99 | ||
|
|
97fbf51190 | ||
|
|
eaed21baf2 | ||
|
|
655a969b7c | ||
|
|
3934d2b758 | ||
|
|
0abe43cb59 | ||
|
|
83a4df546f | ||
|
|
7b0fb5a4ac | ||
|
|
23262aef80 | ||
|
|
5239ab193d | ||
|
|
bcaa06bbb4 | ||
|
|
b63847bb99 | ||
|
|
54a7f3b869 | ||
|
|
ba7fabd835 | ||
|
|
cae4996048 | ||
|
|
566c8dfa81 | ||
|
|
396fd27c30 | ||
|
|
57eebf61a2 | ||
|
|
4428f8e35c | ||
|
|
655a335537 | ||
|
|
ff0a06e83c | ||
|
|
a41e0844be | ||
|
|
99ec5f3dd6 | ||
|
|
c07c4ee026 | ||
|
|
b86edfc27a | ||
|
|
e93b90025f | ||
|
|
510dfa3460 | ||
|
|
492d783245 | ||
|
|
83bdf3b7f9 | ||
|
|
cffc916774 | ||
|
|
4420887272 | ||
|
|
4e178c5841 | ||
|
|
05446e4bbf | ||
|
|
bb9fc01aa6 | ||
|
|
3dce55ac70 | ||
|
|
bacf5fe7c2 | ||
|
|
15f19ac220 | ||
|
|
f7ab654551 | ||
|
|
2f70a988e7 | ||
|
|
f681ad69a7 | ||
|
|
15447f393e | ||
|
|
ded79fc5fd | ||
|
|
77ae18dc82 | ||
|
|
df7d681f04 | ||
|
|
15bce5bb14 | ||
|
|
c64095f75e | ||
|
|
07dbe6f6f7 | ||
|
|
3d97729508 | ||
|
|
d5e9ae3f8b | ||
|
|
c41b278fa8 | ||
|
|
7657741c79 | ||
|
|
5eb3ed6614 | ||
|
|
213a8a5a44 | ||
|
|
c46165d67e | ||
|
|
60168efe1c | ||
|
|
0d5a3115da | ||
|
|
97a2bfd2a3 | ||
|
|
9aba20e4c9 | ||
|
|
81a9508deb | ||
|
|
1569f4c145 | ||
|
|
62fbeb66b3 | ||
|
|
f122d1dc9e | ||
|
|
083772aae4 | ||
|
|
5db14d0471 | ||
|
|
40e16edda1 | ||
|
|
3ca9a88941 | ||
|
|
ed51cb5abd | ||
|
|
8ccb6b16a6 | ||
|
|
1817a33c8b | ||
|
|
6893d12604 | ||
|
|
83605b3ce2 | ||
|
|
6a3cfab0e9 | ||
|
|
4b7eecf8a7 | ||
|
|
018ac1a585 | ||
|
|
6ad5d99ccc | ||
|
|
f843d94177 | ||
|
|
2264a4ecc1 | ||
|
|
d3b65fcaf0 | ||
|
|
eea52ddc4e | ||
|
|
6ef9b921b1 | ||
|
|
4ffa2364a0 | ||
|
|
7e00290d34 | ||
|
|
259434501f | ||
|
|
28deaeda66 | ||
|
|
03c5d71c11 | ||
|
|
2a8cbadc02 | ||
|
|
95d52b7807 | ||
|
|
c9f0d30a86 | ||
|
|
f76eaf51a6 | ||
|
|
e63b3f5166 | ||
|
|
c0cffae534 | ||
|
|
7eaba0dbc6 | ||
|
|
a3e50f3d11 | ||
|
|
d1c7d49753 | ||
|
|
4c3e536282 | ||
|
|
56dd02f26d | ||
|
|
192406dd84 | ||
|
|
c7dbb2084e | ||
|
|
9a45cd8c50 | ||
|
|
d26c46acea | ||
|
|
51c83e1588 | ||
|
|
8774e3f945 | ||
|
|
45775bd823 | ||
|
|
dd78aab407 | ||
|
|
e40af59174 | ||
|
|
a35ae8c380 | ||
|
|
5bddbeb2bf | ||
|
|
c7102cdca1 | ||
|
|
a1ca4846bc | ||
|
|
bb59df6c17 | ||
|
|
4b508f5964 | ||
|
|
ca00afb5f1 | ||
|
|
2969c78ce0 | ||
|
|
fc7e4a0fa0 | ||
|
|
be0175c800 | ||
|
|
a8be43c24e | ||
|
|
94102d99b0 | ||
|
|
fd8685f16e | ||
|
|
56feaac968 | ||
|
|
362ef4ce20 | ||
|
|
2b85c00718 | ||
|
|
41aa437638 | ||
|
|
92864f48b0 | ||
|
|
46fbf563e6 | ||
|
|
e13fe0dd2d | ||
|
|
4a19b5125b | ||
|
|
06703ce3e5 | ||
|
|
676a422916 | ||
|
|
498c7f37e8 | ||
|
|
efd29bef22 | ||
|
|
dab8a02091 | ||
|
|
10771737a9 | ||
|
|
17379bcd20 | ||
|
|
dbb232a3d8 | ||
|
|
4b72bef651 | ||
|
|
b53826d56d | ||
|
|
55ee663d5f | ||
|
|
a27e401674 | ||
|
|
a69f5113b7 | ||
|
|
b6f76bd566 | ||
|
|
01f1a1f2c9 | ||
|
|
efffb483ec | ||
|
|
f21cf0bbd7 | ||
|
|
72a2b1295e | ||
|
|
a022653e2d | ||
|
|
3c42562190 | ||
|
|
e4ca874973 | ||
|
|
e7f67e2e61 | ||
|
|
9f45e7498b | ||
|
|
73c938dbc0 | ||
|
|
2be6da694a | ||
|
|
76f9ed9cd9 | ||
|
|
71ab101d38 | ||
|
|
da967b1ade | ||
|
|
3c4533916b | ||
|
|
1994ea768e | ||
|
|
534bc63d5e | ||
|
|
3fbee52426 | ||
|
|
9bd18b486f | ||
|
|
0afd488dc1 | ||
|
|
c1fc897eb2 | ||
|
|
f88459c0a3 | ||
|
|
b22f3341fe | ||
|
|
486ab5a292 | ||
|
|
5275714183 | ||
|
|
08e5c8d618 | ||
|
|
be853de3b7 | ||
|
|
502426aa6b | ||
|
|
4cdde5c397 | ||
|
|
6ceaf4460c | ||
|
|
f15aac3db1 | ||
|
|
e149e39832 | ||
|
|
f313d62247 | ||
|
|
1b549b9259 | ||
|
|
82630c85f3 | ||
|
|
e0ea141027 | ||
|
|
b361a91508 | ||
|
|
bd1d9ab4ed | ||
|
|
b98ae6ca52 | ||
|
|
9825184a0a | ||
|
|
ac67cffe5c | ||
|
|
9c674ba4f5 | ||
|
|
d109dd5d33 | ||
|
|
3e5446c3d2 | ||
|
|
6adda79888 | ||
|
|
6be6984cc1 | ||
|
|
c50c157cc3 | ||
|
|
c74c378e29 | ||
|
|
d271bde0ec | ||
|
|
df9f80e0f0 | ||
|
|
46371933a7 | ||
|
|
ee6a063cbd | ||
|
|
5f8171a638 | ||
|
|
bb59f7707d | ||
|
|
8b0dccd066 | ||
|
|
6349095d19 | ||
|
|
d7d03fda12 | ||
|
|
4e3a5342c5 | ||
|
|
55f023701c | ||
|
|
6a151cd774 | ||
|
|
7866bcdb1b | ||
|
|
611289e0b0 | ||
|
|
4c409a5b66 | ||
|
|
251c7fdf5d | ||
|
|
afa3ed33bb | ||
|
|
f8367fb063 | ||
|
|
c7c9a57be6 | ||
|
|
c29cab9aac |
21
.github/actions/prepare-test/action.yml
vendored
21
.github/actions/prepare-test/action.yml
vendored
@@ -29,24 +29,27 @@ runs:
|
|||||||
- id: get-url
|
- id: get-url
|
||||||
name: Determine URL
|
name: Determine URL
|
||||||
shell: bash
|
shell: bash
|
||||||
|
env:
|
||||||
|
VERSION: ${{ inputs.version }}
|
||||||
|
USE_ALL_PLATFORM_BUNDLE: ${{ inputs.use-all-platform-bundle }}
|
||||||
run: |
|
run: |
|
||||||
set -e # Fail this Action if `gh release list` fails.
|
set -e # Fail this Action if `gh release list` fails.
|
||||||
|
|
||||||
if [[ ${{ inputs.version }} == "linked" ]]; then
|
if [[ "$VERSION" == "linked" ]]; then
|
||||||
echo "tools-url=linked" >> "$GITHUB_OUTPUT"
|
echo "tools-url=linked" >> "$GITHUB_OUTPUT"
|
||||||
exit 0
|
exit 0
|
||||||
elif [[ ${{ inputs.version }} == "default" ]]; then
|
elif [[ "$VERSION" == "default" ]]; then
|
||||||
echo "tools-url=" >> "$GITHUB_OUTPUT"
|
echo "tools-url=" >> "$GITHUB_OUTPUT"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ${{ inputs.version }} == "nightly-latest" && "$RUNNER_OS" != "Windows" ]]; then
|
if [[ "$VERSION" == "nightly-latest" && "$RUNNER_OS" != "Windows" ]]; then
|
||||||
extension="tar.zst"
|
extension="tar.zst"
|
||||||
else
|
else
|
||||||
extension="tar.gz"
|
extension="tar.gz"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ${{ inputs.use-all-platform-bundle }} == "true" ]]; then
|
if [[ "$USE_ALL_PLATFORM_BUNDLE" == "true" ]]; then
|
||||||
artifact_name="codeql-bundle.$extension"
|
artifact_name="codeql-bundle.$extension"
|
||||||
elif [[ "$RUNNER_OS" == "Linux" ]]; then
|
elif [[ "$RUNNER_OS" == "Linux" ]]; then
|
||||||
artifact_name="codeql-bundle-linux64.$extension"
|
artifact_name="codeql-bundle-linux64.$extension"
|
||||||
@@ -59,14 +62,14 @@ runs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ${{ inputs.version }} == "nightly-latest" ]]; then
|
if [[ "$VERSION" == "nightly-latest" ]]; then
|
||||||
tag=`gh release list --repo dsp-testing/codeql-cli-nightlies -L 1 | cut -f 3`
|
tag=`gh release list --repo dsp-testing/codeql-cli-nightlies -L 1 | cut -f 3`
|
||||||
echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/$tag/$artifact_name" >> $GITHUB_OUTPUT
|
echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/$tag/$artifact_name" >> $GITHUB_OUTPUT
|
||||||
elif [[ ${{ inputs.version }} == *"nightly"* ]]; then
|
elif [[ "$VERSION" == *"nightly"* ]]; then
|
||||||
version=`echo ${{ inputs.version }} | sed -e 's/^.*\-//'`
|
version=`echo "$VERSION" | sed -e 's/^.*\-//'`
|
||||||
echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/codeql-bundle-$version/$artifact_name" >> $GITHUB_OUTPUT
|
echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/codeql-bundle-$version/$artifact_name" >> $GITHUB_OUTPUT
|
||||||
elif [[ ${{ inputs.version }} == *"stable"* ]]; then
|
elif [[ "$VERSION" == *"stable"* ]]; then
|
||||||
version=`echo ${{ inputs.version }} | sed -e 's/^.*\-//'`
|
version=`echo "$VERSION" | sed -e 's/^.*\-//'`
|
||||||
echo "tools-url=https://github.com/github/codeql-action/releases/download/codeql-bundle-$version/$artifact_name" >> $GITHUB_OUTPUT
|
echo "tools-url=https://github.com/github/codeql-action/releases/download/codeql-bundle-$version/$artifact_name" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
echo "::error::Unrecognized version specified!"
|
echo "::error::Unrecognized version specified!"
|
||||||
|
|||||||
7
.github/actions/release-branches/action.yml
vendored
7
.github/actions/release-branches/action.yml
vendored
@@ -18,8 +18,11 @@ runs:
|
|||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- id: branches
|
- id: branches
|
||||||
|
env:
|
||||||
|
MAJOR_VERSION: ${{ inputs.major_version }}
|
||||||
|
LATEST_TAG: ${{ inputs.latest_tag }}
|
||||||
run: |
|
run: |
|
||||||
python ${{ github.action_path }}/release-branches.py \
|
python ${{ github.action_path }}/release-branches.py \
|
||||||
--major-version ${{ inputs.major_version }} \
|
--major-version "$MAJOR_VERSION" \
|
||||||
--latest-tag ${{ inputs.latest_tag }}
|
--latest-tag "$LATEST_TAG"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
5
.github/copilot-instructions.md
vendored
Normal file
5
.github/copilot-instructions.md
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# CodeQL Action - Copilot Instructions
|
||||||
|
|
||||||
|
The CodeQL Action is written in TypeScript and compiled to JavaScript. Both the TypeScript sources and the **generated** JavaScript code are contained in this repository. The TypeScript sources are contained in the `src` directory and the JavaScript code is contained in the `lib` directory. A GitHub Actions workflow checks that the JavaScript code in `lib` is up-to-date. Therefore, you should not review any changes to the contents of the `lib` folder and it is expected that the JavaScript code in `lib` closely mirrors the TypeScript code it is generated from.
|
||||||
|
|
||||||
|
GitHub Actions workflows in the `.github/workflows` directory whose filenames start with two underscores (e.g. `__all-platform-bundle.yml`) are automatically generated using the `pr-checks/sync.sh` script from template files in the `pr-checks/checks` directory. Therefore, you do not need to review files in the `.github/workflows` directory that starts with two underscores. However, you should review changes to the `pr-checks` directory as well as workflows in the `.github/workflows` directory that do not start with underscores.
|
||||||
6
.github/dependabot.yml
vendored
6
.github/dependabot.yml
vendored
@@ -2,8 +2,6 @@ version: 2
|
|||||||
updates:
|
updates:
|
||||||
- package-ecosystem: npm
|
- package-ecosystem: npm
|
||||||
directory: "/"
|
directory: "/"
|
||||||
reviewers:
|
|
||||||
- "github/codeql-production-shield"
|
|
||||||
schedule:
|
schedule:
|
||||||
interval: weekly
|
interval: weekly
|
||||||
labels:
|
labels:
|
||||||
@@ -26,8 +24,6 @@ updates:
|
|||||||
- "*"
|
- "*"
|
||||||
- package-ecosystem: github-actions
|
- package-ecosystem: github-actions
|
||||||
directory: "/"
|
directory: "/"
|
||||||
reviewers:
|
|
||||||
- "github/codeql-production-shield"
|
|
||||||
schedule:
|
schedule:
|
||||||
interval: weekly
|
interval: weekly
|
||||||
groups:
|
groups:
|
||||||
@@ -36,8 +32,6 @@ updates:
|
|||||||
- "*"
|
- "*"
|
||||||
- package-ecosystem: github-actions
|
- package-ecosystem: github-actions
|
||||||
directory: "/.github/actions/setup-swift/" # All subdirectories outside of "/.github/workflows" must be explicitly included.
|
directory: "/.github/actions/setup-swift/" # All subdirectories outside of "/.github/workflows" must be explicitly included.
|
||||||
reviewers:
|
|
||||||
- "github/codeql-production-shield"
|
|
||||||
schedule:
|
schedule:
|
||||||
interval: weekly
|
interval: weekly
|
||||||
groups:
|
groups:
|
||||||
|
|||||||
15
.github/pull_request_template.md
vendored
15
.github/pull_request_template.md
vendored
@@ -1,5 +1,14 @@
|
|||||||
|
|
||||||
|
|
||||||
|
### Risk assessment
|
||||||
|
|
||||||
|
For internal use only. Please select the risk level of this change:
|
||||||
|
|
||||||
|
- **Low risk:** Changes are fully under feature flags, or have been fully tested and validated in pre-production environments and are highly observable, or are documentation or test only.
|
||||||
|
- **High risk:** Changes are not fully under feature flags, have limited visibility and/or cannot be tested outside of production.
|
||||||
|
|
||||||
### Merge / deployment checklist
|
### Merge / deployment checklist
|
||||||
|
|
||||||
- [ ] Confirm this change is backwards compatible with existing workflows.
|
- Confirm this change is backwards compatible with existing workflows.
|
||||||
- [ ] Confirm the [readme](https://github.com/github/codeql-action/blob/main/README.md) has been updated if necessary.
|
- Consider adding a [changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) entry for this change.
|
||||||
- [ ] Confirm the [changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) has been updated if necessary.
|
- Confirm the [readme](https://github.com/github/codeql-action/blob/main/README.md) and docs have been updated if necessary.
|
||||||
|
|||||||
7
.github/workflows/__all-platform-bundle.yml
generated
vendored
7
.github/workflows/__all-platform-bundle.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - All-platform bundle
|
name: PR Check - All-platform bundle
|
||||||
@@ -45,6 +45,11 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'true'
|
use-all-platform-bundle: 'true'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '>=1.21.0'
|
||||||
|
cache: false
|
||||||
- id: init
|
- id: init
|
||||||
uses: ./../action/init
|
uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
|
|||||||
7
.github/workflows/__analyze-ref-input.yml
generated
vendored
7
.github/workflows/__analyze-ref-input.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: "PR Check - Analyze: 'ref' and 'sha' from inputs"
|
name: "PR Check - Analyze: 'ref' and 'sha' from inputs"
|
||||||
@@ -49,6 +49,11 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '>=1.21.0'
|
||||||
|
cache: false
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
|||||||
2
.github/workflows/__autobuild-action.yml
generated
vendored
2
.github/workflows/__autobuild-action.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - autobuild-action
|
name: PR Check - autobuild-action
|
||||||
|
|||||||
2
.github/workflows/__autobuild-direct-tracing-with-working-dir.yml
generated
vendored
2
.github/workflows/__autobuild-direct-tracing-with-working-dir.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Autobuild direct tracing (custom working directory)
|
name: PR Check - Autobuild direct tracing (custom working directory)
|
||||||
|
|||||||
2
.github/workflows/__autobuild-direct-tracing.yml
generated
vendored
2
.github/workflows/__autobuild-direct-tracing.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Autobuild direct tracing
|
name: PR Check - Autobuild direct tracing
|
||||||
|
|||||||
2
.github/workflows/__build-mode-autobuild.yml
generated
vendored
2
.github/workflows/__build-mode-autobuild.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Build mode autobuild
|
name: PR Check - Build mode autobuild
|
||||||
|
|||||||
7
.github/workflows/__build-mode-manual.yml
generated
vendored
7
.github/workflows/__build-mode-manual.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Build mode manual
|
name: PR Check - Build mode manual
|
||||||
@@ -45,6 +45,11 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '>=1.21.0'
|
||||||
|
cache: false
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
id: init
|
id: init
|
||||||
with:
|
with:
|
||||||
|
|||||||
2
.github/workflows/__build-mode-none.yml
generated
vendored
2
.github/workflows/__build-mode-none.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Build mode none
|
name: PR Check - Build mode none
|
||||||
|
|||||||
2
.github/workflows/__build-mode-rollback.yml
generated
vendored
2
.github/workflows/__build-mode-rollback.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Build mode rollback
|
name: PR Check - Build mode rollback
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Extract directly to toolcache
|
name: 'PR Check - Bundle: Caching checks'
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
GO111MODULE: auto
|
GO111MODULE: auto
|
||||||
@@ -22,7 +22,7 @@ on:
|
|||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
extract-direct-to-toolcache:
|
bundle-toolcache:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -33,7 +33,7 @@ jobs:
|
|||||||
version: linked
|
version: linked
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: linked
|
version: linked
|
||||||
name: Extract directly to toolcache
|
name: 'Bundle: Caching checks'
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: read
|
||||||
@@ -92,5 +92,4 @@ jobs:
|
|||||||
throw new Error('Multiple CodeQL versions found in toolcache');
|
throw new Error('Multiple CodeQL versions found in toolcache');
|
||||||
}
|
}
|
||||||
env:
|
env:
|
||||||
CODEQL_ACTION_EXTRACT_TOOLCACHE: true
|
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
9
.github/workflows/__zstd-bundle.yml → .github/workflows/__bundle-zstd.yml
generated
vendored
9
.github/workflows/__zstd-bundle.yml → .github/workflows/__bundle-zstd.yml
generated
vendored
@@ -1,9 +1,9 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Zstandard bundle
|
name: 'PR Check - Bundle: Zstandard checks'
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
GO111MODULE: auto
|
GO111MODULE: auto
|
||||||
@@ -22,7 +22,7 @@ on:
|
|||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
zstd-bundle:
|
bundle-zstd:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -33,7 +33,7 @@ jobs:
|
|||||||
version: linked
|
version: linked
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: linked
|
version: linked
|
||||||
name: Zstandard bundle
|
name: 'Bundle: Zstandard checks'
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: read
|
||||||
@@ -109,5 +109,4 @@ jobs:
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
env:
|
env:
|
||||||
CODEQL_ACTION_ZSTD_BUNDLE: true
|
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
2
.github/workflows/__cleanup-db-cluster-dir.yml
generated
vendored
2
.github/workflows/__cleanup-db-cluster-dir.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Clean up database cluster directory
|
name: PR Check - Clean up database cluster directory
|
||||||
|
|||||||
2
.github/workflows/__config-export.yml
generated
vendored
2
.github/workflows/__config-export.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Config export
|
name: PR Check - Config export
|
||||||
|
|||||||
2
.github/workflows/__config-input.yml
generated
vendored
2
.github/workflows/__config-input.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Config input
|
name: PR Check - Config input
|
||||||
|
|||||||
2
.github/workflows/__cpp-deptrace-disabled.yml
generated
vendored
2
.github/workflows/__cpp-deptrace-disabled.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: 'PR Check - C/C++: disabling autoinstalling dependencies (Linux)'
|
name: 'PR Check - C/C++: disabling autoinstalling dependencies (Linux)'
|
||||||
|
|||||||
4
.github/workflows/__cpp-deptrace-enabled-on-macos.yml
generated
vendored
4
.github/workflows/__cpp-deptrace-enabled-on-macos.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: 'PR Check - C/C++: autoinstalling dependencies is skipped (macOS)'
|
name: 'PR Check - C/C++: autoinstalling dependencies is skipped (macOS)'
|
||||||
@@ -27,6 +27,8 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
- os: macos-latest
|
||||||
|
version: linked
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
name: 'C/C++: autoinstalling dependencies is skipped (macOS)'
|
name: 'C/C++: autoinstalling dependencies is skipped (macOS)'
|
||||||
|
|||||||
2
.github/workflows/__cpp-deptrace-enabled.yml
generated
vendored
2
.github/workflows/__cpp-deptrace-enabled.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: 'PR Check - C/C++: autoinstalling dependencies (Linux)'
|
name: 'PR Check - C/C++: autoinstalling dependencies (Linux)'
|
||||||
|
|||||||
2
.github/workflows/__diagnostics-export.yml
generated
vendored
2
.github/workflows/__diagnostics-export.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Diagnostic export
|
name: PR Check - Diagnostic export
|
||||||
|
|||||||
7
.github/workflows/__export-file-baseline-information.yml
generated
vendored
7
.github/workflows/__export-file-baseline-information.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Export file baseline information
|
name: PR Check - Export file baseline information
|
||||||
@@ -49,6 +49,11 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '>=1.21.0'
|
||||||
|
cache: false
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
id: init
|
id: init
|
||||||
with:
|
with:
|
||||||
|
|||||||
2
.github/workflows/__extractor-ram-threads.yml
generated
vendored
2
.github/workflows/__extractor-ram-threads.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Extractor ram and threads options test
|
name: PR Check - Extractor ram and threads options test
|
||||||
|
|||||||
6
.github/workflows/__go-custom-queries.yml
generated
vendored
6
.github/workflows/__go-custom-queries.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: 'PR Check - Go: Custom queries'
|
name: 'PR Check - Go: Custom queries'
|
||||||
@@ -47,9 +47,11 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- uses: actions/setup-go@v5
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '>=1.21.0'
|
go-version: '>=1.21.0'
|
||||||
|
cache: false
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: go
|
languages: go
|
||||||
|
|||||||
7
.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml
generated
vendored
7
.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: 'PR Check - Go: diagnostic when Go is changed after init step'
|
name: 'PR Check - Go: diagnostic when Go is changed after init step'
|
||||||
@@ -45,10 +45,11 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- uses: actions/setup-go@v5
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
# We need a Go version that ships with statically linked binaries on Linux
|
|
||||||
go-version: '>=1.21.0'
|
go-version: '>=1.21.0'
|
||||||
|
cache: false
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: go
|
languages: go
|
||||||
|
|||||||
7
.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml
generated
vendored
7
.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: 'PR Check - Go: diagnostic when `file` is not installed'
|
name: 'PR Check - Go: diagnostic when `file` is not installed'
|
||||||
@@ -45,10 +45,11 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- uses: actions/setup-go@v5
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
# We need a Go version that ships with statically linked binaries on Linux
|
|
||||||
go-version: '>=1.21.0'
|
go-version: '>=1.21.0'
|
||||||
|
cache: false
|
||||||
- name: Remove `file` program
|
- name: Remove `file` program
|
||||||
run: |
|
run: |
|
||||||
echo $(which file)
|
echo $(which file)
|
||||||
|
|||||||
7
.github/workflows/__go-indirect-tracing-workaround.yml
generated
vendored
7
.github/workflows/__go-indirect-tracing-workaround.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: 'PR Check - Go: workaround for indirect tracing'
|
name: 'PR Check - Go: workaround for indirect tracing'
|
||||||
@@ -45,10 +45,11 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- uses: actions/setup-go@v5
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
# We need a Go version that ships with statically linked binaries on Linux
|
|
||||||
go-version: '>=1.21.0'
|
go-version: '>=1.21.0'
|
||||||
|
cache: false
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: go
|
languages: go
|
||||||
|
|||||||
25
.github/workflows/__go-tracing-autobuilder.yml
generated
vendored
25
.github/workflows/__go-tracing-autobuilder.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: 'PR Check - Go: tracing with autobuilder step'
|
name: 'PR Check - Go: tracing with autobuilder step'
|
||||||
@@ -27,14 +27,6 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.15.5
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-v2.15.5
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.16.6
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-v2.16.6
|
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-v2.17.6
|
version: stable-v2.17.6
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -47,6 +39,14 @@ jobs:
|
|||||||
version: stable-v2.19.4
|
version: stable-v2.19.4
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: stable-v2.19.4
|
version: stable-v2.19.4
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.20.7
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.20.7
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.21.4
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.21.4
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -75,11 +75,10 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- uses: actions/setup-go@v5
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: ~1.24.0
|
go-version: '>=1.21.0'
|
||||||
# to avoid potentially misleading autobuilder results where we expect it to download
|
|
||||||
# dependencies successfully, but they actually come from a warm cache
|
|
||||||
cache: false
|
cache: false
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
|
|||||||
25
.github/workflows/__go-tracing-custom-build-steps.yml
generated
vendored
25
.github/workflows/__go-tracing-custom-build-steps.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: 'PR Check - Go: tracing with custom build steps'
|
name: 'PR Check - Go: tracing with custom build steps'
|
||||||
@@ -27,14 +27,6 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.15.5
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-v2.15.5
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.16.6
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-v2.16.6
|
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-v2.17.6
|
version: stable-v2.17.6
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -47,6 +39,14 @@ jobs:
|
|||||||
version: stable-v2.19.4
|
version: stable-v2.19.4
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: stable-v2.19.4
|
version: stable-v2.19.4
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.20.7
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.20.7
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.21.4
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.21.4
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -75,11 +75,10 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- uses: actions/setup-go@v5
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: ~1.24.0
|
go-version: '>=1.21.0'
|
||||||
# to avoid potentially misleading autobuilder results where we expect it to download
|
|
||||||
# dependencies successfully, but they actually come from a warm cache
|
|
||||||
cache: false
|
cache: false
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
|
|||||||
25
.github/workflows/__go-tracing-legacy-workflow.yml
generated
vendored
25
.github/workflows/__go-tracing-legacy-workflow.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: 'PR Check - Go: tracing with legacy workflow'
|
name: 'PR Check - Go: tracing with legacy workflow'
|
||||||
@@ -27,14 +27,6 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.15.5
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-v2.15.5
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.16.6
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-v2.16.6
|
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-v2.17.6
|
version: stable-v2.17.6
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -47,6 +39,14 @@ jobs:
|
|||||||
version: stable-v2.19.4
|
version: stable-v2.19.4
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: stable-v2.19.4
|
version: stable-v2.19.4
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.20.7
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.20.7
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.21.4
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.21.4
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -75,11 +75,10 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- uses: actions/setup-go@v5
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: ~1.24.0
|
go-version: '>=1.21.0'
|
||||||
# to avoid potentially misleading autobuilder results where we expect it to download
|
|
||||||
# dependencies successfully, but they actually come from a warm cache
|
|
||||||
cache: false
|
cache: false
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
|
|||||||
2
.github/workflows/__init-with-registries.yml
generated
vendored
2
.github/workflows/__init-with-registries.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: 'PR Check - Packaging: Download using registries'
|
name: 'PR Check - Packaging: Download using registries'
|
||||||
|
|||||||
2
.github/workflows/__javascript-source-root.yml
generated
vendored
2
.github/workflows/__javascript-source-root.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Custom source root
|
name: PR Check - Custom source root
|
||||||
|
|||||||
2
.github/workflows/__job-run-uuid-sarif.yml
generated
vendored
2
.github/workflows/__job-run-uuid-sarif.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Job run UUID added to SARIF
|
name: PR Check - Job run UUID added to SARIF
|
||||||
|
|||||||
2
.github/workflows/__language-aliases.yml
generated
vendored
2
.github/workflows/__language-aliases.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Language aliases
|
name: PR Check - Language aliases
|
||||||
|
|||||||
23
.github/workflows/__multi-language-autodetect.yml
generated
vendored
23
.github/workflows/__multi-language-autodetect.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Multi-language repository
|
name: PR Check - Multi-language repository
|
||||||
@@ -27,14 +27,6 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: macos-latest
|
|
||||||
version: stable-v2.15.5
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.15.5
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-v2.16.6
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.16.6
|
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: stable-v2.17.6
|
version: stable-v2.17.6
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
@@ -47,6 +39,14 @@ jobs:
|
|||||||
version: stable-v2.19.4
|
version: stable-v2.19.4
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-v2.19.4
|
version: stable-v2.19.4
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.20.7
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.20.7
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.21.4
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.21.4
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: default
|
version: default
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
@@ -75,10 +75,11 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- uses: actions/setup-go@v5
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '>=1.21.0'
|
go-version: '>=1.21.0'
|
||||||
|
cache: false
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
id: init
|
id: init
|
||||||
with:
|
with:
|
||||||
|
|||||||
69
.github/workflows/__overlay-init-fallback.yml
generated
vendored
Normal file
69
.github/workflows/__overlay-init-fallback.yml
generated
vendored
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
|
# pr-checks/sync.sh
|
||||||
|
# to regenerate this file.
|
||||||
|
|
||||||
|
name: PR Check - Overlay database init fallback
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GO111MODULE: auto
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/v*
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
|
workflow_dispatch: {}
|
||||||
|
jobs:
|
||||||
|
overlay-init-fallback:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: linked
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: nightly-latest
|
||||||
|
name: Overlay database init fallback
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
security-events: read
|
||||||
|
timeout-minutes: 45
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Prepare test
|
||||||
|
id: prepare-test
|
||||||
|
uses: ./.github/actions/prepare-test
|
||||||
|
with:
|
||||||
|
version: ${{ matrix.version }}
|
||||||
|
use-all-platform-bundle: 'false'
|
||||||
|
setup-kotlin: 'true'
|
||||||
|
- uses: ./../action/init
|
||||||
|
with:
|
||||||
|
languages: actions # Any language without overlay support will do
|
||||||
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
env:
|
||||||
|
CODEQL_OVERLAY_DATABASE_MODE: overlay-base
|
||||||
|
- uses: ./../action/analyze
|
||||||
|
id: analysis
|
||||||
|
with:
|
||||||
|
upload-database: false
|
||||||
|
- name: Check database
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cd "$RUNNER_TEMP/codeql_databases/actions"
|
||||||
|
if ! grep -q 'overlayBaseDatabase: false' codeql-database.yml ; then
|
||||||
|
echo "This test needs to be updated to use a non-overlay language."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
7
.github/workflows/__packaging-codescanning-config-inputs-js.yml
generated
vendored
7
.github/workflows/__packaging-codescanning-config-inputs-js.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: 'PR Check - Packaging: Config and input passed to the CLI'
|
name: 'PR Check - Packaging: Config and input passed to the CLI'
|
||||||
@@ -61,6 +61,11 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '>=1.21.0'
|
||||||
|
cache: false
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
config-file: .github/codeql/codeql-config-packaging3.yml
|
config-file: .github/codeql/codeql-config-packaging3.yml
|
||||||
|
|||||||
7
.github/workflows/__packaging-config-inputs-js.yml
generated
vendored
7
.github/workflows/__packaging-config-inputs-js.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: 'PR Check - Packaging: Config and input'
|
name: 'PR Check - Packaging: Config and input'
|
||||||
@@ -61,6 +61,11 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '>=1.21.0'
|
||||||
|
cache: false
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
config-file: .github/codeql/codeql-config-packaging3.yml
|
config-file: .github/codeql/codeql-config-packaging3.yml
|
||||||
|
|||||||
7
.github/workflows/__packaging-config-js.yml
generated
vendored
7
.github/workflows/__packaging-config-js.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: 'PR Check - Packaging: Config file'
|
name: 'PR Check - Packaging: Config file'
|
||||||
@@ -61,6 +61,11 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '>=1.21.0'
|
||||||
|
cache: false
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
config-file: .github/codeql/codeql-config-packaging.yml
|
config-file: .github/codeql/codeql-config-packaging.yml
|
||||||
|
|||||||
7
.github/workflows/__packaging-inputs-js.yml
generated
vendored
7
.github/workflows/__packaging-inputs-js.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: 'PR Check - Packaging: Action input'
|
name: 'PR Check - Packaging: Action input'
|
||||||
@@ -61,6 +61,11 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '>=1.21.0'
|
||||||
|
cache: false
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
config-file: .github/codeql/codeql-config-packaging2.yml
|
config-file: .github/codeql/codeql-config-packaging2.yml
|
||||||
|
|||||||
117
.github/workflows/__quality-queries.yml
generated
vendored
Normal file
117
.github/workflows/__quality-queries.yml
generated
vendored
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
|
# pr-checks/sync.sh
|
||||||
|
# to regenerate this file.
|
||||||
|
|
||||||
|
name: PR Check - Quality queries input
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GO111MODULE: auto
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/v*
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
|
workflow_dispatch: {}
|
||||||
|
jobs:
|
||||||
|
quality-queries:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: linked
|
||||||
|
- os: macos-latest
|
||||||
|
version: linked
|
||||||
|
- os: windows-latest
|
||||||
|
version: linked
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: nightly-latest
|
||||||
|
- os: macos-latest
|
||||||
|
version: nightly-latest
|
||||||
|
- os: windows-latest
|
||||||
|
version: nightly-latest
|
||||||
|
name: Quality queries input
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
security-events: read
|
||||||
|
timeout-minutes: 45
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Prepare test
|
||||||
|
id: prepare-test
|
||||||
|
uses: ./.github/actions/prepare-test
|
||||||
|
with:
|
||||||
|
version: ${{ matrix.version }}
|
||||||
|
use-all-platform-bundle: 'false'
|
||||||
|
setup-kotlin: 'true'
|
||||||
|
- uses: ./../action/init
|
||||||
|
with:
|
||||||
|
languages: javascript
|
||||||
|
quality-queries: code-quality
|
||||||
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
- uses: ./../action/analyze
|
||||||
|
with:
|
||||||
|
output: ${{ runner.temp }}/results
|
||||||
|
upload-database: false
|
||||||
|
- name: Upload security SARIF
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: quality-queries-${{ matrix.os }}-${{ matrix.version }}.sarif.json
|
||||||
|
path: ${{ runner.temp }}/results/javascript.sarif
|
||||||
|
retention-days: 7
|
||||||
|
- name: Upload quality SARIF
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: quality-queries-${{ matrix.os }}-${{ matrix.version }}.quality.sarif.json
|
||||||
|
path: ${{ runner.temp }}/results/javascript.quality.sarif
|
||||||
|
retention-days: 7
|
||||||
|
- name: Check quality query does not appear in security SARIF
|
||||||
|
uses: actions/github-script@v7
|
||||||
|
env:
|
||||||
|
SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
|
||||||
|
EXPECT_PRESENT: 'false'
|
||||||
|
with:
|
||||||
|
script: ${{ env.CHECK_SCRIPT }}
|
||||||
|
- name: Check quality query appears in quality SARIF
|
||||||
|
uses: actions/github-script@v7
|
||||||
|
env:
|
||||||
|
SARIF_PATH: ${{ runner.temp }}/results/javascript.quality.sarif
|
||||||
|
EXPECT_PRESENT: 'true'
|
||||||
|
with:
|
||||||
|
script: ${{ env.CHECK_SCRIPT }}
|
||||||
|
env:
|
||||||
|
CHECK_SCRIPT: |
|
||||||
|
const fs = require('fs');
|
||||||
|
|
||||||
|
const sarif = JSON.parse(fs.readFileSync(process.env['SARIF_PATH'], 'utf8'));
|
||||||
|
const expectPresent = JSON.parse(process.env['EXPECT_PRESENT']);
|
||||||
|
const run = sarif.runs[0];
|
||||||
|
const extensions = run.tool.extensions;
|
||||||
|
|
||||||
|
if (extensions === undefined) {
|
||||||
|
core.setFailed('`extensions` property not found in the SARIF run property bag.');
|
||||||
|
}
|
||||||
|
|
||||||
|
// ID of a query we want to check the presence for
|
||||||
|
const targetId = 'js/regex/always-matches';
|
||||||
|
const found = extensions.find(extension => extension.rules && extension.rules.find(rule => rule.id === targetId));
|
||||||
|
|
||||||
|
if (found && expectPresent) {
|
||||||
|
console.log(`Found rule with id '${targetId}'.`);
|
||||||
|
} else if (!found && !expectPresent) {
|
||||||
|
console.log(`Rule with id '${targetId}' was not found.`);
|
||||||
|
} else {
|
||||||
|
core.setFailed(`${ found ? "Found" : "Didn't find" } rule ${targetId}`);
|
||||||
|
}
|
||||||
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
7
.github/workflows/__remote-config.yml
generated
vendored
7
.github/workflows/__remote-config.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Remote config file
|
name: PR Check - Remote config file
|
||||||
@@ -47,6 +47,11 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '>=1.21.0'
|
||||||
|
cache: false
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
|||||||
2
.github/workflows/__resolve-environment-action.yml
generated
vendored
2
.github/workflows/__resolve-environment-action.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Resolve environment
|
name: PR Check - Resolve environment
|
||||||
|
|||||||
4
.github/workflows/__rubocop-multi-language.yml
generated
vendored
4
.github/workflows/__rubocop-multi-language.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - RuboCop multi-language
|
name: PR Check - RuboCop multi-language
|
||||||
@@ -46,7 +46,7 @@ jobs:
|
|||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Set up Ruby
|
- name: Set up Ruby
|
||||||
uses: ruby/setup-ruby@277ba2a127aba66d45bad0fa2dc56f80dbfedffa # v1.222.0
|
uses: ruby/setup-ruby@2a7b30092b0caf9c046252510f9273b4875f3db9 # v1.254.0
|
||||||
with:
|
with:
|
||||||
ruby-version: 2.6
|
ruby-version: 2.6
|
||||||
- name: Install Code Scanning integration
|
- name: Install Code Scanning integration
|
||||||
|
|||||||
2
.github/workflows/__ruby.yml
generated
vendored
2
.github/workflows/__ruby.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Ruby analysis
|
name: PR Check - Ruby analysis
|
||||||
|
|||||||
8
.github/workflows/__rust.yml
generated
vendored
8
.github/workflows/__rust.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Rust analysis
|
name: PR Check - Rust analysis
|
||||||
@@ -27,6 +27,10 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.19.3
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.22.1
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: linked
|
version: linked
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
@@ -53,8 +57,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
languages: rust
|
languages: rust
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
env:
|
|
||||||
CODEQL_ACTION_RUST_ANALYSIS: true
|
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
id: analysis
|
id: analysis
|
||||||
with:
|
with:
|
||||||
|
|||||||
7
.github/workflows/__split-workflow.yml
generated
vendored
7
.github/workflows/__split-workflow.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Split workflow
|
name: PR Check - Split workflow
|
||||||
@@ -55,6 +55,11 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '>=1.21.0'
|
||||||
|
cache: false
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
config-file: .github/codeql/codeql-config-packaging3.yml
|
config-file: .github/codeql/codeql-config-packaging3.yml
|
||||||
|
|||||||
2
.github/workflows/__start-proxy.yml
generated
vendored
2
.github/workflows/__start-proxy.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Start proxy
|
name: PR Check - Start proxy
|
||||||
|
|||||||
2
.github/workflows/__submit-sarif-failure.yml
generated
vendored
2
.github/workflows/__submit-sarif-failure.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Submit SARIF after failure
|
name: PR Check - Submit SARIF after failure
|
||||||
|
|||||||
2
.github/workflows/__swift-autobuild.yml
generated
vendored
2
.github/workflows/__swift-autobuild.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Swift analysis using autobuild
|
name: PR Check - Swift analysis using autobuild
|
||||||
|
|||||||
7
.github/workflows/__swift-custom-build.yml
generated
vendored
7
.github/workflows/__swift-custom-build.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Swift analysis using a custom build command
|
name: PR Check - Swift analysis using a custom build command
|
||||||
@@ -49,6 +49,11 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '>=1.21.0'
|
||||||
|
cache: false
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
id: init
|
id: init
|
||||||
with:
|
with:
|
||||||
|
|||||||
2
.github/workflows/__test-autobuild-working-dir.yml
generated
vendored
2
.github/workflows/__test-autobuild-working-dir.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Autobuild working directory
|
name: PR Check - Autobuild working directory
|
||||||
|
|||||||
7
.github/workflows/__test-local-codeql.yml
generated
vendored
7
.github/workflows/__test-local-codeql.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Local CodeQL bundle
|
name: PR Check - Local CodeQL bundle
|
||||||
@@ -45,6 +45,11 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '>=1.21.0'
|
||||||
|
cache: false
|
||||||
- name: Fetch a CodeQL bundle
|
- name: Fetch a CodeQL bundle
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
|
|||||||
2
.github/workflows/__test-proxy.yml
generated
vendored
2
.github/workflows/__test-proxy.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Proxy test
|
name: PR Check - Proxy test
|
||||||
|
|||||||
10
.github/workflows/__unset-environment.yml
generated
vendored
10
.github/workflows/__unset-environment.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Test unsetting environment variables
|
name: PR Check - Test unsetting environment variables
|
||||||
@@ -47,6 +47,11 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '>=1.21.0'
|
||||||
|
cache: false
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
id: init
|
id: init
|
||||||
with:
|
with:
|
||||||
@@ -54,9 +59,6 @@ jobs:
|
|||||||
# Swift is not supported on Ubuntu so we manually exclude it from the list here
|
# Swift is not supported on Ubuntu so we manually exclude it from the list here
|
||||||
languages: cpp,csharp,go,java,javascript,python,ruby
|
languages: cpp,csharp,go,java,javascript,python,ruby
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
- uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: '>=1.21.0'
|
|
||||||
- name: Build code
|
- name: Build code
|
||||||
shell: bash
|
shell: bash
|
||||||
run: env -i PATH="$PATH" HOME="$HOME" ./build.sh
|
run: env -i PATH="$PATH" HOME="$HOME" ./build.sh
|
||||||
|
|||||||
78
.github/workflows/__upload-quality-sarif.yml
generated
vendored
Normal file
78
.github/workflows/__upload-quality-sarif.yml
generated
vendored
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
|
# pr-checks/sync.sh
|
||||||
|
# to regenerate this file.
|
||||||
|
|
||||||
|
name: 'PR Check - Upload-sarif: code quality endpoint'
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GO111MODULE: auto
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/v*
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
|
workflow_dispatch: {}
|
||||||
|
jobs:
|
||||||
|
upload-quality-sarif:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: default
|
||||||
|
- os: macos-latest
|
||||||
|
version: default
|
||||||
|
- os: windows-latest
|
||||||
|
version: default
|
||||||
|
name: 'Upload-sarif: code quality endpoint'
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
security-events: read
|
||||||
|
timeout-minutes: 45
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Prepare test
|
||||||
|
id: prepare-test
|
||||||
|
uses: ./.github/actions/prepare-test
|
||||||
|
with:
|
||||||
|
version: ${{ matrix.version }}
|
||||||
|
use-all-platform-bundle: 'false'
|
||||||
|
setup-kotlin: 'true'
|
||||||
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '>=1.21.0'
|
||||||
|
cache: false
|
||||||
|
- uses: ./../action/init
|
||||||
|
with:
|
||||||
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
languages: cpp,csharp,java,javascript,python
|
||||||
|
config-file: ${{ github.repository }}/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{
|
||||||
|
github.sha }}
|
||||||
|
quality-queries: code-quality
|
||||||
|
- name: Build code
|
||||||
|
shell: bash
|
||||||
|
run: ./build.sh
|
||||||
|
# Generate some SARIF we can upload with the upload-sarif step
|
||||||
|
- uses: ./../action/analyze
|
||||||
|
with:
|
||||||
|
ref: refs/heads/main
|
||||||
|
sha: 5e235361806c361d4d3f8859e3c897658025a9a2
|
||||||
|
upload: never
|
||||||
|
- uses: ./../action/upload-sarif
|
||||||
|
with:
|
||||||
|
ref: refs/heads/main
|
||||||
|
sha: 5e235361806c361d4d3f8859e3c897658025a9a2
|
||||||
|
env:
|
||||||
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
7
.github/workflows/__upload-ref-sha-input.yml
generated
vendored
7
.github/workflows/__upload-ref-sha-input.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: "PR Check - Upload-sarif: 'ref' and 'sha' from inputs"
|
name: "PR Check - Upload-sarif: 'ref' and 'sha' from inputs"
|
||||||
@@ -49,6 +49,11 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '>=1.21.0'
|
||||||
|
cache: false
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
|||||||
7
.github/workflows/__with-checkout-path.yml
generated
vendored
7
.github/workflows/__with-checkout-path.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
# pr-checks/sync.sh
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Use a custom `checkout_path`
|
name: PR Check - Use a custom `checkout_path`
|
||||||
@@ -49,6 +49,11 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '>=1.21.0'
|
||||||
|
cache: false
|
||||||
- name: Delete original checkout
|
- name: Delete original checkout
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
110
.github/workflows/__zstd-bundle-streaming.yml
generated
vendored
110
.github/workflows/__zstd-bundle-streaming.yml
generated
vendored
@@ -1,110 +0,0 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
|
||||||
# to regenerate this file.
|
|
||||||
|
|
||||||
name: PR Check - Zstandard bundle (streaming)
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
GO111MODULE: auto
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- releases/v*
|
|
||||||
pull_request:
|
|
||||||
types:
|
|
||||||
- opened
|
|
||||||
- synchronize
|
|
||||||
- reopened
|
|
||||||
- ready_for_review
|
|
||||||
schedule:
|
|
||||||
- cron: '0 5 * * *'
|
|
||||||
workflow_dispatch: {}
|
|
||||||
jobs:
|
|
||||||
zstd-bundle-streaming:
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: macos-latest
|
|
||||||
version: linked
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: linked
|
|
||||||
name: Zstandard bundle (streaming)
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
security-events: read
|
|
||||||
timeout-minutes: 45
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Prepare test
|
|
||||||
id: prepare-test
|
|
||||||
uses: ./.github/actions/prepare-test
|
|
||||||
with:
|
|
||||||
version: ${{ matrix.version }}
|
|
||||||
use-all-platform-bundle: 'false'
|
|
||||||
setup-kotlin: 'true'
|
|
||||||
- name: Remove CodeQL from toolcache
|
|
||||||
uses: actions/github-script@v7
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const fs = require('fs');
|
|
||||||
const path = require('path');
|
|
||||||
const codeqlPath = path.join(process.env['RUNNER_TOOL_CACHE'], 'CodeQL');
|
|
||||||
if (codeqlPath !== undefined) {
|
|
||||||
fs.rmdirSync(codeqlPath, { recursive: true });
|
|
||||||
}
|
|
||||||
- id: init
|
|
||||||
uses: ./../action/init
|
|
||||||
with:
|
|
||||||
languages: javascript
|
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
|
||||||
- uses: ./../action/analyze
|
|
||||||
with:
|
|
||||||
output: ${{ runner.temp }}/results
|
|
||||||
upload-database: false
|
|
||||||
- name: Upload SARIF
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: ${{ matrix.os }}-zstd-bundle.sarif
|
|
||||||
path: ${{ runner.temp }}/results/javascript.sarif
|
|
||||||
retention-days: 7
|
|
||||||
- name: Check diagnostic with expected tools URL appears in SARIF
|
|
||||||
uses: actions/github-script@v7
|
|
||||||
env:
|
|
||||||
SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const fs = require('fs');
|
|
||||||
|
|
||||||
const sarif = JSON.parse(fs.readFileSync(process.env['SARIF_PATH'], 'utf8'));
|
|
||||||
const run = sarif.runs[0];
|
|
||||||
|
|
||||||
const toolExecutionNotifications = run.invocations[0].toolExecutionNotifications;
|
|
||||||
const downloadTelemetryNotifications = toolExecutionNotifications.filter(n =>
|
|
||||||
n.descriptor.id === 'codeql-action/bundle-download-telemetry'
|
|
||||||
);
|
|
||||||
if (downloadTelemetryNotifications.length !== 1) {
|
|
||||||
core.setFailed(
|
|
||||||
'Expected exactly one reporting descriptor in the ' +
|
|
||||||
`'runs[].invocations[].toolExecutionNotifications[]' SARIF property, but found ` +
|
|
||||||
`${downloadTelemetryNotifications.length}. All notification reporting descriptors: ` +
|
|
||||||
`${JSON.stringify(toolExecutionNotifications)}.`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const toolsUrl = downloadTelemetryNotifications[0].properties.attributes.toolsUrl;
|
|
||||||
console.log(`Found tools URL: ${toolsUrl}`);
|
|
||||||
|
|
||||||
if (!toolsUrl.endsWith('.tar.zst')) {
|
|
||||||
core.setFailed(
|
|
||||||
`Expected the tools URL to be a .tar.zst file, but found ${toolsUrl}.`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
env:
|
|
||||||
CODEQL_ACTION_ZSTD_BUNDLE: true
|
|
||||||
CODEQL_ACTION_ZSTD_BUNDLE_STREAMING_EXTRACTION: true
|
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
|
||||||
2
.github/workflows/codeql.yml
vendored
2
.github/workflows/codeql.yml
vendored
@@ -75,7 +75,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-20.04,ubuntu-22.04,windows-2019,windows-2022,macos-13,macos-14]
|
os: [ubuntu-22.04,ubuntu-24.04,windows-2022,windows-2025,macos-13,macos-14,macos-15]
|
||||||
tools: ${{ fromJson(needs.check-codeql-versions.outputs.versions) }}
|
tools: ${{ fromJson(needs.check-codeql-versions.outputs.versions) }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,9 @@
|
|||||||
name: Code-Scanning config CLI tests
|
name: Code-Scanning config CLI tests
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
# Diff informed queries add an additional query filter which is not yet
|
||||||
|
# taken into account by these tests.
|
||||||
|
CODEQL_ACTION_DIFF_INFORMED_QUERIES: false
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
|||||||
2
.github/workflows/post-release-mergeback.yml
vendored
2
.github/workflows/post-release-mergeback.yml
vendored
@@ -168,7 +168,7 @@ jobs:
|
|||||||
--draft
|
--draft
|
||||||
|
|
||||||
- name: Generate token
|
- name: Generate token
|
||||||
uses: actions/create-github-app-token@v1.11.6
|
uses: actions/create-github-app-token@v2.0.6
|
||||||
id: app-token
|
id: app-token
|
||||||
with:
|
with:
|
||||||
app-id: ${{ vars.AUTOMATION_APP_ID }}
|
app-id: ${{ vars.AUTOMATION_APP_ID }}
|
||||||
|
|||||||
6
.github/workflows/pr-checks.yml
vendored
6
.github/workflows/pr-checks.yml
vendored
@@ -67,12 +67,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: 3.11
|
python-version: 3.11
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
# When updating this, update the autogenerated code header in `sync.py` too.
|
|
||||||
pip install ruamel.yaml==0.17.31
|
|
||||||
|
|
||||||
# Ensure the generated PR check workflows are up to date.
|
# Ensure the generated PR check workflows are up to date.
|
||||||
- name: Verify PR checks up to date
|
- name: Verify PR checks up to date
|
||||||
run: .github/workflows/script/verify-pr-checks.sh
|
run: .github/workflows/script/verify-pr-checks.sh
|
||||||
|
|||||||
91
.github/workflows/rebuild.yml
vendored
91
.github/workflows/rebuild.yml
vendored
@@ -9,7 +9,7 @@ jobs:
|
|||||||
rebuild:
|
rebuild:
|
||||||
name: Rebuild Action
|
name: Rebuild Action
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event.label.name == 'Rebuild'
|
if: github.event.label.name == 'Rebuild' || github.event_name == 'workflow_dispatch'
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write # needed to push rebuilt commit
|
contents: write # needed to push rebuilt commit
|
||||||
@@ -18,9 +18,11 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.ref }}
|
fetch-depth: 0
|
||||||
|
ref: ${{ github.event.pull_request.head.ref || github.event.ref }}
|
||||||
|
|
||||||
- name: Remove label
|
- name: Remove label
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||||
@@ -28,21 +30,35 @@ jobs:
|
|||||||
gh pr edit --repo github/codeql-action "$PR_NUMBER" \
|
gh pr edit --repo github/codeql-action "$PR_NUMBER" \
|
||||||
--remove-label "Rebuild"
|
--remove-label "Rebuild"
|
||||||
|
|
||||||
|
- name: Configure git
|
||||||
|
run: |
|
||||||
|
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
|
git config --global user.name "github-actions[bot]"
|
||||||
|
|
||||||
- name: Merge in changes from base branch
|
- name: Merge in changes from base branch
|
||||||
|
id: merge
|
||||||
env:
|
env:
|
||||||
BASE_BRANCH: ${{ github.event.pull_request.base.ref }}
|
BASE_BRANCH: ${{ github.event.pull_request.base.ref || 'main' }}
|
||||||
run: |
|
run: |
|
||||||
git fetch origin "$BASE_BRANCH"
|
git fetch origin "$BASE_BRANCH"
|
||||||
|
|
||||||
# Allow merge conflicts in `lib`, since rebuilding should resolve them.
|
# Allow merge conflicts in `lib`, since rebuilding should resolve them.
|
||||||
git merge "origin/$BASE_BRANCH" || echo "Merge conflicts detected"
|
git merge "origin/$BASE_BRANCH" || echo "Merge conflicts detected, continuing."
|
||||||
|
MERGE_RESULT=$?
|
||||||
|
|
||||||
# Check for merge conflicts outside of `lib`. Disable git diff's trailing whitespace check
|
if [ "$MERGE_RESULT" -ne 0 ]; then
|
||||||
# since `node_modules/@types/semver/README.md` fails it.
|
echo "merge-in-progress=true" >> $GITHUB_OUTPUT
|
||||||
if git -c core.whitespace=-trailing-space diff --check | grep --invert-match '^lib/'; then
|
|
||||||
echo "Merge conflicts detected outside of lib/ directory. Please resolve them manually."
|
# Check for merge conflicts outside of `lib`. Disable git diff's trailing whitespace check
|
||||||
git -c core.whitespace=-trailing-space diff --check | grep --invert-match '^lib/' || true
|
# since `node_modules/@types/semver/README.md` fails it.
|
||||||
exit 1
|
if git -c core.whitespace=-trailing-space diff --check | grep --invert-match '^lib/'; then
|
||||||
|
echo "Merge conflicts were detected outside of the lib directory. Please resolve them manually."
|
||||||
|
git -c core.whitespace=-trailing-space diff --check | grep --invert-match '^lib/' || true
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "No merge conflicts found outside the lib directory. We should be able to resolve all of" \
|
||||||
|
"these by rebuilding the Action."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Compile TypeScript
|
- name: Compile TypeScript
|
||||||
@@ -63,20 +79,49 @@ jobs:
|
|||||||
pip install ruamel.yaml==0.17.31
|
pip install ruamel.yaml==0.17.31
|
||||||
python3 sync.py
|
python3 sync.py
|
||||||
|
|
||||||
- name: Check for changes and push
|
- name: "Merge in progress: Finish merge and push"
|
||||||
|
if: steps.merge.outputs.merge-in-progress == 'true'
|
||||||
|
run: |
|
||||||
|
echo "Finishing merge and pushing changes."
|
||||||
|
git add --all
|
||||||
|
git commit --no-edit
|
||||||
|
git push
|
||||||
|
|
||||||
|
- name: "No merge in progress: Check for changes and push"
|
||||||
|
if: steps.merge.outputs.merge-in-progress != 'true'
|
||||||
|
id: push
|
||||||
|
run: |
|
||||||
|
if [ ! -z "$(git status --porcelain)" ]; then
|
||||||
|
echo "Changes detected, committing and pushing."
|
||||||
|
git add --all
|
||||||
|
# If the merge originally had conflicts, finish the merge.
|
||||||
|
# Otherwise, just commit the changes.
|
||||||
|
if git rev-parse --verify MERGE_HEAD >/dev/null 2>&1; then
|
||||||
|
echo "In progress merge detected, finishing it up."
|
||||||
|
git merge --continue
|
||||||
|
else
|
||||||
|
echo "No in-progress merge detected, committing changes."
|
||||||
|
git commit -m "Rebuild"
|
||||||
|
fi
|
||||||
|
echo "Pushing changes"
|
||||||
|
git push
|
||||||
|
echo "changes=true" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "No changes detected, nothing to commit."
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Notify about rebuild
|
||||||
|
if: >-
|
||||||
|
github.event_name == 'pull_request' &&
|
||||||
|
(
|
||||||
|
steps.merge.outputs.merge-in-progress == 'true' ||
|
||||||
|
steps.push.outputs.changes == 'true'
|
||||||
|
)
|
||||||
env:
|
env:
|
||||||
BRANCH: ${{ github.event.pull_request.head.ref }}
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||||
run: |
|
run: |
|
||||||
if [ ! -z "$(git status --porcelain)" ]; then
|
echo "Pushed a commit to rebuild the Action." \
|
||||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
"Please mark the PR as ready for review to trigger PR checks." |
|
||||||
git config --global user.name "github-actions[bot]"
|
gh pr comment --body-file - --repo github/codeql-action "$PR_NUMBER"
|
||||||
git add --all
|
gh pr ready --undo --repo github/codeql-action "$PR_NUMBER"
|
||||||
git commit -m "Rebuild"
|
|
||||||
git push origin "HEAD:$BRANCH"
|
|
||||||
echo "Pushed a commit to rebuild the Action." \
|
|
||||||
"Please mark the PR as ready for review to trigger PR checks." |
|
|
||||||
gh pr comment --body-file - --repo github/codeql-action "$PR_NUMBER"
|
|
||||||
gh pr ready --undo --repo github/codeql-action "$PR_NUMBER"
|
|
||||||
fi
|
|
||||||
|
|||||||
2
.github/workflows/script/verify-pr-checks.sh
vendored
2
.github/workflows/script/verify-pr-checks.sh
vendored
@@ -12,7 +12,7 @@ fi
|
|||||||
rm -rf .github/workflows/__*
|
rm -rf .github/workflows/__*
|
||||||
|
|
||||||
# Generate the PR checks
|
# Generate the PR checks
|
||||||
cd pr-checks && python3 sync.py
|
pr-checks/sync.sh
|
||||||
|
|
||||||
# Check that repo is still clean
|
# Check that repo is still clean
|
||||||
if [ ! -z "$(git status --porcelain)" ]; then
|
if [ ! -z "$(git status --porcelain)" ]; then
|
||||||
|
|||||||
101
.github/workflows/update-proxy-release.yml
vendored
Normal file
101
.github/workflows/update-proxy-release.yml
vendored
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
name: Update dependency proxy release assets
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
tag:
|
||||||
|
description: "The tag of CodeQL Bundle release that contains the proxy binaries as release assets"
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update:
|
||||||
|
name: Update code and create PR
|
||||||
|
timeout-minutes: 15
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write # needed to push the updated files
|
||||||
|
pull-requests: write # needed to create the PR
|
||||||
|
env:
|
||||||
|
RELEASE_TAG: ${{ inputs.tag }}
|
||||||
|
steps:
|
||||||
|
- name: Check release tag format
|
||||||
|
id: checks
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if ! [[ $RELEASE_TAG =~ ^codeql-bundle-v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||||
|
echo "Invalid release tag: expected a CodeQL bundle tag in the 'codeql-bundle-vM.N.P' format."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "target_branch=dependency-proxy/$RELEASE_TAG" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Check that the release exists
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
run: |
|
||||||
|
(gh release view --repo "$GITHUB_REPOSITORY" --json "assets" "$RELEASE_TAG" && echo "Release found.") || exit 1
|
||||||
|
|
||||||
|
- name: Install Node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0 # ensure we have all tags and can push commits
|
||||||
|
ref: main
|
||||||
|
|
||||||
|
- name: Update git config
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
|
git config --global user.name "github-actions[bot]"
|
||||||
|
|
||||||
|
- name: Update release tag and version
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
NOW=$(date +"%Y%m%d%H%M%S") # only used to make sure we don't fetch stale binaries from the toolcache
|
||||||
|
sed -i "s|https://github.com/github/codeql-action/releases/download/codeql-bundle-v[0-9.]\+/|https://github.com/github/codeql-action/releases/download/$RELEASE_TAG/|g" ./src/start-proxy-action.ts
|
||||||
|
sed -i "s/\"v2.0.[0-9]\+\"/\"v2.0.$NOW\"/g" ./src/start-proxy-action.ts
|
||||||
|
|
||||||
|
- name: Compile TypeScript and commit changes
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
TARGET_BRANCH: ${{ steps.checks.outputs.target_branch }}
|
||||||
|
run: |
|
||||||
|
set -exu
|
||||||
|
git checkout -b "$TARGET_BRANCH"
|
||||||
|
|
||||||
|
npm run build
|
||||||
|
git add ./src/start-proxy-action.ts
|
||||||
|
git add ./lib
|
||||||
|
git commit -m "Update release used by \`start-proxy\` action"
|
||||||
|
|
||||||
|
- name: Push changes and open PR
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
TARGET_BRANCH: ${{ steps.checks.outputs.target_branch }}
|
||||||
|
PR_FLAG: ${{ (github.event_name == 'workflow_dispatch' && '--draft') || '--dry-run' }}
|
||||||
|
run: |
|
||||||
|
set -exu
|
||||||
|
pr_title="Update release used by \`start-proxy\` to \`$RELEASE_TAG\`"
|
||||||
|
pr_body=$(cat << EOF
|
||||||
|
This PR updates the \`start-proxy\` action to use the private registry proxy binaries that
|
||||||
|
are attached as release assets to the \`$RELEASE_TAG\` release.
|
||||||
|
|
||||||
|
|
||||||
|
Please do the following before merging:
|
||||||
|
|
||||||
|
- [ ] Verify that the changes to the code are correct.
|
||||||
|
- [ ] Mark the PR as ready for review to trigger the CI.
|
||||||
|
EOF
|
||||||
|
)
|
||||||
|
|
||||||
|
git push origin "$TARGET_BRANCH"
|
||||||
|
gh pr create \
|
||||||
|
--head "$TARGET_BRANCH" \
|
||||||
|
--base "main" \
|
||||||
|
--title "${pr_title}" \
|
||||||
|
--body "${pr_body}" \
|
||||||
|
$PR_FLAG
|
||||||
2
.github/workflows/update-release-branch.yml
vendored
2
.github/workflows/update-release-branch.yml
vendored
@@ -124,7 +124,7 @@ jobs:
|
|||||||
pull-requests: write # needed to create pull request
|
pull-requests: write # needed to create pull request
|
||||||
steps:
|
steps:
|
||||||
- name: Generate token
|
- name: Generate token
|
||||||
uses: actions/create-github-app-token@v1.11.6
|
uses: actions/create-github-app-token@v2.0.6
|
||||||
id: app-token
|
id: app-token
|
||||||
with:
|
with:
|
||||||
app-id: ${{ vars.AUTOMATION_APP_ID }}
|
app-id: ${{ vars.AUTOMATION_APP_ID }}
|
||||||
|
|||||||
88
CHANGELOG.md
88
CHANGELOG.md
@@ -2,10 +2,96 @@
|
|||||||
|
|
||||||
See the [releases page](https://github.com/github/codeql-action/releases) for the relevant changes to the CodeQL CLI and language packs.
|
See the [releases page](https://github.com/github/codeql-action/releases) for the relevant changes to the CodeQL CLI and language packs.
|
||||||
|
|
||||||
## [UNRELEASED]
|
## 3.29.9 - 12 Aug 2025
|
||||||
|
|
||||||
No user facing changes.
|
No user facing changes.
|
||||||
|
|
||||||
|
## 3.29.8 - 08 Aug 2025
|
||||||
|
|
||||||
|
- Fix an issue where the Action would autodetect unsupported languages such as HTML. [#3015](https://github.com/github/codeql-action/pull/3015)
|
||||||
|
|
||||||
|
## 3.29.7 - 07 Aug 2025
|
||||||
|
|
||||||
|
This release rolls back 3.29.6 to address issues with language autodetection. It is identical to 3.29.5.
|
||||||
|
|
||||||
|
## 3.29.6 - 07 Aug 2025
|
||||||
|
|
||||||
|
- The `cleanup-level` input to the `analyze` Action is now deprecated. The CodeQL Action has written a limited amount of intermediate results to the database since version 2.2.5, and now automatically manages cleanup. [#2999](https://github.com/github/codeql-action/pull/2999)
|
||||||
|
- Update default CodeQL bundle version to 2.22.3. [#3000](https://github.com/github/codeql-action/pull/3000)
|
||||||
|
|
||||||
|
## 3.29.5 - 29 Jul 2025
|
||||||
|
|
||||||
|
- Update default CodeQL bundle version to 2.22.2. [#2986](https://github.com/github/codeql-action/pull/2986)
|
||||||
|
|
||||||
|
## 3.29.4 - 23 Jul 2025
|
||||||
|
|
||||||
|
No user facing changes.
|
||||||
|
|
||||||
|
## 3.29.3 - 21 Jul 2025
|
||||||
|
|
||||||
|
No user facing changes.
|
||||||
|
|
||||||
|
## 3.29.2 - 30 Jun 2025
|
||||||
|
|
||||||
|
- Experimental: When the `quality-queries` input for the `init` action is provided with an argument, separate `.quality.sarif` files are produced and uploaded for each language with the results of the specified queries. Do not use this in production as it is part of an internal experiment and subject to change at any time. [#2935](https://github.com/github/codeql-action/pull/2935)
|
||||||
|
|
||||||
|
## 3.29.1 - 27 Jun 2025
|
||||||
|
|
||||||
|
- Fix bug in PR analysis where user-provided `include` query filter fails to exclude non-included queries. [#2938](https://github.com/github/codeql-action/pull/2938)
|
||||||
|
- Update default CodeQL bundle version to 2.22.1. [#2950](https://github.com/github/codeql-action/pull/2950)
|
||||||
|
|
||||||
|
## 3.29.0 - 11 Jun 2025
|
||||||
|
|
||||||
|
- Update default CodeQL bundle version to 2.22.0. [#2925](https://github.com/github/codeql-action/pull/2925)
|
||||||
|
- Bump minimum CodeQL bundle version to 2.16.6. [#2912](https://github.com/github/codeql-action/pull/2912)
|
||||||
|
|
||||||
|
## 3.28.21 - 28 July 2025
|
||||||
|
|
||||||
|
No user facing changes.
|
||||||
|
|
||||||
|
## 3.28.20 - 21 July 2025
|
||||||
|
|
||||||
|
- Remove support for combining SARIF files from a single upload for GHES 3.18, see [the changelog post](https://github.blog/changelog/2024-05-06-code-scanning-will-stop-combining-runs-from-a-single-upload/). [#2959](https://github.com/github/codeql-action/pull/2959)
|
||||||
|
|
||||||
|
## 3.28.19 - 03 Jun 2025
|
||||||
|
|
||||||
|
- The CodeQL Action no longer includes its own copy of the extractor for the `actions` language, which is currently in public preview.
|
||||||
|
The `actions` extractor has been included in the CodeQL CLI since v2.20.6. If your workflow has enabled the `actions` language _and_ you have pinned
|
||||||
|
your `tools:` property to a specific version of the CodeQL CLI earlier than v2.20.6, you will need to update to at least CodeQL v2.20.6 or disable
|
||||||
|
`actions` analysis.
|
||||||
|
- Update default CodeQL bundle version to 2.21.4. [#2910](https://github.com/github/codeql-action/pull/2910)
|
||||||
|
|
||||||
|
## 3.28.18 - 16 May 2025
|
||||||
|
|
||||||
|
- Update default CodeQL bundle version to 2.21.3. [#2893](https://github.com/github/codeql-action/pull/2893)
|
||||||
|
- Skip validating SARIF produced by CodeQL for improved performance. [#2894](https://github.com/github/codeql-action/pull/2894)
|
||||||
|
- The number of threads and amount of RAM used by CodeQL can now be set via the `CODEQL_THREADS` and `CODEQL_RAM` runner environment variables. If set, these environment variables override the `threads` and `ram` inputs respectively. [#2891](https://github.com/github/codeql-action/pull/2891)
|
||||||
|
|
||||||
|
## 3.28.17 - 02 May 2025
|
||||||
|
|
||||||
|
- Update default CodeQL bundle version to 2.21.2. [#2872](https://github.com/github/codeql-action/pull/2872)
|
||||||
|
|
||||||
|
## 3.28.16 - 23 Apr 2025
|
||||||
|
|
||||||
|
- Update default CodeQL bundle version to 2.21.1. [#2863](https://github.com/github/codeql-action/pull/2863)
|
||||||
|
|
||||||
|
## 3.28.15 - 07 Apr 2025
|
||||||
|
|
||||||
|
- Fix bug where the action would fail if it tried to produce a debug artifact with more than 65535 files. [#2842](https://github.com/github/codeql-action/pull/2842)
|
||||||
|
|
||||||
|
## 3.28.14 - 07 Apr 2025
|
||||||
|
|
||||||
|
- Update default CodeQL bundle version to 2.21.0. [#2838](https://github.com/github/codeql-action/pull/2838)
|
||||||
|
|
||||||
|
## 3.28.13 - 24 Mar 2025
|
||||||
|
|
||||||
|
No user facing changes.
|
||||||
|
|
||||||
|
## 3.28.12 - 19 Mar 2025
|
||||||
|
|
||||||
|
- Dependency caching should now cache more dependencies for Java `build-mode: none` extractions. This should speed up workflows and avoid inconsistent alerts in some cases.
|
||||||
|
- Update default CodeQL bundle version to 2.20.7. [#2810](https://github.com/github/codeql-action/pull/2810)
|
||||||
|
|
||||||
## 3.28.11 - 07 Mar 2025
|
## 3.28.11 - 07 Mar 2025
|
||||||
|
|
||||||
- Update default CodeQL bundle version to 2.20.6. [#2793](https://github.com/github/codeql-action/pull/2793)
|
- Update default CodeQL bundle version to 2.20.6. [#2793](https://github.com/github/codeql-action/pull/2793)
|
||||||
|
|||||||
11
README.md
11
README.md
@@ -55,7 +55,7 @@ For compiled languages:
|
|||||||
|
|
||||||
- `manual` build mode will typically produce the most precise results, but it is more difficult to set up and will cause the analysis to take slightly more time to run.
|
- `manual` build mode will typically produce the most precise results, but it is more difficult to set up and will cause the analysis to take slightly more time to run.
|
||||||
- `autobuild` build mode is simpler to set up, but will only work for projects with generic build steps that can be guessed by the heuristics of the autobuild scripts. If `autobuild` fails, then you must switch to `manual` or `none`. If `autobuild` succeeds, then the results and run time will be the same as `manual` mode.
|
- `autobuild` build mode is simpler to set up, but will only work for projects with generic build steps that can be guessed by the heuristics of the autobuild scripts. If `autobuild` fails, then you must switch to `manual` or `none`. If `autobuild` succeeds, then the results and run time will be the same as `manual` mode.
|
||||||
- `none` build mode is also simpler to set up and is slightly faster to run, but there is a possibility that some alerts will be missed. This may happen if your repository does any code generation during compilation or if there are any dependencies downloaded from registries that the workflow does not have access to. `none` is not yet supported by C/C++, Swift, Go, or Kotlin.
|
- `none` build mode is also simpler to set up and is slightly faster to run, but there is a possibility that some alerts will be missed. This may happen if your repository does any code generation during compilation or if there are any dependencies downloaded from registries that the workflow does not have access to. `none` is not yet supported by Swift, Go, or Kotlin. It is in public preview for C/C++.
|
||||||
|
|
||||||
|
|
||||||
## Supported versions of the CodeQL Action
|
## Supported versions of the CodeQL Action
|
||||||
@@ -70,10 +70,11 @@ We typically release new minor versions of the CodeQL Action and Bundle when a n
|
|||||||
|
|
||||||
| Minimum CodeQL Action | Minimum CodeQL Bundle Version | GitHub Environment | Notes |
|
| Minimum CodeQL Action | Minimum CodeQL Bundle Version | GitHub Environment | Notes |
|
||||||
|-----------------------|-------------------------------|--------------------|-------|
|
|-----------------------|-------------------------------|--------------------|-------|
|
||||||
| `v3.26.6` | `2.18.4` | Enterprise Server 3.15 | |
|
| `v3.28.21` | `2.21.3` | Enterprise Server 3.18 | |
|
||||||
| `v3.25.11` | `2.17.6` | Enterprise Server 3.14 | |
|
| `v3.28.12` | `2.20.7` | Enterprise Server 3.17 | |
|
||||||
| `v3.24.11` | `2.16.6` | Enterprise Server 3.13 | |
|
| `v3.28.6` | `2.20.3` | Enterprise Server 3.16 | |
|
||||||
| `v3.22.12` | `2.15.5` | Enterprise Server 3.12 | |
|
| `v3.28.6` | `2.20.3` | Enterprise Server 3.15 | |
|
||||||
|
| `v3.28.6` | `2.20.3` | Enterprise Server 3.14 | |
|
||||||
|
|
||||||
See the full list of GHES release and deprecation dates at [GitHub Enterprise Server releases](https://docs.github.com/en/enterprise-server/admin/all-releases#releases-of-github-enterprise-server).
|
See the full list of GHES release and deprecation dates at [GitHub Enterprise Server releases](https://docs.github.com/en/enterprise-server/admin/all-releases#releases-of-github-enterprise-server).
|
||||||
|
|
||||||
|
|||||||
@@ -1,44 +0,0 @@
|
|||||||
name: "actions"
|
|
||||||
aliases: []
|
|
||||||
display_name: "GitHub Actions"
|
|
||||||
version: 0.0.1
|
|
||||||
column_kind: "utf16"
|
|
||||||
unicode_newlines: true
|
|
||||||
build_modes:
|
|
||||||
- none
|
|
||||||
file_coverage_languages: []
|
|
||||||
github_api_languages: []
|
|
||||||
scc_languages: []
|
|
||||||
file_types:
|
|
||||||
- name: workflow
|
|
||||||
display_name: GitHub Actions workflow files
|
|
||||||
extensions:
|
|
||||||
- .yml
|
|
||||||
- .yaml
|
|
||||||
forwarded_extractor_name: javascript
|
|
||||||
options:
|
|
||||||
trap:
|
|
||||||
title: TRAP options
|
|
||||||
description: Options about how the extractor handles TRAP files
|
|
||||||
type: object
|
|
||||||
visibility: 3
|
|
||||||
properties:
|
|
||||||
cache:
|
|
||||||
title: TRAP cache options
|
|
||||||
description: Options about how the extractor handles its TRAP cache
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
dir:
|
|
||||||
title: TRAP cache directory
|
|
||||||
description: The directory of the TRAP cache to use
|
|
||||||
type: string
|
|
||||||
bound:
|
|
||||||
title: TRAP cache bound
|
|
||||||
description: A soft limit (in MB) on the size of the TRAP cache
|
|
||||||
type: string
|
|
||||||
pattern: "[0-9]+"
|
|
||||||
write:
|
|
||||||
title: TRAP cache writeable
|
|
||||||
description: Whether to write to the TRAP cache as well as reading it
|
|
||||||
type: string
|
|
||||||
pattern: "(true|TRUE|false|FALSE)"
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
if (($null -ne $env:LGTM_INDEX_INCLUDE) -or ($null -ne $env:LGTM_INDEX_EXCLUDE) -or ($null -ne $env:LGTM_INDEX_FILTERS)) {
|
|
||||||
Write-Output 'Path filters set. Passing them through to the JavaScript extractor.'
|
|
||||||
} else {
|
|
||||||
Write-Output 'No path filters set. Using the default filters.'
|
|
||||||
$DefaultPathFilters = @(
|
|
||||||
'exclude:**/*',
|
|
||||||
'include:.github/workflows/**/*.yml',
|
|
||||||
'include:.github/workflows/**/*.yaml',
|
|
||||||
'include:**/action.yml',
|
|
||||||
'include:**/action.yaml'
|
|
||||||
)
|
|
||||||
|
|
||||||
$env:LGTM_INDEX_FILTERS = $DefaultPathFilters -join "`n"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Find the JavaScript extractor directory via `codeql resolve extractor`.
|
|
||||||
$CodeQL = Join-Path $env:CODEQL_DIST 'codeql.exe'
|
|
||||||
$env:CODEQL_EXTRACTOR_JAVASCRIPT_ROOT = &$CodeQL resolve extractor --language javascript
|
|
||||||
if ($LASTEXITCODE -ne 0) {
|
|
||||||
throw 'Failed to resolve JavaScript extractor.'
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Output "Found JavaScript extractor at '${env:CODEQL_EXTRACTOR_JAVASCRIPT_ROOT}'."
|
|
||||||
|
|
||||||
# Run the JavaScript autobuilder.
|
|
||||||
$JavaScriptAutoBuild = Join-Path $env:CODEQL_EXTRACTOR_JAVASCRIPT_ROOT 'tools\autobuild.cmd'
|
|
||||||
Write-Output "Running JavaScript autobuilder at '${JavaScriptAutoBuild}'."
|
|
||||||
|
|
||||||
# Copy the values of the Actions extractor environment variables to the JavaScript extractor environment variables.
|
|
||||||
$env:CODEQL_EXTRACTOR_JAVASCRIPT_DIAGNOSTIC_DIR = $env:CODEQL_EXTRACTOR_ACTIONS_DIAGNOSTIC_DIR
|
|
||||||
$env:CODEQL_EXTRACTOR_JAVASCRIPT_LOG_DIR = $env:CODEQL_EXTRACTOR_ACTIONS_LOG_DIR
|
|
||||||
$env:CODEQL_EXTRACTOR_JAVASCRIPT_SCRATCH_DIR = $env:CODEQL_EXTRACTOR_ACTIONS_SCRATCH_DIR
|
|
||||||
$env:CODEQL_EXTRACTOR_JAVASCRIPT_SOURCE_ARCHIVE_DIR = $env:CODEQL_EXTRACTOR_ACTIONS_SOURCE_ARCHIVE_DIR
|
|
||||||
$env:CODEQL_EXTRACTOR_JAVASCRIPT_TRAP_DIR = $env:CODEQL_EXTRACTOR_ACTIONS_TRAP_DIR
|
|
||||||
$env:CODEQL_EXTRACTOR_JAVASCRIPT_WIP_DATABASE = $env:CODEQL_EXTRACTOR_ACTIONS_WIP_DATABASE
|
|
||||||
|
|
||||||
&$JavaScriptAutoBuild
|
|
||||||
if ($LASTEXITCODE -ne 0) {
|
|
||||||
throw "JavaScript autobuilder failed."
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
@echo off
|
|
||||||
rem All of the work is done in the PowerShell script
|
|
||||||
powershell.exe %~dp0autobuild-impl.ps1
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
DEFAULT_PATH_FILTERS=$(cat << END
|
|
||||||
exclude:**/*
|
|
||||||
include:.github/workflows/**/*.yml
|
|
||||||
include:.github/workflows/**/*.yaml
|
|
||||||
include:**/action.yml
|
|
||||||
include:**/action.yaml
|
|
||||||
END
|
|
||||||
)
|
|
||||||
|
|
||||||
if [ -n "${LGTM_INDEX_INCLUDE:-}" ] || [ -n "${LGTM_INDEX_EXCLUDE:-}" ] || [ -n "${LGTM_INDEX_FILTERS:-}" ] ; then
|
|
||||||
echo "Path filters set. Passing them through to the JavaScript extractor."
|
|
||||||
else
|
|
||||||
echo "No path filters set. Using the default filters."
|
|
||||||
LGTM_INDEX_FILTERS="${DEFAULT_PATH_FILTERS}"
|
|
||||||
export LGTM_INDEX_FILTERS
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Find the JavaScript extractor directory via `codeql resolve extractor`.
|
|
||||||
CODEQL_EXTRACTOR_JAVASCRIPT_ROOT="$($CODEQL_DIST/codeql resolve extractor --language javascript)"
|
|
||||||
export CODEQL_EXTRACTOR_JAVASCRIPT_ROOT
|
|
||||||
|
|
||||||
echo "Found JavaScript extractor at '${CODEQL_EXTRACTOR_JAVASCRIPT_ROOT}'."
|
|
||||||
|
|
||||||
# Run the JavaScript autobuilder
|
|
||||||
JAVASCRIPT_AUTO_BUILD="${CODEQL_EXTRACTOR_JAVASCRIPT_ROOT}/tools/autobuild.sh"
|
|
||||||
echo "Running JavaScript autobuilder at '${JAVASCRIPT_AUTO_BUILD}'."
|
|
||||||
|
|
||||||
# Copy the values of the Actions extractor environment variables to the JavaScript extractor environment variables.
|
|
||||||
env CODEQL_EXTRACTOR_JAVASCRIPT_DIAGNOSTIC_DIR="${CODEQL_EXTRACTOR_ACTIONS_DIAGNOSTIC_DIR}" \
|
|
||||||
CODEQL_EXTRACTOR_JAVASCRIPT_LOG_DIR="${CODEQL_EXTRACTOR_ACTIONS_LOG_DIR}" \
|
|
||||||
CODEQL_EXTRACTOR_JAVASCRIPT_SCRATCH_DIR="${CODEQL_EXTRACTOR_ACTIONS_SCRATCH_DIR}" \
|
|
||||||
CODEQL_EXTRACTOR_JAVASCRIPT_SOURCE_ARCHIVE_DIR="${CODEQL_EXTRACTOR_ACTIONS_SOURCE_ARCHIVE_DIR}" \
|
|
||||||
CODEQL_EXTRACTOR_JAVASCRIPT_TRAP_DIR="${CODEQL_EXTRACTOR_ACTIONS_TRAP_DIR}" \
|
|
||||||
CODEQL_EXTRACTOR_JAVASCRIPT_WIP_DATABASE="${CODEQL_EXTRACTOR_ACTIONS_WIP_DATABASE}" \
|
|
||||||
${JAVASCRIPT_AUTO_BUILD}
|
|
||||||
@@ -19,9 +19,10 @@ inputs:
|
|||||||
# If changing this, make sure to update workflow.ts accordingly.
|
# If changing this, make sure to update workflow.ts accordingly.
|
||||||
default: "always"
|
default: "always"
|
||||||
cleanup-level:
|
cleanup-level:
|
||||||
description: "Level of cleanup to perform on CodeQL databases at the end of the analyze step. This should either be 'none' to skip cleanup, or be a valid argument for the --cache-cleanup flag of the CodeQL CLI command 'codeql database cleanup' as documented at https://codeql.github.com/docs/codeql-cli/manual/database-cleanup"
|
description: >-
|
||||||
|
DEPRECATED. This option is ignored since, for performance reasons, the CodeQL Action automatically
|
||||||
|
manages cleanup of intermediate results.
|
||||||
required: false
|
required: false
|
||||||
default: "brutal"
|
|
||||||
ram:
|
ram:
|
||||||
description: >-
|
description: >-
|
||||||
The amount of memory in MB that can be used by CodeQL for database finalization and query execution.
|
The amount of memory in MB that can be used by CodeQL for database finalization and query execution.
|
||||||
|
|||||||
@@ -138,6 +138,7 @@ export default [
|
|||||||
rules: {
|
rules: {
|
||||||
"@typescript-eslint/no-explicit-any": "off",
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
"@typescript-eslint/no-unsafe-assignment": "off",
|
"@typescript-eslint/no-unsafe-assignment": "off",
|
||||||
|
"@typescript-eslint/no-unsafe-enum-comparison": "off",
|
||||||
"@typescript-eslint/no-unsafe-member-access": "off",
|
"@typescript-eslint/no-unsafe-member-access": "off",
|
||||||
"@typescript-eslint/no-var-requires": "off",
|
"@typescript-eslint/no-var-requires": "off",
|
||||||
"@typescript-eslint/prefer-regexp-exec": "off",
|
"@typescript-eslint/prefer-regexp-exec": "off",
|
||||||
|
|||||||
@@ -83,6 +83,9 @@ inputs:
|
|||||||
queries:
|
queries:
|
||||||
description: Comma-separated list of additional queries to run. By default, this overrides the same setting in a configuration file; prefix with "+" to use both sets of queries.
|
description: Comma-separated list of additional queries to run. By default, this overrides the same setting in a configuration file; prefix with "+" to use both sets of queries.
|
||||||
required: false
|
required: false
|
||||||
|
quality-queries:
|
||||||
|
description: '[Internal] Comma-separated list of code quality queries to run.'
|
||||||
|
required: false
|
||||||
packs:
|
packs:
|
||||||
description: >-
|
description: >-
|
||||||
Comma-separated list of packs to run. Reference a pack in the format `scope/name[@version]`. If `version` is not
|
Comma-separated list of packs to run. Reference a pack in the format `scope/name[@version]`. If `version` is not
|
||||||
|
|||||||
15
justfile
15
justfile
@@ -3,7 +3,7 @@ all: lint sync
|
|||||||
|
|
||||||
# Lint source typescript
|
# Lint source typescript
|
||||||
lint:
|
lint:
|
||||||
npm run lint -- --fix
|
npm run lint-fix
|
||||||
|
|
||||||
# Sync generated files (javascript and PR checks)
|
# Sync generated files (javascript and PR checks)
|
||||||
sync: build update-pr-checks
|
sync: build update-pr-checks
|
||||||
@@ -15,3 +15,16 @@ update-pr-checks:
|
|||||||
# Transpile typescript code into javascript
|
# Transpile typescript code into javascript
|
||||||
build:
|
build:
|
||||||
npm run build
|
npm run build
|
||||||
|
|
||||||
|
# Build then run all the tests
|
||||||
|
test: build
|
||||||
|
npm run test
|
||||||
|
|
||||||
|
# Run the tests for a single file
|
||||||
|
test_file filename: build
|
||||||
|
npx ava --verbose {{filename}}
|
||||||
|
|
||||||
|
[doc("Refresh the .js build artefacts in the lib directory")]
|
||||||
|
[confirm]
|
||||||
|
refresh-lib:
|
||||||
|
rm -rf lib && npm run build
|
||||||
|
|||||||
77
lib/actions-util.js
generated
77
lib/actions-util.js
generated
@@ -49,10 +49,14 @@ exports.isDefaultSetup = isDefaultSetup;
|
|||||||
exports.prettyPrintInvocation = prettyPrintInvocation;
|
exports.prettyPrintInvocation = prettyPrintInvocation;
|
||||||
exports.ensureEndsInPeriod = ensureEndsInPeriod;
|
exports.ensureEndsInPeriod = ensureEndsInPeriod;
|
||||||
exports.runTool = runTool;
|
exports.runTool = runTool;
|
||||||
|
exports.getPullRequestBranches = getPullRequestBranches;
|
||||||
|
exports.isAnalyzingPullRequest = isAnalyzingPullRequest;
|
||||||
|
exports.fixCodeQualityCategory = fixCodeQualityCategory;
|
||||||
const fs = __importStar(require("fs"));
|
const fs = __importStar(require("fs"));
|
||||||
const path = __importStar(require("path"));
|
const path = __importStar(require("path"));
|
||||||
const core = __importStar(require("@actions/core"));
|
const core = __importStar(require("@actions/core"));
|
||||||
const toolrunner = __importStar(require("@actions/exec/lib/toolrunner"));
|
const toolrunner = __importStar(require("@actions/exec/lib/toolrunner"));
|
||||||
|
const github = __importStar(require("@actions/github"));
|
||||||
const io = __importStar(require("@actions/io"));
|
const io = __importStar(require("@actions/io"));
|
||||||
const util_1 = require("./util");
|
const util_1 = require("./util");
|
||||||
// eslint-disable-next-line import/no-commonjs, @typescript-eslint/no-require-imports
|
// eslint-disable-next-line import/no-commonjs, @typescript-eslint/no-require-imports
|
||||||
@@ -261,7 +265,7 @@ function prettyPrintInvocation(cmd, args) {
|
|||||||
* An error from a tool invocation, with associated exit code, stderr, etc.
|
* An error from a tool invocation, with associated exit code, stderr, etc.
|
||||||
*/
|
*/
|
||||||
class CommandInvocationError extends Error {
|
class CommandInvocationError extends Error {
|
||||||
constructor(cmd, args, exitCode, stderr, stdout) {
|
constructor(cmd, args, exitCode, stderr, stdout = "") {
|
||||||
const prettyCommand = prettyPrintInvocation(cmd, args);
|
const prettyCommand = prettyPrintInvocation(cmd, args);
|
||||||
const lastLine = ensureEndsInPeriod(stderr.trim().split("\n").pop()?.trim() || "n/a");
|
const lastLine = ensureEndsInPeriod(stderr.trim().split("\n").pop()?.trim() || "n/a");
|
||||||
super(`Failed to run "${prettyCommand}". ` +
|
super(`Failed to run "${prettyCommand}". ` +
|
||||||
@@ -352,4 +356,75 @@ const restoreInputs = function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
exports.restoreInputs = restoreInputs;
|
exports.restoreInputs = restoreInputs;
|
||||||
|
/**
|
||||||
|
* Returns the base and head branches of the pull request being analyzed.
|
||||||
|
*
|
||||||
|
* @returns the base and head branches of the pull request, or undefined if
|
||||||
|
* we are not analyzing a pull request.
|
||||||
|
*/
|
||||||
|
function getPullRequestBranches() {
|
||||||
|
const pullRequest = github.context.payload.pull_request;
|
||||||
|
if (pullRequest) {
|
||||||
|
return {
|
||||||
|
base: pullRequest.base.ref,
|
||||||
|
// We use the head label instead of the head ref here, because the head
|
||||||
|
// ref lacks owner information and by itself does not uniquely identify
|
||||||
|
// the head branch (which may be in a forked repository).
|
||||||
|
head: pullRequest.head.label,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
// PR analysis under Default Setup does not have the pull_request context,
|
||||||
|
// but it should set CODE_SCANNING_REF and CODE_SCANNING_BASE_BRANCH.
|
||||||
|
const codeScanningRef = process.env.CODE_SCANNING_REF;
|
||||||
|
const codeScanningBaseBranch = process.env.CODE_SCANNING_BASE_BRANCH;
|
||||||
|
if (codeScanningRef && codeScanningBaseBranch) {
|
||||||
|
return {
|
||||||
|
base: codeScanningBaseBranch,
|
||||||
|
// PR analysis under Default Setup analyzes the PR head commit instead of
|
||||||
|
// the merge commit, so we can use the provided ref directly.
|
||||||
|
head: codeScanningRef,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Returns whether we are analyzing a pull request.
|
||||||
|
*/
|
||||||
|
function isAnalyzingPullRequest() {
|
||||||
|
return getPullRequestBranches() !== undefined;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* A workaround for code quality to map category names from old default setup workflows
|
||||||
|
* to ones that the code quality service expects.
|
||||||
|
*/
|
||||||
|
const qualityCategoryMapping = {
|
||||||
|
"c#": "csharp",
|
||||||
|
cpp: "c-cpp",
|
||||||
|
c: "c-cpp",
|
||||||
|
"c++": "c-cpp",
|
||||||
|
java: "java-kotlin",
|
||||||
|
javascript: "javascript-typescript",
|
||||||
|
typescript: "javascript-typescript",
|
||||||
|
kotlin: "java-kotlin",
|
||||||
|
};
|
||||||
|
/** Adjusts the category string for a Code Quality SARIF file if an "old"
|
||||||
|
* category identifier is used by Default Setup.
|
||||||
|
*/
|
||||||
|
function fixCodeQualityCategory(logger, category) {
|
||||||
|
// The `category` should always be set by Default Setup. We perform this check
|
||||||
|
// to avoid potential issues if Code Quality supports Advanced Setup in the future
|
||||||
|
// and before this workaround is removed.
|
||||||
|
if (category !== undefined &&
|
||||||
|
isDefaultSetup() &&
|
||||||
|
category.startsWith("/language:")) {
|
||||||
|
const language = category.substring("/language:".length);
|
||||||
|
const mappedLanguage = qualityCategoryMapping[language];
|
||||||
|
if (mappedLanguage) {
|
||||||
|
const newCategory = `/language:${mappedLanguage}`;
|
||||||
|
logger.info(`Adjusted category for Code Quality from '${category}' to '${newCategory}'.`);
|
||||||
|
return newCategory;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return category;
|
||||||
|
}
|
||||||
//# sourceMappingURL=actions-util.js.map
|
//# sourceMappingURL=actions-util.js.map
|
||||||
File diff suppressed because one or more lines are too long
160
lib/actions-util.test.js
generated
160
lib/actions-util.test.js
generated
@@ -1,14 +1,79 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
|
if (k2 === undefined) k2 = k;
|
||||||
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||||
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||||
|
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||||
|
}
|
||||||
|
Object.defineProperty(o, k2, desc);
|
||||||
|
}) : (function(o, m, k, k2) {
|
||||||
|
if (k2 === undefined) k2 = k;
|
||||||
|
o[k2] = m[k];
|
||||||
|
}));
|
||||||
|
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||||
|
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||||
|
}) : function(o, v) {
|
||||||
|
o["default"] = v;
|
||||||
|
});
|
||||||
|
var __importStar = (this && this.__importStar) || (function () {
|
||||||
|
var ownKeys = function(o) {
|
||||||
|
ownKeys = Object.getOwnPropertyNames || function (o) {
|
||||||
|
var ar = [];
|
||||||
|
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
||||||
|
return ar;
|
||||||
|
};
|
||||||
|
return ownKeys(o);
|
||||||
|
};
|
||||||
|
return function (mod) {
|
||||||
|
if (mod && mod.__esModule) return mod;
|
||||||
|
var result = {};
|
||||||
|
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
||||||
|
__setModuleDefault(result, mod);
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
})();
|
||||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
const github = __importStar(require("@actions/github"));
|
||||||
const ava_1 = __importDefault(require("ava"));
|
const ava_1 = __importDefault(require("ava"));
|
||||||
|
const actions_util_1 = require("./actions-util");
|
||||||
const api_client_1 = require("./api-client");
|
const api_client_1 = require("./api-client");
|
||||||
const environment_1 = require("./environment");
|
const environment_1 = require("./environment");
|
||||||
|
const logging_1 = require("./logging");
|
||||||
const testing_utils_1 = require("./testing-utils");
|
const testing_utils_1 = require("./testing-utils");
|
||||||
const util_1 = require("./util");
|
const util_1 = require("./util");
|
||||||
(0, testing_utils_1.setupTests)(ava_1.default);
|
(0, testing_utils_1.setupTests)(ava_1.default);
|
||||||
|
function withMockedContext(mockPayload, testFn) {
|
||||||
|
const originalPayload = github.context.payload;
|
||||||
|
github.context.payload = mockPayload;
|
||||||
|
try {
|
||||||
|
return testFn();
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
github.context.payload = originalPayload;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function withMockedEnv(envVars, testFn) {
|
||||||
|
const originalEnv = { ...process.env };
|
||||||
|
// Apply environment changes
|
||||||
|
for (const [key, value] of Object.entries(envVars)) {
|
||||||
|
if (value === undefined) {
|
||||||
|
delete process.env[key];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
process.env[key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
return testFn();
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
// Restore original environment
|
||||||
|
process.env = originalEnv;
|
||||||
|
}
|
||||||
|
}
|
||||||
(0, ava_1.default)("computeAutomationID()", async (t) => {
|
(0, ava_1.default)("computeAutomationID()", async (t) => {
|
||||||
let actualAutomationID = (0, api_client_1.computeAutomationID)(".github/workflows/codeql-analysis.yml:analyze", '{"language": "javascript", "os": "linux"}');
|
let actualAutomationID = (0, api_client_1.computeAutomationID)(".github/workflows/codeql-analysis.yml:analyze", '{"language": "javascript", "os": "linux"}');
|
||||||
t.deepEqual(actualAutomationID, ".github/workflows/codeql-analysis.yml:analyze/language:javascript/os:linux/");
|
t.deepEqual(actualAutomationID, ".github/workflows/codeql-analysis.yml:analyze/language:javascript/os:linux/");
|
||||||
@@ -25,8 +90,103 @@ const util_1 = require("./util");
|
|||||||
actualAutomationID = (0, api_client_1.computeAutomationID)(".github/workflows/codeql-analysis.yml:analyze", undefined);
|
actualAutomationID = (0, api_client_1.computeAutomationID)(".github/workflows/codeql-analysis.yml:analyze", undefined);
|
||||||
t.deepEqual(actualAutomationID, ".github/workflows/codeql-analysis.yml:analyze/");
|
t.deepEqual(actualAutomationID, ".github/workflows/codeql-analysis.yml:analyze/");
|
||||||
});
|
});
|
||||||
|
(0, ava_1.default)("getPullRequestBranches() with pull request context", (t) => {
|
||||||
|
withMockedContext({
|
||||||
|
pull_request: {
|
||||||
|
number: 123,
|
||||||
|
base: { ref: "main" },
|
||||||
|
head: { label: "user:feature-branch" },
|
||||||
|
},
|
||||||
|
}, () => {
|
||||||
|
t.deepEqual((0, actions_util_1.getPullRequestBranches)(), {
|
||||||
|
base: "main",
|
||||||
|
head: "user:feature-branch",
|
||||||
|
});
|
||||||
|
t.is((0, actions_util_1.isAnalyzingPullRequest)(), true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
(0, ava_1.default)("getPullRequestBranches() returns undefined with push context", (t) => {
|
||||||
|
withMockedContext({
|
||||||
|
push: {
|
||||||
|
ref: "refs/heads/main",
|
||||||
|
},
|
||||||
|
}, () => {
|
||||||
|
t.is((0, actions_util_1.getPullRequestBranches)(), undefined);
|
||||||
|
t.is((0, actions_util_1.isAnalyzingPullRequest)(), false);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
(0, ava_1.default)("getPullRequestBranches() with Default Setup environment variables", (t) => {
|
||||||
|
withMockedContext({}, () => {
|
||||||
|
withMockedEnv({
|
||||||
|
CODE_SCANNING_REF: "refs/heads/feature-branch",
|
||||||
|
CODE_SCANNING_BASE_BRANCH: "main",
|
||||||
|
}, () => {
|
||||||
|
t.deepEqual((0, actions_util_1.getPullRequestBranches)(), {
|
||||||
|
base: "main",
|
||||||
|
head: "refs/heads/feature-branch",
|
||||||
|
});
|
||||||
|
t.is((0, actions_util_1.isAnalyzingPullRequest)(), true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
(0, ava_1.default)("getPullRequestBranches() returns undefined when only CODE_SCANNING_REF is set", (t) => {
|
||||||
|
withMockedContext({}, () => {
|
||||||
|
withMockedEnv({
|
||||||
|
CODE_SCANNING_REF: "refs/heads/feature-branch",
|
||||||
|
CODE_SCANNING_BASE_BRANCH: undefined,
|
||||||
|
}, () => {
|
||||||
|
t.is((0, actions_util_1.getPullRequestBranches)(), undefined);
|
||||||
|
t.is((0, actions_util_1.isAnalyzingPullRequest)(), false);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
(0, ava_1.default)("getPullRequestBranches() returns undefined when only CODE_SCANNING_BASE_BRANCH is set", (t) => {
|
||||||
|
withMockedContext({}, () => {
|
||||||
|
withMockedEnv({
|
||||||
|
CODE_SCANNING_REF: undefined,
|
||||||
|
CODE_SCANNING_BASE_BRANCH: "main",
|
||||||
|
}, () => {
|
||||||
|
t.is((0, actions_util_1.getPullRequestBranches)(), undefined);
|
||||||
|
t.is((0, actions_util_1.isAnalyzingPullRequest)(), false);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
(0, ava_1.default)("getPullRequestBranches() returns undefined when no PR context", (t) => {
|
||||||
|
withMockedContext({}, () => {
|
||||||
|
withMockedEnv({
|
||||||
|
CODE_SCANNING_REF: undefined,
|
||||||
|
CODE_SCANNING_BASE_BRANCH: undefined,
|
||||||
|
}, () => {
|
||||||
|
t.is((0, actions_util_1.getPullRequestBranches)(), undefined);
|
||||||
|
t.is((0, actions_util_1.isAnalyzingPullRequest)(), false);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
(0, ava_1.default)("initializeEnvironment", (t) => {
|
(0, ava_1.default)("initializeEnvironment", (t) => {
|
||||||
(0, util_1.initializeEnvironment)("1.2.3");
|
(0, util_1.initializeEnvironment)("1.2.3");
|
||||||
t.deepEqual(process.env[environment_1.EnvVar.VERSION], "1.2.3");
|
t.deepEqual(process.env[environment_1.EnvVar.VERSION], "1.2.3");
|
||||||
});
|
});
|
||||||
|
(0, ava_1.default)("fixCodeQualityCategory", (t) => {
|
||||||
|
withMockedEnv({
|
||||||
|
GITHUB_EVENT_NAME: "dynamic",
|
||||||
|
}, () => {
|
||||||
|
const logger = (0, logging_1.getRunnerLogger)(true);
|
||||||
|
// Categories that should get adjusted.
|
||||||
|
t.is((0, actions_util_1.fixCodeQualityCategory)(logger, "/language:c#"), "/language:csharp");
|
||||||
|
t.is((0, actions_util_1.fixCodeQualityCategory)(logger, "/language:cpp"), "/language:c-cpp");
|
||||||
|
t.is((0, actions_util_1.fixCodeQualityCategory)(logger, "/language:c"), "/language:c-cpp");
|
||||||
|
t.is((0, actions_util_1.fixCodeQualityCategory)(logger, "/language:java"), "/language:java-kotlin");
|
||||||
|
t.is((0, actions_util_1.fixCodeQualityCategory)(logger, "/language:javascript"), "/language:javascript-typescript");
|
||||||
|
t.is((0, actions_util_1.fixCodeQualityCategory)(logger, "/language:typescript"), "/language:javascript-typescript");
|
||||||
|
t.is((0, actions_util_1.fixCodeQualityCategory)(logger, "/language:kotlin"), "/language:java-kotlin");
|
||||||
|
// Categories that should not get adjusted.
|
||||||
|
t.is((0, actions_util_1.fixCodeQualityCategory)(logger, "/language:csharp"), "/language:csharp");
|
||||||
|
t.is((0, actions_util_1.fixCodeQualityCategory)(logger, "/language:go"), "/language:go");
|
||||||
|
t.is((0, actions_util_1.fixCodeQualityCategory)(logger, "/language:actions"), "/language:actions");
|
||||||
|
// Other cases.
|
||||||
|
t.is((0, actions_util_1.fixCodeQualityCategory)(logger, undefined), undefined);
|
||||||
|
t.is((0, actions_util_1.fixCodeQualityCategory)(logger, "random string"), "random string");
|
||||||
|
t.is((0, actions_util_1.fixCodeQualityCategory)(logger, "kotlin"), "kotlin");
|
||||||
|
});
|
||||||
|
});
|
||||||
//# sourceMappingURL=actions-util.test.js.map
|
//# sourceMappingURL=actions-util.test.js.map
|
||||||
File diff suppressed because one or more lines are too long
5
lib/analyze-action-env.test.js
generated
5
lib/analyze-action-env.test.js
generated
@@ -68,6 +68,7 @@ const util = __importStar(require("./util"));
|
|||||||
};
|
};
|
||||||
sinon.stub(configUtils, "getConfig").resolves({
|
sinon.stub(configUtils, "getConfig").resolves({
|
||||||
gitHubVersion,
|
gitHubVersion,
|
||||||
|
augmentationProperties: {},
|
||||||
languages: [],
|
languages: [],
|
||||||
packs: [],
|
packs: [],
|
||||||
trapCaches: {},
|
trapCaches: {},
|
||||||
@@ -75,8 +76,8 @@ const util = __importStar(require("./util"));
|
|||||||
const requiredInputStub = sinon.stub(actionsUtil, "getRequiredInput");
|
const requiredInputStub = sinon.stub(actionsUtil, "getRequiredInput");
|
||||||
requiredInputStub.withArgs("token").returns("fake-token");
|
requiredInputStub.withArgs("token").returns("fake-token");
|
||||||
requiredInputStub.withArgs("upload-database").returns("false");
|
requiredInputStub.withArgs("upload-database").returns("false");
|
||||||
|
requiredInputStub.withArgs("output").returns("out");
|
||||||
const optionalInputStub = sinon.stub(actionsUtil, "getOptionalInput");
|
const optionalInputStub = sinon.stub(actionsUtil, "getOptionalInput");
|
||||||
optionalInputStub.withArgs("cleanup-level").returns("none");
|
|
||||||
optionalInputStub.withArgs("expect-error").returns("false");
|
optionalInputStub.withArgs("expect-error").returns("false");
|
||||||
sinon.stub(api, "getGitHubVersion").resolves(gitHubVersion);
|
sinon.stub(api, "getGitHubVersion").resolves(gitHubVersion);
|
||||||
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
|
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
|
||||||
@@ -95,8 +96,10 @@ const util = __importStar(require("./util"));
|
|||||||
// runFinalize and runQueries are correctly captured by spies, we explicitly
|
// runFinalize and runQueries are correctly captured by spies, we explicitly
|
||||||
// wait for the action promise to complete before starting verification.
|
// wait for the action promise to complete before starting verification.
|
||||||
await analyzeAction.runPromise;
|
await analyzeAction.runPromise;
|
||||||
|
t.assert(runFinalizeStub.calledOnce);
|
||||||
t.deepEqual(runFinalizeStub.firstCall.args[1], "--threads=-1");
|
t.deepEqual(runFinalizeStub.firstCall.args[1], "--threads=-1");
|
||||||
t.deepEqual(runFinalizeStub.firstCall.args[2], "--ram=4992");
|
t.deepEqual(runFinalizeStub.firstCall.args[2], "--ram=4992");
|
||||||
|
t.assert(runQueriesStub.calledOnce);
|
||||||
t.deepEqual(runQueriesStub.firstCall.args[3], "--threads=-1");
|
t.deepEqual(runQueriesStub.firstCall.args[3], "--threads=-1");
|
||||||
t.deepEqual(runQueriesStub.firstCall.args[1], "--ram=4992");
|
t.deepEqual(runQueriesStub.firstCall.args[1], "--ram=4992");
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"analyze-action-env.test.js","sourceRoot":"","sources":["../src/analyze-action-env.test.ts"],"names":[],"mappings":"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"}
|
{"version":3,"file":"analyze-action-env.test.js","sourceRoot":"","sources":["../src/analyze-action-env.test.ts"],"names":[],"mappings":"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"}
|
||||||
5
lib/analyze-action-input.test.js
generated
5
lib/analyze-action-input.test.js
generated
@@ -67,6 +67,7 @@ const util = __importStar(require("./util"));
|
|||||||
};
|
};
|
||||||
sinon.stub(configUtils, "getConfig").resolves({
|
sinon.stub(configUtils, "getConfig").resolves({
|
||||||
gitHubVersion,
|
gitHubVersion,
|
||||||
|
augmentationProperties: {},
|
||||||
languages: [],
|
languages: [],
|
||||||
packs: [],
|
packs: [],
|
||||||
trapCaches: {},
|
trapCaches: {},
|
||||||
@@ -74,8 +75,8 @@ const util = __importStar(require("./util"));
|
|||||||
const requiredInputStub = sinon.stub(actionsUtil, "getRequiredInput");
|
const requiredInputStub = sinon.stub(actionsUtil, "getRequiredInput");
|
||||||
requiredInputStub.withArgs("token").returns("fake-token");
|
requiredInputStub.withArgs("token").returns("fake-token");
|
||||||
requiredInputStub.withArgs("upload-database").returns("false");
|
requiredInputStub.withArgs("upload-database").returns("false");
|
||||||
|
requiredInputStub.withArgs("output").returns("out");
|
||||||
const optionalInputStub = sinon.stub(actionsUtil, "getOptionalInput");
|
const optionalInputStub = sinon.stub(actionsUtil, "getOptionalInput");
|
||||||
optionalInputStub.withArgs("cleanup-level").returns("none");
|
|
||||||
optionalInputStub.withArgs("expect-error").returns("false");
|
optionalInputStub.withArgs("expect-error").returns("false");
|
||||||
sinon.stub(api, "getGitHubVersion").resolves(gitHubVersion);
|
sinon.stub(api, "getGitHubVersion").resolves(gitHubVersion);
|
||||||
sinon.stub(gitUtils, "isAnalyzingDefaultBranch").resolves(true);
|
sinon.stub(gitUtils, "isAnalyzingDefaultBranch").resolves(true);
|
||||||
@@ -95,8 +96,10 @@ const util = __importStar(require("./util"));
|
|||||||
// runFinalize and runQueries are correctly captured by spies, we explicitly
|
// runFinalize and runQueries are correctly captured by spies, we explicitly
|
||||||
// wait for the action promise to complete before starting verification.
|
// wait for the action promise to complete before starting verification.
|
||||||
await analyzeAction.runPromise;
|
await analyzeAction.runPromise;
|
||||||
|
t.assert(runFinalizeStub.calledOnce);
|
||||||
t.deepEqual(runFinalizeStub.firstCall.args[1], "--threads=-1");
|
t.deepEqual(runFinalizeStub.firstCall.args[1], "--threads=-1");
|
||||||
t.deepEqual(runFinalizeStub.firstCall.args[2], "--ram=3012");
|
t.deepEqual(runFinalizeStub.firstCall.args[2], "--ram=3012");
|
||||||
|
t.assert(runQueriesStub.calledOnce);
|
||||||
t.deepEqual(runQueriesStub.firstCall.args[3], "--threads=-1");
|
t.deepEqual(runQueriesStub.firstCall.args[3], "--threads=-1");
|
||||||
t.deepEqual(runQueriesStub.firstCall.args[1], "--ram=3012");
|
t.deepEqual(runQueriesStub.firstCall.args[1], "--ram=3012");
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"analyze-action-input.test.js","sourceRoot":"","sources":["../src/analyze-action-input.test.ts"],"names":[],"mappings":"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"}
|
{"version":3,"file":"analyze-action-input.test.js","sourceRoot":"","sources":["../src/analyze-action-input.test.ts"],"names":[],"mappings":"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"}
|
||||||
14
lib/analyze-action-post.js
generated
14
lib/analyze-action-post.js
generated
@@ -38,12 +38,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||||||
* It will run after the all steps in this job, in reverse order in relation to
|
* It will run after the all steps in this job, in reverse order in relation to
|
||||||
* other `post:` hooks.
|
* other `post:` hooks.
|
||||||
*/
|
*/
|
||||||
|
const fs = __importStar(require("fs"));
|
||||||
const core = __importStar(require("@actions/core"));
|
const core = __importStar(require("@actions/core"));
|
||||||
const actionsUtil = __importStar(require("./actions-util"));
|
const actionsUtil = __importStar(require("./actions-util"));
|
||||||
const api_client_1 = require("./api-client");
|
const api_client_1 = require("./api-client");
|
||||||
const codeql_1 = require("./codeql");
|
const codeql_1 = require("./codeql");
|
||||||
const config_utils_1 = require("./config-utils");
|
const config_utils_1 = require("./config-utils");
|
||||||
const debugArtifacts = __importStar(require("./debug-artifacts"));
|
const debugArtifacts = __importStar(require("./debug-artifacts"));
|
||||||
|
const dependency_caching_1 = require("./dependency-caching");
|
||||||
const environment_1 = require("./environment");
|
const environment_1 = require("./environment");
|
||||||
const logging_1 = require("./logging");
|
const logging_1 = require("./logging");
|
||||||
const util_1 = require("./util");
|
const util_1 = require("./util");
|
||||||
@@ -63,6 +65,18 @@ async function runWrapper() {
|
|||||||
await debugArtifacts.uploadCombinedSarifArtifacts(logger, config.gitHubVersion.type, version.version);
|
await debugArtifacts.uploadCombinedSarifArtifacts(logger, config.gitHubVersion.type, version.version);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// If we analysed Java in build-mode: none, we may have downloaded dependencies
|
||||||
|
// to the temp directory. Clean these up so they don't persist unnecessarily
|
||||||
|
// long on self-hosted runners.
|
||||||
|
const javaTempDependencyDir = (0, dependency_caching_1.getJavaTempDependencyDir)();
|
||||||
|
if (fs.existsSync(javaTempDependencyDir)) {
|
||||||
|
try {
|
||||||
|
fs.rmSync(javaTempDependencyDir, { recursive: true });
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
logger.info(`Failed to remove temporary Java dependencies directory: ${(0, util_1.getErrorMessage)(error)}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
core.setFailed(`analyze post-action step failed: ${(0, util_1.getErrorMessage)(error)}`);
|
core.setFailed(`analyze post-action step failed: ${(0, util_1.getErrorMessage)(error)}`);
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"analyze-action-post.js","sourceRoot":"","sources":["../src/analyze-action-post.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,oDAAsC;AAEtC,4DAA8C;AAC9C,6CAAgD;AAChD,qCAAqC;AACrC,iDAA2C;AAC3C,kEAAoD;AACpD,+CAAuC;AACvC,uCAA6C;AAC7C,iCAAoE;AAEpE,KAAK,UAAU,UAAU;IACvB,IAAI,CAAC;QACH,WAAW,CAAC,aAAa,EAAE,CAAC;QAC5B,MAAM,MAAM,GAAG,IAAA,0BAAgB,GAAE,CAAC;QAClC,MAAM,aAAa,GAAG,MAAM,IAAA,6BAAgB,GAAE,CAAC;QAC/C,IAAA,gCAAyB,EAAC,aAAa,EAAE,MAAM,CAAC,CAAC;QAEjD,kFAAkF;QAClF,wFAAwF;QACxF,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAM,CAAC,mBAAmB,CAAC,KAAK,MAAM,EAAE,CAAC;YACvD,MAAM,MAAM,GAAG,MAAM,IAAA,wBAAS,EAC5B,WAAW,CAAC,qBAAqB,EAAE,EACnC,MAAM,CACP,CAAC;YACF,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;gBACzB,MAAM,MAAM,GAAG,MAAM,IAAA,kBAAS,EAAC,MAAM,CAAC,SAAS,CAAC,CAAC;gBACjD,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,UAAU,EAAE,CAAC;gBAC1C,MAAM,cAAc,CAAC,4BAA4B,CAC/C,MAAM,EACN,MAAM,CAAC,aAAa,CAAC,IAAI,EACzB,OAAO,CAAC,OAAO,CAChB,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,SAAS,CACZ,oCAAoC,IAAA,sBAAe,EAAC,KAAK,CAAC,EAAE,CAC7D,CAAC;IACJ,CAAC;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}
|
{"version":3,"file":"analyze-action-post.js","sourceRoot":"","sources":["../src/analyze-action-post.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,uCAAyB;AAEzB,oDAAsC;AAEtC,4DAA8C;AAC9C,6CAAgD;AAChD,qCAAqC;AACrC,iDAA2C;AAC3C,kEAAoD;AACpD,6DAAgE;AAChE,+CAAuC;AACvC,uCAA6C;AAC7C,iCAAoE;AAEpE,KAAK,UAAU,UAAU;IACvB,IAAI,CAAC;QACH,WAAW,CAAC,aAAa,EAAE,CAAC;QAC5B,MAAM,MAAM,GAAG,IAAA,0BAAgB,GAAE,CAAC;QAClC,MAAM,aAAa,GAAG,MAAM,IAAA,6BAAgB,GAAE,CAAC;QAC/C,IAAA,gCAAyB,EAAC,aAAa,EAAE,MAAM,CAAC,CAAC;QAEjD,kFAAkF;QAClF,wFAAwF;QACxF,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAM,CAAC,mBAAmB,CAAC,KAAK,MAAM,EAAE,CAAC;YACvD,MAAM,MAAM,GAAG,MAAM,IAAA,wBAAS,EAC5B,WAAW,CAAC,qBAAqB,EAAE,EACnC,MAAM,CACP,CAAC;YACF,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;gBACzB,MAAM,MAAM,GAAG,MAAM,IAAA,kBAAS,EAAC,MAAM,CAAC,SAAS,CAAC,CAAC;gBACjD,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,UAAU,EAAE,CAAC;gBAC1C,MAAM,cAAc,CAAC,4BAA4B,CAC/C,MAAM,EACN,MAAM,CAAC,aAAa,CAAC,IAAI,EACzB,OAAO,CAAC,OAAO,CAChB,CAAC;YACJ,CAAC;QACH,CAAC;QAED,+EAA+E;QAC/E,4EAA4E;QAC5E,+BAA+B;QAC/B,MAAM,qBAAqB,GAAG,IAAA,6CAAwB,GAAE,CAAC;QACzD,IAAI,EAAE,CAAC,UAAU,CAAC,qBAAqB,CAAC,EAAE,CAAC;YACzC,IAAI,CAAC;gBACH,EAAE,CAAC,MAAM,CAAC,qBAAqB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YACxD,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,CAAC,IAAI,CACT,2DAA2D,IAAA,sBAAe,EAAC,KAAK,CAAC,EAAE,CACpF,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,SAAS,CACZ,oCAAoC,IAAA,sBAAe,EAAC,KAAK,CAAC,EAAE,CAC7D,CAAC;IACJ,CAAC;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}
|
||||||
64
lib/analyze-action.js
generated
64
lib/analyze-action.js
generated
@@ -41,7 +41,6 @@ const fs = __importStar(require("fs"));
|
|||||||
const path_1 = __importDefault(require("path"));
|
const path_1 = __importDefault(require("path"));
|
||||||
const perf_hooks_1 = require("perf_hooks");
|
const perf_hooks_1 = require("perf_hooks");
|
||||||
const core = __importStar(require("@actions/core"));
|
const core = __importStar(require("@actions/core"));
|
||||||
const github = __importStar(require("@actions/github"));
|
|
||||||
const actionsUtil = __importStar(require("./actions-util"));
|
const actionsUtil = __importStar(require("./actions-util"));
|
||||||
const analyze_1 = require("./analyze");
|
const analyze_1 = require("./analyze");
|
||||||
const api_client_1 = require("./api-client");
|
const api_client_1 = require("./api-client");
|
||||||
@@ -51,10 +50,12 @@ const codeql_1 = require("./codeql");
|
|||||||
const config_utils_1 = require("./config-utils");
|
const config_utils_1 = require("./config-utils");
|
||||||
const database_upload_1 = require("./database-upload");
|
const database_upload_1 = require("./database-upload");
|
||||||
const dependency_caching_1 = require("./dependency-caching");
|
const dependency_caching_1 = require("./dependency-caching");
|
||||||
|
const diff_informed_analysis_utils_1 = require("./diff-informed-analysis-utils");
|
||||||
const environment_1 = require("./environment");
|
const environment_1 = require("./environment");
|
||||||
const feature_flags_1 = require("./feature-flags");
|
const feature_flags_1 = require("./feature-flags");
|
||||||
const languages_1 = require("./languages");
|
const languages_1 = require("./languages");
|
||||||
const logging_1 = require("./logging");
|
const logging_1 = require("./logging");
|
||||||
|
const overlay_database_utils_1 = require("./overlay-database-utils");
|
||||||
const repository_1 = require("./repository");
|
const repository_1 = require("./repository");
|
||||||
const statusReport = __importStar(require("./status-report"));
|
const statusReport = __importStar(require("./status-report"));
|
||||||
const status_report_1 = require("./status-report");
|
const status_report_1 = require("./status-report");
|
||||||
@@ -94,8 +95,8 @@ function hasBadExpectErrorInput() {
|
|||||||
* indicating whether Go extraction has extracted at least one file.
|
* indicating whether Go extraction has extracted at least one file.
|
||||||
*/
|
*/
|
||||||
function doesGoExtractionOutputExist(config) {
|
function doesGoExtractionOutputExist(config) {
|
||||||
const golangDbDirectory = util.getCodeQLDatabasePath(config, languages_1.Language.go);
|
const golangDbDirectory = util.getCodeQLDatabasePath(config, languages_1.KnownLanguage.go);
|
||||||
const trapDirectory = path_1.default.join(golangDbDirectory, "trap", languages_1.Language.go);
|
const trapDirectory = path_1.default.join(golangDbDirectory, "trap", languages_1.KnownLanguage.go);
|
||||||
return (fs.existsSync(trapDirectory) &&
|
return (fs.existsSync(trapDirectory) &&
|
||||||
fs
|
fs
|
||||||
.readdirSync(trapDirectory)
|
.readdirSync(trapDirectory)
|
||||||
@@ -122,7 +123,7 @@ function doesGoExtractionOutputExist(config) {
|
|||||||
* whether any extraction output already exists for Go.
|
* whether any extraction output already exists for Go.
|
||||||
*/
|
*/
|
||||||
async function runAutobuildIfLegacyGoWorkflow(config, logger) {
|
async function runAutobuildIfLegacyGoWorkflow(config, logger) {
|
||||||
if (!config.languages.includes(languages_1.Language.go)) {
|
if (!config.languages.includes(languages_1.KnownLanguage.go)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (config.buildMode) {
|
if (config.buildMode) {
|
||||||
@@ -133,7 +134,7 @@ async function runAutobuildIfLegacyGoWorkflow(config, logger) {
|
|||||||
logger.debug("Won't run Go autobuild since it has already been run.");
|
logger.debug("Won't run Go autobuild since it has already been run.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((0, analyze_1.dbIsFinalized)(config, languages_1.Language.go, logger)) {
|
if ((0, analyze_1.dbIsFinalized)(config, languages_1.KnownLanguage.go, logger)) {
|
||||||
logger.debug("Won't run Go autobuild since there is already a finalized database for Go.");
|
logger.debug("Won't run Go autobuild since there is already a finalized database for Go.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -148,7 +149,7 @@ async function runAutobuildIfLegacyGoWorkflow(config, logger) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
logger.debug("Running Go autobuild because extraction output (TRAP files) for Go code has not been found.");
|
logger.debug("Running Go autobuild because extraction output (TRAP files) for Go code has not been found.");
|
||||||
await (0, autobuild_1.runAutobuild)(config, languages_1.Language.go, logger);
|
await (0, autobuild_1.runAutobuild)(config, languages_1.KnownLanguage.go, logger);
|
||||||
}
|
}
|
||||||
async function run() {
|
async function run() {
|
||||||
const startedAt = new Date();
|
const startedAt = new Date();
|
||||||
@@ -160,14 +161,6 @@ async function run() {
|
|||||||
let dbCreationTimings = undefined;
|
let dbCreationTimings = undefined;
|
||||||
let didUploadTrapCaches = false;
|
let didUploadTrapCaches = false;
|
||||||
util.initializeEnvironment(actionsUtil.getActionVersion());
|
util.initializeEnvironment(actionsUtil.getActionVersion());
|
||||||
// Unset the CODEQL_PROXY_* environment variables, as they are not needed
|
|
||||||
// and can cause issues with the CodeQL CLI
|
|
||||||
// Check for CODEQL_PROXY_HOST: and if it is empty but set, unset it
|
|
||||||
if (process.env.CODEQL_PROXY_HOST === "") {
|
|
||||||
delete process.env.CODEQL_PROXY_HOST;
|
|
||||||
delete process.env.CODEQL_PROXY_PORT;
|
|
||||||
delete process.env.CODEQL_PROXY_CA_CERTIFICATE;
|
|
||||||
}
|
|
||||||
// Make inputs accessible in the `post` step, details at
|
// Make inputs accessible in the `post` step, details at
|
||||||
// https://github.com/github/codeql-action/issues/2553
|
// https://github.com/github/codeql-action/issues/2553
|
||||||
actionsUtil.persistInputs();
|
actionsUtil.persistInputs();
|
||||||
@@ -185,27 +178,36 @@ async function run() {
|
|||||||
if (hasBadExpectErrorInput()) {
|
if (hasBadExpectErrorInput()) {
|
||||||
throw new util.ConfigurationError("`expect-error` input parameter is for internal use only. It should only be set by codeql-action or a fork.");
|
throw new util.ConfigurationError("`expect-error` input parameter is for internal use only. It should only be set by codeql-action or a fork.");
|
||||||
}
|
}
|
||||||
|
// Unset the CODEQL_PROXY_* environment variables when using older CodeQL
|
||||||
|
// CLIs, as they are not needed and can cause issues.
|
||||||
|
if (process.env.CODEQL_PROXY_HOST === "" &&
|
||||||
|
!(await util.codeQlVersionAtLeast(codeql, "2.20.7"))) {
|
||||||
|
delete process.env.CODEQL_PROXY_HOST;
|
||||||
|
delete process.env.CODEQL_PROXY_PORT;
|
||||||
|
delete process.env.CODEQL_PROXY_CA_CERTIFICATE;
|
||||||
|
}
|
||||||
|
if (actionsUtil.getOptionalInput("cleanup-level") !== "") {
|
||||||
|
logger.info("The 'cleanup-level' input is ignored since the CodeQL Action now automatically " +
|
||||||
|
"manages database cleanup. This input can safely be removed from your workflow.");
|
||||||
|
}
|
||||||
const apiDetails = (0, api_client_1.getApiDetails)();
|
const apiDetails = (0, api_client_1.getApiDetails)();
|
||||||
const outputDir = actionsUtil.getRequiredInput("output");
|
const outputDir = actionsUtil.getRequiredInput("output");
|
||||||
core.exportVariable(environment_1.EnvVar.SARIF_RESULTS_OUTPUT_DIR, outputDir);
|
core.exportVariable(environment_1.EnvVar.SARIF_RESULTS_OUTPUT_DIR, outputDir);
|
||||||
const threads = util.getThreadsFlag(actionsUtil.getOptionalInput("threads") || process.env["CODEQL_THREADS"], logger);
|
const threads = util.getThreadsFlag(actionsUtil.getOptionalInput("threads") || process.env["CODEQL_THREADS"], logger);
|
||||||
const repositoryNwo = (0, repository_1.parseRepositoryNwo)(util.getRequiredEnvParam("GITHUB_REPOSITORY"));
|
const repositoryNwo = (0, repository_1.getRepositoryNwo)();
|
||||||
const gitHubVersion = await (0, api_client_1.getGitHubVersion)();
|
const gitHubVersion = await (0, api_client_1.getGitHubVersion)();
|
||||||
util.checkActionVersion(actionsUtil.getActionVersion(), gitHubVersion);
|
util.checkActionVersion(actionsUtil.getActionVersion(), gitHubVersion);
|
||||||
const features = new feature_flags_1.Features(gitHubVersion, repositoryNwo, actionsUtil.getTemporaryDirectory(), logger);
|
const features = new feature_flags_1.Features(gitHubVersion, repositoryNwo, actionsUtil.getTemporaryDirectory(), logger);
|
||||||
const memory = util.getMemoryFlag(actionsUtil.getOptionalInput("ram") || process.env["CODEQL_RAM"], logger);
|
const memory = util.getMemoryFlag(actionsUtil.getOptionalInput("ram") || process.env["CODEQL_RAM"], logger);
|
||||||
const pull_request = github.context.payload.pull_request;
|
const branches = await (0, diff_informed_analysis_utils_1.getDiffInformedAnalysisBranches)(codeql, features, logger);
|
||||||
const diffRangePackDir = pull_request &&
|
const diffRangePackDir = branches
|
||||||
(await (0, analyze_1.setupDiffInformedQueryRun)(pull_request.base.ref, pull_request.head.label, codeql, logger, features));
|
? await (0, analyze_1.setupDiffInformedQueryRun)(branches, logger)
|
||||||
|
: undefined;
|
||||||
await (0, analyze_1.warnIfGoInstalledAfterInit)(config, logger);
|
await (0, analyze_1.warnIfGoInstalledAfterInit)(config, logger);
|
||||||
await runAutobuildIfLegacyGoWorkflow(config, logger);
|
await runAutobuildIfLegacyGoWorkflow(config, logger);
|
||||||
dbCreationTimings = await (0, analyze_1.runFinalize)(outputDir, threads, memory, codeql, config, logger);
|
dbCreationTimings = await (0, analyze_1.runFinalize)(outputDir, threads, memory, codeql, config, logger);
|
||||||
const cleanupLevel = actionsUtil.getOptionalInput("cleanup-level") || "brutal";
|
|
||||||
if (actionsUtil.getRequiredInput("skip-queries") !== "true") {
|
if (actionsUtil.getRequiredInput("skip-queries") !== "true") {
|
||||||
runStats = await (0, analyze_1.runQueries)(outputDir, memory, util.getAddSnippetsFlag(actionsUtil.getRequiredInput("add-snippets")), threads, cleanupLevel, diffRangePackDir, actionsUtil.getOptionalInput("category"), config, logger, features);
|
runStats = await (0, analyze_1.runQueries)(outputDir, memory, util.getAddSnippetsFlag(actionsUtil.getRequiredInput("add-snippets")), threads, diffRangePackDir, actionsUtil.getOptionalInput("category"), codeql, config, logger, features);
|
||||||
}
|
|
||||||
if (cleanupLevel !== "none") {
|
|
||||||
await (0, analyze_1.runCleanup)(config, cleanupLevel, logger);
|
|
||||||
}
|
}
|
||||||
const dbLocations = {};
|
const dbLocations = {};
|
||||||
for (const language of config.languages) {
|
for (const language of config.languages) {
|
||||||
@@ -215,14 +217,22 @@ async function run() {
|
|||||||
core.setOutput("sarif-output", path_1.default.resolve(outputDir));
|
core.setOutput("sarif-output", path_1.default.resolve(outputDir));
|
||||||
const uploadInput = actionsUtil.getOptionalInput("upload");
|
const uploadInput = actionsUtil.getOptionalInput("upload");
|
||||||
if (runStats && actionsUtil.getUploadValue(uploadInput) === "always") {
|
if (runStats && actionsUtil.getUploadValue(uploadInput) === "always") {
|
||||||
uploadResult = await uploadLib.uploadFiles(outputDir, actionsUtil.getRequiredInput("checkout_path"), actionsUtil.getOptionalInput("category"), features, logger);
|
uploadResult = await uploadLib.uploadFiles(outputDir, actionsUtil.getRequiredInput("checkout_path"), actionsUtil.getOptionalInput("category"), features, logger, uploadLib.CodeScanningTarget);
|
||||||
core.setOutput("sarif-id", uploadResult.sarifID);
|
core.setOutput("sarif-id", uploadResult.sarifID);
|
||||||
|
if (config.augmentationProperties.qualityQueriesInput !== undefined) {
|
||||||
|
const qualityUploadResult = await uploadLib.uploadFiles(outputDir, actionsUtil.getRequiredInput("checkout_path"), actionsUtil.fixCodeQualityCategory(logger, actionsUtil.getOptionalInput("category")), features, logger, uploadLib.CodeQualityTarget);
|
||||||
|
core.setOutput("quality-sarif-id", qualityUploadResult.sarifID);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logger.info("Not uploading results");
|
logger.info("Not uploading results");
|
||||||
}
|
}
|
||||||
// Possibly upload the database bundles for remote queries
|
// Possibly upload the overlay-base database to actions cache.
|
||||||
await (0, database_upload_1.uploadDatabases)(repositoryNwo, config, apiDetails, logger);
|
// If databases are to be uploaded, they will first be cleaned up at the overlay level.
|
||||||
|
await (0, overlay_database_utils_1.uploadOverlayBaseDatabaseToCache)(codeql, config, logger);
|
||||||
|
// Possibly upload the database bundles for remote queries.
|
||||||
|
// If databases are to be uploaded, they will first be cleaned up at the clear level.
|
||||||
|
await (0, database_upload_1.uploadDatabases)(repositoryNwo, codeql, config, apiDetails, logger);
|
||||||
// Possibly upload the TRAP caches for later re-use
|
// Possibly upload the TRAP caches for later re-use
|
||||||
const trapCacheUploadStartTime = perf_hooks_1.performance.now();
|
const trapCacheUploadStartTime = perf_hooks_1.performance.now();
|
||||||
didUploadTrapCaches = await (0, trap_caching_1.uploadTrapCaches)(codeql, config, logger);
|
didUploadTrapCaches = await (0, trap_caching_1.uploadTrapCaches)(codeql, config, logger);
|
||||||
@@ -239,7 +249,7 @@ async function run() {
|
|||||||
}
|
}
|
||||||
else if (uploadResult !== undefined &&
|
else if (uploadResult !== undefined &&
|
||||||
actionsUtil.getRequiredInput("wait-for-processing") === "true") {
|
actionsUtil.getRequiredInput("wait-for-processing") === "true") {
|
||||||
await uploadLib.waitForProcessing((0, repository_1.parseRepositoryNwo)(util.getRequiredEnvParam("GITHUB_REPOSITORY")), uploadResult.sarifID, (0, logging_1.getActionsLogger)());
|
await uploadLib.waitForProcessing((0, repository_1.getRepositoryNwo)(), uploadResult.sarifID, (0, logging_1.getActionsLogger)());
|
||||||
}
|
}
|
||||||
// If we did not throw an error yet here, but we expect one, throw it.
|
// If we did not throw an error yet here, but we expect one, throw it.
|
||||||
if (actionsUtil.getOptionalInput("expect-error") === "true") {
|
if (actionsUtil.getOptionalInput("expect-error") === "true") {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
181
lib/analyze.js
generated
181
lib/analyze.js
generated
@@ -36,33 +36,33 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.exportedForTesting = exports.CodeQLAnalysisError = void 0;
|
exports.exportedForTesting = exports.defaultSuites = exports.CodeQLAnalysisError = void 0;
|
||||||
exports.runExtraction = runExtraction;
|
exports.runExtraction = runExtraction;
|
||||||
exports.dbIsFinalized = dbIsFinalized;
|
exports.dbIsFinalized = dbIsFinalized;
|
||||||
exports.setupDiffInformedQueryRun = setupDiffInformedQueryRun;
|
exports.setupDiffInformedQueryRun = setupDiffInformedQueryRun;
|
||||||
|
exports.resolveQuerySuiteAlias = resolveQuerySuiteAlias;
|
||||||
exports.runQueries = runQueries;
|
exports.runQueries = runQueries;
|
||||||
exports.runFinalize = runFinalize;
|
exports.runFinalize = runFinalize;
|
||||||
exports.warnIfGoInstalledAfterInit = warnIfGoInstalledAfterInit;
|
exports.warnIfGoInstalledAfterInit = warnIfGoInstalledAfterInit;
|
||||||
exports.runCleanup = runCleanup;
|
|
||||||
const fs = __importStar(require("fs"));
|
const fs = __importStar(require("fs"));
|
||||||
const path = __importStar(require("path"));
|
const path = __importStar(require("path"));
|
||||||
const perf_hooks_1 = require("perf_hooks");
|
const perf_hooks_1 = require("perf_hooks");
|
||||||
const io = __importStar(require("@actions/io"));
|
const io = __importStar(require("@actions/io"));
|
||||||
const del_1 = __importDefault(require("del"));
|
const del_1 = __importDefault(require("del"));
|
||||||
const yaml = __importStar(require("js-yaml"));
|
const yaml = __importStar(require("js-yaml"));
|
||||||
const actionsUtil = __importStar(require("./actions-util"));
|
const actions_util_1 = require("./actions-util");
|
||||||
const api_client_1 = require("./api-client");
|
const api_client_1 = require("./api-client");
|
||||||
const autobuild_1 = require("./autobuild");
|
const autobuild_1 = require("./autobuild");
|
||||||
const codeql_1 = require("./codeql");
|
const dependency_caching_1 = require("./dependency-caching");
|
||||||
const diagnostics_1 = require("./diagnostics");
|
const diagnostics_1 = require("./diagnostics");
|
||||||
const diff_filtering_utils_1 = require("./diff-filtering-utils");
|
const diff_informed_analysis_utils_1 = require("./diff-informed-analysis-utils");
|
||||||
const environment_1 = require("./environment");
|
const environment_1 = require("./environment");
|
||||||
const feature_flags_1 = require("./feature-flags");
|
const feature_flags_1 = require("./feature-flags");
|
||||||
const languages_1 = require("./languages");
|
const languages_1 = require("./languages");
|
||||||
const logging_1 = require("./logging");
|
const logging_1 = require("./logging");
|
||||||
const tools_features_1 = require("./tools-features");
|
const overlay_database_utils_1 = require("./overlay-database-utils");
|
||||||
|
const repository_1 = require("./repository");
|
||||||
const tracer_config_1 = require("./tracer-config");
|
const tracer_config_1 = require("./tracer-config");
|
||||||
const upload_lib_1 = require("./upload-lib");
|
|
||||||
const util = __importStar(require("./util"));
|
const util = __importStar(require("./util"));
|
||||||
const util_1 = require("./util");
|
const util_1 = require("./util");
|
||||||
class CodeQLAnalysisError extends Error {
|
class CodeQLAnalysisError extends Error {
|
||||||
@@ -91,17 +91,25 @@ async function runExtraction(codeql, config, logger) {
|
|||||||
logger.debug(`Database for ${language} has already been finalized, skipping extraction.`);
|
logger.debug(`Database for ${language} has already been finalized, skipping extraction.`);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (shouldExtractLanguage(config, language)) {
|
if (await shouldExtractLanguage(codeql, config, language)) {
|
||||||
logger.startGroup(`Extracting ${language}`);
|
logger.startGroup(`Extracting ${language}`);
|
||||||
if (language === languages_1.Language.python) {
|
if (language === languages_1.KnownLanguage.python) {
|
||||||
await setupPythonExtractor(logger);
|
await setupPythonExtractor(logger);
|
||||||
}
|
}
|
||||||
if (config.buildMode &&
|
if (config.buildMode) {
|
||||||
(await codeql.supportsFeature(tools_features_1.ToolsFeature.TraceCommandUseBuildMode))) {
|
if (language === languages_1.KnownLanguage.cpp &&
|
||||||
if (language === languages_1.Language.cpp &&
|
|
||||||
config.buildMode === util_1.BuildMode.Autobuild) {
|
config.buildMode === util_1.BuildMode.Autobuild) {
|
||||||
await (0, autobuild_1.setupCppAutobuild)(codeql, logger);
|
await (0, autobuild_1.setupCppAutobuild)(codeql, logger);
|
||||||
}
|
}
|
||||||
|
// The Java `build-mode: none` extractor places dependencies (.jar files) in the
|
||||||
|
// database scratch directory by default. For dependency caching purposes, we want
|
||||||
|
// a stable path that caches can be restored into and that we can cache at the
|
||||||
|
// end of the workflow (i.e. that does not get removed when the scratch directory is).
|
||||||
|
if (language === languages_1.KnownLanguage.java &&
|
||||||
|
config.buildMode === util_1.BuildMode.None) {
|
||||||
|
process.env["CODEQL_EXTRACTOR_JAVA_OPTION_BUILDLESS_DEPENDENCY_DIR"] =
|
||||||
|
(0, dependency_caching_1.getJavaTempDependencyDir)();
|
||||||
|
}
|
||||||
await codeql.extractUsingBuildMode(config, language);
|
await codeql.extractUsingBuildMode(config, language);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -111,11 +119,11 @@ async function runExtraction(codeql, config, logger) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function shouldExtractLanguage(config, language) {
|
async function shouldExtractLanguage(codeql, config, language) {
|
||||||
return (config.buildMode === util_1.BuildMode.None ||
|
return (config.buildMode === util_1.BuildMode.None ||
|
||||||
(config.buildMode === util_1.BuildMode.Autobuild &&
|
(config.buildMode === util_1.BuildMode.Autobuild &&
|
||||||
process.env[environment_1.EnvVar.AUTOBUILD_DID_COMPLETE_SUCCESSFULLY] !== "true") ||
|
process.env[environment_1.EnvVar.AUTOBUILD_DID_COMPLETE_SUCCESSFULLY] !== "true") ||
|
||||||
(!config.buildMode && (0, languages_1.isScannedLanguage)(language)));
|
(!config.buildMode && (await codeql.isScannedLanguage(language))));
|
||||||
}
|
}
|
||||||
function dbIsFinalized(config, language, logger) {
|
function dbIsFinalized(config, language, logger) {
|
||||||
const dbPath = util.getCodeQLDatabasePath(config, language);
|
const dbPath = util.getCodeQLDatabasePath(config, language);
|
||||||
@@ -152,21 +160,13 @@ async function finalizeDatabaseCreation(codeql, config, threadsFlag, memoryFlag,
|
|||||||
/**
|
/**
|
||||||
* Set up the diff-informed analysis feature.
|
* Set up the diff-informed analysis feature.
|
||||||
*
|
*
|
||||||
* @param baseRef The base branch name, used for calculating the diff range.
|
|
||||||
* @param headLabel The label that uniquely identifies the head branch across
|
|
||||||
* repositories, used for calculating the diff range.
|
|
||||||
* @param codeql
|
|
||||||
* @param logger
|
|
||||||
* @param features
|
|
||||||
* @returns Absolute path to the directory containing the extension pack for
|
* @returns Absolute path to the directory containing the extension pack for
|
||||||
* the diff range information, or `undefined` if the feature is disabled.
|
* the diff range information, or `undefined` if the feature is disabled.
|
||||||
*/
|
*/
|
||||||
async function setupDiffInformedQueryRun(baseRef, headLabel, codeql, logger, features) {
|
async function setupDiffInformedQueryRun(branches, logger) {
|
||||||
if (!(await features.getValue(feature_flags_1.Feature.DiffInformedQueries, codeql))) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
return await (0, logging_1.withGroupAsync)("Generating diff range extension pack", async () => {
|
return await (0, logging_1.withGroupAsync)("Generating diff range extension pack", async () => {
|
||||||
const diffRanges = await getPullRequestEditedDiffRanges(baseRef, headLabel, logger);
|
logger.info(`Calculating diff ranges for ${branches.base}...${branches.head}`);
|
||||||
|
const diffRanges = await getPullRequestEditedDiffRanges(branches, logger);
|
||||||
const packDir = writeDiffRangeDataExtensionPack(logger, diffRanges);
|
const packDir = writeDiffRangeDataExtensionPack(logger, diffRanges);
|
||||||
if (packDir === undefined) {
|
if (packDir === undefined) {
|
||||||
logger.warning("Cannot create diff range extension pack for diff-informed queries; " +
|
logger.warning("Cannot create diff range extension pack for diff-informed queries; " +
|
||||||
@@ -181,17 +181,15 @@ async function setupDiffInformedQueryRun(baseRef, headLabel, codeql, logger, fea
|
|||||||
/**
|
/**
|
||||||
* Return the file line ranges that were added or modified in the pull request.
|
* Return the file line ranges that were added or modified in the pull request.
|
||||||
*
|
*
|
||||||
* @param baseRef The base branch name, used for calculating the diff range.
|
* @param branches The base and head branches of the pull request.
|
||||||
* @param headLabel The label that uniquely identifies the head branch across
|
|
||||||
* repositories, used for calculating the diff range.
|
|
||||||
* @param logger
|
* @param logger
|
||||||
* @returns An array of tuples, where each tuple contains the absolute path of a
|
* @returns An array of tuples, where each tuple contains the absolute path of a
|
||||||
* file, the start line and the end line (both 1-based and inclusive) of an
|
* file, the start line and the end line (both 1-based and inclusive) of an
|
||||||
* added or modified range in that file. Returns `undefined` if the action was
|
* added or modified range in that file. Returns `undefined` if the action was
|
||||||
* not triggered by a pull request or if there was an error.
|
* not triggered by a pull request or if there was an error.
|
||||||
*/
|
*/
|
||||||
async function getPullRequestEditedDiffRanges(baseRef, headLabel, logger) {
|
async function getPullRequestEditedDiffRanges(branches, logger) {
|
||||||
const fileDiffs = await getFileDiffsWithBasehead(baseRef, headLabel, logger);
|
const fileDiffs = await getFileDiffsWithBasehead(branches, logger);
|
||||||
if (fileDiffs === undefined) {
|
if (fileDiffs === undefined) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
@@ -214,15 +212,15 @@ async function getPullRequestEditedDiffRanges(baseRef, headLabel, logger) {
|
|||||||
}
|
}
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
async function getFileDiffsWithBasehead(baseRef, headLabel, logger) {
|
async function getFileDiffsWithBasehead(branches, logger) {
|
||||||
const ownerRepo = util.getRequiredEnvParam("GITHUB_REPOSITORY").split("/");
|
// Check CODE_SCANNING_REPOSITORY first. If it is empty or not set, fall back
|
||||||
const owner = ownerRepo[0];
|
// to GITHUB_REPOSITORY.
|
||||||
const repo = ownerRepo[1];
|
const repositoryNwo = (0, repository_1.getRepositoryNwoFromEnv)("CODE_SCANNING_REPOSITORY", "GITHUB_REPOSITORY");
|
||||||
const basehead = `${baseRef}...${headLabel}`;
|
const basehead = `${branches.base}...${branches.head}`;
|
||||||
try {
|
try {
|
||||||
const response = await (0, api_client_1.getApiClient)().rest.repos.compareCommitsWithBasehead({
|
const response = await (0, api_client_1.getApiClient)().rest.repos.compareCommitsWithBasehead({
|
||||||
owner,
|
owner: repositoryNwo.owner,
|
||||||
repo,
|
repo: repositoryNwo.repo,
|
||||||
basehead,
|
basehead,
|
||||||
per_page: 1,
|
per_page: 1,
|
||||||
});
|
});
|
||||||
@@ -248,7 +246,7 @@ function getDiffRanges(fileDiff, logger) {
|
|||||||
// uses forward slashes as the path separator, so on Windows we need to
|
// uses forward slashes as the path separator, so on Windows we need to
|
||||||
// replace any backslashes with forward slashes.
|
// replace any backslashes with forward slashes.
|
||||||
const filename = path
|
const filename = path
|
||||||
.join(actionsUtil.getRequiredInput("checkout_path"), fileDiff.filename)
|
.join((0, actions_util_1.getRequiredInput)("checkout_path"), fileDiff.filename)
|
||||||
.replaceAll(path.sep, "/");
|
.replaceAll(path.sep, "/");
|
||||||
if (fileDiff.patch === undefined) {
|
if (fileDiff.patch === undefined) {
|
||||||
if (fileDiff.changes === 0) {
|
if (fileDiff.changes === 0) {
|
||||||
@@ -334,8 +332,21 @@ function writeDiffRangeDataExtensionPack(logger, ranges) {
|
|||||||
if (ranges === undefined) {
|
if (ranges === undefined) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
const diffRangeDir = path.join(actionsUtil.getTemporaryDirectory(), "pr-diff-range");
|
if (ranges.length === 0) {
|
||||||
fs.mkdirSync(diffRangeDir);
|
// An empty diff range means that there are no added or modified lines in
|
||||||
|
// the pull request. But the `restrictAlertsTo` extensible predicate
|
||||||
|
// interprets an empty data extension differently, as an indication that
|
||||||
|
// all alerts should be included. So we need to specifically set the diff
|
||||||
|
// range to a non-empty list that cannot match any alert location.
|
||||||
|
ranges = [{ path: "", startLine: 0, endLine: 0 }];
|
||||||
|
}
|
||||||
|
const diffRangeDir = path.join((0, actions_util_1.getTemporaryDirectory)(), "pr-diff-range");
|
||||||
|
// We expect the Actions temporary directory to already exist, so are mainly
|
||||||
|
// using `recursive: true` to avoid errors if the directory already exists,
|
||||||
|
// for example if the analyze Action is run multiple times in the same job.
|
||||||
|
// This is not really something that is supported, but we make use of it in
|
||||||
|
// tests.
|
||||||
|
fs.mkdirSync(diffRangeDir, { recursive: true });
|
||||||
fs.writeFileSync(path.join(diffRangeDir, "qlpack.yml"), `
|
fs.writeFileSync(path.join(diffRangeDir, "qlpack.yml"), `
|
||||||
name: codeql-action/pr-diff-range
|
name: codeql-action/pr-diff-range
|
||||||
version: 0.0.0
|
version: 0.0.0
|
||||||
@@ -350,6 +361,7 @@ extensions:
|
|||||||
- addsTo:
|
- addsTo:
|
||||||
pack: codeql/util
|
pack: codeql/util
|
||||||
extensible: restrictAlertsTo
|
extensible: restrictAlertsTo
|
||||||
|
checkPresence: false
|
||||||
data:
|
data:
|
||||||
`;
|
`;
|
||||||
let data = ranges
|
let data = ranges
|
||||||
@@ -371,28 +383,71 @@ extensions:
|
|||||||
logger.debug(`Wrote pr-diff-range extension pack to ${extensionFilePath}:\n${extensionContents}`);
|
logger.debug(`Wrote pr-diff-range extension pack to ${extensionFilePath}:\n${extensionContents}`);
|
||||||
// Write the diff ranges to a JSON file, for action-side alert filtering by the
|
// Write the diff ranges to a JSON file, for action-side alert filtering by the
|
||||||
// upload-lib module.
|
// upload-lib module.
|
||||||
(0, diff_filtering_utils_1.writeDiffRangesJsonFile)(logger, ranges);
|
(0, diff_informed_analysis_utils_1.writeDiffRangesJsonFile)(logger, ranges);
|
||||||
return diffRangeDir;
|
return diffRangeDir;
|
||||||
}
|
}
|
||||||
|
// A set of default query suite names that are understood by the CLI.
|
||||||
|
exports.defaultSuites = new Set([
|
||||||
|
"security-experimental",
|
||||||
|
"security-extended",
|
||||||
|
"security-and-quality",
|
||||||
|
"code-quality",
|
||||||
|
"code-scanning",
|
||||||
|
]);
|
||||||
|
/**
|
||||||
|
* If `maybeSuite` is the name of a default query suite, it is resolved into the corresponding
|
||||||
|
* query suite name for the given `language`. Otherwise, `maybeSuite` is returned as is.
|
||||||
|
*
|
||||||
|
* @param language The language for which to resolve the default query suite name.
|
||||||
|
* @param maybeSuite The string that potentially contains the name of a default query suite.
|
||||||
|
* @returns Returns the resolved query suite name, or the unmodified input.
|
||||||
|
*/
|
||||||
|
function resolveQuerySuiteAlias(language, maybeSuite) {
|
||||||
|
if (exports.defaultSuites.has(maybeSuite)) {
|
||||||
|
return `${language}-${maybeSuite}.qls`;
|
||||||
|
}
|
||||||
|
return maybeSuite;
|
||||||
|
}
|
||||||
// Runs queries and creates sarif files in the given folder
|
// Runs queries and creates sarif files in the given folder
|
||||||
async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag, cleanupLevel, diffRangePackDir, automationDetailsId, config, logger, features) {
|
async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag, diffRangePackDir, automationDetailsId, codeql, config, logger, features) {
|
||||||
const statusReport = {};
|
const statusReport = {};
|
||||||
const queryFlags = [memoryFlag, threadsFlag];
|
const queryFlags = [memoryFlag, threadsFlag];
|
||||||
if (cleanupLevel !== "overlay") {
|
const incrementalMode = [];
|
||||||
|
// Preserve cached intermediate results for overlay-base databases.
|
||||||
|
if (config.augmentationProperties.overlayDatabaseMode !==
|
||||||
|
overlay_database_utils_1.OverlayDatabaseMode.OverlayBase) {
|
||||||
queryFlags.push("--expect-discarded-cache");
|
queryFlags.push("--expect-discarded-cache");
|
||||||
}
|
}
|
||||||
statusReport.analysis_is_diff_informed = diffRangePackDir !== undefined;
|
statusReport.analysis_is_diff_informed = diffRangePackDir !== undefined;
|
||||||
if (diffRangePackDir) {
|
if (diffRangePackDir) {
|
||||||
queryFlags.push(`--additional-packs=${diffRangePackDir}`);
|
queryFlags.push(`--additional-packs=${diffRangePackDir}`);
|
||||||
queryFlags.push("--extension-packs=codeql-action/pr-diff-range");
|
queryFlags.push("--extension-packs=codeql-action/pr-diff-range");
|
||||||
|
incrementalMode.push("diff-informed");
|
||||||
}
|
}
|
||||||
const sarifRunPropertyFlag = diffRangePackDir
|
statusReport.analysis_is_overlay =
|
||||||
? "--sarif-run-property=incrementalMode=diff-informed"
|
config.augmentationProperties.overlayDatabaseMode ===
|
||||||
|
overlay_database_utils_1.OverlayDatabaseMode.Overlay;
|
||||||
|
statusReport.analysis_builds_overlay_base_database =
|
||||||
|
config.augmentationProperties.overlayDatabaseMode ===
|
||||||
|
overlay_database_utils_1.OverlayDatabaseMode.OverlayBase;
|
||||||
|
if (config.augmentationProperties.overlayDatabaseMode ===
|
||||||
|
overlay_database_utils_1.OverlayDatabaseMode.Overlay) {
|
||||||
|
incrementalMode.push("overlay");
|
||||||
|
}
|
||||||
|
const sarifRunPropertyFlag = incrementalMode.length > 0
|
||||||
|
? `--sarif-run-property=incrementalMode=${incrementalMode.join(",")}`
|
||||||
: undefined;
|
: undefined;
|
||||||
const codeql = await (0, codeql_1.getCodeQL)(config.codeQLCmd);
|
|
||||||
for (const language of config.languages) {
|
for (const language of config.languages) {
|
||||||
try {
|
try {
|
||||||
const sarifFile = path.join(sarifFolder, `${language}.sarif`);
|
const sarifFile = path.join(sarifFolder, `${language}.sarif`);
|
||||||
|
const queries = [];
|
||||||
|
if (config.augmentationProperties.qualityQueriesInput !== undefined) {
|
||||||
|
queries.push(util.getGeneratedSuitePath(config, language));
|
||||||
|
for (const qualityQuery of config.augmentationProperties
|
||||||
|
.qualityQueriesInput) {
|
||||||
|
queries.push(resolveQuerySuiteAlias(language, qualityQuery.uses));
|
||||||
|
}
|
||||||
|
}
|
||||||
// The work needed to generate the query suites
|
// The work needed to generate the query suites
|
||||||
// is done in the CLI. We just need to make a single
|
// is done in the CLI. We just need to make a single
|
||||||
// call to run all the queries for each language and
|
// call to run all the queries for each language and
|
||||||
@@ -400,7 +455,7 @@ async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag,
|
|||||||
logger.startGroup(`Running queries for ${language}`);
|
logger.startGroup(`Running queries for ${language}`);
|
||||||
const startTimeRunQueries = new Date().getTime();
|
const startTimeRunQueries = new Date().getTime();
|
||||||
const databasePath = util.getCodeQLDatabasePath(config, language);
|
const databasePath = util.getCodeQLDatabasePath(config, language);
|
||||||
await codeql.databaseRunQueries(databasePath, queryFlags);
|
await codeql.databaseRunQueries(databasePath, queryFlags, queries);
|
||||||
logger.debug(`Finished running queries for ${language}.`);
|
logger.debug(`Finished running queries for ${language}.`);
|
||||||
// TODO should not be using `builtin` here. We should be using `all` instead.
|
// TODO should not be using `builtin` here. We should be using `all` instead.
|
||||||
// The status report does not support `all` yet.
|
// The status report does not support `all` yet.
|
||||||
@@ -408,14 +463,24 @@ async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag,
|
|||||||
new Date().getTime() - startTimeRunQueries;
|
new Date().getTime() - startTimeRunQueries;
|
||||||
logger.startGroup(`Interpreting results for ${language}`);
|
logger.startGroup(`Interpreting results for ${language}`);
|
||||||
const startTimeInterpretResults = new Date();
|
const startTimeInterpretResults = new Date();
|
||||||
const analysisSummary = await runInterpretResults(language, undefined, sarifFile, config.debugMode);
|
const analysisSummary = await runInterpretResults(language, undefined, sarifFile, config.debugMode, automationDetailsId);
|
||||||
|
let qualityAnalysisSummary;
|
||||||
|
if (config.augmentationProperties.qualityQueriesInput !== undefined) {
|
||||||
|
logger.info(`Interpreting quality results for ${language}`);
|
||||||
|
const qualityCategory = (0, actions_util_1.fixCodeQualityCategory)(logger, automationDetailsId);
|
||||||
|
const qualitySarifFile = path.join(sarifFolder, `${language}.quality.sarif`);
|
||||||
|
qualityAnalysisSummary = await runInterpretResults(language, config.augmentationProperties.qualityQueriesInput.map((i) => resolveQuerySuiteAlias(language, i.uses)), qualitySarifFile, config.debugMode, qualityCategory);
|
||||||
|
}
|
||||||
const endTimeInterpretResults = new Date();
|
const endTimeInterpretResults = new Date();
|
||||||
statusReport[`interpret_results_${language}_duration_ms`] =
|
statusReport[`interpret_results_${language}_duration_ms`] =
|
||||||
endTimeInterpretResults.getTime() - startTimeInterpretResults.getTime();
|
endTimeInterpretResults.getTime() - startTimeInterpretResults.getTime();
|
||||||
logger.endGroup();
|
logger.endGroup();
|
||||||
logger.info(analysisSummary);
|
logger.info(analysisSummary);
|
||||||
|
if (qualityAnalysisSummary) {
|
||||||
|
logger.info(qualityAnalysisSummary);
|
||||||
|
}
|
||||||
if (await features.getValue(feature_flags_1.Feature.QaTelemetryEnabled)) {
|
if (await features.getValue(feature_flags_1.Feature.QaTelemetryEnabled)) {
|
||||||
const perQueryAlertCounts = getPerQueryAlertCounts(sarifFile, logger);
|
const perQueryAlertCounts = getPerQueryAlertCounts(sarifFile);
|
||||||
const perQueryAlertCountEventReport = {
|
const perQueryAlertCountEventReport = {
|
||||||
event: "codeql database interpret-results",
|
event: "codeql database interpret-results",
|
||||||
started_at: startTimeInterpretResults.toISOString(),
|
started_at: startTimeInterpretResults.toISOString(),
|
||||||
@@ -438,13 +503,12 @@ async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return statusReport;
|
return statusReport;
|
||||||
async function runInterpretResults(language, queries, sarifFile, enableDebugLogging) {
|
async function runInterpretResults(language, queries, sarifFile, enableDebugLogging, category) {
|
||||||
const databasePath = util.getCodeQLDatabasePath(config, language);
|
const databasePath = util.getCodeQLDatabasePath(config, language);
|
||||||
return await codeql.databaseInterpretResults(databasePath, queries, sarifFile, addSnippetsFlag, threadsFlag, enableDebugLogging ? "-vv" : "-v", sarifRunPropertyFlag, automationDetailsId, config, features);
|
return await codeql.databaseInterpretResults(databasePath, queries, sarifFile, addSnippetsFlag, threadsFlag, enableDebugLogging ? "-vv" : "-v", sarifRunPropertyFlag, category, config, features);
|
||||||
}
|
}
|
||||||
/** Get an object with all queries and their counts parsed from a SARIF file path. */
|
/** Get an object with all queries and their counts parsed from a SARIF file path. */
|
||||||
function getPerQueryAlertCounts(sarifPath, log) {
|
function getPerQueryAlertCounts(sarifPath) {
|
||||||
(0, upload_lib_1.validateSarifFileSchema)(sarifPath, log);
|
|
||||||
const sarifObject = JSON.parse(fs.readFileSync(sarifPath, "utf8"));
|
const sarifObject = JSON.parse(fs.readFileSync(sarifPath, "utf8"));
|
||||||
// We do not need to compute fingerprints because we are not sending data based off of locations.
|
// We do not need to compute fingerprints because we are not sending data based off of locations.
|
||||||
// Generate the query: alert count object
|
// Generate the query: alert count object
|
||||||
@@ -493,7 +557,7 @@ async function warnIfGoInstalledAfterInit(config, logger) {
|
|||||||
const goBinaryPath = await io.which("go", true);
|
const goBinaryPath = await io.which("go", true);
|
||||||
if (goInitPath !== goBinaryPath) {
|
if (goInitPath !== goBinaryPath) {
|
||||||
logger.warning(`Expected \`which go\` to return ${goInitPath}, but got ${goBinaryPath}: please ensure that the correct version of Go is installed before the \`codeql-action/init\` Action is used.`);
|
logger.warning(`Expected \`which go\` to return ${goInitPath}, but got ${goBinaryPath}: please ensure that the correct version of Go is installed before the \`codeql-action/init\` Action is used.`);
|
||||||
(0, diagnostics_1.addDiagnostic)(config, languages_1.Language.go, (0, diagnostics_1.makeDiagnostic)("go/workflow/go-installed-after-codeql-init", "Go was installed after the `codeql-action/init` Action was run", {
|
(0, diagnostics_1.addDiagnostic)(config, languages_1.KnownLanguage.go, (0, diagnostics_1.makeDiagnostic)("go/workflow/go-installed-after-codeql-init", "Go was installed after the `codeql-action/init` Action was run", {
|
||||||
markdownMessage: "To avoid interfering with the CodeQL analysis, perform all installation steps before calling the `github/codeql-action/init` Action.",
|
markdownMessage: "To avoid interfering with the CodeQL analysis, perform all installation steps before calling the `github/codeql-action/init` Action.",
|
||||||
visibility: {
|
visibility: {
|
||||||
statusPage: true,
|
statusPage: true,
|
||||||
@@ -505,15 +569,6 @@ async function warnIfGoInstalledAfterInit(config, logger) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function runCleanup(config, cleanupLevel, logger) {
|
|
||||||
logger.startGroup("Cleaning up databases");
|
|
||||||
for (const language of config.languages) {
|
|
||||||
const codeql = await (0, codeql_1.getCodeQL)(config.codeQLCmd);
|
|
||||||
const databasePath = util.getCodeQLDatabasePath(config, language);
|
|
||||||
await codeql.databaseCleanup(databasePath, cleanupLevel);
|
|
||||||
}
|
|
||||||
logger.endGroup();
|
|
||||||
}
|
|
||||||
exports.exportedForTesting = {
|
exports.exportedForTesting = {
|
||||||
getDiffRanges,
|
getDiffRanges,
|
||||||
};
|
};
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
22
lib/analyze.test.js
generated
22
lib/analyze.test.js
generated
@@ -63,10 +63,9 @@ const util = __importStar(require("./util"));
|
|||||||
const addSnippetsFlag = "";
|
const addSnippetsFlag = "";
|
||||||
const threadsFlag = "";
|
const threadsFlag = "";
|
||||||
sinon.stub(uploadLib, "validateSarifFileSchema");
|
sinon.stub(uploadLib, "validateSarifFileSchema");
|
||||||
for (const language of Object.values(languages_1.Language)) {
|
for (const language of Object.values(languages_1.KnownLanguage)) {
|
||||||
(0, codeql_1.setCodeQL)({
|
const codeql = (0, codeql_1.createStubCodeQL)({
|
||||||
databaseRunQueries: async () => { },
|
databaseRunQueries: async () => { },
|
||||||
packDownload: async () => ({ packs: [] }),
|
|
||||||
databaseInterpretResults: async (_db, _queriesRun, sarifFile) => {
|
databaseInterpretResults: async (_db, _queriesRun, sarifFile) => {
|
||||||
fs.writeFileSync(sarifFile, JSON.stringify({
|
fs.writeFileSync(sarifFile, JSON.stringify({
|
||||||
runs: [
|
runs: [
|
||||||
@@ -114,9 +113,11 @@ const util = __importStar(require("./util"));
|
|||||||
fs.mkdirSync(util.getCodeQLDatabasePath(config, language), {
|
fs.mkdirSync(util.getCodeQLDatabasePath(config, language), {
|
||||||
recursive: true,
|
recursive: true,
|
||||||
});
|
});
|
||||||
const statusReport = await (0, analyze_1.runQueries)(tmpDir, memoryFlag, addSnippetsFlag, threadsFlag, "brutal", undefined, undefined, config, (0, logging_1.getRunnerLogger)(true), (0, testing_utils_1.createFeatures)([feature_flags_1.Feature.QaTelemetryEnabled]));
|
const statusReport = await (0, analyze_1.runQueries)(tmpDir, memoryFlag, addSnippetsFlag, threadsFlag, undefined, undefined, codeql, config, (0, logging_1.getRunnerLogger)(true), (0, testing_utils_1.createFeatures)([feature_flags_1.Feature.QaTelemetryEnabled]));
|
||||||
t.deepEqual(Object.keys(statusReport).sort(), [
|
t.deepEqual(Object.keys(statusReport).sort(), [
|
||||||
|
"analysis_builds_overlay_base_database",
|
||||||
"analysis_is_diff_informed",
|
"analysis_is_diff_informed",
|
||||||
|
"analysis_is_overlay",
|
||||||
`analyze_builtin_queries_${language}_duration_ms`,
|
`analyze_builtin_queries_${language}_duration_ms`,
|
||||||
"event_reports",
|
"event_reports",
|
||||||
`interpret_results_${language}_duration_ms`,
|
`interpret_results_${language}_duration_ms`,
|
||||||
@@ -313,4 +314,17 @@ function runGetDiffRanges(changes, patch) {
|
|||||||
const diffRanges = runGetDiffRanges(2, ["@@ 30 +50,2 @@", "+1", "+2"]);
|
const diffRanges = runGetDiffRanges(2, ["@@ 30 +50,2 @@", "+1", "+2"]);
|
||||||
t.deepEqual(diffRanges, undefined);
|
t.deepEqual(diffRanges, undefined);
|
||||||
});
|
});
|
||||||
|
(0, ava_1.default)("resolveQuerySuiteAlias", (t) => {
|
||||||
|
// default query suite names should resolve to something language-specific ending in `.qls`.
|
||||||
|
for (const suite of analyze_1.defaultSuites) {
|
||||||
|
const resolved = (0, analyze_1.resolveQuerySuiteAlias)(languages_1.KnownLanguage.go, suite);
|
||||||
|
t.assert(resolved.endsWith(".qls"), "Resolved default suite doesn't end in .qls");
|
||||||
|
t.assert(resolved.indexOf(languages_1.KnownLanguage.go) >= 0, "Resolved default suite doesn't contain language name");
|
||||||
|
}
|
||||||
|
// other inputs should be returned unchanged
|
||||||
|
const names = ["foo", "bar", "codeql/go-queries@1.0"];
|
||||||
|
for (const name of names) {
|
||||||
|
t.deepEqual((0, analyze_1.resolveQuerySuiteAlias)(languages_1.KnownLanguage.go, name), name);
|
||||||
|
}
|
||||||
|
});
|
||||||
//# sourceMappingURL=analyze.test.js.map
|
//# sourceMappingURL=analyze.test.js.map
|
||||||
File diff suppressed because one or more lines are too long
19
lib/api-client.js
generated
19
lib/api-client.js
generated
@@ -122,14 +122,12 @@ async function getGitHubVersion() {
|
|||||||
* Get the path of the currently executing workflow relative to the repository root.
|
* Get the path of the currently executing workflow relative to the repository root.
|
||||||
*/
|
*/
|
||||||
async function getWorkflowRelativePath() {
|
async function getWorkflowRelativePath() {
|
||||||
const repo_nwo = (0, util_1.getRequiredEnvParam)("GITHUB_REPOSITORY").split("/");
|
const repo_nwo = (0, repository_1.getRepositoryNwo)();
|
||||||
const owner = repo_nwo[0];
|
|
||||||
const repo = repo_nwo[1];
|
|
||||||
const run_id = Number((0, util_1.getRequiredEnvParam)("GITHUB_RUN_ID"));
|
const run_id = Number((0, util_1.getRequiredEnvParam)("GITHUB_RUN_ID"));
|
||||||
const apiClient = getApiClient();
|
const apiClient = getApiClient();
|
||||||
const runsResponse = await apiClient.request("GET /repos/:owner/:repo/actions/runs/:run_id?exclude_pull_requests=true", {
|
const runsResponse = await apiClient.request("GET /repos/:owner/:repo/actions/runs/:run_id?exclude_pull_requests=true", {
|
||||||
owner,
|
owner: repo_nwo.owner,
|
||||||
repo,
|
repo: repo_nwo.repo,
|
||||||
run_id,
|
run_id,
|
||||||
});
|
});
|
||||||
const workflowUrl = runsResponse.data.workflow_url;
|
const workflowUrl = runsResponse.data.workflow_url;
|
||||||
@@ -187,7 +185,7 @@ function computeAutomationID(analysis_key, environment) {
|
|||||||
}
|
}
|
||||||
/** List all Actions cache entries matching the provided key and ref. */
|
/** List all Actions cache entries matching the provided key and ref. */
|
||||||
async function listActionsCaches(key, ref) {
|
async function listActionsCaches(key, ref) {
|
||||||
const repositoryNwo = (0, repository_1.parseRepositoryNwo)((0, util_1.getRequiredEnvParam)("GITHUB_REPOSITORY"));
|
const repositoryNwo = (0, repository_1.getRepositoryNwo)();
|
||||||
return await getApiClient().paginate("GET /repos/{owner}/{repo}/actions/caches", {
|
return await getApiClient().paginate("GET /repos/{owner}/{repo}/actions/caches", {
|
||||||
owner: repositoryNwo.owner,
|
owner: repositoryNwo.owner,
|
||||||
repo: repositoryNwo.repo,
|
repo: repositoryNwo.repo,
|
||||||
@@ -197,7 +195,7 @@ async function listActionsCaches(key, ref) {
|
|||||||
}
|
}
|
||||||
/** Delete an Actions cache item by its ID. */
|
/** Delete an Actions cache item by its ID. */
|
||||||
async function deleteActionsCache(id) {
|
async function deleteActionsCache(id) {
|
||||||
const repositoryNwo = (0, repository_1.parseRepositoryNwo)((0, util_1.getRequiredEnvParam)("GITHUB_REPOSITORY"));
|
const repositoryNwo = (0, repository_1.getRepositoryNwo)();
|
||||||
await getApiClient().rest.actions.deleteActionsCacheById({
|
await getApiClient().rest.actions.deleteActionsCacheById({
|
||||||
owner: repositoryNwo.owner,
|
owner: repositoryNwo.owner,
|
||||||
repo: repositoryNwo.repo,
|
repo: repositoryNwo.repo,
|
||||||
@@ -208,9 +206,14 @@ function wrapApiConfigurationError(e) {
|
|||||||
if ((0, util_1.isHTTPError)(e)) {
|
if ((0, util_1.isHTTPError)(e)) {
|
||||||
if (e.message.includes("API rate limit exceeded for installation") ||
|
if (e.message.includes("API rate limit exceeded for installation") ||
|
||||||
e.message.includes("commit not found") ||
|
e.message.includes("commit not found") ||
|
||||||
/^ref .* not found in this repository$/.test(e.message)) {
|
e.message.includes("Resource not accessible by integration") ||
|
||||||
|
/ref .* not found in this repository/.test(e.message)) {
|
||||||
return new util_1.ConfigurationError(e.message);
|
return new util_1.ConfigurationError(e.message);
|
||||||
}
|
}
|
||||||
|
else if (e.message.includes("Bad credentials") ||
|
||||||
|
e.message.includes("Not Found")) {
|
||||||
|
return new util_1.ConfigurationError("Please check that your token is valid and has the required permissions: contents: read, security-events: write");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
36
lib/api-client.test.js
generated
36
lib/api-client.test.js
generated
@@ -120,4 +120,40 @@ function mockGetMetaVersionHeader(versionHeader) {
|
|||||||
});
|
});
|
||||||
t.deepEqual({ type: util.GitHubVariant.GHE_DOTCOM }, gheDotcom);
|
t.deepEqual({ type: util.GitHubVariant.GHE_DOTCOM }, gheDotcom);
|
||||||
});
|
});
|
||||||
|
(0, ava_1.default)("wrapApiConfigurationError correctly wraps specific configuration errors", (t) => {
|
||||||
|
// We don't reclassify arbitrary errors
|
||||||
|
const arbitraryError = new Error("arbitrary error");
|
||||||
|
let res = api.wrapApiConfigurationError(arbitraryError);
|
||||||
|
t.is(res, arbitraryError);
|
||||||
|
// Same goes for arbitrary errors
|
||||||
|
const configError = new util.ConfigurationError("arbitrary error");
|
||||||
|
res = api.wrapApiConfigurationError(configError);
|
||||||
|
t.is(res, configError);
|
||||||
|
// If an HTTP error doesn't contain a specific error message, we don't
|
||||||
|
// wrap is an an API error.
|
||||||
|
const httpError = new util.HTTPError("arbitrary HTTP error", 456);
|
||||||
|
res = api.wrapApiConfigurationError(httpError);
|
||||||
|
t.is(res, httpError);
|
||||||
|
// For other HTTP errors, we wrap them as Configuration errors if they contain
|
||||||
|
// specific error messages.
|
||||||
|
const httpNotFoundError = new util.HTTPError("commit not found", 404);
|
||||||
|
res = api.wrapApiConfigurationError(httpNotFoundError);
|
||||||
|
t.deepEqual(res, new util.ConfigurationError("commit not found"));
|
||||||
|
const refNotFoundError = new util.HTTPError("ref 'refs/heads/jitsi' not found in this repository - https://docs.github.com/rest", 404);
|
||||||
|
res = api.wrapApiConfigurationError(refNotFoundError);
|
||||||
|
t.deepEqual(res, new util.ConfigurationError("ref 'refs/heads/jitsi' not found in this repository - https://docs.github.com/rest"));
|
||||||
|
const apiRateLimitError = new util.HTTPError("API rate limit exceeded for installation", 403);
|
||||||
|
res = api.wrapApiConfigurationError(apiRateLimitError);
|
||||||
|
t.deepEqual(res, new util.ConfigurationError("API rate limit exceeded for installation"));
|
||||||
|
const tokenSuggestionMessage = "Please check that your token is valid and has the required permissions: contents: read, security-events: write";
|
||||||
|
const badCredentialsError = new util.HTTPError("Bad credentials", 401);
|
||||||
|
res = api.wrapApiConfigurationError(badCredentialsError);
|
||||||
|
t.deepEqual(res, new util.ConfigurationError(tokenSuggestionMessage));
|
||||||
|
const notFoundError = new util.HTTPError("Not Found", 404);
|
||||||
|
res = api.wrapApiConfigurationError(notFoundError);
|
||||||
|
t.deepEqual(res, new util.ConfigurationError(tokenSuggestionMessage));
|
||||||
|
const resourceNotAccessibleError = new util.HTTPError("Resource not accessible by integration", 403);
|
||||||
|
res = api.wrapApiConfigurationError(resourceNotAccessibleError);
|
||||||
|
t.deepEqual(res, new util.ConfigurationError("Resource not accessible by integration"));
|
||||||
|
});
|
||||||
//# sourceMappingURL=api-client.test.js.map
|
//# sourceMappingURL=api-client.test.js.map
|
||||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
{ "maximumVersion": "3.17", "minimumVersion": "3.12" }
|
{ "maximumVersion": "3.18", "minimumVersion": "3.14" }
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user