mirror of
https://github.com/github/codeql-action.git
synced 2025-12-24 08:10:06 +08:00
Compare commits
790 Commits
fix-uncond
...
v2.25.10
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a073c66b2a | ||
|
|
691ac2e494 | ||
|
|
d6233df2fd | ||
|
|
a78cac18f0 | ||
|
|
46c2e16272 | ||
|
|
3998c927e6 | ||
|
|
23acc5c183 | ||
|
|
9b72dbdc68 | ||
|
|
5bf6dad35b | ||
|
|
feec81c66b | ||
|
|
789b5f86ef | ||
|
|
c36b5fc54f | ||
|
|
b3642aa04d | ||
|
|
1fc6e20182 | ||
|
|
b9bbe2d606 | ||
|
|
356bee4b4a | ||
|
|
e4f82d6949 | ||
|
|
be63ca505c | ||
|
|
69a0a4689a | ||
|
|
f9848b399e | ||
|
|
d37d7829f6 | ||
|
|
385808c715 | ||
|
|
530d4feaa9 | ||
|
|
65db484585 | ||
|
|
37809d1f16 | ||
|
|
159d9119ac | ||
|
|
ed34eb9af4 | ||
|
|
31fe7dd0a6 | ||
|
|
d8d73c0e76 | ||
|
|
3d849e9df2 | ||
|
|
945bb878ef | ||
|
|
9ee83fa7ef | ||
|
|
f2ea211cd9 | ||
|
|
c8fb403f2f | ||
|
|
1354fe5355 | ||
|
|
ca3043e8ef | ||
|
|
b0944a22b8 | ||
|
|
81b81437fd | ||
|
|
eb1d92b846 | ||
|
|
94acfdc22c | ||
|
|
2fc7222394 | ||
|
|
b808216778 | ||
|
|
0a64ae0929 | ||
|
|
ba4e487a2c | ||
|
|
485d096a80 | ||
|
|
12243c759f | ||
|
|
0c392c4570 | ||
|
|
b004bb45a8 | ||
|
|
6d627423af | ||
|
|
599f279aa8 | ||
|
|
8d778e79ff | ||
|
|
c7964947b4 | ||
|
|
b411f9b125 | ||
|
|
2838cede68 | ||
|
|
358d5e7087 | ||
|
|
28d4d514f5 | ||
|
|
e8100b1de2 | ||
|
|
c65a150b16 | ||
|
|
6ac9fc7e8e | ||
|
|
8f1a6fed33 | ||
|
|
4103cca585 | ||
|
|
c48170714b | ||
|
|
52d291229a | ||
|
|
23e160363e | ||
|
|
8308092ba6 | ||
|
|
4a7314f4b5 | ||
|
|
25cffc6265 | ||
|
|
2e230e8fe0 | ||
|
|
66ad891bd4 | ||
|
|
18b06dd1df | ||
|
|
200dd0cf5b | ||
|
|
2bb35eab2f | ||
|
|
9c15e42f19 | ||
|
|
98e79227df | ||
|
|
440350bade | ||
|
|
d4fcc8b7bd | ||
|
|
add199be77 | ||
|
|
366cd98114 | ||
|
|
67d5a9a476 | ||
|
|
19a81bf3db | ||
|
|
8d9b4c6dc8 | ||
|
|
a42953ede1 | ||
|
|
eee8c708a0 | ||
|
|
fd8b26e79b | ||
|
|
fd90298f66 | ||
|
|
28cc49a08b | ||
|
|
6af2d8daa6 | ||
|
|
f079b84933 | ||
|
|
e1a42688db | ||
|
|
df52537e53 | ||
|
|
a095bf2a16 | ||
|
|
bbd4e19f51 | ||
|
|
9ab5d16a3d | ||
|
|
028346e1ff | ||
|
|
5fe08473f8 | ||
|
|
9550da953d | ||
|
|
6548a4d65c | ||
|
|
7927df07e2 | ||
|
|
8c4bc43ead | ||
|
|
584871bb84 | ||
|
|
f629cb3941 | ||
|
|
9983853f46 | ||
|
|
fdba1f907e | ||
|
|
f7f71927cf | ||
|
|
6ccd5631d8 | ||
|
|
4f2b1826e9 | ||
|
|
59af9fc5ab | ||
|
|
610e72285f | ||
|
|
898dead2d6 | ||
|
|
1bea17f717 | ||
|
|
0b4214972e | ||
|
|
4fd6c0d4f1 | ||
|
|
acdf23828a | ||
|
|
087f0b04c6 | ||
|
|
cc96c825ba | ||
|
|
b1bd8da5e7 | ||
|
|
ebd27c09f6 | ||
|
|
2c0b69bd1f | ||
|
|
162eb1e32a | ||
|
|
b46ca8cee6 | ||
|
|
00daf24ffe | ||
|
|
3ee86e168e | ||
|
|
a1a97f41b2 | ||
|
|
ab186bb61a | ||
|
|
ff8133afe9 | ||
|
|
ac7c76bfc7 | ||
|
|
d429afad01 | ||
|
|
b2dad92724 | ||
|
|
9fdb3e4972 | ||
|
|
00792ab1e0 | ||
|
|
7c4668115d | ||
|
|
b0a1d92ae3 | ||
|
|
23c1981a3f | ||
|
|
46fc2c9526 | ||
|
|
445165beea | ||
|
|
63d519c0ae | ||
|
|
0d9161ca1c | ||
|
|
9a1f461645 | ||
|
|
e9e27290e9 | ||
|
|
de1ac31508 | ||
|
|
a57c67b895 | ||
|
|
b7ef64ecb1 | ||
|
|
e54dea297a | ||
|
|
3b42294f03 | ||
|
|
9f32769e43 | ||
|
|
7fd4900b29 | ||
|
|
931fabe1ef | ||
|
|
24766fcf56 | ||
|
|
d05fceb045 | ||
|
|
08487dbb93 | ||
|
|
5a14b059c3 | ||
|
|
df4819e3a1 | ||
|
|
bcc13653e8 | ||
|
|
1796f5474f | ||
|
|
4522b08a7e | ||
|
|
998a4c720d | ||
|
|
c92bbd4223 | ||
|
|
cff15d7117 | ||
|
|
cbe408dfc9 | ||
|
|
bf2faab135 | ||
|
|
32f554ea7c | ||
|
|
78d13343a2 | ||
|
|
a953717405 | ||
|
|
b5e604ae77 | ||
|
|
ceb635d11f | ||
|
|
34710081e2 | ||
|
|
9f6ef11db1 | ||
|
|
b7cec75265 | ||
|
|
90e315a7a8 | ||
|
|
6778fe4553 | ||
|
|
bc3670a4f4 | ||
|
|
4f59156fc8 | ||
|
|
eb4969f5e2 | ||
|
|
4a51972477 | ||
|
|
a8c32fd278 | ||
|
|
6182f337aa | ||
|
|
f73b0b70eb | ||
|
|
c59e05245f | ||
|
|
33e416c056 | ||
|
|
67f8a36bdb | ||
|
|
4995c49010 | ||
|
|
def4d2cd4e | ||
|
|
5ac5c91bc1 | ||
|
|
7a6352f8e6 | ||
|
|
cf4c3b4434 | ||
|
|
9dc84e9abe | ||
|
|
c49579ba44 | ||
|
|
d23427596b | ||
|
|
9fba755525 | ||
|
|
43beef629f | ||
|
|
7d9b7a1870 | ||
|
|
715d348a99 | ||
|
|
7aff39e921 | ||
|
|
e36d338969 | ||
|
|
4f0ceda83a | ||
|
|
2c25369331 | ||
|
|
654d389318 | ||
|
|
685e64b1e3 | ||
|
|
02619f4624 | ||
|
|
8e81fd40bf | ||
|
|
52e98c0622 | ||
|
|
65c9ae9352 | ||
|
|
b1c3187939 | ||
|
|
a21528bb71 | ||
|
|
ccf74c9479 | ||
|
|
45fb58ab31 | ||
|
|
ec1179000d | ||
|
|
4fdf4ac628 | ||
|
|
e50fb8fff0 | ||
|
|
ca7f194e36 | ||
|
|
4b812a5dff | ||
|
|
1e21373a75 | ||
|
|
4673d41da1 | ||
|
|
65297ef0b0 | ||
|
|
84d6ead480 | ||
|
|
b20bf5914d | ||
|
|
93b8232a39 | ||
|
|
ee63da2847 | ||
|
|
e62cc70a8b | ||
|
|
5d274be858 | ||
|
|
3a471a06fa | ||
|
|
725ed4139d | ||
|
|
1de9b371a1 | ||
|
|
757fcd3d21 | ||
|
|
40f70f96b1 | ||
|
|
41857bab35 | ||
|
|
8fcfedf570 | ||
|
|
c2eaf8a4f9 | ||
|
|
a17ed37616 | ||
|
|
b3225af51b | ||
|
|
905f9b0083 | ||
|
|
80394dcc32 | ||
|
|
7c29971135 | ||
|
|
a5e49d1544 | ||
|
|
24acd7711e | ||
|
|
8b0dfa84c7 | ||
|
|
4ebadbc746 | ||
|
|
ceaec5c11a | ||
|
|
39f10b5b8a | ||
|
|
5af22f0433 | ||
|
|
64ccee938f | ||
|
|
e76c3643d1 | ||
|
|
caa31633f2 | ||
|
|
04aff1f5fa | ||
|
|
c01f016188 | ||
|
|
d39d31e687 | ||
|
|
a7278252c7 | ||
|
|
1efa8597b1 | ||
|
|
ac2f82a1ff | ||
|
|
0ad7791640 | ||
|
|
79d9ee7f07 | ||
|
|
9ace329d8c | ||
|
|
dbf2b1706b | ||
|
|
b849f33370 | ||
|
|
ff6a3c42a5 | ||
|
|
42cbd34070 | ||
|
|
9762ef1fad | ||
|
|
5122fa879d | ||
|
|
c3aa7b8d0d | ||
|
|
619dc0c4b8 | ||
|
|
8f596b4ae3 | ||
|
|
de8916ec5a | ||
|
|
4909c1ffb9 | ||
|
|
f45390cde1 | ||
|
|
1be8c488eb | ||
|
|
82edfe29ce | ||
|
|
8786e1f9a1 | ||
|
|
e949a1676c | ||
|
|
3c7ac61481 | ||
|
|
948c1ebff4 | ||
|
|
e4b5f9d015 | ||
|
|
8aad228360 | ||
|
|
c992dad089 | ||
|
|
06c30cc68c | ||
|
|
b5bd9be6da | ||
|
|
c7f9125735 | ||
|
|
1c7e8b2cf2 | ||
|
|
39e1e6509e | ||
|
|
501f5f5716 | ||
|
|
5d73b1bd71 | ||
|
|
c4fb451437 | ||
|
|
556b3bcfae | ||
|
|
ef66aeacbf | ||
|
|
9b87e0a8c4 | ||
|
|
18111b696b | ||
|
|
ade98b980a | ||
|
|
8566d50a79 | ||
|
|
453a95695a | ||
|
|
c7a8056fc3 | ||
|
|
71e6077db0 | ||
|
|
db2b739f55 | ||
|
|
b8e2556072 | ||
|
|
d8b8ad0cb2 | ||
|
|
fc090c44d2 | ||
|
|
f72882a05b | ||
|
|
ea78e51e31 | ||
|
|
14eab9153b | ||
|
|
59771ddf53 | ||
|
|
24b71bdbcc | ||
|
|
f2c09fb28a | ||
|
|
b9d792527d | ||
|
|
12bc863d11 | ||
|
|
e006461bad | ||
|
|
d37ec9a9ec | ||
|
|
ba352fa8e7 | ||
|
|
d95215f691 | ||
|
|
553a89d488 | ||
|
|
1ae9ce7145 | ||
|
|
df5a14dc28 | ||
|
|
a22989dcd4 | ||
|
|
3f70eaa4d3 | ||
|
|
2b2cee5229 | ||
|
|
4fcf7a216c | ||
|
|
d30d1cabb4 | ||
|
|
f21d2d2d1a | ||
|
|
55585360a3 | ||
|
|
fa75c144b4 | ||
|
|
5a599c68cf | ||
|
|
aa4a08dd29 | ||
|
|
2eaad471b6 | ||
|
|
cbe29f55df | ||
|
|
8f057a3d8e | ||
|
|
3d49faaabb | ||
|
|
e37d0f3e7c | ||
|
|
5b74166227 | ||
|
|
829376a618 | ||
|
|
efc474680f | ||
|
|
93f93fc2ad | ||
|
|
1ac88f37c7 | ||
|
|
3901d1208a | ||
|
|
4b0172d9c2 | ||
|
|
d4e7b0e493 | ||
|
|
96f44cb9d2 | ||
|
|
1829b70201 | ||
|
|
8ea1a11e72 | ||
|
|
24a01703e4 | ||
|
|
987236cc0f | ||
|
|
287c064d05 | ||
|
|
ee097cec19 | ||
|
|
5e9199f7b4 | ||
|
|
21eac7ce4e | ||
|
|
88fafebdd3 | ||
|
|
1a60a91726 | ||
|
|
2f0d0eaebd | ||
|
|
8f1e24411b | ||
|
|
33e3a7c976 | ||
|
|
84efe241da | ||
|
|
218c52e7c7 | ||
|
|
dd2106d0d1 | ||
|
|
3d026bcb8d | ||
|
|
f242fc9172 | ||
|
|
24a95a0411 | ||
|
|
7c23a5e578 | ||
|
|
746a1af6ad | ||
|
|
1f8d877ef2 | ||
|
|
140158642f | ||
|
|
3f0cb87e80 | ||
|
|
d33e75159d | ||
|
|
e94a917e33 | ||
|
|
bcb5e6e0b8 | ||
|
|
fcdff8b3c9 | ||
|
|
e6b2c0d6b8 | ||
|
|
4e8e3439dd | ||
|
|
f0a5e52d93 | ||
|
|
4a666f8539 | ||
|
|
ffd3158cb9 | ||
|
|
82478fb458 | ||
|
|
2a96432c79 | ||
|
|
93075ceec3 | ||
|
|
1c270d01c7 | ||
|
|
11eab0d2e6 | ||
|
|
a023017ea9 | ||
|
|
794eacf375 | ||
|
|
a1559aa4a9 | ||
|
|
f64694af39 | ||
|
|
4355270be1 | ||
|
|
3f041c51a5 | ||
|
|
7df281f2fe | ||
|
|
f421cda8e7 | ||
|
|
5f535debfe | ||
|
|
278465cdfb | ||
|
|
e0bc6b7942 | ||
|
|
6ab7733abd | ||
|
|
d8293662f4 | ||
|
|
9ba21c3639 | ||
|
|
c7eea240e2 | ||
|
|
65e69c8a4b | ||
|
|
c037115ddf | ||
|
|
d3c32a84cb | ||
|
|
26540626a5 | ||
|
|
d3257627d7 | ||
|
|
978bdd643f | ||
|
|
2cc8bbd0e0 | ||
|
|
3bd9c3e65c | ||
|
|
dcf00b3fd4 | ||
|
|
f8dd543c81 | ||
|
|
6514cbb626 | ||
|
|
f06c933b16 | ||
|
|
eda4878a3d | ||
|
|
eeaea14a62 | ||
|
|
ec214df87a | ||
|
|
f4936c4c20 | ||
|
|
99c9897648 | ||
|
|
d7c4cc360c | ||
|
|
048b508a9d | ||
|
|
84ba7fb56d | ||
|
|
016720d81f | ||
|
|
f835435c19 | ||
|
|
58194bf81a | ||
|
|
956f09c2ef | ||
|
|
a99c6230dc | ||
|
|
155888c08e | ||
|
|
82b82e58c0 | ||
|
|
3c4b8bc120 | ||
|
|
a0a63a2dd4 | ||
|
|
3bd271cec3 | ||
|
|
70aa50b057 | ||
|
|
6ac57535de | ||
|
|
e20c273295 | ||
|
|
2bbafcdd7f | ||
|
|
7e30c622b0 | ||
|
|
ccc609bf1a | ||
|
|
a12b868bbc | ||
|
|
3d817349a4 | ||
|
|
a82bad7182 | ||
|
|
61ddd48e03 | ||
|
|
ca4079b3a2 | ||
|
|
abca38cf8c | ||
|
|
763babe7ac | ||
|
|
72d46cb780 | ||
|
|
0b21c947c0 | ||
|
|
7cdd97256b | ||
|
|
1b1aada464 | ||
|
|
6505708f95 | ||
|
|
09d4101d2b | ||
|
|
a3ab02e645 | ||
|
|
9cf4574790 | ||
|
|
964f5e7811 | ||
|
|
9c0c35b370 | ||
|
|
c84e4c8e7b | ||
|
|
4aca720110 | ||
|
|
7f375aeb76 | ||
|
|
294b6df61d | ||
|
|
1aae1e7090 | ||
|
|
ea1261a218 | ||
|
|
66736a1775 | ||
|
|
dfb0fd0039 | ||
|
|
423a04bb2c | ||
|
|
c2dc67199a | ||
|
|
f018a9586e | ||
|
|
6007966519 | ||
|
|
efed72eb8f | ||
|
|
6a57a861ab | ||
|
|
bcca54f232 | ||
|
|
76d48637f2 | ||
|
|
4821ae1424 | ||
|
|
4b2a78627b | ||
|
|
05963f47d8 | ||
|
|
2b9b521560 | ||
|
|
1ecc2779e9 | ||
|
|
e28ae3a84c | ||
|
|
bddfc7c6d5 | ||
|
|
3edd1bf725 | ||
|
|
88a0b7abb3 | ||
|
|
88b28eb70d | ||
|
|
f055b5e672 | ||
|
|
0d680ab61c | ||
|
|
3d82264f40 | ||
|
|
e402144d13 | ||
|
|
a009e4d1af | ||
|
|
3b6ebfb5f8 | ||
|
|
8da95d81a8 | ||
|
|
070b05147a | ||
|
|
649f3e87e1 | ||
|
|
362c407426 | ||
|
|
e56cfd0877 | ||
|
|
f195496548 | ||
|
|
6046c633c7 | ||
|
|
ed2b6b741f | ||
|
|
a7b089b87e | ||
|
|
570dc010e8 | ||
|
|
1a8046c7f3 | ||
|
|
8c395e0c45 | ||
|
|
de22b302a6 | ||
|
|
ef507e1748 | ||
|
|
3ab4101902 | ||
|
|
a006adfa77 | ||
|
|
5e882999f1 | ||
|
|
69e120d747 | ||
|
|
5ec06c71f0 | ||
|
|
caf377935a | ||
|
|
532ca5486e | ||
|
|
2fa207a8b7 | ||
|
|
24c3eda0e3 | ||
|
|
27a6cd0a11 | ||
|
|
1bac334738 | ||
|
|
83a02f7883 | ||
|
|
849379362c | ||
|
|
5fa9b09edf | ||
|
|
928ff8c822 | ||
|
|
2f52385615 | ||
|
|
272cd56763 | ||
|
|
3839e215cc | ||
|
|
61f4d893e6 | ||
|
|
30ad6c3d9e | ||
|
|
baf3361f31 | ||
|
|
40034859a7 | ||
|
|
8762383e8d | ||
|
|
8a470fddaf | ||
|
|
d59eafb69b | ||
|
|
158d0780dc | ||
|
|
2307ff547f | ||
|
|
ccd3f02545 | ||
|
|
c0917251d4 | ||
|
|
e12a8cc5eb | ||
|
|
888ab31e3e | ||
|
|
bd56a05133 | ||
|
|
7bde9061b4 | ||
|
|
9330c6877d | ||
|
|
db9620802e | ||
|
|
62712e9ff9 | ||
|
|
52f2347108 | ||
|
|
1a6bac42d0 | ||
|
|
cc3808ec2a | ||
|
|
d8595f5543 | ||
|
|
166b8a70b8 | ||
|
|
2c235f1a60 | ||
|
|
17c5ab2ca1 | ||
|
|
60465730fb | ||
|
|
e4a536270d | ||
|
|
28b564f8c6 | ||
|
|
25d334f188 | ||
|
|
66c3cec3e8 | ||
|
|
36f1104e11 | ||
|
|
78df51c1cc | ||
|
|
045d9f3939 | ||
|
|
a3c8eb3ab0 | ||
|
|
6078595fdf | ||
|
|
395cdfe20c | ||
|
|
905ae4af53 | ||
|
|
a56a03b370 | ||
|
|
6dab9f2356 | ||
|
|
4d6d2bfeaa | ||
|
|
05053827ef | ||
|
|
fa5685c7f0 | ||
|
|
8c3591c19a | ||
|
|
557a8d2306 | ||
|
|
7351df07bb | ||
|
|
d15fdd879b | ||
|
|
633baf86c3 | ||
|
|
ed2c332cfe | ||
|
|
a39d1d29ad | ||
|
|
47b3d888fe | ||
|
|
28c290059f | ||
|
|
eb991df649 | ||
|
|
a74dcdb056 | ||
|
|
aeb89ef79a | ||
|
|
2896599ec9 | ||
|
|
e3a86ed8b6 | ||
|
|
5d55901fc8 | ||
|
|
80eb8d5395 | ||
|
|
908a88334d | ||
|
|
0ddabac401 | ||
|
|
9bce06dffb | ||
|
|
b882b63a68 | ||
|
|
c9f3eed85d | ||
|
|
88189dc01e | ||
|
|
2a15560d6d | ||
|
|
8b0f3e6135 | ||
|
|
8601b9e70a | ||
|
|
bd94b4c175 | ||
|
|
755340a6bd | ||
|
|
9467b486f0 | ||
|
|
e2e140ad14 | ||
|
|
5b1ae298f9 | ||
|
|
982d9346ad | ||
|
|
ebda17e859 | ||
|
|
cca1ddefc0 | ||
|
|
f32f0bf8e4 | ||
|
|
bf8c75ee37 | ||
|
|
5a96876652 | ||
|
|
1c652cd4ee | ||
|
|
36c51ac2b5 | ||
|
|
a7dc229496 | ||
|
|
592977e6ae | ||
|
|
1737b12155 | ||
|
|
4a610e2380 | ||
|
|
b9d85b4c34 | ||
|
|
c709994d27 | ||
|
|
8cb81db135 | ||
|
|
0ce9708b98 | ||
|
|
2ddf87a698 | ||
|
|
ef0a773901 | ||
|
|
4a8f20f6b9 | ||
|
|
65b0987dbe | ||
|
|
460939e7d8 | ||
|
|
ceebdeb9fa | ||
|
|
29e98fd241 | ||
|
|
47c8d615ed | ||
|
|
c232c5de9c | ||
|
|
2452b7d8af | ||
|
|
4ffed09d48 | ||
|
|
b7c408a8b7 | ||
|
|
379614612a | ||
|
|
01d302a04e | ||
|
|
3a7796d6ad | ||
|
|
56b93f29eb | ||
|
|
381e65f460 | ||
|
|
d88d538126 | ||
|
|
8b6a45a6ec | ||
|
|
2ccdcd5135 | ||
|
|
dc983b33c3 | ||
|
|
4f50fb3be5 | ||
|
|
02022337ac | ||
|
|
3dafabe4d9 | ||
|
|
40cd785140 | ||
|
|
10746dd61e | ||
|
|
66a4732f1d | ||
|
|
e62fb8e891 | ||
|
|
ece8414c72 | ||
|
|
32f8d538f3 | ||
|
|
663c1506d4 | ||
|
|
1a41e5519a | ||
|
|
f00392ec30 | ||
|
|
95d258ab1c | ||
|
|
d57cf8e232 | ||
|
|
729def5a41 | ||
|
|
eb60ca25f8 | ||
|
|
c6cf6fda4d | ||
|
|
7b30fefa68 | ||
|
|
427cfbe9a2 | ||
|
|
bc64d12bb9 | ||
|
|
ecdd69dbae | ||
|
|
191f59f435 | ||
|
|
057a9cbd10 | ||
|
|
1a077f8f6c | ||
|
|
3935424551 | ||
|
|
05d809f630 | ||
|
|
d8c4c3a4eb | ||
|
|
b301568384 | ||
|
|
f5c8be0ac1 | ||
|
|
4504810aa1 | ||
|
|
cf10f87301 | ||
|
|
db663b280b | ||
|
|
e675ced7a7 | ||
|
|
41154da3e4 | ||
|
|
c79c360e02 | ||
|
|
65853b9b29 | ||
|
|
4e5f9c0873 | ||
|
|
77be28fbdb | ||
|
|
4075abfb06 | ||
|
|
5a6da1d85d | ||
|
|
43a8916cbe | ||
|
|
b0346e4adb | ||
|
|
3ab1d29793 | ||
|
|
9a734dafa1 | ||
|
|
8fae32eb18 | ||
|
|
1515e2bb20 | ||
|
|
fc9f9e5ef9 | ||
|
|
f3ced614cb | ||
|
|
932a7d5a59 | ||
|
|
9e39a05578 | ||
|
|
0ab8e2a32a | ||
|
|
8fb654e590 | ||
|
|
0fe34bd39a | ||
|
|
db6e5fff06 | ||
|
|
cf7e9f2349 | ||
|
|
39cc02b1d9 | ||
|
|
15b447d64b | ||
|
|
dc021d495c | ||
|
|
e1fa6ddb4a | ||
|
|
1d4866b058 | ||
|
|
da89f3f4cf | ||
|
|
f822fa3067 | ||
|
|
3ed798ed18 | ||
|
|
5b498ba405 | ||
|
|
7dde705407 | ||
|
|
c004a3e831 | ||
|
|
921adb69c6 | ||
|
|
e8893c57a1 | ||
|
|
78d6c8e84d | ||
|
|
2db0327171 | ||
|
|
f9dea84e29 | ||
|
|
81eb6b2bf4 | ||
|
|
483bef1dab | ||
|
|
b58c2f67a6 | ||
|
|
f7d53249e3 | ||
|
|
254b53d999 | ||
|
|
e34513334c | ||
|
|
463930c71f | ||
|
|
d982a14465 | ||
|
|
55c1fd5777 | ||
|
|
0166a8a567 | ||
|
|
401f9d6286 | ||
|
|
d2e867f3be | ||
|
|
ec42edcaab | ||
|
|
8c22ec9e5d | ||
|
|
68d348377f | ||
|
|
e33271d071 | ||
|
|
eab49d76a3 | ||
|
|
202c383f78 | ||
|
|
cfefe3a7e8 | ||
|
|
25f779c0f2 | ||
|
|
738d232550 | ||
|
|
2f93e4319b | ||
|
|
5c9716f453 | ||
|
|
c98f2c953c | ||
|
|
554c990fe8 | ||
|
|
abe5934e80 | ||
|
|
8879ae88d9 | ||
|
|
01e8d7f881 | ||
|
|
a2c5130ffd | ||
|
|
b7bf0a3ed3 | ||
|
|
9a9b0e4a8f | ||
|
|
33e354b34b | ||
|
|
f4cfe8904c | ||
|
|
61bf02577c | ||
|
|
16150320c5 | ||
|
|
bd67d8d6b2 | ||
|
|
a2619f68c8 | ||
|
|
666e2f9edf | ||
|
|
d43ae36a63 | ||
|
|
75af1f5948 | ||
|
|
65c74964a9 | ||
|
|
2eaf0149ef | ||
|
|
f03430628f | ||
|
|
baaf7d5247 | ||
|
|
c6fd1aa12c | ||
|
|
d0c5ea08fd | ||
|
|
a246aaa40c | ||
|
|
f1915cce98 | ||
|
|
2949ab83fb | ||
|
|
b96e5e1158 | ||
|
|
545bf65803 | ||
|
|
42edda9026 | ||
|
|
bd00f23331 | ||
|
|
d0c848438b | ||
|
|
e86ee7f7b4 | ||
|
|
4f9fb97304 | ||
|
|
a854253aca | ||
|
|
f72cffc780 | ||
|
|
4759df8df7 | ||
|
|
d13ca047ae | ||
|
|
475e2aff08 | ||
|
|
554005d264 | ||
|
|
fb29452d38 | ||
|
|
13884cb7d7 | ||
|
|
ac64986f93 | ||
|
|
cdcacf8b4f | ||
|
|
4d7889a2f1 | ||
|
|
0b21cf2492 | ||
|
|
ae616145ed | ||
|
|
f65ecd09c7 | ||
|
|
4d75a10efa | ||
|
|
e65c5d92f7 | ||
|
|
6b12e3d9d9 | ||
|
|
e292db6207 | ||
|
|
1fea7a57e7 | ||
|
|
96531062ba | ||
|
|
eb14aeb61d | ||
|
|
30597e33ea | ||
|
|
cd94990cfe | ||
|
|
f5a82188bc | ||
|
|
8e8de28ef8 | ||
|
|
72e5036933 | ||
|
|
8b7fcbfac2 | ||
|
|
e24bd8fed4 | ||
|
|
8f2682add5 | ||
|
|
8f5ae1a11a | ||
|
|
99d337aef5 | ||
|
|
997d889b5d | ||
|
|
1500a13138 | ||
|
|
0d318c9f1a | ||
|
|
d6286c6fdb | ||
|
|
9c74de20cb | ||
|
|
49a6ae4966 | ||
|
|
3366e3bbdd | ||
|
|
844fc3cd56 | ||
|
|
5a201efe22 | ||
|
|
c9f92aa25f | ||
|
|
03e7845b7b | ||
|
|
54f10077ea | ||
|
|
20d1a9b175 | ||
|
|
c28d79bb2e | ||
|
|
241e8b42b2 | ||
|
|
8bc67d15e2 | ||
|
|
e106171cbb | ||
|
|
231f9f1b59 | ||
|
|
47334bf4e9 | ||
|
|
e763762131 |
@@ -29,7 +29,16 @@ inputs:
|
|||||||
tools:
|
tools:
|
||||||
required: true
|
required: true
|
||||||
description: |
|
description: |
|
||||||
The url of codeql to use.
|
The version of CodeQL passed to the `tools` input of the init action.
|
||||||
|
This can be any of the following:
|
||||||
|
|
||||||
|
- A local path to a tarball containing the CodeQL tools, or
|
||||||
|
- A URL to a GitHub release assets containing the CodeQL tools, or
|
||||||
|
- A special value `linked` which is forcing the use of the CodeQL tools
|
||||||
|
that the action has been bundled with.
|
||||||
|
|
||||||
|
If not specified, the Action will check in several places until it finds
|
||||||
|
the CodeQL tools.
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
|
|||||||
2
.github/actions/check-sarif/action.yml
vendored
2
.github/actions/check-sarif/action.yml
vendored
@@ -16,5 +16,5 @@ inputs:
|
|||||||
Comma separated list of query ids that should NOT be included in this SARIF file.
|
Comma separated list of query ids that should NOT be included in this SARIF file.
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: node20
|
using: node16
|
||||||
main: index.js
|
main: index.js
|
||||||
|
|||||||
6
.github/actions/prepare-test/action.yml
vendored
6
.github/actions/prepare-test/action.yml
vendored
@@ -2,7 +2,7 @@ name: "Prepare test"
|
|||||||
description: Performs some preparation to run tests
|
description: Performs some preparation to run tests
|
||||||
inputs:
|
inputs:
|
||||||
version:
|
version:
|
||||||
description: "The version of the CodeQL CLI to use. Can be 'latest', 'default', 'nightly-latest', 'nightly-YYYY-MM-DD', or 'stable-YYYY-MM-DD'."
|
description: "The version of the CodeQL CLI to use. Can be 'linked', 'default', 'nightly-latest', 'nightly-YYYY-MM-DD', or 'stable-YYYY-MM-DD'."
|
||||||
required: true
|
required: true
|
||||||
use-all-platform-bundle:
|
use-all-platform-bundle:
|
||||||
description: "If true, we output a tools URL with codeql-bundle.tar.gz file rather than platform-specific URL"
|
description: "If true, we output a tools URL with codeql-bundle.tar.gz file rather than platform-specific URL"
|
||||||
@@ -50,8 +50,8 @@ runs:
|
|||||||
elif [[ ${{ inputs.version }} == *"stable"* ]]; then
|
elif [[ ${{ inputs.version }} == *"stable"* ]]; then
|
||||||
version=`echo ${{ inputs.version }} | sed -e 's/^.*\-//'`
|
version=`echo ${{ inputs.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
|
||||||
elif [[ ${{ inputs.version }} == "latest" ]]; then
|
elif [[ ${{ inputs.version }} == "linked" ]]; then
|
||||||
echo "tools-url=latest" >> $GITHUB_OUTPUT
|
echo "tools-url=linked" >> $GITHUB_OUTPUT
|
||||||
elif [[ ${{ inputs.version }} == "default" ]]; then
|
elif [[ ${{ inputs.version }} == "default" ]]; then
|
||||||
echo "tools-url=" >> $GITHUB_OUTPUT
|
echo "tools-url=" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
|
|||||||
12
.github/actions/query-filter-test/action.yml
vendored
12
.github/actions/query-filter-test/action.yml
vendored
@@ -23,7 +23,16 @@ inputs:
|
|||||||
tools:
|
tools:
|
||||||
required: true
|
required: true
|
||||||
description: |
|
description: |
|
||||||
The url of codeql to use.
|
The version of CodeQL passed to the `tools` input of the init action.
|
||||||
|
This can be any of the following:
|
||||||
|
|
||||||
|
- A local path to a tarball containing the CodeQL tools, or
|
||||||
|
- A URL to a GitHub release assets containing the CodeQL tools, or
|
||||||
|
- A special value `linked` which is forcing the use of the CodeQL tools
|
||||||
|
that the action has been bundled with.
|
||||||
|
|
||||||
|
If not specified, the Action will check in several places until it finds
|
||||||
|
the CodeQL tools.
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
@@ -39,7 +48,6 @@ runs:
|
|||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
with:
|
with:
|
||||||
output: ${{ runner.temp }}/results
|
output: ${{ runner.temp }}/results
|
||||||
upload-database: false
|
|
||||||
upload: never
|
upload: never
|
||||||
env:
|
env:
|
||||||
CODEQL_ACTION_TEST_MODE: "true"
|
CODEQL_ACTION_TEST_MODE: "true"
|
||||||
|
|||||||
@@ -18,12 +18,12 @@ runs:
|
|||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: 3.8
|
python-version: 3.12
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install PyGithub==1.55 requests
|
pip install PyGithub==2.3.0 requests
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Update git config
|
- name: Update git config
|
||||||
|
|||||||
2
.github/actions/setup-swift/action.yml
vendored
2
.github/actions/setup-swift/action.yml
vendored
@@ -33,7 +33,7 @@ runs:
|
|||||||
fi
|
fi
|
||||||
echo "version=$VERSION" | tee -a $GITHUB_OUTPUT
|
echo "version=$VERSION" | tee -a $GITHUB_OUTPUT
|
||||||
|
|
||||||
- uses: swift-actions/setup-swift@cdbe0f7f4c77929b6580e71983e8606e55ffe7e4 # Please update the corresponding SHA in the CLI's CodeQL Action Integration Test.
|
- uses: redsun82/setup-swift@b2b6f77ab14f6a9b136b520dc53ec8eca27d2b99 # Please update the corresponding SHA in the CLI's CodeQL Action Integration Test.
|
||||||
if: runner.os == 'Linux' && steps.get_swift_version.outputs.version != 'null'
|
if: runner.os == 'Linux' && steps.get_swift_version.outputs.version != 'null'
|
||||||
with:
|
with:
|
||||||
swift-version: "${{ steps.get_swift_version.outputs.version }}"
|
swift-version: "${{ steps.get_swift_version.outputs.version }}"
|
||||||
|
|||||||
33
.github/update-release-branch.py
vendored
33
.github/update-release-branch.py
vendored
@@ -1,5 +1,6 @@
|
|||||||
import argparse
|
import argparse
|
||||||
import datetime
|
import datetime
|
||||||
|
import fileinput
|
||||||
import re
|
import re
|
||||||
from github import Github
|
from github import Github
|
||||||
import json
|
import json
|
||||||
@@ -60,7 +61,7 @@ def open_pr(
|
|||||||
|
|
||||||
# Start constructing the body text
|
# Start constructing the body text
|
||||||
body = []
|
body = []
|
||||||
body.append(f'Merging {source_branch_short_sha} into {target_branch}.')
|
body.append(f'Merging {source_branch_short_sha} into `{target_branch}`.')
|
||||||
|
|
||||||
body.append('')
|
body.append('')
|
||||||
body.append(f'Conductor for this PR is @{conductor}.')
|
body.append(f'Conductor for this PR is @{conductor}.')
|
||||||
@@ -92,7 +93,7 @@ def open_pr(
|
|||||||
'branch to resolve the merge conflicts.')
|
'branch to resolve the merge conflicts.')
|
||||||
body.append(' - [ ] Ensure the CHANGELOG displays the correct version and date.')
|
body.append(' - [ ] Ensure the CHANGELOG displays the correct version and date.')
|
||||||
body.append(' - [ ] Ensure the CHANGELOG includes all relevant, user-facing changes since the last release.')
|
body.append(' - [ ] Ensure the CHANGELOG includes all relevant, user-facing changes since the last release.')
|
||||||
body.append(f' - [ ] Check that there are not any unexpected commits being merged into the {target_branch} branch.')
|
body.append(f' - [ ] Check that there are not any unexpected commits being merged into the `{target_branch}` branch.')
|
||||||
body.append(' - [ ] Ensure the docs team is aware of any documentation changes that need to be released.')
|
body.append(' - [ ] Ensure the docs team is aware of any documentation changes that need to be released.')
|
||||||
|
|
||||||
if not is_primary_release:
|
if not is_primary_release:
|
||||||
@@ -171,6 +172,19 @@ def get_current_version():
|
|||||||
with open('package.json', 'r') as f:
|
with open('package.json', 'r') as f:
|
||||||
return json.load(f)['version']
|
return json.load(f)['version']
|
||||||
|
|
||||||
|
# `npm version` doesn't always work because of merge conflicts, so we
|
||||||
|
# replace the version in package.json textually.
|
||||||
|
def replace_version_package_json(prev_version, new_version):
|
||||||
|
prev_line_is_codeql = False
|
||||||
|
for line in fileinput.input('package.json', inplace = True, encoding='utf-8'):
|
||||||
|
if prev_line_is_codeql and f'\"version\": \"{prev_version}\"' in line:
|
||||||
|
print(line.replace(prev_version, new_version), end='')
|
||||||
|
else:
|
||||||
|
prev_line_is_codeql = False
|
||||||
|
print(line, end='')
|
||||||
|
if '\"name\": \"codeql\",' in line:
|
||||||
|
prev_line_is_codeql = True
|
||||||
|
|
||||||
def get_today_string():
|
def get_today_string():
|
||||||
today = datetime.datetime.today()
|
today = datetime.datetime.today()
|
||||||
return '{:%d %b %Y}'.format(today)
|
return '{:%d %b %Y}'.format(today)
|
||||||
@@ -186,16 +200,17 @@ def process_changelog_for_backports(source_branch_major_version, target_branch_m
|
|||||||
with open('CHANGELOG.md', 'r') as f:
|
with open('CHANGELOG.md', 'r') as f:
|
||||||
|
|
||||||
# until we find the first section, just duplicate all lines
|
# until we find the first section, just duplicate all lines
|
||||||
while True:
|
found_first_section = False
|
||||||
|
while not found_first_section:
|
||||||
line = f.readline()
|
line = f.readline()
|
||||||
if not line:
|
if not line:
|
||||||
raise Exception('Could not find any change sections in CHANGELOG.md') # EOF
|
raise Exception('Could not find any change sections in CHANGELOG.md') # EOF
|
||||||
|
|
||||||
output += line
|
|
||||||
if line.startswith('## '):
|
if line.startswith('## '):
|
||||||
line = line.replace(f'## {source_branch_major_version}', f'## {target_branch_major_version}')
|
line = line.replace(f'## {source_branch_major_version}', f'## {target_branch_major_version}')
|
||||||
# we have found the first section, so now handle things differently
|
found_first_section = True
|
||||||
break
|
|
||||||
|
output += line
|
||||||
|
|
||||||
# found_content tracks whether we hit two headings in a row
|
# found_content tracks whether we hit two headings in a row
|
||||||
found_content = False
|
found_content = False
|
||||||
@@ -373,9 +388,9 @@ def main():
|
|||||||
run_git('commit', '--no-edit')
|
run_git('commit', '--no-edit')
|
||||||
|
|
||||||
# Migrate the package version number from a vLatest version number to a vOlder version number
|
# Migrate the package version number from a vLatest version number to a vOlder version number
|
||||||
print(f'Setting version number to {version}')
|
print(f'Setting version number to {version} in package.json')
|
||||||
subprocess.check_output(['npm', 'version', version, '--no-git-tag-version'])
|
replace_version_package_json(get_current_version(), version) # We rely on the `Update dependencies` workflow to update package-lock.json
|
||||||
run_git('add', 'package.json', 'package-lock.json')
|
run_git('add', 'package.json')
|
||||||
|
|
||||||
# Migrate the changelog notes from vLatest version numbers to vOlder version numbers
|
# Migrate the changelog notes from vLatest version numbers to vOlder version numbers
|
||||||
print(f'Migrating changelog notes from v{source_branch_major_version} to v{target_branch_major_version}')
|
print(f'Migrating changelog notes from v{source_branch_major_version} to v{target_branch_major_version}')
|
||||||
|
|||||||
15
.github/workflows/__all-platform-bundle.yml
generated
vendored
15
.github/workflows/__all-platform-bundle.yml
generated
vendored
@@ -19,10 +19,13 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
all-platform-bundle:
|
all-platform-bundle:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
@@ -37,11 +40,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -56,10 +57,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'true'
|
use-all-platform-bundle: 'true'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- id: init
|
- id: init
|
||||||
uses: ./../action/init
|
uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
@@ -71,7 +68,5 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
with:
|
|
||||||
upload-database: false
|
|
||||||
env:
|
env:
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
|
|||||||
14
.github/workflows/__analyze-ref-input.yml
generated
vendored
14
.github/workflows/__analyze-ref-input.yml
generated
vendored
@@ -19,10 +19,13 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
analyze-ref-input:
|
analyze-ref-input:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
@@ -41,11 +44,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -60,10 +61,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
@@ -75,7 +72,6 @@ jobs:
|
|||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
with:
|
with:
|
||||||
upload-database: false
|
|
||||||
ref: refs/heads/main
|
ref: refs/heads/main
|
||||||
sha: 5e235361806c361d4d3f8859e3c897658025a9a2
|
sha: 5e235361806c361d4d3f8859e3c897658025a9a2
|
||||||
env:
|
env:
|
||||||
|
|||||||
21
.github/workflows/__autobuild-action.yml
generated
vendored
21
.github/workflows/__autobuild-action.yml
generated
vendored
@@ -19,18 +19,21 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
autobuild-action:
|
autobuild-action:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: latest
|
version: linked
|
||||||
name: autobuild-action
|
name: autobuild-action
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@@ -41,11 +44,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -60,10 +61,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: csharp
|
languages: csharp
|
||||||
@@ -78,8 +75,6 @@ jobs:
|
|||||||
CORECLR_PROFILER: ''
|
CORECLR_PROFILER: ''
|
||||||
CORECLR_PROFILER_PATH_64: ''
|
CORECLR_PROFILER_PATH_64: ''
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
with:
|
|
||||||
upload-database: false
|
|
||||||
- name: Check database
|
- name: Check database
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
92
.github/workflows/__autobuild-direct-tracing-with-working-dir.yml
generated
vendored
Normal file
92
.github/workflows/__autobuild-direct-tracing-with-working-dir.yml
generated
vendored
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
# 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 - Autobuild direct tracing (custom working directory)
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GO111MODULE: auto
|
||||||
|
CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN: 'true'
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/v*
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
|
workflow_dispatch: {}
|
||||||
|
jobs:
|
||||||
|
autobuild-direct-tracing-with-working-dir:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: linked
|
||||||
|
- os: windows-latest
|
||||||
|
version: linked
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: nightly-latest
|
||||||
|
- os: windows-latest
|
||||||
|
version: nightly-latest
|
||||||
|
name: Autobuild direct tracing (custom working directory)
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
timeout-minutes: 45
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Setup Python on MacOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: >-
|
||||||
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
- 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'
|
||||||
|
- name: Test setup
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
# Make sure that Gradle build succeeds in autobuild-dir ...
|
||||||
|
cp -a ../action/tests/java-repo autobuild-dir
|
||||||
|
# ... and fails if attempted in the current directory
|
||||||
|
echo > build.gradle
|
||||||
|
- uses: ./../action/init
|
||||||
|
with:
|
||||||
|
build-mode: autobuild
|
||||||
|
languages: java
|
||||||
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
- name: Check that indirect tracing is disabled
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if [[ ! -z "${CODEQL_RUNNER}" ]]; then
|
||||||
|
echo "Expected indirect tracing to be disabled, but the" \
|
||||||
|
"CODEQL_RUNNER environment variable is set."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
- uses: ./../action/autobuild
|
||||||
|
with:
|
||||||
|
working-directory: autobuild-dir
|
||||||
|
- uses: ./../action/analyze
|
||||||
|
env:
|
||||||
|
CODEQL_ACTION_AUTOBUILD_BUILD_MODE_DIRECT_TRACING: true
|
||||||
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
93
.github/workflows/__autobuild-direct-tracing.yml
generated
vendored
Normal file
93
.github/workflows/__autobuild-direct-tracing.yml
generated
vendored
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
# 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 - Autobuild direct tracing
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GO111MODULE: auto
|
||||||
|
CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN: 'true'
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/v*
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
|
workflow_dispatch: {}
|
||||||
|
jobs:
|
||||||
|
autobuild-direct-tracing:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: linked
|
||||||
|
- os: windows-latest
|
||||||
|
version: linked
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: nightly-latest
|
||||||
|
- os: windows-latest
|
||||||
|
version: nightly-latest
|
||||||
|
name: Autobuild direct tracing
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
timeout-minutes: 45
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Setup Python on MacOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: >-
|
||||||
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
- 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'
|
||||||
|
- name: Set up Java test repo configuration
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mv * .github ../action/tests/multi-language-repo/
|
||||||
|
mv ../action/tests/multi-language-repo/.github/workflows .github
|
||||||
|
mv ../action/tests/java-repo/* .
|
||||||
|
|
||||||
|
- uses: ./../action/init
|
||||||
|
id: init
|
||||||
|
with:
|
||||||
|
build-mode: autobuild
|
||||||
|
db-location: ${{ runner.temp }}/customDbLocation
|
||||||
|
languages: java
|
||||||
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
|
||||||
|
- name: Check that indirect tracing is disabled
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if [[ ! -z "${CODEQL_RUNNER}" ]]; then
|
||||||
|
echo "Expected indirect tracing to be disabled, but the" \
|
||||||
|
"CODEQL_RUNNER environment variable is set."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- uses: ./../action/analyze
|
||||||
|
env:
|
||||||
|
CODEQL_ACTION_AUTOBUILD_BUILD_MODE_DIRECT_TRACING: true
|
||||||
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
85
.github/workflows/__build-mode-autobuild.yml
generated
vendored
Normal file
85
.github/workflows/__build-mode-autobuild.yml
generated
vendored
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
# 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 - Build mode autobuild
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GO111MODULE: auto
|
||||||
|
CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN: 'true'
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/v*
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
|
workflow_dispatch: {}
|
||||||
|
jobs:
|
||||||
|
build-mode-autobuild:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: nightly-latest
|
||||||
|
name: Build mode autobuild
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
timeout-minutes: 45
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Setup Python on MacOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: >-
|
||||||
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
- 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'
|
||||||
|
- name: Set up Java test repo configuration
|
||||||
|
run: |
|
||||||
|
mv * .github ../action/tests/multi-language-repo/
|
||||||
|
mv ../action/tests/multi-language-repo/.github/workflows .github
|
||||||
|
mv ../action/tests/java-repo/* .
|
||||||
|
|
||||||
|
- uses: ./../action/init
|
||||||
|
id: init
|
||||||
|
with:
|
||||||
|
build-mode: autobuild
|
||||||
|
db-location: ${{ runner.temp }}/customDbLocation
|
||||||
|
languages: java
|
||||||
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
|
||||||
|
- name: Validate database build mode
|
||||||
|
run: |
|
||||||
|
metadata_path="$RUNNER_TEMP/customDbLocation/java/codeql-database.yml"
|
||||||
|
build_mode=$(yq eval '.buildMode' "$metadata_path")
|
||||||
|
if [[ "$build_mode" != "autobuild" ]]; then
|
||||||
|
echo "Expected build mode to be 'autobuild' but was $build_mode"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- uses: ./../action/analyze
|
||||||
|
env:
|
||||||
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
87
.github/workflows/__build-mode-manual.yml
generated
vendored
Normal file
87
.github/workflows/__build-mode-manual.yml
generated
vendored
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
# 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 - Build mode manual
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GO111MODULE: auto
|
||||||
|
CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN: 'true'
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/v*
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
|
workflow_dispatch: {}
|
||||||
|
jobs:
|
||||||
|
build-mode-manual:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: nightly-latest
|
||||||
|
name: Build mode manual
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
timeout-minutes: 45
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Setup Python on MacOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: >-
|
||||||
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
- 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'
|
||||||
|
- uses: ./../action/init
|
||||||
|
id: init
|
||||||
|
with:
|
||||||
|
build-mode: manual
|
||||||
|
db-location: ${{ runner.temp }}/customDbLocation
|
||||||
|
languages: java
|
||||||
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
|
||||||
|
- name: Validate database build mode
|
||||||
|
run: |
|
||||||
|
metadata_path="$RUNNER_TEMP/customDbLocation/java/codeql-database.yml"
|
||||||
|
build_mode=$(yq eval '.buildMode' "$metadata_path")
|
||||||
|
if [[ "$build_mode" != "manual" ]]; then
|
||||||
|
echo "Expected build mode to be 'manual' but was $build_mode"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- uses: ./../action/.github/actions/setup-swift
|
||||||
|
with:
|
||||||
|
codeql-path: ${{ steps.init.outputs.codeql-path }}
|
||||||
|
|
||||||
|
- name: Build code
|
||||||
|
shell: bash
|
||||||
|
run: ./build.sh
|
||||||
|
|
||||||
|
- uses: ./../action/analyze
|
||||||
|
env:
|
||||||
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
85
.github/workflows/__build-mode-none.yml
generated
vendored
Normal file
85
.github/workflows/__build-mode-none.yml
generated
vendored
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
# 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 - Build mode none
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GO111MODULE: auto
|
||||||
|
CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN: 'true'
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/v*
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
|
workflow_dispatch: {}
|
||||||
|
jobs:
|
||||||
|
build-mode-none:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: linked
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: nightly-latest
|
||||||
|
name: Build mode none
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
timeout-minutes: 45
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Setup Python on MacOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: >-
|
||||||
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
- 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'
|
||||||
|
- uses: ./../action/init
|
||||||
|
id: init
|
||||||
|
with:
|
||||||
|
build-mode: none
|
||||||
|
db-location: ${{ runner.temp }}/customDbLocation
|
||||||
|
languages: java
|
||||||
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
|
||||||
|
- name: Validate database build mode
|
||||||
|
run: |
|
||||||
|
metadata_path="$RUNNER_TEMP/customDbLocation/java/codeql-database.yml"
|
||||||
|
build_mode=$(yq eval '.buildMode' "$metadata_path")
|
||||||
|
if [[ "$build_mode" != "none" ]]; then
|
||||||
|
echo "Expected build mode to be 'none' but was $build_mode"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# The latest nightly supports omitting the autobuild Action when the build mode is specified.
|
||||||
|
- uses: ./../action/autobuild
|
||||||
|
if: matrix.version != 'nightly-latest'
|
||||||
|
|
||||||
|
- uses: ./../action/analyze
|
||||||
|
env:
|
||||||
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
86
.github/workflows/__build-mode-rollback.yml
generated
vendored
Normal file
86
.github/workflows/__build-mode-rollback.yml
generated
vendored
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
# 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 - Build mode rollback
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GO111MODULE: auto
|
||||||
|
CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN: 'true'
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/v*
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
|
workflow_dispatch: {}
|
||||||
|
jobs:
|
||||||
|
build-mode-rollback:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: nightly-latest
|
||||||
|
name: Build mode rollback
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
timeout-minutes: 45
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Setup Python on MacOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: >-
|
||||||
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
- 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'
|
||||||
|
- name: Set up Java test repo configuration
|
||||||
|
run: |
|
||||||
|
mv * .github ../action/tests/multi-language-repo/
|
||||||
|
mv ../action/tests/multi-language-repo/.github/workflows .github
|
||||||
|
mv ../action/tests/java-repo/* .
|
||||||
|
|
||||||
|
- uses: ./../action/init
|
||||||
|
id: init
|
||||||
|
with:
|
||||||
|
build-mode: none
|
||||||
|
db-location: ${{ runner.temp }}/customDbLocation
|
||||||
|
languages: java
|
||||||
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
|
||||||
|
- name: Validate database build mode
|
||||||
|
run: |
|
||||||
|
metadata_path="$RUNNER_TEMP/customDbLocation/java/codeql-database.yml"
|
||||||
|
build_mode=$(yq eval '.buildMode' "$metadata_path")
|
||||||
|
if [[ "$build_mode" != "autobuild" ]]; then
|
||||||
|
echo "Expected build mode to be 'autobuild' but was $build_mode"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- uses: ./../action/analyze
|
||||||
|
env:
|
||||||
|
CODEQL_ACTION_DISABLE_JAVA_BUILDLESS: true
|
||||||
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
81
.github/workflows/__cleanup-db-cluster-dir.yml
generated
vendored
Normal file
81
.github/workflows/__cleanup-db-cluster-dir.yml
generated
vendored
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
# 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 - Clean up database cluster directory
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GO111MODULE: auto
|
||||||
|
CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN: 'true'
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/v*
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
|
workflow_dispatch: {}
|
||||||
|
jobs:
|
||||||
|
cleanup-db-cluster-dir:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: linked
|
||||||
|
name: Clean up database cluster directory
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
timeout-minutes: 45
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Setup Python on MacOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: >-
|
||||||
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
- 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'
|
||||||
|
- name: Add a file to the database cluster directory
|
||||||
|
run: |
|
||||||
|
mkdir -p "${{ runner.temp }}/customDbLocation/javascript"
|
||||||
|
touch "${{ runner.temp }}/customDbLocation/javascript/a-file-to-clean-up.txt"
|
||||||
|
|
||||||
|
- uses: ./../action/init
|
||||||
|
id: init
|
||||||
|
with:
|
||||||
|
build-mode: none
|
||||||
|
db-location: ${{ runner.temp }}/customDbLocation
|
||||||
|
languages: javascript
|
||||||
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
|
||||||
|
- name: Validate file cleaned up
|
||||||
|
run: |
|
||||||
|
if [[ -f "${{ runner.temp }}/customDbLocation/javascript/a-file-to-clean-up.txt" ]]; then
|
||||||
|
echo "File was not cleaned up"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "File was cleaned up"
|
||||||
|
env:
|
||||||
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
19
.github/workflows/__config-export.yml
generated
vendored
19
.github/workflows/__config-export.yml
generated
vendored
@@ -19,18 +19,21 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
config-export:
|
config-export:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -47,11 +50,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -66,10 +67,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: javascript
|
languages: javascript
|
||||||
|
|||||||
89
.github/workflows/__config-input.yml
generated
vendored
Normal file
89
.github/workflows/__config-input.yml
generated
vendored
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
# 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 - Config input
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GO111MODULE: auto
|
||||||
|
CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN: 'true'
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/v*
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
|
workflow_dispatch: {}
|
||||||
|
jobs:
|
||||||
|
config-input:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: linked
|
||||||
|
name: Config input
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
timeout-minutes: 45
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Setup Python on MacOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: >-
|
||||||
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
- 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'
|
||||||
|
- name: Copy queries into workspace
|
||||||
|
run: |
|
||||||
|
cp -a ../action/queries .
|
||||||
|
|
||||||
|
- uses: ./../action/init
|
||||||
|
with:
|
||||||
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
languages: javascript
|
||||||
|
build-mode: none
|
||||||
|
config: |
|
||||||
|
disable-default-queries: true
|
||||||
|
queries:
|
||||||
|
- name: Run custom query
|
||||||
|
uses: ./queries/default-setup-environment-variables.ql
|
||||||
|
paths-ignore:
|
||||||
|
- tests
|
||||||
|
- lib
|
||||||
|
|
||||||
|
- uses: ./../action/analyze
|
||||||
|
with:
|
||||||
|
output: ${{ runner.temp }}/results
|
||||||
|
|
||||||
|
- name: Check SARIF
|
||||||
|
uses: ./../action/.github/actions/check-sarif
|
||||||
|
with:
|
||||||
|
sarif-file: ${{ runner.temp }}/results/javascript.sarif
|
||||||
|
queries-run: javascript/codeql-action/default-setup-env-vars
|
||||||
|
queries-not-run: javascript/codeql-action/default-setup-context-properties
|
||||||
|
env:
|
||||||
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
15
.github/workflows/__cpp-deptrace-disabled.yml
generated
vendored
15
.github/workflows/__cpp-deptrace-disabled.yml
generated
vendored
@@ -19,14 +19,17 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
cpp-deptrace-disabled:
|
cpp-deptrace-disabled:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
@@ -41,11 +44,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -60,10 +61,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- name: Test setup
|
- name: Test setup
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
13
.github/workflows/__cpp-deptrace-enabled-on-macos.yml
generated
vendored
13
.github/workflows/__cpp-deptrace-enabled-on-macos.yml
generated
vendored
@@ -19,10 +19,13 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
cpp-deptrace-enabled-on-macos:
|
cpp-deptrace-enabled-on-macos:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -37,11 +40,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -56,10 +57,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- name: Test setup
|
- name: Test setup
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
15
.github/workflows/__cpp-deptrace-enabled.yml
generated
vendored
15
.github/workflows/__cpp-deptrace-enabled.yml
generated
vendored
@@ -19,14 +19,17 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
cpp-deptrace-enabled:
|
cpp-deptrace-enabled:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
@@ -41,11 +44,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -60,10 +61,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- name: Test setup
|
- name: Test setup
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
29
.github/workflows/__diagnostics-export.yml
generated
vendored
29
.github/workflows/__diagnostics-export.yml
generated
vendored
@@ -19,24 +19,27 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
diagnostics-export:
|
diagnostics-export:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-20230317
|
version: stable-20230403
|
||||||
- os: macos-latest
|
- os: macos-12
|
||||||
version: stable-20230317
|
version: stable-20230403
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: stable-20230317
|
version: stable-20230403
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -53,11 +56,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -72,10 +73,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
id: init
|
id: init
|
||||||
with:
|
with:
|
||||||
@@ -87,7 +84,7 @@ jobs:
|
|||||||
CODEQL_PATH: ${{ steps.init.outputs.codeql-path }}
|
CODEQL_PATH: ${{ steps.init.outputs.codeql-path }}
|
||||||
run: |
|
run: |
|
||||||
for i in {1..2}; do
|
for i in {1..2}; do
|
||||||
# Use the same location twice to test the workaround for the bug in CodeQL CLI 2.12.5 that
|
# Use the same location twice to test the workaround for the bug in CodeQL CLI 2.12.6 that
|
||||||
# produces an invalid diagnostic with multiple identical location objects.
|
# produces an invalid diagnostic with multiple identical location objects.
|
||||||
"$CODEQL_PATH" database add-diagnostic \
|
"$CODEQL_PATH" database add-diagnostic \
|
||||||
"$RUNNER_TEMP/codeql_databases/javascript" \
|
"$RUNNER_TEMP/codeql_databases/javascript" \
|
||||||
|
|||||||
13
.github/workflows/__export-file-baseline-information.yml
generated
vendored
13
.github/workflows/__export-file-baseline-information.yml
generated
vendored
@@ -19,10 +19,13 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
export-file-baseline-information:
|
export-file-baseline-information:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
@@ -41,11 +44,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -60,10 +61,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
id: init
|
id: init
|
||||||
with:
|
with:
|
||||||
|
|||||||
15
.github/workflows/__extractor-ram-threads.yml
generated
vendored
15
.github/workflows/__extractor-ram-threads.yml
generated
vendored
@@ -19,14 +19,17 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
extractor-ram-threads:
|
extractor-ram-threads:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: latest
|
version: linked
|
||||||
name: Extractor ram and threads options test
|
name: Extractor ram and threads options test
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@@ -37,11 +40,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -56,10 +57,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: java
|
languages: java
|
||||||
|
|||||||
54
.github/workflows/__go-custom-queries.yml
generated
vendored
54
.github/workflows/__go-custom-queries.yml
generated
vendored
@@ -19,36 +19,45 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
go-custom-queries:
|
go-custom-queries:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-20221211
|
version: stable-20230403
|
||||||
- os: macos-latest
|
- os: macos-12
|
||||||
version: stable-20221211
|
version: stable-20230403
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: stable-20221211
|
version: stable-20230403
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-20230418
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-20230418
|
|
||||||
- os: windows-latest
|
|
||||||
version: stable-20230418
|
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-v2.13.5
|
version: stable-v2.13.5
|
||||||
- os: macos-latest
|
- os: macos-12
|
||||||
version: stable-v2.13.5
|
version: stable-v2.13.5
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: stable-v2.13.5
|
version: stable-v2.13.5
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-v2.14.6
|
version: stable-v2.14.6
|
||||||
- os: macos-latest
|
- os: macos-12
|
||||||
version: stable-v2.14.6
|
version: stable-v2.14.6
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: stable-v2.14.6
|
version: stable-v2.14.6
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.15.5
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.15.5
|
||||||
|
- os: windows-latest
|
||||||
|
version: stable-v2.15.5
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.16.6
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.16.6
|
||||||
|
- os: windows-latest
|
||||||
|
version: stable-v2.16.6
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -56,11 +65,11 @@ jobs:
|
|||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: default
|
version: default
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -77,11 +86,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -96,10 +103,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
- uses: actions/setup-go@v5
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
with:
|
||||||
shell: bash
|
go-version: '>=1.21.0'
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: go
|
languages: go
|
||||||
@@ -109,8 +115,6 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
with:
|
|
||||||
upload-database: false
|
|
||||||
env:
|
env:
|
||||||
DOTNET_GENERATE_ASPNET_CERTIFICATE: 'false'
|
DOTNET_GENERATE_ASPNET_CERTIFICATE: 'false'
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
|
|||||||
13
.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml
generated
vendored
13
.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml
generated
vendored
@@ -19,10 +19,13 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
go-indirect-tracing-workaround-diagnostic:
|
go-indirect-tracing-workaround-diagnostic:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
@@ -37,11 +40,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -56,10 +57,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
# We need a Go version that ships with statically linked binaries on Linux
|
# We need a Go version that ships with statically linked binaries on Linux
|
||||||
|
|||||||
104
.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml
generated
vendored
Normal file
104
.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml
generated
vendored
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
# 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 - Go: diagnostic when `file` is not installed'
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GO111MODULE: auto
|
||||||
|
CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN: 'true'
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/v*
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
|
workflow_dispatch: {}
|
||||||
|
jobs:
|
||||||
|
go-indirect-tracing-workaround-no-file-program:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.14.6
|
||||||
|
name: 'Go: diagnostic when `file` is not installed'
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
timeout-minutes: 45
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Setup Python on MacOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: >-
|
||||||
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
- 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'
|
||||||
|
- uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
# We need a Go version that ships with statically linked binaries on Linux
|
||||||
|
go-version: '>=1.21.0'
|
||||||
|
- name: Remove `file` program
|
||||||
|
run: |
|
||||||
|
echo $(which file)
|
||||||
|
sudo rm -rf $(which file)
|
||||||
|
echo $(which file)
|
||||||
|
- uses: ./../action/init
|
||||||
|
with:
|
||||||
|
languages: go
|
||||||
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
- name: Build code
|
||||||
|
shell: bash
|
||||||
|
run: go build main.go
|
||||||
|
- uses: ./../action/analyze
|
||||||
|
with:
|
||||||
|
output: ${{ runner.temp }}/results
|
||||||
|
upload-database: false
|
||||||
|
- name: Check diagnostic appears in SARIF
|
||||||
|
uses: actions/github-script@v7
|
||||||
|
env:
|
||||||
|
SARIF_PATH: ${{ runner.temp }}/results/go.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 statusPageNotifications = toolExecutionNotifications.filter(n =>
|
||||||
|
n.descriptor.id === 'go/workflow/file-program-unavailable' && n.properties?.visibility?.statusPage
|
||||||
|
);
|
||||||
|
if (statusPageNotifications.length !== 1) {
|
||||||
|
core.setFailed(
|
||||||
|
'Expected exactly one status page reporting descriptor for this diagnostic in the ' +
|
||||||
|
`'runs[].invocations[].toolExecutionNotifications[]' SARIF property, but found ` +
|
||||||
|
`${statusPageNotifications.length}. All notification reporting descriptors: ` +
|
||||||
|
`${JSON.stringify(toolExecutionNotifications)}.`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
env:
|
||||||
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
15
.github/workflows/__go-indirect-tracing-workaround.yml
generated
vendored
15
.github/workflows/__go-indirect-tracing-workaround.yml
generated
vendored
@@ -19,10 +19,13 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
go-indirect-tracing-workaround:
|
go-indirect-tracing-workaround:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
@@ -37,11 +40,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -56,10 +57,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
# We need a Go version that ships with statically linked binaries on Linux
|
# We need a Go version that ships with statically linked binaries on Linux
|
||||||
@@ -72,8 +69,6 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: go build main.go
|
run: go build main.go
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
with:
|
|
||||||
upload-database: false
|
|
||||||
- shell: bash
|
- shell: bash
|
||||||
run: |
|
run: |
|
||||||
if [[ -z "${CODEQL_ACTION_GO_BINARY}" ]]; then
|
if [[ -z "${CODEQL_ACTION_GO_BINARY}" ]]; then
|
||||||
|
|||||||
46
.github/workflows/__go-tracing-autobuilder.yml
generated
vendored
46
.github/workflows/__go-tracing-autobuilder.yml
generated
vendored
@@ -19,36 +19,43 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
go-tracing-autobuilder:
|
go-tracing-autobuilder:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-20221211
|
version: stable-20230403
|
||||||
- os: macos-latest
|
- os: macos-12
|
||||||
version: stable-20221211
|
version: stable-20230403
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-20230418
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-20230418
|
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-v2.13.5
|
version: stable-v2.13.5
|
||||||
- os: macos-latest
|
- os: macos-12
|
||||||
version: stable-v2.13.5
|
version: stable-v2.13.5
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-v2.14.6
|
version: stable-v2.14.6
|
||||||
- os: macos-latest
|
- os: macos-12
|
||||||
version: stable-v2.14.6
|
version: stable-v2.14.6
|
||||||
|
- 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: default
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: default
|
version: default
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -63,11 +70,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -82,21 +87,18 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: ~1.21.1
|
go-version: ~1.22.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
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: go
|
languages: go
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
- uses: ./../action/autobuild
|
- uses: ./../action/autobuild
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
with:
|
|
||||||
upload-database: false
|
|
||||||
- shell: bash
|
- shell: bash
|
||||||
run: |
|
run: |
|
||||||
if [[ "${CODEQL_ACTION_DID_AUTOBUILD_GOLANG}" != true ]]; then
|
if [[ "${CODEQL_ACTION_DID_AUTOBUILD_GOLANG}" != true ]]; then
|
||||||
|
|||||||
46
.github/workflows/__go-tracing-custom-build-steps.yml
generated
vendored
46
.github/workflows/__go-tracing-custom-build-steps.yml
generated
vendored
@@ -19,36 +19,43 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
go-tracing-custom-build-steps:
|
go-tracing-custom-build-steps:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-20221211
|
version: stable-20230403
|
||||||
- os: macos-latest
|
- os: macos-12
|
||||||
version: stable-20221211
|
version: stable-20230403
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-20230418
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-20230418
|
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-v2.13.5
|
version: stable-v2.13.5
|
||||||
- os: macos-latest
|
- os: macos-12
|
||||||
version: stable-v2.13.5
|
version: stable-v2.13.5
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-v2.14.6
|
version: stable-v2.14.6
|
||||||
- os: macos-latest
|
- os: macos-12
|
||||||
version: stable-v2.14.6
|
version: stable-v2.14.6
|
||||||
|
- 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: default
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: default
|
version: default
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -63,11 +70,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -82,13 +87,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: ~1.21.1
|
go-version: ~1.22.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
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: go
|
languages: go
|
||||||
@@ -97,8 +101,6 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: go build main.go
|
run: go build main.go
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
with:
|
|
||||||
upload-database: false
|
|
||||||
- shell: bash
|
- shell: bash
|
||||||
run: |
|
run: |
|
||||||
# Once we start running Bash 4.2 in all environments, we can replace the
|
# Once we start running Bash 4.2 in all environments, we can replace the
|
||||||
|
|||||||
46
.github/workflows/__go-tracing-legacy-workflow.yml
generated
vendored
46
.github/workflows/__go-tracing-legacy-workflow.yml
generated
vendored
@@ -19,36 +19,43 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
go-tracing-legacy-workflow:
|
go-tracing-legacy-workflow:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-20221211
|
version: stable-20230403
|
||||||
- os: macos-latest
|
- os: macos-12
|
||||||
version: stable-20221211
|
version: stable-20230403
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-20230418
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-20230418
|
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-v2.13.5
|
version: stable-v2.13.5
|
||||||
- os: macos-latest
|
- os: macos-12
|
||||||
version: stable-v2.13.5
|
version: stable-v2.13.5
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-v2.14.6
|
version: stable-v2.14.6
|
||||||
- os: macos-latest
|
- os: macos-12
|
||||||
version: stable-v2.14.6
|
version: stable-v2.14.6
|
||||||
|
- 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: default
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: default
|
version: default
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -63,11 +70,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -82,20 +87,17 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: ~1.21.1
|
go-version: ~1.22.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
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: go
|
languages: go
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
with:
|
|
||||||
upload-database: false
|
|
||||||
- shell: bash
|
- shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd "$RUNNER_TEMP/codeql_databases"
|
cd "$RUNNER_TEMP/codeql_databases"
|
||||||
|
|||||||
19
.github/workflows/__init-with-registries.yml
generated
vendored
19
.github/workflows/__init-with-registries.yml
generated
vendored
@@ -19,10 +19,13 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
init-with-registries:
|
init-with-registries:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
@@ -32,11 +35,11 @@ jobs:
|
|||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: default
|
version: default
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -54,11 +57,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -73,10 +74,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- name: Init with registries
|
- name: Init with registries
|
||||||
uses: ./../action/init
|
uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
|
|||||||
17
.github/workflows/__javascript-source-root.yml
generated
vendored
17
.github/workflows/__javascript-source-root.yml
generated
vendored
@@ -19,14 +19,17 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
javascript-source-root:
|
javascript-source-root:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
@@ -41,11 +44,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -60,10 +61,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- name: Move codeql-action
|
- name: Move codeql-action
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@@ -76,9 +73,7 @@ jobs:
|
|||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
with:
|
with:
|
||||||
upload-database: false
|
|
||||||
skip-queries: true
|
skip-queries: true
|
||||||
upload: never
|
|
||||||
- name: Assert database exists
|
- name: Assert database exists
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
15
.github/workflows/__language-aliases.yml
generated
vendored
15
.github/workflows/__language-aliases.yml
generated
vendored
@@ -19,14 +19,17 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
language-aliases:
|
language-aliases:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: latest
|
version: linked
|
||||||
name: Language aliases
|
name: Language aliases
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@@ -37,11 +40,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -56,10 +57,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: C#,java-kotlin,swift,typescript
|
languages: C#,java-kotlin,swift,typescript
|
||||||
|
|||||||
49
.github/workflows/__multi-language-autodetect.yml
generated
vendored
49
.github/workflows/__multi-language-autodetect.yml
generated
vendored
@@ -19,38 +19,29 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
multi-language-autodetect:
|
multi-language-autodetect:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: macos-12
|
||||||
version: stable-20221211
|
version: stable-20230403
|
||||||
- os: macos-latest
|
- os: macos-12
|
||||||
version: stable-20221211
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-20230418
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-20230418
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.13.5
|
version: stable-v2.13.5
|
||||||
- os: macos-latest
|
- os: macos-12
|
||||||
version: stable-v2.13.5
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.14.6
|
version: stable-v2.14.6
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: stable-v2.14.6
|
version: stable-v2.15.5
|
||||||
- os: ubuntu-latest
|
- os: macos-latest
|
||||||
version: default
|
version: stable-v2.16.6
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: default
|
version: default
|
||||||
- os: ubuntu-latest
|
|
||||||
version: latest
|
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: ubuntu-latest
|
|
||||||
version: nightly-latest
|
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
name: Multi-language repository
|
name: Multi-language repository
|
||||||
@@ -63,11 +54,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -82,10 +71,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
- uses: actions/setup-go@v5
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
with:
|
||||||
shell: bash
|
go-version: '>=1.21.0'
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
id: init
|
id: init
|
||||||
with:
|
with:
|
||||||
@@ -145,9 +134,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Check language autodetect for Swift
|
- name: Check language autodetect for Swift
|
||||||
if: >-
|
if: runner.os != 'Windows' && matrix.version != 'stable-20230403'
|
||||||
env.CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT == 'true' ||
|
|
||||||
(runner.os != 'Windows' && matrix.version == 'nightly-latest')
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
SWIFT_DB=${{ fromJson(steps.analysis.outputs.db-locations).swift }}
|
SWIFT_DB=${{ fromJson(steps.analysis.outputs.db-locations).swift }}
|
||||||
|
|||||||
19
.github/workflows/__packaging-codescanning-config-inputs-js.yml
generated
vendored
19
.github/workflows/__packaging-codescanning-config-inputs-js.yml
generated
vendored
@@ -19,18 +19,21 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
packaging-codescanning-config-inputs-js:
|
packaging-codescanning-config-inputs-js:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -53,11 +56,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -72,10 +73,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
config-file: .github/codeql/codeql-config-packaging3.yml
|
config-file: .github/codeql/codeql-config-packaging3.yml
|
||||||
|
|||||||
19
.github/workflows/__packaging-config-inputs-js.yml
generated
vendored
19
.github/workflows/__packaging-config-inputs-js.yml
generated
vendored
@@ -19,18 +19,21 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
packaging-config-inputs-js:
|
packaging-config-inputs-js:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -53,11 +56,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -72,10 +73,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
config-file: .github/codeql/codeql-config-packaging3.yml
|
config-file: .github/codeql/codeql-config-packaging3.yml
|
||||||
|
|||||||
19
.github/workflows/__packaging-config-js.yml
generated
vendored
19
.github/workflows/__packaging-config-js.yml
generated
vendored
@@ -19,18 +19,21 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
packaging-config-js:
|
packaging-config-js:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -53,11 +56,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -72,10 +73,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
config-file: .github/codeql/codeql-config-packaging.yml
|
config-file: .github/codeql/codeql-config-packaging.yml
|
||||||
|
|||||||
19
.github/workflows/__packaging-inputs-js.yml
generated
vendored
19
.github/workflows/__packaging-inputs-js.yml
generated
vendored
@@ -19,18 +19,21 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
packaging-inputs-js:
|
packaging-inputs-js:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -53,11 +56,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -72,10 +73,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
config-file: .github/codeql/codeql-config-packaging2.yml
|
config-file: .github/codeql/codeql-config-packaging2.yml
|
||||||
|
|||||||
49
.github/workflows/__remote-config.yml
generated
vendored
49
.github/workflows/__remote-config.yml
generated
vendored
@@ -19,36 +19,45 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
remote-config:
|
remote-config:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-20221211
|
version: stable-20230403
|
||||||
- os: macos-latest
|
- os: macos-12
|
||||||
version: stable-20221211
|
version: stable-20230403
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: stable-20221211
|
version: stable-20230403
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-20230418
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-20230418
|
|
||||||
- os: windows-latest
|
|
||||||
version: stable-20230418
|
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-v2.13.5
|
version: stable-v2.13.5
|
||||||
- os: macos-latest
|
- os: macos-12
|
||||||
version: stable-v2.13.5
|
version: stable-v2.13.5
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: stable-v2.13.5
|
version: stable-v2.13.5
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-v2.14.6
|
version: stable-v2.14.6
|
||||||
- os: macos-latest
|
- os: macos-12
|
||||||
version: stable-v2.14.6
|
version: stable-v2.14.6
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: stable-v2.14.6
|
version: stable-v2.14.6
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.15.5
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.15.5
|
||||||
|
- os: windows-latest
|
||||||
|
version: stable-v2.15.5
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.16.6
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.16.6
|
||||||
|
- os: windows-latest
|
||||||
|
version: stable-v2.16.6
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -56,11 +65,11 @@ jobs:
|
|||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: default
|
version: default
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -77,11 +86,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -96,10 +103,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
|||||||
21
.github/workflows/__resolve-environment-action.yml
generated
vendored
21
.github/workflows/__resolve-environment-action.yml
generated
vendored
@@ -19,15 +19,18 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
resolve-environment-action:
|
resolve-environment-action:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-v2.13.4
|
version: stable-v2.13.4
|
||||||
- os: macos-latest
|
- os: macos-12
|
||||||
version: stable-v2.13.4
|
version: stable-v2.13.4
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: stable-v2.13.4
|
version: stable-v2.13.4
|
||||||
@@ -38,11 +41,11 @@ jobs:
|
|||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: default
|
version: default
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -59,11 +62,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -78,10 +79,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.version == 'stable-v2.13.4' && 'go' || 'go,javascript-typescript'
|
languages: ${{ matrix.version == 'stable-v2.13.4' && 'go' || 'go,javascript-typescript'
|
||||||
|
|||||||
13
.github/workflows/__rubocop-multi-language.yml
generated
vendored
13
.github/workflows/__rubocop-multi-language.yml
generated
vendored
@@ -19,10 +19,13 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
rubocop-multi-language:
|
rubocop-multi-language:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
@@ -37,11 +40,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -56,10 +57,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- name: Set up Ruby
|
- name: Set up Ruby
|
||||||
uses: ruby/setup-ruby@v1
|
uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
|
|||||||
17
.github/workflows/__ruby.yml
generated
vendored
17
.github/workflows/__ruby.yml
generated
vendored
@@ -19,16 +19,19 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
ruby:
|
ruby:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -47,11 +50,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -66,10 +67,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: ruby
|
languages: ruby
|
||||||
|
|||||||
45
.github/workflows/__scaling-reserved-ram.yml
generated
vendored
45
.github/workflows/__scaling-reserved-ram.yml
generated
vendored
@@ -19,38 +19,29 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
scaling-reserved-ram:
|
scaling-reserved-ram:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: macos-12
|
||||||
version: stable-20221211
|
version: stable-20230403
|
||||||
- os: macos-latest
|
- os: macos-12
|
||||||
version: stable-20221211
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-20230418
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-20230418
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.13.5
|
version: stable-v2.13.5
|
||||||
- os: macos-latest
|
- os: macos-12
|
||||||
version: stable-v2.13.5
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.14.6
|
version: stable-v2.14.6
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: stable-v2.14.6
|
version: stable-v2.15.5
|
||||||
- os: ubuntu-latest
|
- os: macos-latest
|
||||||
version: default
|
version: stable-v2.16.6
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: default
|
version: default
|
||||||
- os: ubuntu-latest
|
|
||||||
version: latest
|
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: ubuntu-latest
|
|
||||||
version: nightly-latest
|
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
name: Scaling reserved RAM
|
name: Scaling reserved RAM
|
||||||
@@ -63,11 +54,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -82,10 +71,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
- uses: actions/setup-go@v5
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
with:
|
||||||
shell: bash
|
go-version: '>=1.21.0'
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
id: init
|
id: init
|
||||||
with:
|
with:
|
||||||
|
|||||||
17
.github/workflows/__split-workflow.yml
generated
vendored
17
.github/workflows/__split-workflow.yml
generated
vendored
@@ -19,16 +19,19 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
split-workflow:
|
split-workflow:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -47,11 +50,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -66,10 +67,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
config-file: .github/codeql/codeql-config-packaging3.yml
|
config-file: .github/codeql/codeql-config-packaging3.yml
|
||||||
|
|||||||
15
.github/workflows/__submit-sarif-failure.yml
generated
vendored
15
.github/workflows/__submit-sarif-failure.yml
generated
vendored
@@ -19,14 +19,17 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
submit-sarif-failure:
|
submit-sarif-failure:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
@@ -41,11 +44,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -60,10 +61,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: ./init
|
- uses: ./init
|
||||||
with:
|
with:
|
||||||
|
|||||||
21
.github/workflows/__swift-custom-build.yml
generated
vendored
21
.github/workflows/__swift-custom-build.yml
generated
vendored
@@ -19,22 +19,19 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
swift-custom-build:
|
swift-custom-build:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
|
||||||
version: latest
|
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: ubuntu-latest
|
|
||||||
version: default
|
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: default
|
version: default
|
||||||
- os: ubuntu-latest
|
|
||||||
version: nightly-latest
|
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
name: Swift analysis using a custom build command
|
name: Swift analysis using a custom build command
|
||||||
@@ -47,11 +44,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -66,10 +61,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
id: init
|
id: init
|
||||||
with:
|
with:
|
||||||
|
|||||||
17
.github/workflows/__test-autobuild-working-dir.yml
generated
vendored
17
.github/workflows/__test-autobuild-working-dir.yml
generated
vendored
@@ -19,14 +19,17 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
test-autobuild-working-dir:
|
test-autobuild-working-dir:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: latest
|
version: linked
|
||||||
name: Autobuild working directory
|
name: Autobuild working directory
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@@ -37,11 +40,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -56,10 +57,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- name: Test setup
|
- name: Test setup
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@@ -75,8 +72,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
working-directory: autobuild-dir
|
working-directory: autobuild-dir
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
with:
|
|
||||||
upload-database: false
|
|
||||||
- name: Check database
|
- name: Check database
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
15
.github/workflows/__test-local-codeql.yml
generated
vendored
15
.github/workflows/__test-local-codeql.yml
generated
vendored
@@ -19,10 +19,13 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
test-local-codeql:
|
test-local-codeql:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
@@ -37,11 +40,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -56,10 +57,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- name: Fetch a CodeQL bundle
|
- name: Fetch a CodeQL bundle
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
@@ -77,7 +74,5 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
with:
|
|
||||||
upload-database: false
|
|
||||||
env:
|
env:
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
|
|||||||
17
.github/workflows/__test-proxy.yml
generated
vendored
17
.github/workflows/__test-proxy.yml
generated
vendored
@@ -19,14 +19,17 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
test-proxy:
|
test-proxy:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: latest
|
version: linked
|
||||||
name: Proxy test
|
name: Proxy test
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@@ -37,11 +40,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -56,17 +57,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: javascript
|
languages: javascript
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
with:
|
|
||||||
upload-database: false
|
|
||||||
env:
|
env:
|
||||||
https_proxy: http://squid-proxy:3128
|
https_proxy: http://squid-proxy:3128
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
|
|||||||
36
.github/workflows/__unset-environment.yml
generated
vendored
36
.github/workflows/__unset-environment.yml
generated
vendored
@@ -19,25 +19,26 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
unset-environment:
|
unset-environment:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: macos-12
|
||||||
version: stable-20221211
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-20230418
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.13.5
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.14.6
|
version: stable-v2.14.6
|
||||||
- os: ubuntu-latest
|
- os: macos-latest
|
||||||
|
version: stable-v2.15.5
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.16.6
|
||||||
|
- os: macos-latest
|
||||||
|
version: linked
|
||||||
|
- os: macos-latest
|
||||||
version: default
|
version: default
|
||||||
- os: ubuntu-latest
|
- os: macos-latest
|
||||||
version: latest
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
name: Test unsetting environment variables
|
name: Test unsetting environment variables
|
||||||
permissions:
|
permissions:
|
||||||
@@ -49,11 +50,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -68,10 +67,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
id: init
|
id: init
|
||||||
with:
|
with:
|
||||||
@@ -80,6 +75,9 @@ jobs:
|
|||||||
- uses: ./../action/.github/actions/setup-swift
|
- uses: ./../action/.github/actions/setup-swift
|
||||||
with:
|
with:
|
||||||
codeql-path: ${{ steps.init.outputs.codeql-path }}
|
codeql-path: ${{ steps.init.outputs.codeql-path }}
|
||||||
|
- uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '>=1.21.0'
|
||||||
- name: Build code
|
- name: Build code
|
||||||
shell: bash
|
shell: bash
|
||||||
# Disable Kotlin analysis while it's incompatible with Kotlin 1.8, until we find a
|
# Disable Kotlin analysis while it's incompatible with Kotlin 1.8, until we find a
|
||||||
|
|||||||
15
.github/workflows/__upload-ref-sha-input.yml
generated
vendored
15
.github/workflows/__upload-ref-sha-input.yml
generated
vendored
@@ -19,10 +19,13 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
upload-ref-sha-input:
|
upload-ref-sha-input:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
@@ -41,11 +44,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -60,10 +61,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
@@ -73,9 +70,9 @@ jobs:
|
|||||||
- name: Build code
|
- name: Build code
|
||||||
shell: bash
|
shell: bash
|
||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
|
# Generate some SARIF we can upload with the upload-sarif step
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
with:
|
with:
|
||||||
upload-database: false
|
|
||||||
ref: refs/heads/main
|
ref: refs/heads/main
|
||||||
sha: 5e235361806c361d4d3f8859e3c897658025a9a2
|
sha: 5e235361806c361d4d3f8859e3c897658025a9a2
|
||||||
upload: never
|
upload: never
|
||||||
|
|||||||
64
.github/workflows/__with-checkout-path.yml
generated
vendored
64
.github/workflows/__with-checkout-path.yml
generated
vendored
@@ -19,54 +19,21 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
with-checkout-path:
|
with-checkout-path:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-20221211
|
version: linked
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: stable-20221211
|
version: linked
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: stable-20221211
|
version: linked
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-20230418
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-20230418
|
|
||||||
- os: windows-latest
|
|
||||||
version: stable-20230418
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.13.5
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-v2.13.5
|
|
||||||
- os: windows-latest
|
|
||||||
version: stable-v2.13.5
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.14.6
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-v2.14.6
|
|
||||||
- os: windows-latest
|
|
||||||
version: stable-v2.14.6
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: default
|
|
||||||
- os: macos-latest
|
|
||||||
version: default
|
|
||||||
- os: windows-latest
|
|
||||||
version: default
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: latest
|
|
||||||
- os: macos-latest
|
|
||||||
version: latest
|
|
||||||
- os: windows-latest
|
|
||||||
version: latest
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: nightly-latest
|
|
||||||
- os: macos-latest
|
|
||||||
version: nightly-latest
|
|
||||||
- os: windows-latest
|
|
||||||
version: nightly-latest
|
|
||||||
name: Use a custom `checkout_path`
|
name: Use a custom `checkout_path`
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@@ -77,11 +44,9 @@ jobs:
|
|||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: >-
|
||||||
matrix.os == 'macos-latest' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20221211' ||
|
matrix.version == 'stable-20230403' ||
|
||||||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
@@ -96,10 +61,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
- name: Set environment variable for Swift enablement
|
|
||||||
if: runner.os != 'Windows' && matrix.version == '20221211'
|
|
||||||
shell: bash
|
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
|
||||||
- name: Delete original checkout
|
- name: Delete original checkout
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@@ -120,7 +81,6 @@ jobs:
|
|||||||
# it's enough to test one compiled language and one interpreted language
|
# it's enough to test one compiled language and one interpreted language
|
||||||
languages: csharp,javascript
|
languages: csharp,javascript
|
||||||
source-root: x/y/z/some-path/tests/multi-language-repo
|
source-root: x/y/z/some-path/tests/multi-language-repo
|
||||||
debug: true
|
|
||||||
|
|
||||||
- name: Build code
|
- name: Build code
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -133,14 +93,6 @@ jobs:
|
|||||||
checkout_path: x/y/z/some-path/tests/multi-language-repo
|
checkout_path: x/y/z/some-path/tests/multi-language-repo
|
||||||
ref: v1.1.0
|
ref: v1.1.0
|
||||||
sha: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6
|
sha: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6
|
||||||
upload: never
|
|
||||||
upload-database: false
|
|
||||||
|
|
||||||
- uses: ./../action/upload-sarif
|
|
||||||
with:
|
|
||||||
ref: v1.1.0
|
|
||||||
sha: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6
|
|
||||||
checkout_path: x/y/z/some-path/tests/multi-language-repo
|
|
||||||
|
|
||||||
- name: Verify SARIF after upload
|
- name: Verify SARIF after upload
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
9
.github/workflows/codeql.yml
vendored
9
.github/workflows/codeql.yml
vendored
@@ -41,7 +41,7 @@ jobs:
|
|||||||
id: init-latest
|
id: init-latest
|
||||||
uses: ./init
|
uses: ./init
|
||||||
with:
|
with:
|
||||||
tools: latest
|
tools: linked
|
||||||
languages: javascript
|
languages: javascript
|
||||||
- name: Compare default and latest CodeQL bundle versions
|
- name: Compare default and latest CodeQL bundle versions
|
||||||
id: compare
|
id: compare
|
||||||
@@ -54,16 +54,16 @@ jobs:
|
|||||||
echo "Default CodeQL bundle version is $CODEQL_VERSION_DEFAULT"
|
echo "Default CodeQL bundle version is $CODEQL_VERSION_DEFAULT"
|
||||||
echo "Latest CodeQL bundle version is $CODEQL_VERSION_LATEST"
|
echo "Latest CodeQL bundle version is $CODEQL_VERSION_LATEST"
|
||||||
|
|
||||||
# If we're running on a pull request, run with both bundles, even if `tools: latest` would
|
# If we're running on a pull request, run with both bundles, even if `tools: linked` would
|
||||||
# be the same as `tools: null`. This allows us to make the job for each of the bundles a
|
# be the same as `tools: null`. This allows us to make the job for each of the bundles a
|
||||||
# required status check.
|
# required status check.
|
||||||
#
|
#
|
||||||
# If we're running on push or schedule, then we can skip running with `tools: latest` when it would be
|
# If we're running on push or schedule, then we can skip running with `tools: linked` when it would be
|
||||||
# the same as running with `tools: null`.
|
# the same as running with `tools: null`.
|
||||||
if [[ "$GITHUB_EVENT_NAME" != "pull_request" && "$CODEQL_VERSION_DEFAULT" == "$CODEQL_VERSION_LATEST" ]]; then
|
if [[ "$GITHUB_EVENT_NAME" != "pull_request" && "$CODEQL_VERSION_DEFAULT" == "$CODEQL_VERSION_LATEST" ]]; then
|
||||||
VERSIONS_JSON='[null]'
|
VERSIONS_JSON='[null]'
|
||||||
else
|
else
|
||||||
VERSIONS_JSON='[null, "latest"]'
|
VERSIONS_JSON='[null, "linked"]'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Output a JSON-encoded list with the distinct versions to test against.
|
# Output a JSON-encoded list with the distinct versions to test against.
|
||||||
@@ -73,6 +73,7 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
needs: [check-codeql-versions]
|
needs: [check-codeql-versions]
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-20.04,ubuntu-22.04,windows-2019,windows-2022,macos-11,macos-12,macos-13]
|
os: [ubuntu-20.04,ubuntu-22.04,windows-2019,windows-2022,macos-11,macos-12,macos-13]
|
||||||
tools: ${{ fromJson(needs.check-codeql-versions.outputs.versions) }}
|
tools: ${{ fromJson(needs.check-codeql-versions.outputs.versions) }}
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -22,12 +24,13 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: latest
|
version: linked
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
|
|||||||
21
.github/workflows/debug-artifacts-failure.yml
vendored
21
.github/workflows/debug-artifacts-failure.yml
vendored
@@ -17,18 +17,17 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
upload-artifacts:
|
upload-artifacts:
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest, macos-latest]
|
|
||||||
name: Upload debug artifacts after failure in analyze
|
name: Upload debug artifacts after failure in analyze
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Dump GitHub event
|
- name: Dump GitHub event
|
||||||
run: cat "${GITHUB_EVENT_PATH}"
|
run: cat "${GITHUB_EVENT_PATH}"
|
||||||
@@ -38,7 +37,7 @@ jobs:
|
|||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: linked
|
||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: ^1.13.1
|
go-version: ^1.13.1
|
||||||
@@ -53,9 +52,11 @@ jobs:
|
|||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
id: analysis
|
id: analysis
|
||||||
|
env:
|
||||||
|
# Forces a failure in this step.
|
||||||
|
CODEQL_ACTION_EXTRA_OPTIONS: '{ "database": { "finalize": ["--invalid-option"] } }'
|
||||||
with:
|
with:
|
||||||
expect-error: true
|
expect-error: true
|
||||||
ram: 1
|
|
||||||
download-and-check-artifacts:
|
download-and-check-artifacts:
|
||||||
name: Download and check debug artifacts after failure in analyze
|
name: Download and check debug artifacts after failure in analyze
|
||||||
needs: upload-artifacts
|
needs: upload-artifacts
|
||||||
@@ -67,11 +68,9 @@ jobs:
|
|||||||
- name: Check expected artifacts exist
|
- name: Check expected artifacts exist
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
OPERATING_SYSTEMS="ubuntu-latest macos-latest"
|
|
||||||
LANGUAGES="cpp csharp go java javascript python"
|
LANGUAGES="cpp csharp go java javascript python"
|
||||||
for os in $OPERATING_SYSTEMS; do
|
cd "./my-debug-artifacts"
|
||||||
pushd "./my-debug-artifacts-$os"
|
echo "Artifacts from run:"
|
||||||
echo "Artifacts from run on $os:"
|
|
||||||
for language in $LANGUAGES; do
|
for language in $LANGUAGES; do
|
||||||
echo "- Checking $language"
|
echo "- Checking $language"
|
||||||
if [[ ! -f "my-db-$language-partial.zip" ]] ; then
|
if [[ ! -f "my-db-$language-partial.zip" ]] ; then
|
||||||
@@ -87,7 +86,5 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
popd
|
|
||||||
done
|
|
||||||
env:
|
env:
|
||||||
GO111MODULE: auto
|
GO111MODULE: auto
|
||||||
|
|||||||
38
.github/workflows/debug-artifacts.yml
vendored
38
.github/workflows/debug-artifacts.yml
vendored
@@ -16,27 +16,29 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
upload-artifacts:
|
upload-artifacts:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os:
|
|
||||||
- ubuntu-latest
|
|
||||||
- macos-latest
|
|
||||||
version:
|
version:
|
||||||
- stable-20221211
|
# TODO: Once CLI v2.17.4 is available and the platform is switched back to ubuntu,
|
||||||
- stable-20230418
|
# stable-20230403, stable-v2.13.5, and stable-v2.14.6 can be added back to this matrix,
|
||||||
- stable-v2.13.5
|
# and the VERSIONS variable in the bash script below.
|
||||||
- stable-v2.14.6
|
# Prior to CLI v2.15.1, ARM runners were not supported by the build tracer.
|
||||||
|
- stable-v2.15.5
|
||||||
|
- stable-v2.16.6
|
||||||
- default
|
- default
|
||||||
- latest
|
- linked
|
||||||
- nightly-latest
|
- nightly-latest
|
||||||
name: Upload debug artifacts
|
name: Upload debug artifacts
|
||||||
env:
|
env:
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: macos-latest # TODO: Switch back to ubuntu for `nightly-latest` and `linked` once CLI v2.17.4 is available.
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -48,16 +50,6 @@ jobs:
|
|||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: ^1.13.1
|
go-version: ^1.13.1
|
||||||
- name: Setup Python on MacOS
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
if: |
|
|
||||||
matrix.os == 'macos-latest' && (
|
|
||||||
matrix.version == 'stable-20221211' ||
|
|
||||||
matrix.version == 'stable-20230418' ||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
|
||||||
python-version: '3.11'
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
id: init
|
id: init
|
||||||
with:
|
with:
|
||||||
@@ -84,12 +76,11 @@ jobs:
|
|||||||
- name: Check expected artifacts exist
|
- name: Check expected artifacts exist
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
VERSIONS="stable-20221211 stable-20230418 stable-v2.13.5 stable-v2.14.6 default latest nightly-latest"
|
VERSIONS="stable-v2.15.5 stable-v2.16.6 default linked nightly-latest"
|
||||||
LANGUAGES="cpp csharp go java javascript python"
|
LANGUAGES="cpp csharp go java javascript python"
|
||||||
for version in $VERSIONS; do
|
for version in $VERSIONS; do
|
||||||
for os in ubuntu-latest macos-latest; do
|
pushd "./my-debug-artifacts-${version//./}"
|
||||||
pushd "./my-debug-artifacts-$os-${version//./}"
|
echo "Artifacts from version $version:"
|
||||||
echo "Artifacts from version $version on $os:"
|
|
||||||
for language in $LANGUAGES; do
|
for language in $LANGUAGES; do
|
||||||
echo "- Checking $language"
|
echo "- Checking $language"
|
||||||
if [[ ! -f "$language.sarif" ]] ; then
|
if [[ ! -f "$language.sarif" ]] ; then
|
||||||
@@ -107,6 +98,5 @@ jobs:
|
|||||||
done
|
done
|
||||||
popd
|
popd
|
||||||
done
|
done
|
||||||
done
|
|
||||||
env:
|
env:
|
||||||
GO111MODULE: auto
|
GO111MODULE: auto
|
||||||
|
|||||||
6
.github/workflows/expected-queries-runs.yml
vendored
6
.github/workflows/expected-queries-runs.yml
vendored
@@ -11,6 +11,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -27,7 +29,7 @@ jobs:
|
|||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: linked
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: javascript
|
languages: javascript
|
||||||
@@ -35,8 +37,6 @@ jobs:
|
|||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
with:
|
with:
|
||||||
output: ${{ runner.temp }}/results
|
output: ${{ runner.temp }}/results
|
||||||
upload-database: false
|
|
||||||
upload: never
|
|
||||||
|
|
||||||
- name: Check Sarif
|
- name: Check Sarif
|
||||||
uses: ./../action/.github/actions/check-sarif
|
uses: ./../action/.github/actions/check-sarif
|
||||||
|
|||||||
5
.github/workflows/pr-checks.yml
vendored
5
.github/workflows/pr-checks.yml
vendored
@@ -16,8 +16,9 @@ jobs:
|
|||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
node-types-version: [16.11, current] # run tests on 16.11 while CodeQL Action v2 is still supported
|
node-types-version: [16.11, current] # we backport this matrix job in order to maintain the same check names
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -49,6 +50,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Check generated JS
|
- name: Check generated JS
|
||||||
|
if: matrix.node-types-version != 'current' # we do not need to test the newer node on the v2 branch
|
||||||
run: .github/workflows/script/check-js.sh
|
run: .github/workflows/script/check-js.sh
|
||||||
|
|
||||||
check-node-modules:
|
check-node-modules:
|
||||||
@@ -89,6 +91,7 @@ jobs:
|
|||||||
name: Unit Test
|
name: Unit Test
|
||||||
needs: [check-js, check-node-modules]
|
needs: [check-js, check-node-modules]
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|||||||
174
.github/workflows/python-deps.yml
vendored
174
.github/workflows/python-deps.yml
vendored
@@ -1,174 +0,0 @@
|
|||||||
name: Test Python Package Installation
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main, releases/v*]
|
|
||||||
pull_request:
|
|
||||||
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
|
|
||||||
# by other workflows.
|
|
||||||
types: [opened, synchronize, reopened, ready_for_review]
|
|
||||||
paths:
|
|
||||||
# Changes to this workflow.
|
|
||||||
- '.github/workflows/python-deps.yml'
|
|
||||||
# Changes to the Python package installation scripts and their tests.
|
|
||||||
- 'python-setup/**'
|
|
||||||
# Changes to the default CodeQL bundle version.
|
|
||||||
- '**/defaults.json'
|
|
||||||
schedule:
|
|
||||||
# Weekly on Monday.
|
|
||||||
- cron: '0 0 * * 1'
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test-setup-python-scripts:
|
|
||||||
timeout-minutes: 45
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-20.04, ubuntu-22.04, macos-latest]
|
|
||||||
python_deps_type: [pipenv, poetry, requirements, setup_py]
|
|
||||||
python_version: [3]
|
|
||||||
|
|
||||||
|
|
||||||
env:
|
|
||||||
PYTHON_DEPS_TYPE: ${{ matrix.python_deps_type }}
|
|
||||||
PYTHON_VERSION: ${{ matrix.python_version }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
|
||||||
uses: ./init
|
|
||||||
id: init
|
|
||||||
with:
|
|
||||||
tools: latest
|
|
||||||
languages: python
|
|
||||||
setup-python-dependencies: false
|
|
||||||
|
|
||||||
- name: Test Auto Package Installation
|
|
||||||
run: |
|
|
||||||
set -x
|
|
||||||
$GITHUB_WORKSPACE/python-setup/install_tools.sh
|
|
||||||
|
|
||||||
cd $GITHUB_WORKSPACE/python-setup/tests/${PYTHON_DEPS_TYPE}/requests-${PYTHON_VERSION}
|
|
||||||
|
|
||||||
case ${{ matrix.os }} in
|
|
||||||
ubuntu-20.04*) basePath="/opt";;
|
|
||||||
ubuntu-22.04*) basePath="/opt";;
|
|
||||||
macos-latest*) basePath="/Users/runner";;
|
|
||||||
esac
|
|
||||||
echo ${basePath}
|
|
||||||
|
|
||||||
$GITHUB_WORKSPACE/python-setup/auto_install_packages.py "$(dirname ${{steps.init.outputs.codeql-path}})"
|
|
||||||
- name: Setup for extractor
|
|
||||||
run: |
|
|
||||||
echo $CODEQL_PYTHON
|
|
||||||
# only run if $CODEQL_PYTHON is set
|
|
||||||
if [ ! -z $CODEQL_PYTHON ]; then
|
|
||||||
$GITHUB_WORKSPACE/python-setup/tests/from_python_exe.py $CODEQL_PYTHON;
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Verify packages installed
|
|
||||||
run: |
|
|
||||||
$GITHUB_WORKSPACE/python-setup/tests/check_requests.sh ${PYTHON_VERSION} 2.31.0
|
|
||||||
|
|
||||||
# This one shouldn't fail, but also won't install packages
|
|
||||||
test-setup-python-scripts-non-standard-location:
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-20.04, ubuntu-22.04, macos-latest]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
|
||||||
uses: ./init
|
|
||||||
id: init
|
|
||||||
with:
|
|
||||||
tools: latest
|
|
||||||
languages: python
|
|
||||||
setup-python-dependencies: false
|
|
||||||
|
|
||||||
- name: Test Auto Package Installation
|
|
||||||
run: |
|
|
||||||
set -x
|
|
||||||
$GITHUB_WORKSPACE/python-setup/install_tools.sh
|
|
||||||
|
|
||||||
cd $GITHUB_WORKSPACE/python-setup/tests/requirements/non-standard-location
|
|
||||||
|
|
||||||
case ${{ matrix.os }} in
|
|
||||||
ubuntu-20.04*) basePath="/opt";;
|
|
||||||
ubuntu-22.04*) basePath="/opt";;
|
|
||||||
macos-latest*) basePath="/Users/runner";;
|
|
||||||
esac
|
|
||||||
echo ${basePath}
|
|
||||||
|
|
||||||
$GITHUB_WORKSPACE/python-setup/auto_install_packages.py "$(dirname ${{steps.init.outputs.codeql-path}})"
|
|
||||||
|
|
||||||
- name: Setup for extractor
|
|
||||||
run: |
|
|
||||||
echo $CODEQL_PYTHON
|
|
||||||
# only run if $CODEQL_PYTHON is set
|
|
||||||
if [ ! -z $CODEQL_PYTHON ]; then
|
|
||||||
$GITHUB_WORKSPACE/python-setup/tests/from_python_exe.py $CODEQL_PYTHON;
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Verify packages installed
|
|
||||||
run: |
|
|
||||||
test -z $LGTM_INDEX_IMPORT_PATH
|
|
||||||
|
|
||||||
test-setup-python-scripts-windows:
|
|
||||||
runs-on: windows-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
python_deps_type: [pipenv, poetry, requirements, setup_py]
|
|
||||||
python_version: [3]
|
|
||||||
|
|
||||||
env:
|
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
|
||||||
PYTHON_DEPS_TYPE: ${{ matrix.python_deps_type }}
|
|
||||||
PYTHON_VERSION: ${{ matrix.python_version }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python_version }}
|
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
|
||||||
id: init
|
|
||||||
uses: ./init
|
|
||||||
with:
|
|
||||||
tools: latest
|
|
||||||
languages: python
|
|
||||||
setup-python-dependencies: false
|
|
||||||
|
|
||||||
- name: Test Auto Package Installation
|
|
||||||
env:
|
|
||||||
CODEQL_PATH: ${{ steps.init.outputs.codeql-path }}
|
|
||||||
run: |
|
|
||||||
$cmd = $Env:GITHUB_WORKSPACE + "\\python-setup\\install_tools.ps1"
|
|
||||||
powershell -File $cmd
|
|
||||||
|
|
||||||
cd $Env:GITHUB_WORKSPACE\\python-setup/tests/$Env:PYTHON_DEPS_TYPE/requests-$Env:PYTHON_VERSION
|
|
||||||
$codeql_dist = (get-item $Env:CODEQL_PATH).Directory.FullName
|
|
||||||
py -3 $Env:GITHUB_WORKSPACE\\python-setup\\auto_install_packages.py $codeql_dist
|
|
||||||
|
|
||||||
- name: Setup for extractor
|
|
||||||
run: |
|
|
||||||
echo $Env:CODEQL_PYTHON
|
|
||||||
|
|
||||||
py -3 $Env:GITHUB_WORKSPACE\\python-setup\\tests\\from_python_exe.py $Env:CODEQL_PYTHON
|
|
||||||
|
|
||||||
- name: Verify packages installed
|
|
||||||
run: |
|
|
||||||
$cmd = $Env:GITHUB_WORKSPACE + "\\python-setup\\tests\\check_requests.ps1"
|
|
||||||
powershell -File $cmd $Env:PYTHON_VERSION 2.31.0
|
|
||||||
7
.github/workflows/python312-windows.yml
vendored
7
.github/workflows/python312-windows.yml
vendored
@@ -14,6 +14,8 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-setup-python-scripts:
|
test-setup-python-scripts:
|
||||||
|
env:
|
||||||
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
||||||
@@ -32,11 +34,8 @@ jobs:
|
|||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: ./../action/init
|
uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
tools: latest
|
tools: linked
|
||||||
languages: python
|
languages: python
|
||||||
|
|
||||||
- name: Analyze
|
- name: Analyze
|
||||||
uses: ./../action/analyze
|
uses: ./../action/analyze
|
||||||
with:
|
|
||||||
upload: false
|
|
||||||
upload-database: false
|
|
||||||
|
|||||||
4
.github/workflows/query-filters.yml
vendored
4
.github/workflows/query-filters.yml
vendored
@@ -11,6 +11,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -25,7 +27,7 @@ jobs:
|
|||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: linked
|
||||||
|
|
||||||
- name: Check SARIF for default queries with Single include, Single exclude
|
- name: Check SARIF for default queries with Single include, Single exclude
|
||||||
uses: ./../action/.github/actions/query-filter-test
|
uses: ./../action/.github/actions/query-filter-test
|
||||||
|
|||||||
18
.github/workflows/rebuild.yml
vendored
18
.github/workflows/rebuild.yml
vendored
@@ -3,6 +3,7 @@ name: Rebuild Action
|
|||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [labeled]
|
types: [labeled]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
rebuild:
|
rebuild:
|
||||||
@@ -24,6 +25,23 @@ 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: Merge in changes from base branch
|
||||||
|
env:
|
||||||
|
BASE_BRANCH: ${{ github.event.pull_request.base.ref }}
|
||||||
|
run: |
|
||||||
|
git fetch origin "$BASE_BRANCH"
|
||||||
|
|
||||||
|
# Allow merge conflicts in `lib`, since rebuilding should resolve them.
|
||||||
|
git merge "origin/$BASE_BRANCH" || echo "Merge conflicts detected"
|
||||||
|
|
||||||
|
# Check for merge conflicts outside of `lib`. Disable git diff's trailing whitespace check
|
||||||
|
# since `node_modules/@types/semver/README.md` fails it.
|
||||||
|
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."
|
||||||
|
git -c core.whitespace=-trailing-space diff --check | grep --invert-match '^lib/' || true
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Compile TypeScript
|
- name: Compile TypeScript
|
||||||
run: |
|
run: |
|
||||||
npm install
|
npm install
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
if [ "$1" != "update" && "$1" != "check-only" ]; then
|
#!/bin/bash
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
if [ "$1" != "update" ] && [ "$1" != "check-only" ]; then
|
||||||
>&2 echo "Failed: Invalid argument. Must be 'update' or 'check-only'"
|
>&2 echo "Failed: Invalid argument. Must be 'update' or 'check-only'"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sudo npm install --force -g npm@9.2.0
|
npm install --force -g npm@9.2.0
|
||||||
|
|
||||||
# clean the npm cache to ensure we don't have any files owned by root
|
# clean the npm cache to ensure we don't have any files owned by root
|
||||||
sudo npm cache clean --force
|
sudo npm cache clean --force
|
||||||
|
|||||||
5
.github/workflows/test-codeql-bundle-all.yml
vendored
5
.github/workflows/test-codeql-bundle-all.yml
vendored
@@ -16,10 +16,13 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
test-codeql-bundle-all:
|
test-codeql-bundle-all:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
@@ -50,7 +53,5 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
with:
|
|
||||||
upload-database: false
|
|
||||||
env:
|
env:
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
|
|||||||
2
.github/workflows/update-bundle.yml
vendored
2
.github/workflows/update-bundle.yml
vendored
@@ -54,7 +54,7 @@ jobs:
|
|||||||
cli_version=$(jq -r '.cliVersion' src/defaults.json)
|
cli_version=$(jq -r '.cliVersion' src/defaults.json)
|
||||||
pr_url=$(gh pr create \
|
pr_url=$(gh pr create \
|
||||||
--title "Update default bundle to $cli_version" \
|
--title "Update default bundle to $cli_version" \
|
||||||
--body "This pull request updates the default CodeQL bundle, as used with \`tools: latest\` and on GHES, to $cli_version." \
|
--body "This pull request updates the default CodeQL bundle, as used with \`tools: linked\` and on GHES, to $cli_version." \
|
||||||
--assignee "$GITHUB_ACTOR" \
|
--assignee "$GITHUB_ACTOR" \
|
||||||
--draft \
|
--draft \
|
||||||
)
|
)
|
||||||
|
|||||||
7
.gitignore
vendored
7
.gitignore
vendored
@@ -1,2 +1,7 @@
|
|||||||
# Ignore for example failing-tests.json from AVA
|
# Ignore for example failing-tests.json from AVA
|
||||||
node_modules/.cache
|
node_modules/.cache/
|
||||||
|
# Java build files
|
||||||
|
.gradle/
|
||||||
|
*.class
|
||||||
|
# macOS
|
||||||
|
.DS_Store
|
||||||
|
|||||||
120
CHANGELOG.md
120
CHANGELOG.md
@@ -4,22 +4,132 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th
|
|||||||
|
|
||||||
Note that the only difference between `v2` and `v3` of the CodeQL Action is the node version they support, with `v3` running on node 20 while we continue to release `v2` to support running on node 16. For example `3.22.11` was the first `v3` release and is functionally identical to `2.22.11`. This approach ensures an easy way to track exactly which features are included in different versions, indicated by the minor and patch version numbers.
|
Note that the only difference between `v2` and `v3` of the CodeQL Action is the node version they support, with `v3` running on node 20 while we continue to release `v2` to support running on node 16. For example `3.22.11` was the first `v3` release and is functionally identical to `2.22.11`. This approach ensures an easy way to track exactly which features are included in different versions, indicated by the minor and patch version numbers.
|
||||||
|
|
||||||
## [UNRELEASED]
|
## 2.25.10 - 13 Jun 2024
|
||||||
|
|
||||||
|
- Update default CodeQL bundle version to 2.17.5. [#2327](https://github.com/github/codeql-action/pull/2327)
|
||||||
|
|
||||||
|
## 2.25.9 - 12 Jun 2024
|
||||||
|
|
||||||
|
- Avoid failing database creation if the database folder already exists and contains some unexpected files. Requires CodeQL 2.18.0 or higher. [#2330](https://github.com/github/codeql-action/pull/2330)
|
||||||
|
- The init Action will attempt to clean up the database cluster directory before creating a new database and at the end of the job. This will help to avoid issues where the database cluster directory is left in an inconsistent state. [#2332](https://github.com/github/codeql-action/pull/2332)
|
||||||
|
|
||||||
|
## 2.25.8 - 04 Jun 2024
|
||||||
|
|
||||||
|
- Update default CodeQL bundle version to 2.17.4. [#2321](https://github.com/github/codeql-action/pull/2321)
|
||||||
|
|
||||||
|
## 2.25.7 - 31 May 2024
|
||||||
|
|
||||||
|
- We are rolling out a feature in May/June 2024 that will reduce the Actions cache usage of the Action by keeping only the newest TRAP cache for each language. [#2306](https://github.com/github/codeql-action/pull/2306)
|
||||||
|
|
||||||
|
## 2.25.6 - 20 May 2024
|
||||||
|
|
||||||
|
- Update default CodeQL bundle version to 2.17.3. [#2295](https://github.com/github/codeql-action/pull/2295)
|
||||||
|
|
||||||
|
## 2.25.5 - 13 May 2024
|
||||||
|
|
||||||
|
- Add a compatibility matrix of supported CodeQL Action, CodeQL CLI, and GitHub Enterprise Server versions to the [README.md](README.md). [#2273](https://github.com/github/codeql-action/pull/2273)
|
||||||
|
- Avoid printing out a warning for a missing `on.push` trigger when the CodeQL Action is triggered via a `workflow_call` event. [#2274](https://github.com/github/codeql-action/pull/2274)
|
||||||
|
- The `tools: latest` input to the `init` Action has been renamed to `tools: linked`. This option specifies that the Action should use the tools shipped at the same time as the Action. The old name will continue to work for backwards compatibility, but we recommend that new workflows use the new name. [#2281](https://github.com/github/codeql-action/pull/2281)
|
||||||
|
|
||||||
|
## 2.25.4 - 08 May 2024
|
||||||
|
|
||||||
|
- Update default CodeQL bundle version to 2.17.2. [#2270](https://github.com/github/codeql-action/pull/2270)
|
||||||
|
|
||||||
|
## 2.25.3 - 25 Apr 2024
|
||||||
|
|
||||||
|
- Update default CodeQL bundle version to 2.17.1. [#2247](https://github.com/github/codeql-action/pull/2247)
|
||||||
|
- Workflows running on `macos-latest` using CodeQL CLI versions before v2.15.1 will need to either upgrade their CLI version to v2.15.1 or newer, or change the platform to an Intel MacOS runner, such as `macos-12`. ARM machines with SIP disabled, including the newest `macos-latest` image, are unsupported for CLI versions before 2.15.1. [#2261](https://github.com/github/codeql-action/pull/2261)
|
||||||
|
|
||||||
|
## 2.25.2 - 22 Apr 2024
|
||||||
|
|
||||||
No user facing changes.
|
No user facing changes.
|
||||||
|
|
||||||
## 3.23.0 - 08 Jan 2024
|
## 2.25.1 - 17 Apr 2024
|
||||||
|
|
||||||
|
- We are rolling out a feature in April/May 2024 that improves the reliability and performance of analyzing code when analyzing a compiled language with the `autobuild` [build mode](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#codeql-build-modes). [#2235](https://github.com/github/codeql-action/pull/2235)
|
||||||
|
- Fix a bug where the `init` Action would fail if `--overwrite` was specified in `CODEQL_ACTION_EXTRA_OPTIONS`. [#2245](https://github.com/github/codeql-action/pull/2245)
|
||||||
|
|
||||||
|
## 2.25.0 - 15 Apr 2024
|
||||||
|
|
||||||
|
- The deprecated feature for extracting dependencies for a Python analysis has been removed. [#2224](https://github.com/github/codeql-action/pull/2224)
|
||||||
|
As a result, the following inputs and environment variables are now ignored:
|
||||||
|
- The `setup-python-dependencies` input to the `init` Action
|
||||||
|
- The `CODEQL_ACTION_DISABLE_PYTHON_DEPENDENCY_INSTALLATION` environment variable
|
||||||
|
We recommend removing any references to these from your workflows. For more information, see the release notes for CodeQL Action v3.23.0 and v2.23.0.
|
||||||
|
- Automatically overwrite an existing database if found on the filesystem. [#2229](https://github.com/github/codeql-action/pull/2229)
|
||||||
|
- Bump the minimum CodeQL bundle version to 2.12.6. [#2232](https://github.com/github/codeql-action/pull/2232)
|
||||||
|
- A more relevant log message and a diagnostic are now emitted when the `file` program is not installed on a Linux runner, but is required for Go tracing to succeed. [#2234](https://github.com/github/codeql-action/pull/2234)
|
||||||
|
|
||||||
|
## 2.24.10 - 05 Apr 2024
|
||||||
|
|
||||||
|
- Update default CodeQL bundle version to 2.17.0. [#2219](https://github.com/github/codeql-action/pull/2219)
|
||||||
|
- Add a deprecation warning for customers using CodeQL version 2.12.5 and earlier. These versions of CodeQL were discontinued on 26 March 2024 alongside GitHub Enterprise Server 3.8, and will be unsupported by CodeQL Action versions 3.25.0 and later and versions 2.25.0 and later. [#2220](https://github.com/github/codeql-action/pull/2220)
|
||||||
|
- If you are using one of these versions, please update to CodeQL CLI version 2.12.6 or later. For instance, if you have specified a custom version of the CLI using the 'tools' input to the 'init' Action, you can remove this input to use the default version.
|
||||||
|
- Alternatively, if you want to continue using a version of the CodeQL CLI between 2.11.6 and 2.12.5, you can replace `github/codeql-action/*@v3` by `github/codeql-action/*@v3.24.10` and `github/codeql-action/*@v2` by `github/codeql-action/*@v2.24.10` in your code scanning workflow to ensure you continue using this version of the CodeQL Action.
|
||||||
|
|
||||||
|
## 2.24.9 - 22 Mar 2024
|
||||||
|
|
||||||
|
- Update default CodeQL bundle version to 2.16.5. [#2203](https://github.com/github/codeql-action/pull/2203)
|
||||||
|
|
||||||
|
## 2.24.8 - 18 Mar 2024
|
||||||
|
|
||||||
|
- Improve the ease of debugging extraction issues by increasing the verbosity of the extractor logs when running in debug mode. [#2195](https://github.com/github/codeql-action/pull/2195)
|
||||||
|
|
||||||
|
## 2.24.7 - 12 Mar 2024
|
||||||
|
|
||||||
|
- Update default CodeQL bundle version to 2.16.4. [#2185](https://github.com/github/codeql-action/pull/2185)
|
||||||
|
|
||||||
|
## 2.24.6 - 29 Feb 2024
|
||||||
|
|
||||||
|
No user facing changes.
|
||||||
|
|
||||||
|
## 2.24.5 - 23 Feb 2024
|
||||||
|
|
||||||
|
- Update default CodeQL bundle version to 2.16.3. [#2156](https://github.com/github/codeql-action/pull/2156)
|
||||||
|
|
||||||
|
## 2.24.4 - 21 Feb 2024
|
||||||
|
|
||||||
|
- Fix an issue where an existing, but empty, `/sys/fs/cgroup/cpuset.cpus` file always resulted in a single-threaded run. [#2151](https://github.com/github/codeql-action/pull/2151)
|
||||||
|
|
||||||
|
## 2.24.3 - 15 Feb 2024
|
||||||
|
|
||||||
|
- Fix an issue where the CodeQL Action would fail to load a configuration specified by the `config` input to the `init` Action. [#2147](https://github.com/github/codeql-action/pull/2147)
|
||||||
|
|
||||||
|
## 2.24.2 - 15 Feb 2024
|
||||||
|
|
||||||
|
- Enable improved multi-threaded performance on larger runners for GitHub Enterprise Server users. This feature is already available to GitHub.com users. [#2141](https://github.com/github/codeql-action/pull/2141)
|
||||||
|
|
||||||
|
## 2.24.1 - 13 Feb 2024
|
||||||
|
|
||||||
|
- Update default CodeQL bundle version to 2.16.2. [#2124](https://github.com/github/codeql-action/pull/2124)
|
||||||
|
- The CodeQL action no longer fails if it can't write to the telemetry api endpoint. [#2121](https://github.com/github/codeql-action/pull/2121)
|
||||||
|
|
||||||
|
## 2.24.0 - 02 Feb 2024
|
||||||
|
|
||||||
|
- CodeQL Python analysis will no longer install dependencies on GitHub Enterprise Server, as is already the case for GitHub.com. See [release notes for 3.23.0](#3230---08-jan-2024) for more details. [#2106](https://github.com/github/codeql-action/pull/2106)
|
||||||
|
|
||||||
|
## 2.23.2 - 26 Jan 2024
|
||||||
|
|
||||||
|
- On Linux, the maximum possible value for the `--threads` option now respects the CPU count as specified in `cgroup` files to more accurately reflect the number of available cores when running in containers. [#2083](https://github.com/github/codeql-action/pull/2083)
|
||||||
|
- Update default CodeQL bundle version to 2.16.1. [#2096](https://github.com/github/codeql-action/pull/2096)
|
||||||
|
|
||||||
|
## 2.23.1 - 17 Jan 2024
|
||||||
|
|
||||||
|
- Update default CodeQL bundle version to 2.16.0. [#2073](https://github.com/github/codeql-action/pull/2073)
|
||||||
|
- Change the retention period for uploaded debug artifacts to 7 days. Previously, this was whatever the repository default was. [#2079](https://github.com/github/codeql-action/pull/2079)
|
||||||
|
|
||||||
|
## 2.23.0 - 08 Jan 2024
|
||||||
|
|
||||||
- We are rolling out a feature in January 2024 that will disable Python dependency installation by default for all users. This improves the speed of analysis while having only a very minor impact on results. You can override this behavior by setting `CODEQL_ACTION_DISABLE_PYTHON_DEPENDENCY_INSTALLATION=false` in your workflow, however we plan to remove this ability in future versions of the CodeQL Action. [#2031](https://github.com/github/codeql-action/pull/2031)
|
- We are rolling out a feature in January 2024 that will disable Python dependency installation by default for all users. This improves the speed of analysis while having only a very minor impact on results. You can override this behavior by setting `CODEQL_ACTION_DISABLE_PYTHON_DEPENDENCY_INSTALLATION=false` in your workflow, however we plan to remove this ability in future versions of the CodeQL Action. [#2031](https://github.com/github/codeql-action/pull/2031)
|
||||||
- The CodeQL Action now requires CodeQL version 2.11.6 or later. For more information, see [the corresponding changelog entry for CodeQL Action version 2.22.7](#2227---16-nov-2023). [#2009](https://github.com/github/codeql-action/pull/2009)
|
- The CodeQL Action now requires CodeQL version 2.11.6 or later. For more information, see [the corresponding changelog entry for CodeQL Action version 2.22.7](#2227---16-nov-2023). [#2009](https://github.com/github/codeql-action/pull/2009)
|
||||||
|
|
||||||
## 3.22.12 - 22 Dec 2023
|
## 2.22.12 - 22 Dec 2023
|
||||||
|
|
||||||
- Update default CodeQL bundle version to 2.15.5. [#2047](https://github.com/github/codeql-action/pull/2047)
|
- Update default CodeQL bundle version to 2.15.5. [#2047](https://github.com/github/codeql-action/pull/2047)
|
||||||
|
|
||||||
## 3.22.11 - 13 Dec 2023
|
## 2.22.11 - 13 Dec 2023
|
||||||
|
|
||||||
- [v3+ only] The CodeQL Action now runs on Node.js v20. [#2006](https://github.com/github/codeql-action/pull/2006)
|
No user facing changes.
|
||||||
|
|
||||||
## 2.22.10 - 12 Dec 2023
|
## 2.22.10 - 12 Dec 2023
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1 @@
|
|||||||
**/* @github/codeql-action-reviewers
|
**/* @github/codeql-action-reviewers
|
||||||
|
|
||||||
/python-setup/ @github/codeql-python @github/codeql-action-reviewers
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
[fork]: https://github.com/github/codeql-action/fork
|
[fork]: https://github.com/github/codeql-action/fork
|
||||||
[pr]: https://github.com/github/codeql-action/compare
|
[pr]: https://github.com/github/codeql-action/compare
|
||||||
[code-of-conduct]: CODE_OF_CONDUCT.md
|
[code-of-conduct]: CODE_OF_CONDUCT.md
|
||||||
|
[readme]: README.md#supported-versions-of-the-codeql-cli-and-github-enterprise-server
|
||||||
|
|
||||||
Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
|
Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
|
||||||
|
|
||||||
@@ -57,18 +58,14 @@ Here are a few things you can do that will increase the likelihood of your pull
|
|||||||
## Releasing (write access required)
|
## Releasing (write access required)
|
||||||
|
|
||||||
1. The first step of releasing a new version of the `codeql-action` is running the "Update release branch" workflow.
|
1. The first step of releasing a new version of the `codeql-action` is running the "Update release branch" workflow.
|
||||||
This workflow goes through the pull requests that have been merged to `main` since the last release, creates a changelog, then opens a pull request to merge the changes since the last release into the `releases/v2` release branch.
|
This workflow goes through the pull requests that have been merged to `main` since the last release, creates a changelog, then opens a pull request to merge the changes since the last release into the `releases/v3` release branch.
|
||||||
|
|
||||||
You can start a release by triggering this workflow via [workflow dispatch](https://github.com/github/codeql-action/actions/workflows/update-release-branch.yml).
|
You can start a release by triggering this workflow via [workflow dispatch](https://github.com/github/codeql-action/actions/workflows/update-release-branch.yml).
|
||||||
1. The workflow run will open a pull request titled "Merge main into releases/v2". Mark the pull request as [ready for review](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request#marking-a-pull-request-as-ready-for-review) to trigger the PR checks.
|
1. The workflow run will open a pull request titled "Merge main into releases/v3". Follow the steps on the checklist in the pull request. Once you've checked off all but the last two of these, approve the PR and automerge it.
|
||||||
1. Review the checklist items in the pull request description.
|
1. When the "Merge main into releases/v3" pull request is merged into the `releases/v3` branch, a mergeback pull request to `main` and a backport pull request to `releases/v2` will both be automatically created. This mergeback pull request incorporates the changelog updates into `main`, tags the release using the merge commit of the "Merge main into releases/v3" pull request, and bumps the patch version of the CodeQL Action. The backport pull request will incorporate the updates into `releases/v2`.
|
||||||
Once you've checked off all but the last two of these, approve the PR and automerge it.
|
1. Approve the mergeback and backport pull requests and automerge them.
|
||||||
1. When the "Merge main into releases/v2" pull request is merged into the `releases/v2` branch, the "Tag release and merge back" workflow will create a mergeback PR.
|
|
||||||
This mergeback incorporates the changelog updates into `main`, tags the release using the merge commit of the "Merge main into releases/v2" pull request, and bumps the patch version of the CodeQL Action.
|
|
||||||
|
|
||||||
Approve the mergeback PR and automerge it.
|
Once the mergeback and backport pull request have been merged, the release is complete.
|
||||||
|
|
||||||
Once the mergeback has been merged to `main`, the release is complete.
|
|
||||||
|
|
||||||
## Keeping the PR checks up to date (admin access required)
|
## Keeping the PR checks up to date (admin access required)
|
||||||
|
|
||||||
@@ -88,6 +85,7 @@ We typically deprecate a version of CodeQL when the GitHub Enterprise Server (GH
|
|||||||
1. Notify users using the old version of CodeQL about the deprecation.
|
1. Notify users using the old version of CodeQL about the deprecation.
|
||||||
- Update `CODEQL_NEXT_MINIMUM_VERSION`, `GHES_VERSION_MOST_RECENTLY_DEPRECATED`, and `GHES_MOST_RECENT_DEPRECATION_DATE` in `src/codeql.ts` to reflect the new minimum version of CodeQL and the GHES version that has just been deprecated.
|
- Update `CODEQL_NEXT_MINIMUM_VERSION`, `GHES_VERSION_MOST_RECENTLY_DEPRECATED`, and `GHES_MOST_RECENT_DEPRECATION_DATE` in `src/codeql.ts` to reflect the new minimum version of CodeQL and the GHES version that has just been deprecated.
|
||||||
- Add a changelog note announcing the deprecation.
|
- Add a changelog note announcing the deprecation.
|
||||||
|
- Update the CLI version referenced in the [readme] by adding a new row to the compatibility table.
|
||||||
- Example PR: https://github.com/github/codeql-action/pull/1884
|
- Example PR: https://github.com/github/codeql-action/pull/1884
|
||||||
1. Release the Action, or wait for the next scheduled release of the Action, then wait at least a week so users have time to see and act on the deprecation warning.
|
1. Release the Action, or wait for the next scheduled release of the Action, then wait at least a week so users have time to see and act on the deprecation warning.
|
||||||
1. Remove support for the old version of CodeQL.
|
1. Remove support for the old version of CodeQL.
|
||||||
|
|||||||
33
README.md
33
README.md
@@ -16,6 +16,39 @@ We recommend using default setup to configure CodeQL analysis for your repositor
|
|||||||
|
|
||||||
You can also configure advanced setup for a repository to find security vulnerabilities in your code using a highly customizable code scanning configuration. For more information, see "[Configuring advanced setup for code scanning](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/configuring-advanced-setup-for-code-scanning)" and "[Customizing your advanced setup for code scanning](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning)."
|
You can also configure advanced setup for a repository to find security vulnerabilities in your code using a highly customizable code scanning configuration. For more information, see "[Configuring advanced setup for code scanning](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/configuring-advanced-setup-for-code-scanning)" and "[Customizing your advanced setup for code scanning](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning)."
|
||||||
|
|
||||||
|
### Permissions
|
||||||
|
|
||||||
|
All advanced setup code scanning workflows must have the `security-events: write` permission. Workflows in private repositories must additionally have the `contents: read` permission. For more information, see "[Assigning permissions to jobs](https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs)."
|
||||||
|
|
||||||
|
## Supported versions of the CodeQL Action
|
||||||
|
|
||||||
|
The following versions of the CodeQL Action are currently supported:
|
||||||
|
|
||||||
|
- v3 (latest)
|
||||||
|
- v2 (deprecated, support will end on December 5th, 2024)
|
||||||
|
|
||||||
|
The only difference between CodeQL Action v2 and v3 is the version of Node.js on which they run. CodeQL Action v3 runs on Node 20, while CodeQL Action v2 runs on Node 16.
|
||||||
|
|
||||||
|
To provide the best experience to customers using older versions of GitHub Enterprise Server, we will continue to release CodeQL Action v2 so that these customers can continue to run the latest version of CodeQL as long as their version of GitHub Enterprise Server is supported. For example CodeQL Action v3.22.11 was the first release of CodeQL Action v3 and is functionally identical to v2.22.11. This approach provides an easy way to track exactly which features are included in different versions by looking at the minor and patch version numbers.
|
||||||
|
|
||||||
|
For more information, see "[Code scanning: deprecation of CodeQL Action v2](https://github.blog/changelog/2024-01-12-code-scanning-deprecation-of-codeql-action-v2/)."
|
||||||
|
|
||||||
|
## Supported versions of the CodeQL CLI and GitHub Enterprise Server
|
||||||
|
|
||||||
|
We typically release new minor versions of the CodeQL Action and CLI when a new minor version of GitHub Enterprise Server (GHES) is released. When a version of GHES is deprecated, the CodeQL Action and CLI releases that shipped with it are deprecated as well.
|
||||||
|
|
||||||
|
| Recommended CodeQL Action | Recommended CodeQL CLI Version | GitHub Environment |
|
||||||
|
|---------|----------|--------------|
|
||||||
|
| `v3` | default (do not pass a `tools` input) | GitHub.com |
|
||||||
|
| `3.22.12` | `2.15.5` | Enterprise Server 3.12 |
|
||||||
|
| `2.22.1` | `2.14.6` | Enterprise Server 3.11 |
|
||||||
|
| `2.20.3` | `2.13.5` | Enterprise Server 3.10 |
|
||||||
|
| `2.2.9` | `2.12.5` | Enterprise Server 3.9 |
|
||||||
|
|
||||||
|
CodeQL Action `v2` will stop receiving updates when GHES 3.11 is deprecated.
|
||||||
|
|
||||||
|
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).
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
Read about [troubleshooting code scanning](https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning).
|
Read about [troubleshooting code scanning](https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning).
|
||||||
|
|||||||
@@ -52,10 +52,10 @@ inputs:
|
|||||||
# If changing this, make sure to update workflow.ts accordingly.
|
# If changing this, make sure to update workflow.ts accordingly.
|
||||||
default: ${{ github.workspace }}
|
default: ${{ github.workspace }}
|
||||||
ref:
|
ref:
|
||||||
description: "The ref where results will be uploaded. If not provided, the Action will use the GITHUB_REF environment variable. If provided, the sha input must be provided as well. This input is not available in pull requests from forks."
|
description: "The ref where results will be uploaded. If not provided, the Action will use the GITHUB_REF environment variable. If provided, the sha input must be provided as well. This input is ignored for pull requests from forks."
|
||||||
required: false
|
required: false
|
||||||
sha:
|
sha:
|
||||||
description: "The sha of the HEAD of the ref where results will be uploaded. If not provided, the Action will use the GITHUB_SHA environment variable. If provided, the ref input must be provided as well. This input is not available in pull requests from forks."
|
description: "The sha of the HEAD of the ref where results will be uploaded. If not provided, the Action will use the GITHUB_SHA environment variable. If provided, the ref input must be provided as well. This input is ignored for pull requests from forks."
|
||||||
required: false
|
required: false
|
||||||
category:
|
category:
|
||||||
description: String used by Code Scanning for matching the analyses
|
description: String used by Code Scanning for matching the analyses
|
||||||
@@ -69,6 +69,8 @@ inputs:
|
|||||||
required: true
|
required: true
|
||||||
default: "true"
|
default: "true"
|
||||||
token:
|
token:
|
||||||
|
description: "GitHub token to use for authenticating with this instance of GitHub. The token needs the `security-events: write` permission."
|
||||||
|
required: false
|
||||||
default: ${{ github.token }}
|
default: ${{ github.token }}
|
||||||
matrix:
|
matrix:
|
||||||
default: ${{ toJson(matrix) }}
|
default: ${{ toJson(matrix) }}
|
||||||
@@ -84,6 +86,6 @@ outputs:
|
|||||||
sarif-id:
|
sarif-id:
|
||||||
description: The ID of the uploaded SARIF file.
|
description: The ID of the uploaded SARIF file.
|
||||||
runs:
|
runs:
|
||||||
using: node20
|
using: node16
|
||||||
main: "../lib/analyze-action.js"
|
main: "../lib/analyze-action.js"
|
||||||
post: "../lib/analyze-action-post.js"
|
post: "../lib/analyze-action-post.js"
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ description: 'Attempt to automatically build code'
|
|||||||
author: 'GitHub'
|
author: 'GitHub'
|
||||||
inputs:
|
inputs:
|
||||||
token:
|
token:
|
||||||
|
description: "GitHub token to use for authenticating with this instance of GitHub. The token needs the `security-events: write` permission."
|
||||||
|
required: false
|
||||||
default: ${{ github.token }}
|
default: ${{ github.token }}
|
||||||
matrix:
|
matrix:
|
||||||
default: ${{ toJson(matrix) }}
|
default: ${{ toJson(matrix) }}
|
||||||
@@ -13,5 +15,5 @@ inputs:
|
|||||||
$GITHUB_WORKSPACE as its working directory.
|
$GITHUB_WORKSPACE as its working directory.
|
||||||
required: false
|
required: false
|
||||||
runs:
|
runs:
|
||||||
using: node20
|
using: node16
|
||||||
main: '../lib/autobuild-action.js'
|
main: '../lib/autobuild-action.js'
|
||||||
|
|||||||
@@ -3,12 +3,44 @@ description: 'Set up CodeQL'
|
|||||||
author: 'GitHub'
|
author: 'GitHub'
|
||||||
inputs:
|
inputs:
|
||||||
tools:
|
tools:
|
||||||
description: URL of CodeQL tools
|
description: >-
|
||||||
|
By default, the Action will use the recommended version of the CodeQL
|
||||||
|
Bundle to analyze your project. You can override this choice using this
|
||||||
|
input. One of:
|
||||||
|
|
||||||
|
- A local path to a CodeQL Bundle tarball, or
|
||||||
|
- The URL of a CodeQL Bundle tarball GitHub release asset, or
|
||||||
|
- A special value `linked` which uses the version of the CodeQL tools
|
||||||
|
that the Action has been bundled with.
|
||||||
|
|
||||||
|
If not specified, the Action will check in several places until it finds
|
||||||
|
the CodeQL tools.
|
||||||
required: false
|
required: false
|
||||||
# If not specified the Action will check in several places until it finds the CodeQL tools.
|
|
||||||
languages:
|
languages:
|
||||||
description: |
|
description: >-
|
||||||
A comma-separated value of the languages to be analysed e.g. python,javascript
|
A comma-separated list of CodeQL languages to analyze.
|
||||||
|
|
||||||
|
Due to the performance benefit of parallelizing builds, we recommend specifying languages to
|
||||||
|
analyze using a matrix and providing `\$\{{ matrix.language }}` as this input.
|
||||||
|
|
||||||
|
For more information, see
|
||||||
|
https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#changing-the-languages-that-are-analyzed.
|
||||||
|
required: false
|
||||||
|
build-mode:
|
||||||
|
description: >-
|
||||||
|
The build mode that will be used to analyze the language. This input is only available when
|
||||||
|
analyzing a single CodeQL language per job, for example using a matrix.
|
||||||
|
|
||||||
|
Available build modes will differ based on the language being analyzed. One of:
|
||||||
|
|
||||||
|
- `none`: The database will be created without building the source code.
|
||||||
|
Available for all interpreted languages and some compiled languages.
|
||||||
|
- `autobuild`: The database will be created by attempting to automatically build the source
|
||||||
|
code. Available for all compiled languages.
|
||||||
|
- `manual`: The database will be created by building the source code using a manually
|
||||||
|
specified build command. To use this build mode, specify manual build steps in
|
||||||
|
your workflow between the `init` and `analyze` steps. Available for all
|
||||||
|
compiled languages.
|
||||||
required: false
|
required: false
|
||||||
token:
|
token:
|
||||||
description: GitHub token to use for authenticating with this instance of GitHub. To download custom packs from multiple registries, use the registries input.
|
description: GitHub token to use for authenticating with this instance of GitHub. To download custom packs from multiple registries, use the registries input.
|
||||||
@@ -53,7 +85,7 @@ inputs:
|
|||||||
required: false
|
required: false
|
||||||
packs:
|
packs:
|
||||||
description: >-
|
description: >-
|
||||||
[Experimental] 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
|
||||||
specified, then the latest version of the pack is used. By default, this overrides the same setting in a
|
specified, then the latest version of the pack is used. By default, this overrides the same setting in a
|
||||||
configuration file; prefix with "+" to use both sets of packs.
|
configuration file; prefix with "+" to use both sets of packs.
|
||||||
|
|
||||||
@@ -64,9 +96,8 @@ inputs:
|
|||||||
description: A token for fetching external config files and queries if they reside in a private repository in the same GitHub instance that is running this action.
|
description: A token for fetching external config files and queries if they reside in a private repository in the same GitHub instance that is running this action.
|
||||||
required: false
|
required: false
|
||||||
setup-python-dependencies:
|
setup-python-dependencies:
|
||||||
description: Try to auto-install your python dependencies
|
description: DEPRECATED. This option is ignored since CodeQL Action no longer installs Python dependencies as of versions 3.25.0 and 2.25.0.
|
||||||
required: true
|
required: false
|
||||||
default: 'true'
|
|
||||||
source-root:
|
source-root:
|
||||||
description: Path of the root source code directory, relative to $GITHUB_WORKSPACE.
|
description: Path of the root source code directory, relative to $GITHUB_WORKSPACE.
|
||||||
required: false
|
required: false
|
||||||
@@ -109,6 +140,6 @@ outputs:
|
|||||||
codeql-path:
|
codeql-path:
|
||||||
description: The path of the CodeQL binary used for analysis
|
description: The path of the CodeQL binary used for analysis
|
||||||
runs:
|
runs:
|
||||||
using: node20
|
using: node16
|
||||||
main: '../lib/init-action.js'
|
main: '../lib/init-action.js'
|
||||||
post: '../lib/init-action-post.js'
|
post: '../lib/init-action-post.js'
|
||||||
|
|||||||
27
lib/actions-util.js
generated
27
lib/actions-util.js
generated
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.getFileType = exports.getWorkflowRunAttempt = exports.getWorkflowRunID = exports.getUploadValue = exports.printDebugLogs = exports.isAnalyzingDefaultBranch = exports.getRelativeScriptPath = exports.isRunningLocalAction = exports.getWorkflowEventName = exports.getActionVersion = exports.getRef = exports.determineMergeBaseCommitOid = exports.getCommitOid = exports.getTemporaryDirectory = exports.getOptionalInput = exports.getRequiredInput = void 0;
|
exports.isSelfHostedRunner = exports.getFileType = exports.FileCmdNotFoundError = exports.getWorkflowRunAttempt = exports.getWorkflowRunID = exports.getUploadValue = exports.printDebugLogs = exports.isAnalyzingDefaultBranch = exports.getWorkflowEvent = exports.getRelativeScriptPath = exports.isRunningLocalAction = exports.getWorkflowEventName = exports.getActionVersion = exports.getRef = exports.determineMergeBaseCommitOid = exports.getCommitOid = exports.getTemporaryDirectory = exports.getOptionalInput = exports.getRequiredInput = void 0;
|
||||||
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"));
|
||||||
@@ -41,7 +41,7 @@ const pkg = require("../package.json");
|
|||||||
const getRequiredInput = function (name) {
|
const getRequiredInput = function (name) {
|
||||||
const value = core.getInput(name);
|
const value = core.getInput(name);
|
||||||
if (!value) {
|
if (!value) {
|
||||||
throw new util_1.UserError(`Input required and not supplied: ${name}`);
|
throw new util_1.ConfigurationError(`Input required and not supplied: ${name}`);
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
};
|
};
|
||||||
@@ -177,7 +177,7 @@ async function getRef() {
|
|||||||
const hasShaInput = !!shaInput;
|
const hasShaInput = !!shaInput;
|
||||||
// If one of 'ref' or 'sha' are provided, both are required
|
// If one of 'ref' or 'sha' are provided, both are required
|
||||||
if ((hasRefInput || hasShaInput) && !(hasRefInput && hasShaInput)) {
|
if ((hasRefInput || hasShaInput) && !(hasRefInput && hasShaInput)) {
|
||||||
throw new util_1.UserError("Both 'ref' and 'sha' are required if one of them is provided.");
|
throw new util_1.ConfigurationError("Both 'ref' and 'sha' are required if one of them is provided.");
|
||||||
}
|
}
|
||||||
const ref = refInput || getRefFromEnv();
|
const ref = refInput || getRefFromEnv();
|
||||||
const sha = shaInput || (0, util_1.getRequiredEnvParam)("GITHUB_SHA");
|
const sha = shaInput || (0, util_1.getRequiredEnvParam)("GITHUB_SHA");
|
||||||
@@ -275,6 +275,7 @@ function getWorkflowEvent() {
|
|||||||
throw new Error(`Unable to read workflow event JSON from ${eventJsonFile}: ${e}`);
|
throw new Error(`Unable to read workflow event JSON from ${eventJsonFile}: ${e}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
exports.getWorkflowEvent = getWorkflowEvent;
|
||||||
function removeRefsHeadsPrefix(ref) {
|
function removeRefsHeadsPrefix(ref) {
|
||||||
return ref.startsWith("refs/heads/") ? ref.slice("refs/heads/".length) : ref;
|
return ref.startsWith("refs/heads/") ? ref.slice("refs/heads/".length) : ref;
|
||||||
}
|
}
|
||||||
@@ -380,6 +381,13 @@ function getWorkflowRunAttempt() {
|
|||||||
return workflowRunAttempt;
|
return workflowRunAttempt;
|
||||||
}
|
}
|
||||||
exports.getWorkflowRunAttempt = getWorkflowRunAttempt;
|
exports.getWorkflowRunAttempt = getWorkflowRunAttempt;
|
||||||
|
class FileCmdNotFoundError extends Error {
|
||||||
|
constructor(msg) {
|
||||||
|
super(msg);
|
||||||
|
this.name = "FileCmdNotFoundError";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.FileCmdNotFoundError = FileCmdNotFoundError;
|
||||||
/**
|
/**
|
||||||
* Tries to obtain the output of the `file` command for the file at the specified path.
|
* Tries to obtain the output of the `file` command for the file at the specified path.
|
||||||
* The output will vary depending on the type of `file`, which operating system we are running on, etc.
|
* The output will vary depending on the type of `file`, which operating system we are running on, etc.
|
||||||
@@ -387,11 +395,18 @@ exports.getWorkflowRunAttempt = getWorkflowRunAttempt;
|
|||||||
const getFileType = async (filePath) => {
|
const getFileType = async (filePath) => {
|
||||||
let stderr = "";
|
let stderr = "";
|
||||||
let stdout = "";
|
let stdout = "";
|
||||||
|
let fileCmdPath;
|
||||||
|
try {
|
||||||
|
fileCmdPath = await safeWhich.safeWhich("file");
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
throw new FileCmdNotFoundError(`The \`file\` program is required, but does not appear to be installed. Please install it: ${e}`);
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
// The `file` command will output information about the type of file pointed at by `filePath`.
|
// The `file` command will output information about the type of file pointed at by `filePath`.
|
||||||
// For binary files, this may include e.g. whether they are static of dynamic binaries.
|
// For binary files, this may include e.g. whether they are static of dynamic binaries.
|
||||||
// The `-L` switch instructs the command to follow symbolic links.
|
// The `-L` switch instructs the command to follow symbolic links.
|
||||||
await new toolrunner.ToolRunner(await safeWhich.safeWhich("file"), ["-L", filePath], {
|
await new toolrunner.ToolRunner(fileCmdPath, ["-L", filePath], {
|
||||||
silent: true,
|
silent: true,
|
||||||
listeners: {
|
listeners: {
|
||||||
stdout: (data) => {
|
stdout: (data) => {
|
||||||
@@ -410,4 +425,8 @@ const getFileType = async (filePath) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
exports.getFileType = getFileType;
|
exports.getFileType = getFileType;
|
||||||
|
function isSelfHostedRunner() {
|
||||||
|
return process.env.RUNNER_ENVIRONMENT === "self-hosted";
|
||||||
|
}
|
||||||
|
exports.isSelfHostedRunner = isSelfHostedRunner;
|
||||||
//# sourceMappingURL=actions-util.js.map
|
//# sourceMappingURL=actions-util.js.map
|
||||||
File diff suppressed because one or more lines are too long
4
lib/actions-util.test.js
generated
4
lib/actions-util.test.js
generated
@@ -227,7 +227,9 @@ const util_1 = require("./util");
|
|||||||
const infoStub = sinon.stub(core, "info");
|
const infoStub = sinon.stub(core, "info");
|
||||||
process.env["GITHUB_EVENT_NAME"] = "pull_request";
|
process.env["GITHUB_EVENT_NAME"] = "pull_request";
|
||||||
process.env["GITHUB_SHA"] = "100912429fab4cb230e66ffb11e738ac5194e73a";
|
process.env["GITHUB_SHA"] = "100912429fab4cb230e66ffb11e738ac5194e73a";
|
||||||
await actionsUtil.determineMergeBaseCommitOid(path.join(__dirname, "../.."));
|
await (0, util_1.withTmpDir)(async (tmpDir) => {
|
||||||
|
await actionsUtil.determineMergeBaseCommitOid(tmpDir);
|
||||||
|
});
|
||||||
t.deepEqual(1, infoStub.callCount);
|
t.deepEqual(1, infoStub.callCount);
|
||||||
t.assert(infoStub.firstCall.args[0].startsWith("The checkout path provided to the action does not appear to be a git repository."));
|
t.assert(infoStub.firstCall.args[0].startsWith("The checkout path provided to the action does not appear to be a git repository."));
|
||||||
infoStub.restore();
|
infoStub.restore();
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
2
lib/analyze-action-env.test.js
generated
2
lib/analyze-action-env.test.js
generated
@@ -50,7 +50,7 @@ const util = __importStar(require("./util"));
|
|||||||
sinon
|
sinon
|
||||||
.stub(statusReport, "createStatusReportBase")
|
.stub(statusReport, "createStatusReportBase")
|
||||||
.resolves({});
|
.resolves({});
|
||||||
sinon.stub(statusReport, "sendStatusReport").resolves(true);
|
sinon.stub(statusReport, "sendStatusReport").resolves();
|
||||||
sinon.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(true);
|
sinon.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(true);
|
||||||
const gitHubVersion = {
|
const gitHubVersion = {
|
||||||
type: util.GitHubVariant.DOTCOM,
|
type: util.GitHubVariant.DOTCOM,
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"analyze-action-env.test.js","sourceRoot":"","sources":["../src/analyze-action-env.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAuB;AACvB,6CAA+B;AAE/B,4DAA8C;AAC9C,mDAAqC;AACrC,kDAAoC;AACpC,4DAA8C;AAC9C,8DAAgD;AAChD,mDAIyB;AACzB,6CAA+B;AAE/B,IAAA,0BAAU,EAAC,aAAI,CAAC,CAAC;AAEjB,4EAA4E;AAC5E,4EAA4E;AAC5E,+EAA+E;AAC/E,+EAA+E;AAC/E,gFAAgF;AAChF,iCAAiC;AAEjC,I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C5E,wEAAwE;QACxE,MAAM,aAAa,CAAC,UAAU,CAAC;QAE/B,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;QAC/D,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;QAC7D,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;QAC9D,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
||||||
2
lib/analyze-action-input.test.js
generated
2
lib/analyze-action-input.test.js
generated
@@ -50,7 +50,7 @@ const util = __importStar(require("./util"));
|
|||||||
sinon
|
sinon
|
||||||
.stub(statusReport, "createStatusReportBase")
|
.stub(statusReport, "createStatusReportBase")
|
||||||
.resolves({});
|
.resolves({});
|
||||||
sinon.stub(statusReport, "sendStatusReport").resolves(true);
|
sinon.stub(statusReport, "sendStatusReport").resolves();
|
||||||
const gitHubVersion = {
|
const gitHubVersion = {
|
||||||
type: util.GitHubVariant.DOTCOM,
|
type: util.GitHubVariant.DOTCOM,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"analyze-action-input.test.js","sourceRoot":"","sources":["../src/analyze-action-input.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAuB;AACvB,6CAA+B;AAE/B,4DAA8C;AAC9C,mDAAqC;AACrC,kDAAoC;AACpC,4DAA8C;AAC9C,8DAAgD;AAChD,mDAIyB;AACzB,6CAA+B;AAE/B,IAAA,0BAAU,EAAC,aAAI,CAAC,CAAC;AAEjB,4EAA4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AAC,CAAC;QACpD,iBAAiB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAElD,MAAM,eAAe,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;QAC3D,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QACzD,MAAM,aAAa,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;QAElD,uEAAuE;QACvE,oEAAoE;QACpE,4EAA4E;QAC5E,wEAAwE;QACxE,MAAM,aAAa,CAAC,UAAU,CAAC;QAE/B,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;QAC/D,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;QAC7D,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;QAC9D,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
||||||
4
lib/analyze-action-post.js
generated
4
lib/analyze-action-post.js
generated
@@ -31,10 +31,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||||||
const core = __importStar(require("@actions/core"));
|
const core = __importStar(require("@actions/core"));
|
||||||
const analyzeActionPostHelper = __importStar(require("./analyze-action-post-helper"));
|
const analyzeActionPostHelper = __importStar(require("./analyze-action-post-helper"));
|
||||||
const debugArtifacts = __importStar(require("./debug-artifacts"));
|
const debugArtifacts = __importStar(require("./debug-artifacts"));
|
||||||
|
const uploadSarifActionPostHelper = __importStar(require("./upload-sarif-action-post-helper"));
|
||||||
const util_1 = require("./util");
|
const util_1 = require("./util");
|
||||||
async function runWrapper() {
|
async function runWrapper() {
|
||||||
try {
|
try {
|
||||||
await analyzeActionPostHelper.run(debugArtifacts.uploadSarifDebugArtifact);
|
await analyzeActionPostHelper.run(debugArtifacts.uploadSarifDebugArtifact);
|
||||||
|
// Also run the upload-sarif post action since we're potentially running
|
||||||
|
// the same steps in the analyze action.
|
||||||
|
await uploadSarifActionPostHelper.uploadArtifacts(debugArtifacts.uploadDebugArtifacts);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
core.setFailed(`analyze post-action step failed: ${(0, util_1.wrapError)(error).message}`);
|
core.setFailed(`analyze post-action step failed: ${(0, util_1.wrapError)(error).message}`);
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"analyze-action-post.js","sourceRoot":"","sources":["../src/analyze-action-post.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,oDAAsC;AAEtC,sFAAwE;AACxE,kEAAoD;AACpD,iCAAmC;AAEnC,KAAK,UAAU,UAAU;IACvB,IAAI,CAAC;QACH,MAAM,uBAAuB,CAAC,GAAG,CAAC,cAAc,CAAC,wBAAwB,CAAC,CAAC;IAC7E,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,SAAS,CACZ,oCAAoC,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAC/D,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,oDAAsC;AAEtC,sFAAwE;AACxE,kEAAoD;AACpD,+FAAiF;AACjF,iCAAmC;AAEnC,KAAK,UAAU,UAAU;IACvB,IAAI,CAAC;QACH,MAAM,uBAAuB,CAAC,GAAG,CAAC,cAAc,CAAC,wBAAwB,CAAC,CAAC;QAE3E,wEAAwE;QACxE,wCAAwC;QACxC,MAAM,2BAA2B,CAAC,eAAe,CAC/C,cAAc,CAAC,oBAAoB,CACpC,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,SAAS,CACZ,oCAAoC,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAC/D,CAAC;IACJ,CAAC;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}
|
||||||
79
lib/analyze-action.js
generated
79
lib/analyze-action.js
generated
@@ -31,7 +31,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 safe_which_1 = require("@chrisgavin/safe-which");
|
|
||||||
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");
|
||||||
@@ -39,7 +38,6 @@ const autobuild_1 = require("./autobuild");
|
|||||||
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 database_upload_1 = require("./database-upload");
|
const database_upload_1 = require("./database-upload");
|
||||||
const diagnostics_1 = require("./diagnostics");
|
|
||||||
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");
|
||||||
@@ -50,14 +48,15 @@ const status_report_1 = require("./status-report");
|
|||||||
const trap_caching_1 = require("./trap-caching");
|
const trap_caching_1 = require("./trap-caching");
|
||||||
const uploadLib = __importStar(require("./upload-lib"));
|
const uploadLib = __importStar(require("./upload-lib"));
|
||||||
const util = __importStar(require("./util"));
|
const util = __importStar(require("./util"));
|
||||||
const util_1 = require("./util");
|
async function sendStatusReport(startedAt, config, stats, error, trapCacheUploadTime, dbCreationTimings, didUploadTrapCaches, trapCacheCleanup, logger) {
|
||||||
async function sendStatusReport(startedAt, config, stats, error, trapCacheUploadTime, dbCreationTimings, didUploadTrapCaches, logger) {
|
|
||||||
const status = (0, status_report_1.getActionsStatus)(error, stats?.analyze_failure_language);
|
const status = (0, status_report_1.getActionsStatus)(error, stats?.analyze_failure_language);
|
||||||
const statusReportBase = await (0, status_report_1.createStatusReportBase)("finish", status, startedAt, await util.checkDiskUsage(), error?.message, error?.stack);
|
const statusReportBase = await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.Analyze, status, startedAt, config, await util.checkDiskUsage(), logger, error?.message, error?.stack);
|
||||||
|
if (statusReportBase !== undefined) {
|
||||||
const report = {
|
const report = {
|
||||||
...statusReportBase,
|
...statusReportBase,
|
||||||
...(stats || {}),
|
...(stats || {}),
|
||||||
...(dbCreationTimings || {}),
|
...(dbCreationTimings || {}),
|
||||||
|
...(trapCacheCleanup || {}),
|
||||||
};
|
};
|
||||||
if (config && didUploadTrapCaches) {
|
if (config && didUploadTrapCaches) {
|
||||||
const trapCacheUploadStatusReport = {
|
const trapCacheUploadStatusReport = {
|
||||||
@@ -70,6 +69,7 @@ async function sendStatusReport(startedAt, config, stats, error, trapCacheUpload
|
|||||||
else {
|
else {
|
||||||
await statusReport.sendStatusReport(report);
|
await statusReport.sendStatusReport(report);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// `expect-error` should only be set to a non-false value by the CodeQL Action PR checks.
|
// `expect-error` should only be set to a non-false value by the CodeQL Action PR checks.
|
||||||
function hasBadExpectErrorInput() {
|
function hasBadExpectErrorInput() {
|
||||||
@@ -108,10 +108,14 @@ function doesGoExtractionOutputExist(config) {
|
|||||||
* - We approximate whether manual build steps are present by looking at
|
* - We approximate whether manual build steps are present by looking at
|
||||||
* 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, features, logger) {
|
||||||
if (!config.languages.includes(languages_1.Language.go)) {
|
if (!config.languages.includes(languages_1.Language.go)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (config.buildMode) {
|
||||||
|
logger.debug("Skipping legacy Go autobuild since a build mode has been specified.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (process.env[environment_1.EnvVar.DID_AUTOBUILD_GOLANG] === "true") {
|
if (process.env[environment_1.EnvVar.DID_AUTOBUILD_GOLANG] === "true") {
|
||||||
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;
|
||||||
@@ -131,61 +135,43 @@ 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)(languages_1.Language.go, config, logger);
|
await (0, autobuild_1.runAutobuild)(config, languages_1.Language.go, features, logger);
|
||||||
}
|
}
|
||||||
async function run() {
|
async function run() {
|
||||||
const startedAt = new Date();
|
const startedAt = new Date();
|
||||||
let uploadResult = undefined;
|
let uploadResult = undefined;
|
||||||
let runStats = undefined;
|
let runStats = undefined;
|
||||||
let config = undefined;
|
let config = undefined;
|
||||||
|
let trapCacheCleanupTelemetry = undefined;
|
||||||
let trapCacheUploadTime = undefined;
|
let trapCacheUploadTime = undefined;
|
||||||
let dbCreationTimings = undefined;
|
let dbCreationTimings = undefined;
|
||||||
let didUploadTrapCaches = false;
|
let didUploadTrapCaches = false;
|
||||||
util.initializeEnvironment(actionsUtil.getActionVersion());
|
util.initializeEnvironment(actionsUtil.getActionVersion());
|
||||||
const logger = (0, logging_1.getActionsLogger)();
|
const logger = (0, logging_1.getActionsLogger)();
|
||||||
try {
|
try {
|
||||||
if (!(await statusReport.sendStatusReport(await (0, status_report_1.createStatusReportBase)("finish", "starting", startedAt, await util.checkDiskUsage(logger))))) {
|
const statusReportBase = await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.Analyze, "starting", startedAt, config, await util.checkDiskUsage(logger), logger);
|
||||||
return;
|
if (statusReportBase !== undefined) {
|
||||||
|
await statusReport.sendStatusReport(statusReportBase);
|
||||||
}
|
}
|
||||||
config = await (0, config_utils_1.getConfig)(actionsUtil.getTemporaryDirectory(), logger);
|
config = await (0, config_utils_1.getConfig)(actionsUtil.getTemporaryDirectory(), logger);
|
||||||
if (config === undefined) {
|
if (config === undefined) {
|
||||||
throw new Error("Config file could not be found at expected location. Has the 'init' action been called?");
|
throw new Error("Config file could not be found at expected location. Has the 'init' action been called?");
|
||||||
}
|
}
|
||||||
|
const codeql = await (0, codeql_1.getCodeQL)(config.codeQLCmd);
|
||||||
if (hasBadExpectErrorInput()) {
|
if (hasBadExpectErrorInput()) {
|
||||||
throw new util.UserError("`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.");
|
||||||
}
|
}
|
||||||
const apiDetails = (0, api_client_1.getApiDetails)();
|
const apiDetails = (0, api_client_1.getApiDetails)();
|
||||||
const outputDir = actionsUtil.getRequiredInput("output");
|
const outputDir = actionsUtil.getRequiredInput("output");
|
||||||
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.parseRepositoryNwo)(util.getRequiredEnvParam("GITHUB_REPOSITORY"));
|
||||||
const gitHubVersion = await (0, api_client_1.getGitHubVersion)();
|
const gitHubVersion = await (0, api_client_1.getGitHubVersion)();
|
||||||
|
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);
|
||||||
// Check that `which go` still points at the same path it did when the `init` Action ran to ensure that no steps
|
await (0, analyze_1.warnIfGoInstalledAfterInit)(config, logger);
|
||||||
// in-between performed any setup. We encourage users to perform all setup tasks before initializing CodeQL so that
|
await runAutobuildIfLegacyGoWorkflow(config, features, logger);
|
||||||
// the setup tasks do not interfere with our analysis.
|
dbCreationTimings = await (0, analyze_1.runFinalize)(outputDir, threads, memory, codeql, config, features, logger);
|
||||||
// Furthermore, if we installed a wrapper script in the `init` Action, we need to ensure that there isn't a step
|
|
||||||
// in the workflow after the `init` step which installs a different version of Go and takes precedence in the PATH,
|
|
||||||
// thus potentially circumventing our workaround that allows tracing to work.
|
|
||||||
const goInitPath = process.env[environment_1.EnvVar.GO_BINARY_LOCATION];
|
|
||||||
if (process.env[environment_1.EnvVar.DID_AUTOBUILD_GOLANG] !== "true" &&
|
|
||||||
goInitPath !== undefined) {
|
|
||||||
const goBinaryPath = await (0, safe_which_1.safeWhich)("go");
|
|
||||||
if (goInitPath !== goBinaryPath) {
|
|
||||||
core.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", {
|
|
||||||
markdownMessage: "To avoid interfering with the CodeQL analysis, perform all installation steps before calling the `github/codeql-action/init` Action.",
|
|
||||||
visibility: {
|
|
||||||
statusPage: true,
|
|
||||||
telemetry: true,
|
|
||||||
cliSummaryTable: true,
|
|
||||||
},
|
|
||||||
severity: "warning",
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
await runAutobuildIfLegacyGoWorkflow(config, logger);
|
|
||||||
dbCreationTimings = await (0, analyze_1.runFinalize)(outputDir, threads, memory, config, logger, features);
|
|
||||||
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, actionsUtil.getOptionalInput("category"), config, logger, features);
|
runStats = await (0, analyze_1.runQueries)(outputDir, memory, util.getAddSnippetsFlag(actionsUtil.getRequiredInput("add-snippets")), threads, actionsUtil.getOptionalInput("category"), config, logger, features);
|
||||||
}
|
}
|
||||||
@@ -200,7 +186,7 @@ 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.uploadFromActions(outputDir, actionsUtil.getRequiredInput("checkout_path"), actionsUtil.getOptionalInput("category"), logger, { considerInvalidRequestUserError: false });
|
uploadResult = await uploadLib.uploadFromActions(outputDir, actionsUtil.getRequiredInput("checkout_path"), actionsUtil.getOptionalInput("category"), logger);
|
||||||
core.setOutput("sarif-id", uploadResult.sarifID);
|
core.setOutput("sarif-id", uploadResult.sarifID);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -210,12 +196,13 @@ async function run() {
|
|||||||
await (0, database_upload_1.uploadDatabases)(repositoryNwo, config, apiDetails, logger);
|
await (0, database_upload_1.uploadDatabases)(repositoryNwo, 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();
|
||||||
const codeql = await (0, codeql_1.getCodeQL)(config.codeQLCmd);
|
|
||||||
didUploadTrapCaches = await (0, trap_caching_1.uploadTrapCaches)(codeql, config, logger);
|
didUploadTrapCaches = await (0, trap_caching_1.uploadTrapCaches)(codeql, config, logger);
|
||||||
trapCacheUploadTime = perf_hooks_1.performance.now() - trapCacheUploadStartTime;
|
trapCacheUploadTime = perf_hooks_1.performance.now() - trapCacheUploadStartTime;
|
||||||
|
// Clean up TRAP caches
|
||||||
|
trapCacheCleanupTelemetry = await (0, trap_caching_1.cleanupTrapCaches)(config, features, logger);
|
||||||
// We don't upload results in test mode, so don't wait for processing
|
// We don't upload results in test mode, so don't wait for processing
|
||||||
if (util.isInTestMode()) {
|
if (util.isInTestMode()) {
|
||||||
core.debug("In test mode. Waiting for processing is disabled.");
|
logger.debug("In test mode. Waiting for processing is disabled.");
|
||||||
}
|
}
|
||||||
else if (uploadResult !== undefined &&
|
else if (uploadResult !== undefined &&
|
||||||
actionsUtil.getRequiredInput("wait-for-processing") === "true") {
|
actionsUtil.getRequiredInput("wait-for-processing") === "true") {
|
||||||
@@ -228,17 +215,17 @@ async function run() {
|
|||||||
core.exportVariable(environment_1.EnvVar.ANALYZE_DID_COMPLETE_SUCCESSFULLY, "true");
|
core.exportVariable(environment_1.EnvVar.ANALYZE_DID_COMPLETE_SUCCESSFULLY, "true");
|
||||||
}
|
}
|
||||||
catch (unwrappedError) {
|
catch (unwrappedError) {
|
||||||
const error = (0, util_1.wrapError)(unwrappedError);
|
const error = util.wrapError(unwrappedError);
|
||||||
if (actionsUtil.getOptionalInput("expect-error") !== "true" ||
|
if (actionsUtil.getOptionalInput("expect-error") !== "true" ||
|
||||||
hasBadExpectErrorInput()) {
|
hasBadExpectErrorInput()) {
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
}
|
}
|
||||||
if (error instanceof analyze_1.CodeQLAnalysisError) {
|
if (error instanceof analyze_1.CodeQLAnalysisError) {
|
||||||
const stats = { ...error.queriesStatusReport };
|
const stats = { ...error.queriesStatusReport };
|
||||||
await sendStatusReport(startedAt, config, stats, error, trapCacheUploadTime, dbCreationTimings, didUploadTrapCaches, logger);
|
await sendStatusReport(startedAt, config, stats, error, trapCacheUploadTime, dbCreationTimings, didUploadTrapCaches, trapCacheCleanupTelemetry, logger);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
await sendStatusReport(startedAt, config, undefined, error, trapCacheUploadTime, dbCreationTimings, didUploadTrapCaches, logger);
|
await sendStatusReport(startedAt, config, undefined, error, trapCacheUploadTime, dbCreationTimings, didUploadTrapCaches, trapCacheCleanupTelemetry, logger);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -246,13 +233,13 @@ async function run() {
|
|||||||
await sendStatusReport(startedAt, config, {
|
await sendStatusReport(startedAt, config, {
|
||||||
...runStats,
|
...runStats,
|
||||||
...uploadResult.statusReport,
|
...uploadResult.statusReport,
|
||||||
}, undefined, trapCacheUploadTime, dbCreationTimings, didUploadTrapCaches, logger);
|
}, undefined, trapCacheUploadTime, dbCreationTimings, didUploadTrapCaches, trapCacheCleanupTelemetry, logger);
|
||||||
}
|
}
|
||||||
else if (runStats) {
|
else if (runStats) {
|
||||||
await sendStatusReport(startedAt, config, { ...runStats }, undefined, trapCacheUploadTime, dbCreationTimings, didUploadTrapCaches, logger);
|
await sendStatusReport(startedAt, config, { ...runStats }, undefined, trapCacheUploadTime, dbCreationTimings, didUploadTrapCaches, trapCacheCleanupTelemetry, logger);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
await sendStatusReport(startedAt, config, undefined, undefined, trapCacheUploadTime, dbCreationTimings, didUploadTrapCaches, logger);
|
await sendStatusReport(startedAt, config, undefined, undefined, trapCacheUploadTime, dbCreationTimings, didUploadTrapCaches, trapCacheCleanupTelemetry, logger);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports.runPromise = run();
|
exports.runPromise = run();
|
||||||
@@ -261,9 +248,9 @@ async function runWrapper() {
|
|||||||
await exports.runPromise;
|
await exports.runPromise;
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
core.setFailed(`analyze action failed: ${(0, util_1.wrapError)(error).message}`);
|
core.setFailed(`analyze action failed: ${util.wrapError(error).message}`);
|
||||||
}
|
}
|
||||||
await (0, util_1.checkForTimeout)();
|
await util.checkForTimeout();
|
||||||
}
|
}
|
||||||
void runWrapper();
|
void runWrapper();
|
||||||
//# sourceMappingURL=analyze-action.js.map
|
//# sourceMappingURL=analyze-action.js.map
|
||||||
File diff suppressed because one or more lines are too long
112
lib/analyze.js
generated
112
lib/analyze.js
generated
@@ -26,19 +26,24 @@ 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.runCleanup = exports.runFinalize = exports.runQueries = exports.dbIsFinalized = exports.createdDBForScannedLanguages = exports.CodeQLAnalysisError = void 0;
|
exports.runCleanup = exports.warnIfGoInstalledAfterInit = exports.runFinalize = exports.runQueries = exports.dbIsFinalized = exports.runExtraction = exports.CodeQLAnalysisError = void 0;
|
||||||
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 toolrunner = __importStar(require("@actions/exec/lib/toolrunner"));
|
const safe_which_1 = require("@chrisgavin/safe-which");
|
||||||
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 autobuild_1 = require("./autobuild");
|
||||||
const codeql_1 = require("./codeql");
|
const codeql_1 = require("./codeql");
|
||||||
|
const diagnostics_1 = require("./diagnostics");
|
||||||
|
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 tools_features_1 = require("./tools-features");
|
||||||
const tracer_config_1 = require("./tracer-config");
|
const tracer_config_1 = require("./tracer-config");
|
||||||
const upload_lib_1 = require("./upload-lib");
|
const upload_lib_1 = require("./upload-lib");
|
||||||
const util = __importStar(require("./util"));
|
const util = __importStar(require("./util"));
|
||||||
|
const util_1 = require("./util");
|
||||||
class CodeQLAnalysisError extends Error {
|
class CodeQLAnalysisError extends Error {
|
||||||
constructor(queriesStatusReport, message) {
|
constructor(queriesStatusReport, message) {
|
||||||
super(message);
|
super(message);
|
||||||
@@ -47,48 +52,49 @@ class CodeQLAnalysisError extends Error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports.CodeQLAnalysisError = CodeQLAnalysisError;
|
exports.CodeQLAnalysisError = CodeQLAnalysisError;
|
||||||
async function setupPythonExtractor(logger, features, codeql) {
|
async function setupPythonExtractor(logger) {
|
||||||
const codeqlPython = process.env["CODEQL_PYTHON"];
|
const codeqlPython = process.env["CODEQL_PYTHON"];
|
||||||
if (codeqlPython === undefined || codeqlPython.length === 0) {
|
if (codeqlPython === undefined || codeqlPython.length === 0) {
|
||||||
// If CODEQL_PYTHON is not set, no dependencies were installed, so we don't need to do anything
|
// If CODEQL_PYTHON is not set, no dependencies were installed, so we don't need to do anything
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (await (0, feature_flags_1.isPythonDependencyInstallationDisabled)(codeql, features)) {
|
logger.warning("The CODEQL_PYTHON environment variable is no longer supported. Please remove it from your workflow. This environment variable was originally used to specify a Python executable that included the dependencies of your Python code, however Python analysis no longer uses these dependencies." +
|
||||||
logger.warning("We recommend that you remove the CODEQL_PYTHON environment variable from your workflow. This environment variable was originally used to specify a Python executable that included the dependencies of your Python code, however Python analysis no longer uses these dependencies." +
|
|
||||||
"\nIf you used CODEQL_PYTHON to force the version of Python to analyze as, please use CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION instead, such as 'CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION=2.7' or 'CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION=3.11'.");
|
"\nIf you used CODEQL_PYTHON to force the version of Python to analyze as, please use CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION instead, such as 'CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION=2.7' or 'CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION=3.11'.");
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
const scriptsFolder = path.resolve(__dirname, "../python-setup");
|
|
||||||
let output = "";
|
|
||||||
const options = {
|
|
||||||
listeners: {
|
|
||||||
stdout: (data) => {
|
|
||||||
output += data.toString();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
await new toolrunner.ToolRunner(codeqlPython, [path.join(scriptsFolder, "find_site_packages.py")], options).exec();
|
|
||||||
logger.info(`Setting LGTM_INDEX_IMPORT_PATH=${output}`);
|
|
||||||
process.env["LGTM_INDEX_IMPORT_PATH"] = output;
|
|
||||||
output = "";
|
|
||||||
await new toolrunner.ToolRunner(codeqlPython, ["-c", "import sys; print(sys.version_info[0])"], options).exec();
|
|
||||||
logger.info(`Setting LGTM_PYTHON_SETUP_VERSION=${output}`);
|
|
||||||
process.env["LGTM_PYTHON_SETUP_VERSION"] = output;
|
|
||||||
}
|
}
|
||||||
async function createdDBForScannedLanguages(codeql, config, logger, features) {
|
async function runExtraction(codeql, config, logger) {
|
||||||
for (const language of config.languages) {
|
for (const language of config.languages) {
|
||||||
if ((0, languages_1.isScannedLanguage)(language) &&
|
if (dbIsFinalized(config, language, logger)) {
|
||||||
!dbIsFinalized(config, language, logger)) {
|
logger.debug(`Database for ${language} has already been finalized, skipping extraction.`);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (shouldExtractLanguage(config, language)) {
|
||||||
logger.startGroup(`Extracting ${language}`);
|
logger.startGroup(`Extracting ${language}`);
|
||||||
if (language === languages_1.Language.python) {
|
if (language === languages_1.Language.python) {
|
||||||
await setupPythonExtractor(logger, features, codeql);
|
await setupPythonExtractor(logger);
|
||||||
}
|
}
|
||||||
|
if (config.buildMode &&
|
||||||
|
(await codeql.supportsFeature(tools_features_1.ToolsFeature.TraceCommandUseBuildMode))) {
|
||||||
|
if (language === languages_1.Language.cpp &&
|
||||||
|
config.buildMode === util_1.BuildMode.Autobuild) {
|
||||||
|
await (0, autobuild_1.setupCppAutobuild)(codeql, logger);
|
||||||
|
}
|
||||||
|
await codeql.extractUsingBuildMode(config, language);
|
||||||
|
}
|
||||||
|
else {
|
||||||
await codeql.extractScannedLanguage(config, language);
|
await codeql.extractScannedLanguage(config, language);
|
||||||
|
}
|
||||||
logger.endGroup();
|
logger.endGroup();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports.createdDBForScannedLanguages = createdDBForScannedLanguages;
|
exports.runExtraction = runExtraction;
|
||||||
|
function shouldExtractLanguage(config, language) {
|
||||||
|
return (config.buildMode === util_1.BuildMode.None ||
|
||||||
|
(config.buildMode === util_1.BuildMode.Autobuild &&
|
||||||
|
process.env[environment_1.EnvVar.AUTOBUILD_DID_COMPLETE_SUCCESSFULLY] !== "true") ||
|
||||||
|
(!config.buildMode && (0, languages_1.isScannedLanguage)(language)));
|
||||||
|
}
|
||||||
function dbIsFinalized(config, language, logger) {
|
function dbIsFinalized(config, language, logger) {
|
||||||
const dbPath = util.getCodeQLDatabasePath(config, language);
|
const dbPath = util.getCodeQLDatabasePath(config, language);
|
||||||
try {
|
try {
|
||||||
@@ -101,10 +107,9 @@ function dbIsFinalized(config, language, logger) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports.dbIsFinalized = dbIsFinalized;
|
exports.dbIsFinalized = dbIsFinalized;
|
||||||
async function finalizeDatabaseCreation(config, threadsFlag, memoryFlag, logger, features) {
|
async function finalizeDatabaseCreation(codeql, config, threadsFlag, memoryFlag, logger) {
|
||||||
const codeql = await (0, codeql_1.getCodeQL)(config.codeQLCmd);
|
|
||||||
const extractionStart = perf_hooks_1.performance.now();
|
const extractionStart = perf_hooks_1.performance.now();
|
||||||
await createdDBForScannedLanguages(codeql, config, logger, features);
|
await runExtraction(codeql, config, logger);
|
||||||
const extractionTime = perf_hooks_1.performance.now() - extractionStart;
|
const extractionTime = perf_hooks_1.performance.now() - extractionStart;
|
||||||
const trapImportStart = perf_hooks_1.performance.now();
|
const trapImportStart = perf_hooks_1.performance.now();
|
||||||
for (const language of config.languages) {
|
for (const language of config.languages) {
|
||||||
@@ -113,7 +118,7 @@ async function finalizeDatabaseCreation(config, threadsFlag, memoryFlag, logger,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logger.startGroup(`Finalizing ${language}`);
|
logger.startGroup(`Finalizing ${language}`);
|
||||||
await codeql.finalizeDatabase(util.getCodeQLDatabasePath(config, language), threadsFlag, memoryFlag);
|
await codeql.finalizeDatabase(util.getCodeQLDatabasePath(config, language), threadsFlag, memoryFlag, config.debugMode);
|
||||||
logger.endGroup();
|
logger.endGroup();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -138,7 +143,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, features);
|
await codeql.databaseRunQueries(databasePath, queryFlags);
|
||||||
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.
|
||||||
@@ -169,7 +174,7 @@ async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag,
|
|||||||
}
|
}
|
||||||
statusReport["event_reports"].push(perQueryAlertCountEventReport);
|
statusReport["event_reports"].push(perQueryAlertCountEventReport);
|
||||||
}
|
}
|
||||||
if (!(await util.codeQlVersionAbove(codeql, codeql_1.CODEQL_VERSION_ANALYSIS_SUMMARY_V2))) {
|
if (!(await util.codeQlVersionAtLeast(codeql, codeql_1.CODEQL_VERSION_ANALYSIS_SUMMARY_V2))) {
|
||||||
await runPrintLinesOfCode(language);
|
await runPrintLinesOfCode(language);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -209,7 +214,7 @@ async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports.runQueries = runQueries;
|
exports.runQueries = runQueries;
|
||||||
async function runFinalize(outputDir, threadsFlag, memoryFlag, config, logger, features) {
|
async function runFinalize(outputDir, threadsFlag, memoryFlag, codeql, config, features, logger) {
|
||||||
try {
|
try {
|
||||||
await (0, del_1.default)(outputDir, { force: true });
|
await (0, del_1.default)(outputDir, { force: true });
|
||||||
}
|
}
|
||||||
@@ -219,17 +224,40 @@ async function runFinalize(outputDir, threadsFlag, memoryFlag, config, logger, f
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
await fs.promises.mkdir(outputDir, { recursive: true });
|
await fs.promises.mkdir(outputDir, { recursive: true });
|
||||||
const timings = await finalizeDatabaseCreation(config, threadsFlag, memoryFlag, logger, features);
|
const timings = await finalizeDatabaseCreation(codeql, config, threadsFlag, memoryFlag, logger);
|
||||||
// WARNING: This does not _really_ end tracing, as the tracer will restore its
|
// If we didn't already end tracing in the autobuild Action, end it now.
|
||||||
// critical environment variables and it'll still be active for all processes
|
if (process.env[environment_1.EnvVar.AUTOBUILD_DID_COMPLETE_SUCCESSFULLY] !== "true") {
|
||||||
// launched from this build step.
|
await (0, tracer_config_1.endTracingForCluster)(codeql, config, logger, features);
|
||||||
// However, it will stop tracing for all steps past the codeql-action/analyze
|
}
|
||||||
// step.
|
|
||||||
// Delete variables as specified by the end-tracing script
|
|
||||||
await (0, tracer_config_1.endTracingForCluster)(config);
|
|
||||||
return timings;
|
return timings;
|
||||||
}
|
}
|
||||||
exports.runFinalize = runFinalize;
|
exports.runFinalize = runFinalize;
|
||||||
|
async function warnIfGoInstalledAfterInit(config, logger) {
|
||||||
|
// Check that `which go` still points at the same path it did when the `init` Action ran to ensure that no steps
|
||||||
|
// in-between performed any setup. We encourage users to perform all setup tasks before initializing CodeQL so that
|
||||||
|
// the setup tasks do not interfere with our analysis.
|
||||||
|
// Furthermore, if we installed a wrapper script in the `init` Action, we need to ensure that there isn't a step
|
||||||
|
// in the workflow after the `init` step which installs a different version of Go and takes precedence in the PATH,
|
||||||
|
// thus potentially circumventing our workaround that allows tracing to work.
|
||||||
|
const goInitPath = process.env[environment_1.EnvVar.GO_BINARY_LOCATION];
|
||||||
|
if (process.env[environment_1.EnvVar.DID_AUTOBUILD_GOLANG] !== "true" &&
|
||||||
|
goInitPath !== undefined) {
|
||||||
|
const goBinaryPath = await (0, safe_which_1.safeWhich)("go");
|
||||||
|
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.`);
|
||||||
|
(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", {
|
||||||
|
markdownMessage: "To avoid interfering with the CodeQL analysis, perform all installation steps before calling the `github/codeql-action/init` Action.",
|
||||||
|
visibility: {
|
||||||
|
statusPage: true,
|
||||||
|
telemetry: true,
|
||||||
|
cliSummaryTable: true,
|
||||||
|
},
|
||||||
|
severity: "warning",
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.warnIfGoInstalledAfterInit = warnIfGoInstalledAfterInit;
|
||||||
async function runCleanup(config, cleanupLevel, logger) {
|
async function runCleanup(config, cleanupLevel, logger) {
|
||||||
logger.startGroup("Cleaning up databases");
|
logger.startGroup("Cleaning up databases");
|
||||||
for (const language of config.languages) {
|
for (const language of config.languages) {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
18
lib/analyze.test.js
generated
18
lib/analyze.test.js
generated
@@ -95,25 +95,11 @@ const util = __importStar(require("./util"));
|
|||||||
},
|
},
|
||||||
databasePrintBaseline: async () => "",
|
databasePrintBaseline: async () => "",
|
||||||
});
|
});
|
||||||
const config = {
|
const config = (0, testing_utils_1.createTestConfig)({
|
||||||
languages: [language],
|
languages: [language],
|
||||||
originalUserInput: {},
|
|
||||||
tempDir: tmpDir,
|
tempDir: tmpDir,
|
||||||
codeQLCmd: "",
|
|
||||||
gitHubVersion: {
|
|
||||||
type: util.GitHubVariant.DOTCOM,
|
|
||||||
},
|
|
||||||
dbLocation: path.resolve(tmpDir, "codeql_databases"),
|
dbLocation: path.resolve(tmpDir, "codeql_databases"),
|
||||||
debugMode: false,
|
});
|
||||||
debugArtifactName: util.DEFAULT_DEBUG_ARTIFACT_NAME,
|
|
||||||
debugDatabaseName: util.DEFAULT_DEBUG_DATABASE_NAME,
|
|
||||||
augmentationProperties: {
|
|
||||||
packsInputCombines: false,
|
|
||||||
queriesInputCombines: false,
|
|
||||||
},
|
|
||||||
trapCaches: {},
|
|
||||||
trapCacheDownloadTime: 0,
|
|
||||||
};
|
|
||||||
fs.mkdirSync(util.getCodeQLDatabasePath(config, language), {
|
fs.mkdirSync(util.getCodeQLDatabasePath(config, language), {
|
||||||
recursive: true,
|
recursive: true,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"analyze.test.js","sourceRoot":"","sources":["../src/analyze.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,8CAAuB;AACvB,6CAA+B;AAE/B,uCAAuC;AACvC,qCAAqC;AAErC,mDAA0C;AAC1C,2CAAuC;AACvC,uCAA4C;AAC5C,mDAA+E;AAC/E,wDAA0C;AAC1C,6CAA+B;AAE/B,IAAA,0BAAU,EAAC,aAAI,CAAC,CAAC;AAEjB;;;;;GAKG;AACH,IAAA,aAAI,EAAC,sBAAsB,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IACvC,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;QAC5C,IAAA,gCAAgB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAEjC,MAAM,UAAU,GAAG,EAAE,CAAC;QACtB,MAAM,eAAe,GAAG,EAAE,CAAC;QAC3B,MAAM,WAAW,GAAG,EAAE,CAAC;QACvB,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,yBAAyB,CAAC,CAAC;QAEjD,KAAK,MA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W,CAAC,UAAW,CAAC,CAAC;YACnD,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
||||||
35
lib/api-client.js
generated
35
lib/api-client.js
generated
@@ -26,12 +26,13 @@ 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.computeAutomationID = exports.getAutomationID = exports.getAnalysisKey = exports.getWorkflowRelativePath = exports.getGitHubVersion = exports.getGitHubVersionFromApi = exports.getApiClientWithExternalAuth = exports.getApiClient = exports.getApiDetails = exports.DisallowedAPIVersionReason = void 0;
|
exports.wrapApiConfigurationError = exports.deleteActionsCache = exports.listActionsCaches = exports.computeAutomationID = exports.getAutomationID = exports.getAnalysisKey = exports.getWorkflowRelativePath = exports.getGitHubVersion = exports.getGitHubVersionFromApi = exports.getApiClientWithExternalAuth = exports.getApiClient = exports.getApiDetails = exports.DisallowedAPIVersionReason = void 0;
|
||||||
const core = __importStar(require("@actions/core"));
|
const core = __importStar(require("@actions/core"));
|
||||||
const githubUtils = __importStar(require("@actions/github/lib/utils"));
|
const githubUtils = __importStar(require("@actions/github/lib/utils"));
|
||||||
const retry = __importStar(require("@octokit/plugin-retry"));
|
const retry = __importStar(require("@octokit/plugin-retry"));
|
||||||
const console_log_level_1 = __importDefault(require("console-log-level"));
|
const console_log_level_1 = __importDefault(require("console-log-level"));
|
||||||
const actions_util_1 = require("./actions-util");
|
const actions_util_1 = require("./actions-util");
|
||||||
|
const repository_1 = require("./repository");
|
||||||
const util_1 = require("./util");
|
const util_1 = require("./util");
|
||||||
const GITHUB_ENTERPRISE_VERSION_HEADER = "x-github-enterprise-version";
|
const GITHUB_ENTERPRISE_VERSION_HEADER = "x-github-enterprise-version";
|
||||||
var DisallowedAPIVersionReason;
|
var DisallowedAPIVersionReason;
|
||||||
@@ -163,4 +164,36 @@ function computeAutomationID(analysis_key, environment) {
|
|||||||
return automationID;
|
return automationID;
|
||||||
}
|
}
|
||||||
exports.computeAutomationID = computeAutomationID;
|
exports.computeAutomationID = computeAutomationID;
|
||||||
|
/** List all Actions cache entries matching the provided key and ref. */
|
||||||
|
async function listActionsCaches(key, ref) {
|
||||||
|
const repositoryNwo = (0, repository_1.parseRepositoryNwo)((0, util_1.getRequiredEnvParam)("GITHUB_REPOSITORY"));
|
||||||
|
return await getApiClient().paginate("GET /repos/{owner}/{repo}/actions/caches", {
|
||||||
|
owner: repositoryNwo.owner,
|
||||||
|
repo: repositoryNwo.repo,
|
||||||
|
key,
|
||||||
|
ref,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
exports.listActionsCaches = listActionsCaches;
|
||||||
|
/** Delete an Actions cache item by its ID. */
|
||||||
|
async function deleteActionsCache(id) {
|
||||||
|
const repositoryNwo = (0, repository_1.parseRepositoryNwo)((0, util_1.getRequiredEnvParam)("GITHUB_REPOSITORY"));
|
||||||
|
await getApiClient().rest.actions.deleteActionsCacheById({
|
||||||
|
owner: repositoryNwo.owner,
|
||||||
|
repo: repositoryNwo.repo,
|
||||||
|
cache_id: id,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
exports.deleteActionsCache = deleteActionsCache;
|
||||||
|
function wrapApiConfigurationError(e) {
|
||||||
|
if ((0, util_1.isHTTPError)(e)) {
|
||||||
|
if (e.message.includes("API rate limit exceeded for site ID installation") ||
|
||||||
|
e.message.includes("commit not found") ||
|
||||||
|
/^ref .* not found in this repository$/.test(e.message)) {
|
||||||
|
return new util_1.ConfigurationError(e.message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return e;
|
||||||
|
}
|
||||||
|
exports.wrapApiConfigurationError = wrapApiConfigurationError;
|
||||||
//# sourceMappingURL=api-client.js.map
|
//# sourceMappingURL=api-client.js.map
|
||||||
@@ -1 +1 @@
|
|||||||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KACb,CAAC,CAAC;AACL,CAAC;AAVD,gDAUC;AAED,SAAgB,yBAAyB,CAAC,CAAU;IAClD,IAAI,IAAA,kBAAW,EAAC,CAAC,CAAC,EAAE,CAAC;QACnB,IACE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,kDAAkD,CAAC;YACtE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAC;YACtC,uCAAuC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,EACvD,CAAC;YACD,OAAO,IAAI,yBAAkB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAXD,8DAWC"}
|
||||||
@@ -1 +1 @@
|
|||||||
{ "maximumVersion": "3.12", "minimumVersion": "3.8" }
|
{ "maximumVersion": "3.14", "minimumVersion": "3.9" }
|
||||||
|
|||||||
41
lib/autobuild-action.js
generated
41
lib/autobuild-action.js
generated
@@ -27,37 +27,50 @@ const core = __importStar(require("@actions/core"));
|
|||||||
const actions_util_1 = 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 configUtils = __importStar(require("./config-utils"));
|
const codeql_1 = require("./codeql");
|
||||||
|
const config_utils_1 = require("./config-utils");
|
||||||
|
const environment_1 = require("./environment");
|
||||||
|
const feature_flags_1 = require("./feature-flags");
|
||||||
const logging_1 = require("./logging");
|
const logging_1 = require("./logging");
|
||||||
|
const repository_1 = require("./repository");
|
||||||
const status_report_1 = require("./status-report");
|
const status_report_1 = require("./status-report");
|
||||||
|
const tracer_config_1 = require("./tracer-config");
|
||||||
const util_1 = require("./util");
|
const util_1 = require("./util");
|
||||||
async function sendCompletedStatusReport(logger, startedAt, allLanguages, failingLanguage, cause) {
|
async function sendCompletedStatusReport(config, logger, startedAt, allLanguages, failingLanguage, cause) {
|
||||||
(0, util_1.initializeEnvironment)((0, actions_util_1.getActionVersion)());
|
(0, util_1.initializeEnvironment)((0, actions_util_1.getActionVersion)());
|
||||||
const status = (0, status_report_1.getActionsStatus)(cause, failingLanguage);
|
const status = (0, status_report_1.getActionsStatus)(cause, failingLanguage);
|
||||||
const statusReportBase = await (0, status_report_1.createStatusReportBase)("autobuild", status, startedAt, await (0, util_1.checkDiskUsage)(logger), cause?.message, cause?.stack);
|
const statusReportBase = await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.Autobuild, status, startedAt, config, await (0, util_1.checkDiskUsage)(logger), logger, cause?.message, cause?.stack);
|
||||||
|
if (statusReportBase !== undefined) {
|
||||||
const statusReport = {
|
const statusReport = {
|
||||||
...statusReportBase,
|
...statusReportBase,
|
||||||
autobuild_languages: allLanguages.join(","),
|
autobuild_languages: allLanguages.join(","),
|
||||||
autobuild_failure: failingLanguage,
|
autobuild_failure: failingLanguage,
|
||||||
};
|
};
|
||||||
await (0, status_report_1.sendStatusReport)(statusReport);
|
await (0, status_report_1.sendStatusReport)(statusReport);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
async function run() {
|
async function run() {
|
||||||
const startedAt = new Date();
|
const startedAt = new Date();
|
||||||
const logger = (0, logging_1.getActionsLogger)();
|
const logger = (0, logging_1.getActionsLogger)();
|
||||||
let currentLanguage = undefined;
|
let config;
|
||||||
let languages = undefined;
|
let currentLanguage;
|
||||||
|
let languages;
|
||||||
try {
|
try {
|
||||||
if (!(await (0, status_report_1.sendStatusReport)(await (0, status_report_1.createStatusReportBase)("autobuild", "starting", startedAt, await (0, util_1.checkDiskUsage)(logger))))) {
|
const statusReportBase = await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.Autobuild, "starting", startedAt, config, await (0, util_1.checkDiskUsage)(logger), logger);
|
||||||
return;
|
if (statusReportBase !== undefined) {
|
||||||
|
await (0, status_report_1.sendStatusReport)(statusReportBase);
|
||||||
}
|
}
|
||||||
const gitHubVersion = await (0, api_client_1.getGitHubVersion)();
|
const gitHubVersion = await (0, api_client_1.getGitHubVersion)();
|
||||||
(0, util_1.checkGitHubVersionInRange)(gitHubVersion, logger);
|
(0, util_1.checkGitHubVersionInRange)(gitHubVersion, logger);
|
||||||
const config = await configUtils.getConfig((0, actions_util_1.getTemporaryDirectory)(), logger);
|
(0, util_1.checkActionVersion)((0, actions_util_1.getActionVersion)(), gitHubVersion);
|
||||||
|
const repositoryNwo = (0, repository_1.parseRepositoryNwo)((0, util_1.getRequiredEnvParam)("GITHUB_REPOSITORY"));
|
||||||
|
const features = new feature_flags_1.Features(gitHubVersion, repositoryNwo, (0, actions_util_1.getTemporaryDirectory)(), logger);
|
||||||
|
config = await (0, config_utils_1.getConfig)((0, actions_util_1.getTemporaryDirectory)(), logger);
|
||||||
if (config === undefined) {
|
if (config === undefined) {
|
||||||
throw new Error("Config file could not be found at expected location. Has the 'init' action been called?");
|
throw new Error("Config file could not be found at expected location. Has the 'init' action been called?");
|
||||||
}
|
}
|
||||||
languages = await (0, autobuild_1.determineAutobuildLanguages)(config, logger);
|
const codeql = await (0, codeql_1.getCodeQL)(config.codeQLCmd);
|
||||||
|
languages = await (0, autobuild_1.determineAutobuildLanguages)(codeql, config, logger);
|
||||||
if (languages !== undefined) {
|
if (languages !== undefined) {
|
||||||
const workingDirectory = (0, actions_util_1.getOptionalInput)("working-directory");
|
const workingDirectory = (0, actions_util_1.getOptionalInput)("working-directory");
|
||||||
if (workingDirectory) {
|
if (workingDirectory) {
|
||||||
@@ -66,17 +79,21 @@ async function run() {
|
|||||||
}
|
}
|
||||||
for (const language of languages) {
|
for (const language of languages) {
|
||||||
currentLanguage = language;
|
currentLanguage = language;
|
||||||
await (0, autobuild_1.runAutobuild)(language, config, logger);
|
await (0, autobuild_1.runAutobuild)(config, language, features, logger);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// End tracing early to avoid tracing analyze. This improves the performance and reliability of
|
||||||
|
// the analyze step.
|
||||||
|
await (0, tracer_config_1.endTracingForCluster)(codeql, config, logger, features);
|
||||||
}
|
}
|
||||||
catch (unwrappedError) {
|
catch (unwrappedError) {
|
||||||
const error = (0, util_1.wrapError)(unwrappedError);
|
const error = (0, util_1.wrapError)(unwrappedError);
|
||||||
core.setFailed(`We were unable to automatically build your code. Please replace the call to the autobuild action with your custom build steps. ${error.message}`);
|
core.setFailed(`We were unable to automatically build your code. Please replace the call to the autobuild action with your custom build steps. ${error.message}`);
|
||||||
await sendCompletedStatusReport(logger, startedAt, languages ?? [], currentLanguage, error);
|
await sendCompletedStatusReport(config, logger, startedAt, languages ?? [], currentLanguage, error);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await sendCompletedStatusReport(logger, startedAt, languages ?? []);
|
core.exportVariable(environment_1.EnvVar.AUTOBUILD_DID_COMPLETE_SUCCESSFULLY, "true");
|
||||||
|
await sendCompletedStatusReport(config, logger, startedAt, languages ?? []);
|
||||||
}
|
}
|
||||||
async function runWrapper() {
|
async function runWrapper() {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"autobuild-action.js","sourceRoot":"","sources":["../src/autobuild-action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AAEtC,iDAIwB;AACxB,6CAAgD;AAChD,2CAAwE;AACxE,4DAA8C;AAE9C,uCAAqD;AACrD,mDAKyB;AACzB,iCAKgB;AAShB,KAAK,UAAU,yBAAyB,CACtC,MAAc,EACd,SAAe,EACf,YAAsB,EACtB,eAAwB,EACxB,KAAa;IAEb,IAAA,4BAAqB,EAAC,IAAA,+BAAgB,GAAE,CAAC,CAAC;IAE1C,MAAM,MAAM,GAAG,IAAA,gCAAgB,EAAC,KAAK,EAAE,eAAe,CAAC,CAAC;IACxD,MAAM,gBAAgB,GAAG,MAAM,IAAA,sCAAsB,EACnD,WAAW,EACX,MAAM,EACN,SAAS,EACT,MAAM,IAAA,qBAA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F,oBAAoB;QACpB,MAAM,IAAA,oCAAoB,EAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC/D,CAAC;IAAC,OAAO,cAAc,EAAE,CAAC;QACxB,MAAM,KAAK,GAAG,IAAA,gBAAS,EAAC,cAAc,CAAC,CAAC;QACxC,IAAI,CAAC,SAAS,CACZ,kIAAkI,KAAK,CAAC,OAAO,EAAE,CAClJ,CAAC;QACF,MAAM,yBAAyB,CAC7B,MAAM,EACN,MAAM,EACN,SAAS,EACT,SAAS,IAAI,EAAE,EACf,eAAe,EACf,KAAK,CACN,CAAC;QACF,OAAO;IACT,CAAC;IAED,IAAI,CAAC,cAAc,CAAC,oBAAM,CAAC,mCAAmC,EAAE,MAAM,CAAC,CAAC;IAExE,MAAM,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,IAAI,EAAE,CAAC,CAAC;AAC9E,CAAC;AAED,KAAK,UAAU,UAAU;IACvB,IAAI,CAAC;QACH,MAAM,GAAG,EAAE,CAAC;IACd,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,SAAS,CAAC,4BAA4B,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}
|
||||||
22
lib/autobuild.js
generated
22
lib/autobuild.js
generated
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.runAutobuild = exports.determineAutobuildLanguages = void 0;
|
exports.runAutobuild = exports.setupCppAutobuild = exports.determineAutobuildLanguages = void 0;
|
||||||
const core = __importStar(require("@actions/core"));
|
const core = __importStar(require("@actions/core"));
|
||||||
const actions_util_1 = require("./actions-util");
|
const actions_util_1 = require("./actions-util");
|
||||||
const api_client_1 = require("./api-client");
|
const api_client_1 = require("./api-client");
|
||||||
@@ -32,8 +32,15 @@ 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 repository_1 = require("./repository");
|
const repository_1 = require("./repository");
|
||||||
|
const tools_features_1 = require("./tools-features");
|
||||||
const util_1 = require("./util");
|
const util_1 = require("./util");
|
||||||
async function determineAutobuildLanguages(config, logger) {
|
async function determineAutobuildLanguages(codeql, config, logger) {
|
||||||
|
if ((config.buildMode === util_1.BuildMode.None &&
|
||||||
|
(await codeql.supportsFeature(tools_features_1.ToolsFeature.TraceCommandUseBuildMode))) ||
|
||||||
|
config.buildMode === util_1.BuildMode.Manual) {
|
||||||
|
logger.info(`Using ${config.buildMode} build mode, nothing to autobuild.`);
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
// Attempt to find a language to autobuild
|
// Attempt to find a language to autobuild
|
||||||
// We want pick the dominant language in the repo from the ones we're able to build
|
// We want pick the dominant language in the repo from the ones we're able to build
|
||||||
// The languages are sorted in order specified by user or by lines of code if we got
|
// The languages are sorted in order specified by user or by lines of code if we got
|
||||||
@@ -126,13 +133,20 @@ async function setupCppAutobuild(codeql, logger) {
|
|||||||
core.exportVariable(envVar, "false");
|
core.exportVariable(envVar, "false");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function runAutobuild(language, config, logger) {
|
exports.setupCppAutobuild = setupCppAutobuild;
|
||||||
|
async function runAutobuild(config, language, features, logger) {
|
||||||
logger.startGroup(`Attempting to automatically build ${language} code`);
|
logger.startGroup(`Attempting to automatically build ${language} code`);
|
||||||
const codeQL = await (0, codeql_1.getCodeQL)(config.codeQLCmd);
|
const codeQL = await (0, codeql_1.getCodeQL)(config.codeQLCmd);
|
||||||
if (language === languages_1.Language.cpp) {
|
if (language === languages_1.Language.cpp) {
|
||||||
await setupCppAutobuild(codeQL, logger);
|
await setupCppAutobuild(codeQL, logger);
|
||||||
}
|
}
|
||||||
await codeQL.runAutobuild(language);
|
if (config.buildMode &&
|
||||||
|
(await features.getValue(feature_flags_1.Feature.AutobuildDirectTracing, codeQL))) {
|
||||||
|
await codeQL.extractUsingBuildMode(config, language);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
await codeQL.runAutobuild(config, language);
|
||||||
|
}
|
||||||
if (language === languages_1.Language.go) {
|
if (language === languages_1.Language.go) {
|
||||||
core.exportVariable(environment_1.EnvVar.DID_AUTOBUILD_GOLANG, "true");
|
core.exportVariable(environment_1.EnvVar.DID_AUTOBUILD_GOLANG, "true");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"autobuild.js","sourceRoot":"","sources":["../src/autobuild.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AAEtC,iDAA6E;AAC7E,6CAAgD;AAChD,qCAA6C;AAE7C,+CAAuC;AACvC,mDAAmE;AACnE,2CAAyD;AAEzD,6CAAkD;AAClD,iCAA6C;AAEtC,KAAK,UAAU,2BAA2B,CAC/C,MAA0B,EAC1B,MAAc;IAEd,0CAA0C;IAC1C,mFAAmF;IACnF,oFAAoF;IACpF,4EAA4E;IAC5E,MAAM,kBAAkB,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CACvD,IAAA,4BAAgB,EAAC,CAAC,CAAC,CACpB,CAAC;IAEF,IAAI,CAAC,kBAAkB,EAAE,CAAC;QACxB,MAAM,CAAC,IAAI,CACT,iEAAiE,CAClE,CAAC;QACF,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,MAAM,2BAA2B,GAAG,kBAAkB,CAAC,MAAM,CAC3D,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,oBA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C,MAA0B,EAC1B,QAAkB,EAClB,QAA2B,EAC3B,MAAc;IAEd,MAAM,CAAC,UAAU,CAAC,qCAAqC,QAAQ,OAAO,CAAC,CAAC;IACxE,MAAM,MAAM,GAAG,MAAM,IAAA,kBAAS,EAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACjD,IAAI,QAAQ,KAAK,oBAAQ,CAAC,GAAG,EAAE,CAAC;QAC9B,MAAM,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,CAAC;IACD,IACE,MAAM,CAAC,SAAS;QAChB,CAAC,MAAM,QAAQ,CAAC,QAAQ,CAAC,uBAAO,CAAC,sBAAsB,EAAE,MAAM,CAAC,CAAC,EACjE,CAAC;QACD,MAAM,MAAM,CAAC,qBAAqB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACvD,CAAC;SAAM,CAAC;QACN,MAAM,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC9C,CAAC;IACD,IAAI,QAAQ,KAAK,oBAAQ,CAAC,EAAE,EAAE,CAAC;QAC7B,IAAI,CAAC,cAAc,CAAC,oBAAM,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC;IAC3D,CAAC;IACD,MAAM,CAAC,QAAQ,EAAE,CAAC;AACpB,CAAC;AAvBD,oCAuBC"}
|
||||||
281
lib/cli-errors.js
generated
Normal file
281
lib/cli-errors.js
generated
Normal file
@@ -0,0 +1,281 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.wrapCliConfigurationError = exports.getCliConfigCategoryIfExists = exports.cliErrorsConfig = exports.CliConfigErrorCategory = exports.CommandInvocationError = void 0;
|
||||||
|
const util_1 = require("./util");
|
||||||
|
/**
|
||||||
|
* A class of Error that we can classify as an error stemming from a CLI
|
||||||
|
* invocation, with associated exit code, stderr,etc.
|
||||||
|
*/
|
||||||
|
class CommandInvocationError extends Error {
|
||||||
|
constructor(cmd, args, exitCode, stderr, stdout) {
|
||||||
|
const prettyCommand = [cmd, ...args]
|
||||||
|
.map((x) => (x.includes(" ") ? `'${x}'` : x))
|
||||||
|
.join(" ");
|
||||||
|
const fatalErrors = extractFatalErrors(stderr);
|
||||||
|
const autobuildErrors = extractAutobuildErrors(stderr);
|
||||||
|
let message;
|
||||||
|
if (fatalErrors) {
|
||||||
|
message =
|
||||||
|
`Encountered a fatal error while running "${prettyCommand}". ` +
|
||||||
|
`Exit code was ${exitCode} and error was: ${fatalErrors.trim()} See the logs for more details.`;
|
||||||
|
}
|
||||||
|
else if (autobuildErrors) {
|
||||||
|
const autobuildHelpLink = "https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/automatic-build-failed";
|
||||||
|
message =
|
||||||
|
"We were unable to automatically build your code. Please provide manual build steps. " +
|
||||||
|
`For more information, see ${autobuildHelpLink}. ` +
|
||||||
|
`Encountered the following error: ${autobuildErrors}`;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
let lastLine = stderr.trim().split("\n").pop()?.trim() || "";
|
||||||
|
if (lastLine[lastLine.length - 1] !== ".") {
|
||||||
|
lastLine += ".";
|
||||||
|
}
|
||||||
|
message =
|
||||||
|
`Encountered a fatal error while running "${prettyCommand}". ` +
|
||||||
|
`Exit code was ${exitCode} and last log line was: ${lastLine} See the logs for more details.`;
|
||||||
|
}
|
||||||
|
super(message);
|
||||||
|
this.exitCode = exitCode;
|
||||||
|
this.stderr = stderr;
|
||||||
|
this.stdout = stdout;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.CommandInvocationError = CommandInvocationError;
|
||||||
|
/**
|
||||||
|
* Provide a better error message from the stderr of a CLI invocation that failed with a fatal
|
||||||
|
* error.
|
||||||
|
*
|
||||||
|
* - If the CLI invocation failed with a fatal error, this returns that fatal error, followed by
|
||||||
|
* any fatal errors that occurred in plumbing commands.
|
||||||
|
* - If the CLI invocation did not fail with a fatal error, this returns `undefined`.
|
||||||
|
*
|
||||||
|
* ### Example
|
||||||
|
*
|
||||||
|
* ```
|
||||||
|
* Running TRAP import for CodeQL database at /home/runner/work/_temp/codeql_databases/javascript...
|
||||||
|
* A fatal error occurred: Evaluator heap must be at least 384.00 MiB
|
||||||
|
* A fatal error occurred: Dataset import for
|
||||||
|
* /home/runner/work/_temp/codeql_databases/javascript/db-javascript failed with code 2
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* becomes
|
||||||
|
*
|
||||||
|
* ```
|
||||||
|
* Encountered a fatal error while running "codeql-for-testing database finalize --finalize-dataset
|
||||||
|
* --threads=2 --ram=2048 db". Exit code was 32 and error was: A fatal error occurred: Dataset
|
||||||
|
* import for /home/runner/work/_temp/codeql_databases/javascript/db-javascript failed with code 2.
|
||||||
|
* Context: A fatal error occurred: Evaluator heap must be at least 384.00 MiB.
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* Where possible, this tries to summarize the error into a single line, as this displays better in
|
||||||
|
* the Actions UI.
|
||||||
|
*/
|
||||||
|
function extractFatalErrors(error) {
|
||||||
|
const fatalErrorRegex = /.*fatal error occurred:/gi;
|
||||||
|
let fatalErrors = [];
|
||||||
|
let lastFatalErrorIndex;
|
||||||
|
let match;
|
||||||
|
while ((match = fatalErrorRegex.exec(error)) !== null) {
|
||||||
|
if (lastFatalErrorIndex !== undefined) {
|
||||||
|
fatalErrors.push(error.slice(lastFatalErrorIndex, match.index).trim());
|
||||||
|
}
|
||||||
|
lastFatalErrorIndex = match.index;
|
||||||
|
}
|
||||||
|
if (lastFatalErrorIndex !== undefined) {
|
||||||
|
const lastError = error.slice(lastFatalErrorIndex).trim();
|
||||||
|
if (fatalErrors.length === 0) {
|
||||||
|
// No other errors
|
||||||
|
return lastError;
|
||||||
|
}
|
||||||
|
const isOneLiner = !fatalErrors.some((e) => e.includes("\n"));
|
||||||
|
if (isOneLiner) {
|
||||||
|
fatalErrors = fatalErrors.map(ensureEndsInPeriod);
|
||||||
|
}
|
||||||
|
return [
|
||||||
|
ensureEndsInPeriod(lastError),
|
||||||
|
"Context:",
|
||||||
|
...fatalErrors.reverse(),
|
||||||
|
].join(isOneLiner ? " " : "\n");
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
function extractAutobuildErrors(error) {
|
||||||
|
const pattern = /.*\[autobuild\] \[ERROR\] (.*)/gi;
|
||||||
|
let errorLines = [...error.matchAll(pattern)].map((match) => match[1]);
|
||||||
|
// Truncate if there are more than 10 matching lines.
|
||||||
|
if (errorLines.length > 10) {
|
||||||
|
errorLines = errorLines.slice(0, 10);
|
||||||
|
errorLines.push("(truncated)");
|
||||||
|
}
|
||||||
|
return errorLines.join("\n") || undefined;
|
||||||
|
}
|
||||||
|
function ensureEndsInPeriod(text) {
|
||||||
|
return text[text.length - 1] === "." ? text : `${text}.`;
|
||||||
|
}
|
||||||
|
/** Error messages from the CLI that we consider configuration errors and handle specially. */
|
||||||
|
var CliConfigErrorCategory;
|
||||||
|
(function (CliConfigErrorCategory) {
|
||||||
|
CliConfigErrorCategory["ExternalRepositoryCloneFailed"] = "ExternalRepositoryCloneFailed";
|
||||||
|
CliConfigErrorCategory["GradleBuildFailed"] = "GradleBuildFailed";
|
||||||
|
CliConfigErrorCategory["IncompatibleWithActionVersion"] = "IncompatibleWithActionVersion";
|
||||||
|
CliConfigErrorCategory["InitCalledTwice"] = "InitCalledTwice";
|
||||||
|
CliConfigErrorCategory["InvalidConfigFile"] = "InvalidConfigFile";
|
||||||
|
CliConfigErrorCategory["InvalidSourceRoot"] = "InvalidSourceRoot";
|
||||||
|
CliConfigErrorCategory["MavenBuildFailed"] = "MavenBuildFailed";
|
||||||
|
CliConfigErrorCategory["NoBuildCommandAutodetected"] = "NoBuildCommandAutodetected";
|
||||||
|
CliConfigErrorCategory["NoBuildMethodAutodetected"] = "NoBuildMethodAutodetected";
|
||||||
|
CliConfigErrorCategory["NoSourceCodeSeen"] = "NoSourceCodeSeen";
|
||||||
|
CliConfigErrorCategory["NoSupportedBuildCommandSucceeded"] = "NoSupportedBuildCommandSucceeded";
|
||||||
|
CliConfigErrorCategory["NoSupportedBuildSystemDetected"] = "NoSupportedBuildSystemDetected";
|
||||||
|
CliConfigErrorCategory["OutOfMemoryOrDisk"] = "OutOfMemoryOrDisk";
|
||||||
|
CliConfigErrorCategory["PackCannotBeFound"] = "PackCannotBeFound";
|
||||||
|
CliConfigErrorCategory["PackMissingAuth"] = "PackMissingAuth";
|
||||||
|
CliConfigErrorCategory["SwiftBuildFailed"] = "SwiftBuildFailed";
|
||||||
|
CliConfigErrorCategory["UnsupportedBuildMode"] = "UnsupportedBuildMode";
|
||||||
|
})(CliConfigErrorCategory || (exports.CliConfigErrorCategory = CliConfigErrorCategory = {}));
|
||||||
|
/**
|
||||||
|
* All of our caught CLI error messages that we handle specially: ie. if we
|
||||||
|
* would like to categorize an error as a configuration error or not.
|
||||||
|
*/
|
||||||
|
exports.cliErrorsConfig = {
|
||||||
|
[CliConfigErrorCategory.ExternalRepositoryCloneFailed]: {
|
||||||
|
cliErrorMessageCandidates: [
|
||||||
|
new RegExp("Failed to clone external Git repository"),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
[CliConfigErrorCategory.GradleBuildFailed]: {
|
||||||
|
cliErrorMessageCandidates: [
|
||||||
|
new RegExp("[autobuild] FAILURE: Build failed with an exception."),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
// Version of CodeQL CLI is incompatible with this version of the CodeQL Action
|
||||||
|
[CliConfigErrorCategory.IncompatibleWithActionVersion]: {
|
||||||
|
cliErrorMessageCandidates: [
|
||||||
|
new RegExp("is not compatible with this CodeQL CLI"),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
[CliConfigErrorCategory.InitCalledTwice]: {
|
||||||
|
cliErrorMessageCandidates: [
|
||||||
|
new RegExp("Refusing to create databases .* but could not process any of it"),
|
||||||
|
],
|
||||||
|
additionalErrorMessageToAppend: `Is the "init" action called twice in the same job?`,
|
||||||
|
},
|
||||||
|
[CliConfigErrorCategory.InvalidConfigFile]: {
|
||||||
|
cliErrorMessageCandidates: [
|
||||||
|
new RegExp("Config file .* is not valid"),
|
||||||
|
new RegExp("The supplied config file is empty"),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
// Expected source location for database creation does not exist
|
||||||
|
[CliConfigErrorCategory.InvalidSourceRoot]: {
|
||||||
|
cliErrorMessageCandidates: [new RegExp("Invalid source root")],
|
||||||
|
},
|
||||||
|
[CliConfigErrorCategory.MavenBuildFailed]: {
|
||||||
|
cliErrorMessageCandidates: [
|
||||||
|
new RegExp("\\[autobuild\\] \\[ERROR\\] Failed to execute goal"),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
[CliConfigErrorCategory.NoBuildCommandAutodetected]: {
|
||||||
|
cliErrorMessageCandidates: [
|
||||||
|
new RegExp("Could not auto-detect a suitable build method"),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
[CliConfigErrorCategory.NoBuildMethodAutodetected]: {
|
||||||
|
cliErrorMessageCandidates: [
|
||||||
|
new RegExp("Could not detect a suitable build command for the source checkout"),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
// Usually when a manual build script has failed, or if an autodetected language
|
||||||
|
// was unintended to have CodeQL analysis run on it.
|
||||||
|
[CliConfigErrorCategory.NoSourceCodeSeen]: {
|
||||||
|
exitCode: 32,
|
||||||
|
cliErrorMessageCandidates: [
|
||||||
|
new RegExp("CodeQL detected code written in .* but could not process any of it"),
|
||||||
|
new RegExp("CodeQL did not detect any code written in languages supported by CodeQL"),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
[CliConfigErrorCategory.NoSupportedBuildCommandSucceeded]: {
|
||||||
|
cliErrorMessageCandidates: [
|
||||||
|
new RegExp("No supported build command succeeded"),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
[CliConfigErrorCategory.NoSupportedBuildSystemDetected]: {
|
||||||
|
cliErrorMessageCandidates: [
|
||||||
|
new RegExp("No supported build system detected"),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
[CliConfigErrorCategory.OutOfMemoryOrDisk]: {
|
||||||
|
cliErrorMessageCandidates: [
|
||||||
|
new RegExp("CodeQL is out of memory."),
|
||||||
|
new RegExp("out of disk"),
|
||||||
|
new RegExp("No space left on device"),
|
||||||
|
],
|
||||||
|
additionalErrorMessageToAppend: "For more information, see https://gh.io/troubleshooting-code-scanning/out-of-disk-or-memory",
|
||||||
|
},
|
||||||
|
[CliConfigErrorCategory.PackCannotBeFound]: {
|
||||||
|
cliErrorMessageCandidates: [
|
||||||
|
new RegExp("Query pack .* cannot be found\\. Check the spelling of the pack\\."),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
[CliConfigErrorCategory.PackMissingAuth]: {
|
||||||
|
cliErrorMessageCandidates: [
|
||||||
|
new RegExp("GitHub Container registry .* 403 Forbidden"),
|
||||||
|
new RegExp("Do you need to specify a token to authenticate to the registry?"),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
[CliConfigErrorCategory.SwiftBuildFailed]: {
|
||||||
|
cliErrorMessageCandidates: [
|
||||||
|
new RegExp("\\[autobuilder/build\\] \\[build-command-failed\\] `autobuild` failed to run the build command"),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
[CliConfigErrorCategory.UnsupportedBuildMode]: {
|
||||||
|
cliErrorMessageCandidates: [
|
||||||
|
new RegExp("does not support the .* build mode. Please try using one of the following build modes instead"),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* Check if the given CLI error or exit code, if applicable, apply to any known
|
||||||
|
* CLI errors in the configuration record. If either the CLI error message matches one of
|
||||||
|
* the error messages in the config record, or the exit codes match, return the error category;
|
||||||
|
* if not, return undefined.
|
||||||
|
*/
|
||||||
|
function getCliConfigCategoryIfExists(cliError) {
|
||||||
|
for (const [category, configuration] of Object.entries(exports.cliErrorsConfig)) {
|
||||||
|
if (cliError.exitCode !== undefined &&
|
||||||
|
configuration.exitCode !== undefined &&
|
||||||
|
cliError.exitCode === configuration.exitCode) {
|
||||||
|
return category;
|
||||||
|
}
|
||||||
|
for (const e of configuration.cliErrorMessageCandidates) {
|
||||||
|
if (cliError.message.match(e) || cliError.stderr.match(e)) {
|
||||||
|
return category;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
exports.getCliConfigCategoryIfExists = getCliConfigCategoryIfExists;
|
||||||
|
/**
|
||||||
|
* Changes an error received from the CLI to a ConfigurationError with optionally an extra
|
||||||
|
* error message appended, if it exists in a known set of configuration errors. Otherwise,
|
||||||
|
* simply returns the original error.
|
||||||
|
*/
|
||||||
|
function wrapCliConfigurationError(cliError) {
|
||||||
|
if (!(cliError instanceof CommandInvocationError)) {
|
||||||
|
return cliError;
|
||||||
|
}
|
||||||
|
const cliConfigErrorCategory = getCliConfigCategoryIfExists(cliError);
|
||||||
|
if (cliConfigErrorCategory === undefined) {
|
||||||
|
return cliError;
|
||||||
|
}
|
||||||
|
let errorMessageBuilder = cliError.message;
|
||||||
|
const additionalErrorMessageToAppend = exports.cliErrorsConfig[cliConfigErrorCategory].additionalErrorMessageToAppend;
|
||||||
|
if (additionalErrorMessageToAppend !== undefined) {
|
||||||
|
errorMessageBuilder = `${errorMessageBuilder} ${additionalErrorMessageToAppend}`;
|
||||||
|
}
|
||||||
|
return new util_1.ConfigurationError(errorMessageBuilder);
|
||||||
|
}
|
||||||
|
exports.wrapCliConfigurationError = wrapCliConfigurationError;
|
||||||
|
//# sourceMappingURL=cli-errors.js.map
|
||||||
1
lib/cli-errors.js.map
Normal file
1
lib/cli-errors.js.map
Normal file
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user