mirror of
https://github.com/github/codeql-action.git
synced 2025-12-22 23:30:05 +08:00
Compare commits
329 Commits
codeql-bun
...
v2.26.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
366883a76d | ||
|
|
b6f3dd5b69 | ||
|
|
ee7156af3a | ||
|
|
79105e57fc | ||
|
|
89893dd326 | ||
|
|
36a8987598 | ||
|
|
429e197704 | ||
|
|
9eec338902 | ||
|
|
a93f8c2fd1 | ||
|
|
af1f2e89e3 | ||
|
|
404b712ccd | ||
|
|
e36312243c | ||
|
|
2bc3b8381e | ||
|
|
dd9700c166 | ||
|
|
24f9e43571 | ||
|
|
88634f4927 | ||
|
|
308547dc25 | ||
|
|
57391aa8d6 | ||
|
|
ece28a826b | ||
|
|
29d86d22a3 | ||
|
|
5b15b9edeb | ||
|
|
18ac79e766 | ||
|
|
0d5982aa33 | ||
|
|
da9ecb0f40 | ||
|
|
c4c3c4421f | ||
|
|
41833c77c6 | ||
|
|
d620faa0b4 | ||
|
|
25ad3c8e40 | ||
|
|
44ecae4896 | ||
|
|
50357f5d12 | ||
|
|
5d9950fd02 | ||
|
|
18c419ea04 | ||
|
|
def1e359d7 | ||
|
|
6ef274e152 | ||
|
|
5c02493ebf | ||
|
|
a8ab493c76 | ||
|
|
3ec2588ed0 | ||
|
|
c056c182c0 | ||
|
|
5973e2313a | ||
|
|
11a4b17771 | ||
|
|
684a773172 | ||
|
|
f1e8960cb4 | ||
|
|
138862ec00 | ||
|
|
0430e6625a | ||
|
|
50d1f406e9 | ||
|
|
ecf465891a | ||
|
|
1c5b392677 | ||
|
|
eb055d739a | ||
|
|
7c2bec0cc3 | ||
|
|
3884d04c11 | ||
|
|
c24926b734 | ||
|
|
68ba39bacf | ||
|
|
8dd1773467 | ||
|
|
441c9d90e4 | ||
|
|
f03da13454 | ||
|
|
29a5cfc75d | ||
|
|
9e440ad4c7 | ||
|
|
136f5a589b | ||
|
|
0407820509 | ||
|
|
48c11ed2ba | ||
|
|
a1404425d9 | ||
|
|
ecb9ccfcb1 | ||
|
|
acb243eabd | ||
|
|
8612c175f8 | ||
|
|
0763ccfe11 | ||
|
|
4be318a22d | ||
|
|
84f2bfe7be | ||
|
|
0f24d46599 | ||
|
|
e6c9383ca6 | ||
|
|
9c646c24a4 | ||
|
|
8b7d7393fb | ||
|
|
3822a64bb3 | ||
|
|
6511e77610 | ||
|
|
fdd01ca1fe | ||
|
|
ba3ac6f096 | ||
|
|
7be3a64c02 | ||
|
|
19a1da54d1 | ||
|
|
b7b85bb26f | ||
|
|
7ff117d65d | ||
|
|
5cdd182212 | ||
|
|
42c6f6c925 | ||
|
|
159c618fd0 | ||
|
|
38a02917b0 | ||
|
|
16639b4b1a | ||
|
|
ca2d8a2534 | ||
|
|
ee304a3057 | ||
|
|
060c11b07f | ||
|
|
9f7e0af9f6 | ||
|
|
25d25968e6 | ||
|
|
a6c4760357 | ||
|
|
3e0e84636c | ||
|
|
aa96d09e16 | ||
|
|
e24bc47be8 | ||
|
|
95d81a0096 | ||
|
|
fc5bae6a19 | ||
|
|
a8428cd9ea | ||
|
|
87819cead8 | ||
|
|
9a5f54856d | ||
|
|
8f2e2d6281 | ||
|
|
afb54ba388 | ||
|
|
57a4b22c7d | ||
|
|
4b1d7da102 | ||
|
|
97e8f69368 | ||
|
|
f8e94f9775 | ||
|
|
e549eca490 | ||
|
|
20f361b0e9 | ||
|
|
12c986850b | ||
|
|
9e375a8f4f | ||
|
|
befbb8b4a5 | ||
|
|
461cce50d3 | ||
|
|
7e72016db9 | ||
|
|
7c2a1b9bb7 | ||
|
|
02d73d0544 | ||
|
|
5cf07d8b70 | ||
|
|
ecab108bfb | ||
|
|
1b214db077 | ||
|
|
826b78c018 | ||
|
|
f67c9cd326 | ||
|
|
77e41720af | ||
|
|
4733419117 | ||
|
|
6186179441 | ||
|
|
7b43b7c7ca | ||
|
|
5669f66a72 | ||
|
|
b400d0f668 | ||
|
|
736528d92f | ||
|
|
98042e78ca | ||
|
|
892ff9ec25 | ||
|
|
edfef2739a | ||
|
|
7ad1090882 | ||
|
|
7cb4b5a421 | ||
|
|
563dcafdfe | ||
|
|
4bcff1af46 | ||
|
|
bc172e1162 | ||
|
|
6abdf6c312 | ||
|
|
57d4608536 | ||
|
|
700bccb48b | ||
|
|
e113c555ef | ||
|
|
ed554bd623 | ||
|
|
3fd960a2d2 | ||
|
|
5767038bb9 | ||
|
|
f9d5614349 | ||
|
|
9029d5d6a6 | ||
|
|
d958b976dc | ||
|
|
7482df244c | ||
|
|
2cefb791de | ||
|
|
703bc820da | ||
|
|
250eb55355 | ||
|
|
5f2fdb88c3 | ||
|
|
a073c66b2a | ||
|
|
691ac2e494 | ||
|
|
d6233df2fd | ||
|
|
a78cac18f0 | ||
|
|
46c2e16272 | ||
|
|
3998c927e6 | ||
|
|
b9bbe2d606 | ||
|
|
e4f82d6949 | ||
|
|
be63ca505c | ||
|
|
69a0a4689a | ||
|
|
f9848b399e | ||
|
|
d37d7829f6 | ||
|
|
6ac9fc7e8e | ||
|
|
4103cca585 | ||
|
|
52d291229a | ||
|
|
23e160363e | ||
|
|
8308092ba6 | ||
|
|
4a7314f4b5 | ||
|
|
366cd98114 | ||
|
|
8d9b4c6dc8 | ||
|
|
eee8c708a0 | ||
|
|
fd8b26e79b | ||
|
|
fd90298f66 | ||
|
|
28cc49a08b | ||
|
|
162eb1e32a | ||
|
|
a1a97f41b2 | ||
|
|
ab186bb61a | ||
|
|
ff8133afe9 | ||
|
|
ac7c76bfc7 | ||
|
|
d429afad01 | ||
|
|
d05fceb045 | ||
|
|
78d13343a2 | ||
|
|
a953717405 | ||
|
|
b5e604ae77 | ||
|
|
ceb635d11f | ||
|
|
34710081e2 | ||
|
|
4f0ceda83a | ||
|
|
654d389318 | ||
|
|
685e64b1e3 | ||
|
|
02619f4624 | ||
|
|
8e81fd40bf | ||
|
|
52e98c0622 | ||
|
|
ceaec5c11a | ||
|
|
39f10b5b8a | ||
|
|
64ccee938f | ||
|
|
e76c3643d1 | ||
|
|
caa31633f2 | ||
|
|
04aff1f5fa | ||
|
|
9ace329d8c | ||
|
|
b849f33370 | ||
|
|
42cbd34070 | ||
|
|
9762ef1fad | ||
|
|
5122fa879d | ||
|
|
c3aa7b8d0d | ||
|
|
e949a1676c | ||
|
|
948c1ebff4 | ||
|
|
e4b5f9d015 | ||
|
|
8aad228360 | ||
|
|
c992dad089 | ||
|
|
06c30cc68c | ||
|
|
f72882a05b | ||
|
|
b9d792527d | ||
|
|
12bc863d11 | ||
|
|
ba352fa8e7 | ||
|
|
d95215f691 | ||
|
|
553a89d488 | ||
|
|
ffd3158cb9 | ||
|
|
82478fb458 | ||
|
|
2a96432c79 | ||
|
|
93075ceec3 | ||
|
|
a023017ea9 | ||
|
|
794eacf375 | ||
|
|
a1559aa4a9 | ||
|
|
a82bad7182 | ||
|
|
61ddd48e03 | ||
|
|
abca38cf8c | ||
|
|
763babe7ac | ||
|
|
72d46cb780 | ||
|
|
0b21c947c0 | ||
|
|
c2dc67199a | ||
|
|
f018a9586e | ||
|
|
6007966519 | ||
|
|
efed72eb8f | ||
|
|
bcca54f232 | ||
|
|
76d48637f2 | ||
|
|
4821ae1424 | ||
|
|
e56cfd0877 | ||
|
|
6046c633c7 | ||
|
|
ed2b6b741f | ||
|
|
570dc010e8 | ||
|
|
1a8046c7f3 | ||
|
|
8c395e0c45 | ||
|
|
de22b302a6 | ||
|
|
928ff8c822 | ||
|
|
2f52385615 | ||
|
|
272cd56763 | ||
|
|
3839e215cc | ||
|
|
61f4d893e6 | ||
|
|
30ad6c3d9e | ||
|
|
78df51c1cc | ||
|
|
045d9f3939 | ||
|
|
a3c8eb3ab0 | ||
|
|
6078595fdf | ||
|
|
395cdfe20c | ||
|
|
a56a03b370 | ||
|
|
05053827ef | ||
|
|
fa5685c7f0 | ||
|
|
8c3591c19a | ||
|
|
557a8d2306 | ||
|
|
7351df07bb | ||
|
|
d15fdd879b | ||
|
|
80eb8d5395 | ||
|
|
0ddabac401 | ||
|
|
b882b63a68 | ||
|
|
8b0f3e6135 | ||
|
|
8601b9e70a | ||
|
|
bd94b4c175 | ||
|
|
755340a6bd | ||
|
|
4a8f20f6b9 | ||
|
|
460939e7d8 | ||
|
|
ceebdeb9fa | ||
|
|
47c8d615ed | ||
|
|
c232c5de9c | ||
|
|
2452b7d8af | ||
|
|
4ffed09d48 | ||
|
|
8b6a45a6ec | ||
|
|
2ccdcd5135 | ||
|
|
4f50fb3be5 | ||
|
|
02022337ac | ||
|
|
3dafabe4d9 | ||
|
|
40cd785140 | ||
|
|
10746dd61e | ||
|
|
1a077f8f6c | ||
|
|
05d809f630 | ||
|
|
d8c4c3a4eb | ||
|
|
b301568384 | ||
|
|
f5c8be0ac1 | ||
|
|
4504810aa1 | ||
|
|
dc021d495c | ||
|
|
f822fa3067 | ||
|
|
3ed798ed18 | ||
|
|
5b498ba405 | ||
|
|
7dde705407 | ||
|
|
c004a3e831 | ||
|
|
2f93e4319b | ||
|
|
c98f2c953c | ||
|
|
554c990fe8 | ||
|
|
abe5934e80 | ||
|
|
8879ae88d9 | ||
|
|
01e8d7f881 | ||
|
|
4759df8df7 | ||
|
|
554005d264 | ||
|
|
fb29452d38 | ||
|
|
13884cb7d7 | ||
|
|
ac64986f93 | ||
|
|
cdcacf8b4f | ||
|
|
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 |
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
|
||||||
|
|||||||
7
.github/workflows/__all-platform-bundle.yml
generated
vendored
7
.github/workflows/__all-platform-bundle.yml
generated
vendored
@@ -41,8 +41,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
@@ -60,10 +58,9 @@ jobs:
|
|||||||
- id: init
|
- id: init
|
||||||
uses: ./../action/init
|
uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
|
# Swift is not supported on Ubuntu so we manually exclude it from the list here
|
||||||
|
languages: cpp,csharp,go,java,javascript,python,ruby
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
- uses: ./../action/.github/actions/setup-swift
|
|
||||||
with:
|
|
||||||
codeql-path: ${{ steps.init.outputs.codeql-path }}
|
|
||||||
- name: Build code
|
- name: Build code
|
||||||
shell: bash
|
shell: bash
|
||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
|
|||||||
2
.github/workflows/__analyze-ref-input.yml
generated
vendored
2
.github/workflows/__analyze-ref-input.yml
generated
vendored
@@ -45,8 +45,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
2
.github/workflows/__autobuild-action.yml
generated
vendored
2
.github/workflows/__autobuild-action.yml
generated
vendored
@@ -45,8 +45,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
2
.github/workflows/__autobuild-direct-tracing-with-working-dir.yml
generated
vendored
2
.github/workflows/__autobuild-direct-tracing-with-working-dir.yml
generated
vendored
@@ -47,8 +47,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
2
.github/workflows/__autobuild-direct-tracing.yml
generated
vendored
2
.github/workflows/__autobuild-direct-tracing.yml
generated
vendored
@@ -47,8 +47,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
2
.github/workflows/__build-mode-autobuild.yml
generated
vendored
2
.github/workflows/__build-mode-autobuild.yml
generated
vendored
@@ -41,8 +41,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
6
.github/workflows/__build-mode-manual.yml
generated
vendored
6
.github/workflows/__build-mode-manual.yml
generated
vendored
@@ -41,8 +41,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
@@ -74,10 +72,6 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- uses: ./../action/.github/actions/setup-swift
|
|
||||||
with:
|
|
||||||
codeql-path: ${{ steps.init.outputs.codeql-path }}
|
|
||||||
|
|
||||||
- name: Build code
|
- name: Build code
|
||||||
shell: bash
|
shell: bash
|
||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
|
|||||||
2
.github/workflows/__build-mode-none.yml
generated
vendored
2
.github/workflows/__build-mode-none.yml
generated
vendored
@@ -43,8 +43,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
2
.github/workflows/__build-mode-rollback.yml
generated
vendored
2
.github/workflows/__build-mode-rollback.yml
generated
vendored
@@ -41,8 +41,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
2
.github/workflows/__cleanup-db-cluster-dir.yml
generated
vendored
2
.github/workflows/__cleanup-db-cluster-dir.yml
generated
vendored
@@ -41,8 +41,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
2
.github/workflows/__config-export.yml
generated
vendored
2
.github/workflows/__config-export.yml
generated
vendored
@@ -51,8 +51,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
2
.github/workflows/__config-input.yml
generated
vendored
2
.github/workflows/__config-input.yml
generated
vendored
@@ -41,8 +41,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
2
.github/workflows/__cpp-deptrace-disabled.yml
generated
vendored
2
.github/workflows/__cpp-deptrace-disabled.yml
generated
vendored
@@ -45,8 +45,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
2
.github/workflows/__cpp-deptrace-enabled-on-macos.yml
generated
vendored
2
.github/workflows/__cpp-deptrace-enabled-on-macos.yml
generated
vendored
@@ -41,8 +41,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
2
.github/workflows/__cpp-deptrace-enabled.yml
generated
vendored
2
.github/workflows/__cpp-deptrace-enabled.yml
generated
vendored
@@ -45,8 +45,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
16
.github/workflows/__diagnostics-export.yml
generated
vendored
16
.github/workflows/__diagnostics-export.yml
generated
vendored
@@ -27,12 +27,6 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-20230403
|
|
||||||
- os: macos-12
|
|
||||||
version: stable-20230403
|
|
||||||
- os: windows-latest
|
|
||||||
version: stable-20230403
|
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: linked
|
version: linked
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -57,8 +51,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
@@ -83,17 +75,13 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CODEQL_PATH: ${{ steps.init.outputs.codeql-path }}
|
CODEQL_PATH: ${{ steps.init.outputs.codeql-path }}
|
||||||
run: |
|
run: |
|
||||||
for i in {1..2}; do
|
|
||||||
# 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.
|
|
||||||
"$CODEQL_PATH" database add-diagnostic \
|
"$CODEQL_PATH" database add-diagnostic \
|
||||||
"$RUNNER_TEMP/codeql_databases/javascript" \
|
"$RUNNER_TEMP/codeql_databases/javascript" \
|
||||||
--file-path /path/to/file \
|
--file-path /path/to/file \
|
||||||
--plaintext-message "Plaintext message $i" \
|
--plaintext-message "Plaintext message" \
|
||||||
--source-id "lang/diagnostics/example" \
|
--source-id "lang/diagnostics/example" \
|
||||||
--source-name "Diagnostic name" \
|
--source-name "Diagnostic name" \
|
||||||
--ready-for-status-page
|
--ready-for-status-page
|
||||||
done
|
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
with:
|
with:
|
||||||
output: ${{ runner.temp }}/results
|
output: ${{ runner.temp }}/results
|
||||||
@@ -113,7 +101,7 @@ jobs:
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
|
||||||
function checkStatusPageNotification(n) {
|
function checkStatusPageNotification(n) {
|
||||||
const expectedMessage = 'Plaintext message 1\n\nCodeQL also found 1 other diagnostic like this. See the workflow log for details.';
|
const expectedMessage = 'Plaintext message';
|
||||||
if (n.message.text !== expectedMessage) {
|
if (n.message.text !== expectedMessage) {
|
||||||
core.setFailed(`Expected the status page diagnostic to have the message '${expectedMessage}', but found '${n.message.text}'.`);
|
core.setFailed(`Expected the status page diagnostic to have the message '${expectedMessage}', but found '${n.message.text}'.`);
|
||||||
}
|
}
|
||||||
|
|||||||
4
.github/workflows/__export-file-baseline-information.yml
generated
vendored
4
.github/workflows/__export-file-baseline-information.yml
generated
vendored
@@ -45,8 +45,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
@@ -86,7 +84,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd "$RUNNER_TEMP/results"
|
cd "$RUNNER_TEMP/results"
|
||||||
expected_baseline_languages="c csharp go java kotlin javascript python ruby"
|
expected_baseline_languages="c csharp go java kotlin javascript python ruby"
|
||||||
if [[ $RUNNER_OS != "Windows" ]]; then
|
if [[ $RUNNER_OS == "macOS" ]]; then
|
||||||
expected_baseline_languages+=" swift"
|
expected_baseline_languages+=" swift"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
2
.github/workflows/__extractor-ram-threads.yml
generated
vendored
2
.github/workflows/__extractor-ram-threads.yml
generated
vendored
@@ -41,8 +41,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
14
.github/workflows/__go-custom-queries.yml
generated
vendored
14
.github/workflows/__go-custom-queries.yml
generated
vendored
@@ -27,12 +27,6 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-20230403
|
|
||||||
- os: macos-12
|
|
||||||
version: stable-20230403
|
|
||||||
- os: windows-latest
|
|
||||||
version: stable-20230403
|
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-v2.13.5
|
version: stable-v2.13.5
|
||||||
- os: macos-12
|
- os: macos-12
|
||||||
@@ -57,6 +51,12 @@ jobs:
|
|||||||
version: stable-v2.16.6
|
version: stable-v2.16.6
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: stable-v2.16.6
|
version: stable-v2.16.6
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.17.6
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.17.6
|
||||||
|
- os: windows-latest
|
||||||
|
version: stable-v2.17.6
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -87,8 +87,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
2
.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml
generated
vendored
2
.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml
generated
vendored
@@ -41,8 +41,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
2
.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml
generated
vendored
2
.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml
generated
vendored
@@ -41,8 +41,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
2
.github/workflows/__go-indirect-tracing-workaround.yml
generated
vendored
2
.github/workflows/__go-indirect-tracing-workaround.yml
generated
vendored
@@ -41,8 +41,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
10
.github/workflows/__go-tracing-autobuilder.yml
generated
vendored
10
.github/workflows/__go-tracing-autobuilder.yml
generated
vendored
@@ -27,10 +27,6 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-20230403
|
|
||||||
- os: macos-12
|
|
||||||
version: stable-20230403
|
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-v2.13.5
|
version: stable-v2.13.5
|
||||||
- os: macos-12
|
- os: macos-12
|
||||||
@@ -47,6 +43,10 @@ jobs:
|
|||||||
version: stable-v2.16.6
|
version: stable-v2.16.6
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: stable-v2.16.6
|
version: stable-v2.16.6
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.17.6
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.17.6
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -71,8 +71,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
10
.github/workflows/__go-tracing-custom-build-steps.yml
generated
vendored
10
.github/workflows/__go-tracing-custom-build-steps.yml
generated
vendored
@@ -27,10 +27,6 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-20230403
|
|
||||||
- os: macos-12
|
|
||||||
version: stable-20230403
|
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-v2.13.5
|
version: stable-v2.13.5
|
||||||
- os: macos-12
|
- os: macos-12
|
||||||
@@ -47,6 +43,10 @@ jobs:
|
|||||||
version: stable-v2.16.6
|
version: stable-v2.16.6
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: stable-v2.16.6
|
version: stable-v2.16.6
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.17.6
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.17.6
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -71,8 +71,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
10
.github/workflows/__go-tracing-legacy-workflow.yml
generated
vendored
10
.github/workflows/__go-tracing-legacy-workflow.yml
generated
vendored
@@ -27,10 +27,6 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-20230403
|
|
||||||
- os: macos-12
|
|
||||||
version: stable-20230403
|
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-v2.13.5
|
version: stable-v2.13.5
|
||||||
- os: macos-12
|
- os: macos-12
|
||||||
@@ -47,6 +43,10 @@ jobs:
|
|||||||
version: stable-v2.16.6
|
version: stable-v2.16.6
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: stable-v2.16.6
|
version: stable-v2.16.6
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.17.6
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.17.6
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -71,8 +71,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
2
.github/workflows/__init-with-registries.yml
generated
vendored
2
.github/workflows/__init-with-registries.yml
generated
vendored
@@ -58,8 +58,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
2
.github/workflows/__javascript-source-root.yml
generated
vendored
2
.github/workflows/__javascript-source-root.yml
generated
vendored
@@ -45,8 +45,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
2
.github/workflows/__language-aliases.yml
generated
vendored
2
.github/workflows/__language-aliases.yml
generated
vendored
@@ -41,8 +41,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
24
.github/workflows/__multi-language-autodetect.yml
generated
vendored
24
.github/workflows/__multi-language-autodetect.yml
generated
vendored
@@ -28,15 +28,25 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: macos-12
|
- os: macos-12
|
||||||
version: stable-20230403
|
version: stable-v2.13.5
|
||||||
- os: macos-12
|
- os: ubuntu-latest
|
||||||
version: stable-v2.13.5
|
version: stable-v2.13.5
|
||||||
- os: macos-12
|
- os: macos-12
|
||||||
version: stable-v2.14.6
|
version: stable-v2.14.6
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.14.6
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: stable-v2.15.5
|
version: stable-v2.15.5
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.15.5
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: stable-v2.16.6
|
version: stable-v2.16.6
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.16.6
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.17.6
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.17.6
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: default
|
version: default
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
@@ -61,8 +71,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
@@ -85,9 +93,13 @@ jobs:
|
|||||||
id: init
|
id: init
|
||||||
with:
|
with:
|
||||||
db-location: ${{ runner.temp }}/customDbLocation
|
db-location: ${{ runner.temp }}/customDbLocation
|
||||||
|
# Swift is not supported on Ubuntu so we manually exclude it from the list here
|
||||||
|
languages: ${{ runner.os == 'Linux' && 'cpp,csharp,go,java,javascript,python,ruby'
|
||||||
|
|| '' }}
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
|
||||||
- uses: ./../action/.github/actions/setup-swift
|
- uses: ./../action/.github/actions/setup-swift
|
||||||
|
if: runner.os == 'macOS'
|
||||||
with:
|
with:
|
||||||
codeql-path: ${{ steps.init.outputs.codeql-path }}
|
codeql-path: ${{ steps.init.outputs.codeql-path }}
|
||||||
|
|
||||||
@@ -139,8 +151,8 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Check language autodetect for Swift
|
- name: Check language autodetect for Swift on MacOS
|
||||||
if: runner.os != 'Windows' && matrix.version != 'stable-20230403'
|
if: runner.os == 'macOS'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
SWIFT_DB=${{ fromJson(steps.analysis.outputs.db-locations).swift }}
|
SWIFT_DB=${{ fromJson(steps.analysis.outputs.db-locations).swift }}
|
||||||
|
|||||||
2
.github/workflows/__packaging-codescanning-config-inputs-js.yml
generated
vendored
2
.github/workflows/__packaging-codescanning-config-inputs-js.yml
generated
vendored
@@ -57,8 +57,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
2
.github/workflows/__packaging-config-inputs-js.yml
generated
vendored
2
.github/workflows/__packaging-config-inputs-js.yml
generated
vendored
@@ -57,8 +57,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
2
.github/workflows/__packaging-config-js.yml
generated
vendored
2
.github/workflows/__packaging-config-js.yml
generated
vendored
@@ -57,8 +57,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
2
.github/workflows/__packaging-inputs-js.yml
generated
vendored
2
.github/workflows/__packaging-inputs-js.yml
generated
vendored
@@ -57,8 +57,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
14
.github/workflows/__remote-config.yml
generated
vendored
14
.github/workflows/__remote-config.yml
generated
vendored
@@ -27,12 +27,6 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-20230403
|
|
||||||
- os: macos-12
|
|
||||||
version: stable-20230403
|
|
||||||
- os: windows-latest
|
|
||||||
version: stable-20230403
|
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-v2.13.5
|
version: stable-v2.13.5
|
||||||
- os: macos-12
|
- os: macos-12
|
||||||
@@ -57,6 +51,12 @@ jobs:
|
|||||||
version: stable-v2.16.6
|
version: stable-v2.16.6
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: stable-v2.16.6
|
version: stable-v2.16.6
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.17.6
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.17.6
|
||||||
|
- os: windows-latest
|
||||||
|
version: stable-v2.17.6
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -87,8 +87,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
14
.github/workflows/__resolve-environment-action.yml
generated
vendored
14
.github/workflows/__resolve-environment-action.yml
generated
vendored
@@ -28,11 +28,11 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-v2.13.4
|
version: stable-v2.13.5
|
||||||
- os: macos-12
|
- os: macos-12
|
||||||
version: stable-v2.13.4
|
version: stable-v2.13.5
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: stable-v2.13.4
|
version: stable-v2.13.5
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -63,8 +63,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
@@ -81,7 +79,7 @@ jobs:
|
|||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- 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.5' && 'go' || 'go,javascript-typescript'
|
||||||
}}
|
}}
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
|
||||||
@@ -96,14 +94,14 @@ jobs:
|
|||||||
run: exit 1
|
run: exit 1
|
||||||
|
|
||||||
- name: Resolve environment for JavaScript/TypeScript
|
- name: Resolve environment for JavaScript/TypeScript
|
||||||
if: matrix.version != 'stable-v2.13.4'
|
if: matrix.version != 'stable-v2.13.5'
|
||||||
uses: ./../action/resolve-environment
|
uses: ./../action/resolve-environment
|
||||||
id: resolve-environment-js
|
id: resolve-environment-js
|
||||||
with:
|
with:
|
||||||
language: javascript-typescript
|
language: javascript-typescript
|
||||||
|
|
||||||
- name: Fail if JavaScript/TypeScript configuration present
|
- name: Fail if JavaScript/TypeScript configuration present
|
||||||
if: matrix.version != 'stable-v2.13.4' &&
|
if: matrix.version != 'stable-v2.13.5' &&
|
||||||
fromJSON(steps.resolve-environment-js.outputs.environment).configuration.javascript
|
fromJSON(steps.resolve-environment-js.outputs.environment).configuration.javascript
|
||||||
run: exit 1
|
run: exit 1
|
||||||
env:
|
env:
|
||||||
|
|||||||
2
.github/workflows/__rubocop-multi-language.yml
generated
vendored
2
.github/workflows/__rubocop-multi-language.yml
generated
vendored
@@ -41,8 +41,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
2
.github/workflows/__ruby.yml
generated
vendored
2
.github/workflows/__ruby.yml
generated
vendored
@@ -51,8 +51,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
104
.github/workflows/__scaling-reserved-ram.yml
generated
vendored
104
.github/workflows/__scaling-reserved-ram.yml
generated
vendored
@@ -1,104 +0,0 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
|
||||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
|
||||||
# to regenerate this file.
|
|
||||||
|
|
||||||
name: PR Check - Scaling reserved RAM
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
GO111MODULE: auto
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- releases/v*
|
|
||||||
pull_request:
|
|
||||||
types:
|
|
||||||
- opened
|
|
||||||
- synchronize
|
|
||||||
- reopened
|
|
||||||
- ready_for_review
|
|
||||||
schedule:
|
|
||||||
- cron: '0 5 * * *'
|
|
||||||
workflow_dispatch: {}
|
|
||||||
jobs:
|
|
||||||
scaling-reserved-ram:
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: macos-12
|
|
||||||
version: stable-20230403
|
|
||||||
- os: macos-12
|
|
||||||
version: stable-v2.13.5
|
|
||||||
- os: macos-12
|
|
||||||
version: stable-v2.14.6
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-v2.15.5
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-v2.16.6
|
|
||||||
- os: macos-latest
|
|
||||||
version: default
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: default
|
|
||||||
- os: macos-latest
|
|
||||||
version: linked
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: linked
|
|
||||||
- os: macos-latest
|
|
||||||
version: nightly-latest
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: nightly-latest
|
|
||||||
name: Scaling reserved RAM
|
|
||||||
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'
|
|
||||||
setup-kotlin: 'true'
|
|
||||||
- uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: '>=1.21.0'
|
|
||||||
|
|
||||||
- uses: ./../action/init
|
|
||||||
id: init
|
|
||||||
with:
|
|
||||||
db-location: ${{ runner.temp }}/customDbLocation
|
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
|
||||||
|
|
||||||
- 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
|
|
||||||
id: analysis
|
|
||||||
with:
|
|
||||||
upload-database: false
|
|
||||||
env:
|
|
||||||
CODEQL_ACTION_SCALING_RESERVED_RAM: true
|
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
|
||||||
2
.github/workflows/__split-workflow.yml
generated
vendored
2
.github/workflows/__split-workflow.yml
generated
vendored
@@ -51,8 +51,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
3
.github/workflows/__submit-sarif-failure.yml
generated
vendored
3
.github/workflows/__submit-sarif-failure.yml
generated
vendored
@@ -45,8 +45,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
@@ -65,6 +63,7 @@ jobs:
|
|||||||
- uses: ./init
|
- uses: ./init
|
||||||
with:
|
with:
|
||||||
languages: javascript
|
languages: javascript
|
||||||
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
- name: Fail
|
- name: Fail
|
||||||
# We want this job to pass if the Action correctly uploads the SARIF file for
|
# We want this job to pass if the Action correctly uploads the SARIF file for
|
||||||
# the failed run.
|
# the failed run.
|
||||||
|
|||||||
2
.github/workflows/__swift-autobuild.yml
generated
vendored
2
.github/workflows/__swift-autobuild.yml
generated
vendored
@@ -41,8 +41,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
8
.github/workflows/__swift-custom-build.yml
generated
vendored
8
.github/workflows/__swift-custom-build.yml
generated
vendored
@@ -29,16 +29,10 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: linked
|
version: linked
|
||||||
- os: ubuntu-latest
|
|
||||||
version: linked
|
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: default
|
version: default
|
||||||
- os: ubuntu-latest
|
|
||||||
version: default
|
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
- os: ubuntu-latest
|
|
||||||
version: nightly-latest
|
|
||||||
name: Swift analysis using a custom build command
|
name: Swift analysis using a custom build command
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@@ -51,8 +45,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
2
.github/workflows/__test-autobuild-working-dir.yml
generated
vendored
2
.github/workflows/__test-autobuild-working-dir.yml
generated
vendored
@@ -41,8 +41,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
7
.github/workflows/__test-local-codeql.yml
generated
vendored
7
.github/workflows/__test-local-codeql.yml
generated
vendored
@@ -41,8 +41,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
@@ -66,10 +64,9 @@ jobs:
|
|||||||
- id: init
|
- id: init
|
||||||
uses: ./../action/init
|
uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
|
# Swift is not supported on Ubuntu so we manually exclude it from the list here
|
||||||
|
languages: cpp,csharp,go,java,javascript,python,ruby
|
||||||
tools: ./codeql-bundle-linux64.tar.gz
|
tools: ./codeql-bundle-linux64.tar.gz
|
||||||
- uses: ./../action/.github/actions/setup-swift
|
|
||||||
with:
|
|
||||||
codeql-path: ${{ steps.init.outputs.codeql-path }}
|
|
||||||
- name: Build code
|
- name: Build code
|
||||||
shell: bash
|
shell: bash
|
||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
|
|||||||
2
.github/workflows/__test-proxy.yml
generated
vendored
2
.github/workflows/__test-proxy.yml
generated
vendored
@@ -41,8 +41,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
17
.github/workflows/__unset-environment.yml
generated
vendored
17
.github/workflows/__unset-environment.yml
generated
vendored
@@ -27,6 +27,16 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.13.5
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.14.6
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.15.5
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.16.6
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.17.6
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
@@ -45,8 +55,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
@@ -65,10 +73,9 @@ jobs:
|
|||||||
id: init
|
id: init
|
||||||
with:
|
with:
|
||||||
db-location: ${{ runner.temp }}/customDbLocation
|
db-location: ${{ runner.temp }}/customDbLocation
|
||||||
|
# Swift is not supported on Ubuntu so we manually exclude it from the list here
|
||||||
|
languages: cpp,csharp,go,java,javascript,python,ruby
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
- uses: ./../action/.github/actions/setup-swift
|
|
||||||
with:
|
|
||||||
codeql-path: ${{ steps.init.outputs.codeql-path }}
|
|
||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '>=1.21.0'
|
go-version: '>=1.21.0'
|
||||||
|
|||||||
2
.github/workflows/__upload-ref-sha-input.yml
generated
vendored
2
.github/workflows/__upload-ref-sha-input.yml
generated
vendored
@@ -45,8 +45,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
2
.github/workflows/__with-checkout-path.yml
generated
vendored
2
.github/workflows/__with-checkout-path.yml
generated
vendored
@@ -45,8 +45,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
runner.os == 'macOS' && (
|
runner.os == 'macOS' && (
|
||||||
|
|
||||||
matrix.version == 'stable-20230403' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
matrix.version == 'stable-v2.13.5' ||
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
matrix.version == 'stable-v2.14.6')
|
||||||
|
|||||||
10
.github/workflows/debug-artifacts.yml
vendored
10
.github/workflows/debug-artifacts.yml
vendored
@@ -22,10 +22,11 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
version:
|
version:
|
||||||
- stable-20230403
|
|
||||||
- stable-v2.13.5
|
- stable-v2.13.5
|
||||||
- stable-v2.14.6
|
- stable-v2.14.6
|
||||||
- stable-v2.15.5
|
- stable-v2.15.5
|
||||||
|
- stable-v2.16.6
|
||||||
|
- stable-v2.17.6
|
||||||
- default
|
- default
|
||||||
- linked
|
- linked
|
||||||
- nightly-latest
|
- nightly-latest
|
||||||
@@ -52,9 +53,8 @@ jobs:
|
|||||||
debug: true
|
debug: true
|
||||||
debug-artifact-name: my-debug-artifacts
|
debug-artifact-name: my-debug-artifacts
|
||||||
debug-database-name: my-db
|
debug-database-name: my-db
|
||||||
- uses: ./../action/.github/actions/setup-swift
|
# We manually exclude Swift from the languages list here, as it is not supported on Ubuntu
|
||||||
with:
|
languages: cpp,csharp,go,java,javascript,python,ruby
|
||||||
codeql-path: ${{ steps.init.outputs.codeql-path }}
|
|
||||||
- name: Build code
|
- name: Build code
|
||||||
shell: bash
|
shell: bash
|
||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
@@ -71,7 +71,7 @@ jobs:
|
|||||||
- name: Check expected artifacts exist
|
- name: Check expected artifacts exist
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
VERSIONS="stable-20230403 stable-v2.13.5 stable-v2.14.6 stable-v2.15.5 default linked nightly-latest"
|
VERSIONS="stable-v2.13.5 stable-v2.14.6 stable-v2.15.5 stable-v2.16.6 stable-v2.17.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
|
||||||
pushd "./my-debug-artifacts-${version//./}"
|
pushd "./my-debug-artifacts-${version//./}"
|
||||||
|
|||||||
9
.github/workflows/pr-checks.yml
vendored
9
.github/workflows/pr-checks.yml
vendored
@@ -2,7 +2,6 @@ name: PR Checks
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main, releases/v*]
|
|
||||||
pull_request:
|
pull_request:
|
||||||
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
|
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
|
||||||
# by other workflows.
|
# by other workflows.
|
||||||
@@ -18,7 +17,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
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
|
||||||
@@ -50,9 +49,11 @@ 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:
|
||||||
|
if: github.event_name != 'push' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/releases/v')
|
||||||
name: Check modules up to date
|
name: Check modules up to date
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
@@ -63,6 +64,7 @@ jobs:
|
|||||||
run: .github/workflows/script/check-node-modules.sh
|
run: .github/workflows/script/check-node-modules.sh
|
||||||
|
|
||||||
check-file-contents:
|
check-file-contents:
|
||||||
|
if: github.event_name != 'push' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/releases/v')
|
||||||
name: Check file contents
|
name: Check file contents
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
@@ -87,6 +89,7 @@ jobs:
|
|||||||
run: .github/workflows/script/verify-pr-checks.sh
|
run: .github/workflows/script/verify-pr-checks.sh
|
||||||
|
|
||||||
npm-test:
|
npm-test:
|
||||||
|
if: github.event_name != 'push' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/releases/v')
|
||||||
name: Unit Test
|
name: Unit Test
|
||||||
needs: [check-js, check-node-modules]
|
needs: [check-js, check-node-modules]
|
||||||
strategy:
|
strategy:
|
||||||
@@ -106,7 +109,7 @@ jobs:
|
|||||||
npm test
|
npm test
|
||||||
|
|
||||||
check-node-version:
|
check-node-version:
|
||||||
if: ${{ github.event.pull_request }}
|
if: github.event.pull_request
|
||||||
name: Check Action Node versions
|
name: Check Action Node versions
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ fi
|
|||||||
echo "Getting checks for $GITHUB_SHA"
|
echo "Getting checks for $GITHUB_SHA"
|
||||||
|
|
||||||
# Ignore any checks with "https://", CodeQL, LGTM, and Update checks.
|
# Ignore any checks with "https://", CodeQL, LGTM, and Update checks.
|
||||||
CHECKS="$(gh api repos/github/codeql-action/commits/"${GITHUB_SHA}"/check-runs --paginate | jq --slurp --compact-output --raw-output '[.[].check_runs | .[].name | select(contains("https://") or . == "CodeQL" or . == "Dependabot" or . == "check-expected-release-files" or contains("Update") or contains("update") or contains("test-setup-python-scripts") | not)] | unique | sort')"
|
CHECKS="$(gh api repos/github/codeql-action/commits/"${GITHUB_SHA}"/check-runs --paginate | jq --slurp --compact-output --raw-output '[.[].check_runs.[] | select(.conclusion != "skipped") | .name | select(contains("https://") or . == "CodeQL" or . == "Dependabot" or . == "check-expected-release-files" or contains("Update") or contains("update") or contains("test-setup-python-scripts") | not)] | unique | sort')"
|
||||||
|
|
||||||
echo "$CHECKS" | jq
|
echo "$CHECKS" | jq
|
||||||
|
|
||||||
|
|||||||
5
.github/workflows/test-codeql-bundle-all.yml
vendored
5
.github/workflows/test-codeql-bundle-all.yml
vendored
@@ -42,10 +42,9 @@ jobs:
|
|||||||
- id: init
|
- id: init
|
||||||
uses: ./../action/init
|
uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
|
# We manually exclude Swift from the languages list here, as it is not supported on Ubuntu
|
||||||
|
languages: cpp,csharp,go,java,javascript,python,ruby
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
- uses: ./../action/.github/actions/setup-swift
|
|
||||||
with:
|
|
||||||
codeql-path: ${{ steps.init.outputs.codeql-path }}
|
|
||||||
- name: Build code
|
- name: Build code
|
||||||
shell: bash
|
shell: bash
|
||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
|
|||||||
84
CHANGELOG.md
84
CHANGELOG.md
@@ -4,156 +4,170 @@ 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.26.2 - 14 Aug 2024
|
||||||
|
|
||||||
|
- Update default CodeQL bundle version to 2.18.2. [#2417](https://github.com/github/codeql-action/pull/2417)
|
||||||
|
|
||||||
|
## 2.26.1 - 13 Aug 2024
|
||||||
|
|
||||||
No user facing changes.
|
No user facing changes.
|
||||||
|
|
||||||
## 3.25.13 - 19 Jul 2024
|
## 2.26.0 - 06 Aug 2024
|
||||||
|
|
||||||
|
- _Deprecation:_ Swift analysis on Ubuntu runner images is no longer supported. Please migrate to a macOS runner if this affects you. [#2403](https://github.com/github/codeql-action/pull/2403)
|
||||||
|
- Bump the minimum CodeQL bundle version to 2.13.5. [#2408](https://github.com/github/codeql-action/pull/2408)
|
||||||
|
|
||||||
|
## 2.25.15 - 26 Jul 2024
|
||||||
|
|
||||||
|
- Update default CodeQL bundle version to 2.18.1. [#2385](https://github.com/github/codeql-action/pull/2385)
|
||||||
|
|
||||||
|
## 2.25.14 - 25 Jul 2024
|
||||||
|
|
||||||
|
- Experimental: add a new `start-proxy` action which starts the same HTTP proxy as used by [`github/dependabot-action`](https://github.com/github/dependabot-action). Do not use this in production as it is part of an internal experiment and subject to change at any time. [#2376](https://github.com/github/codeql-action/pull/2376)
|
||||||
|
|
||||||
|
## 2.25.13 - 19 Jul 2024
|
||||||
|
|
||||||
- Add `codeql-version` to outputs. [#2368](https://github.com/github/codeql-action/pull/2368)
|
- Add `codeql-version` to outputs. [#2368](https://github.com/github/codeql-action/pull/2368)
|
||||||
- Add a deprecation warning for customers using CodeQL version 2.13.4 and earlier. These versions of CodeQL were discontinued on 9 July 2024 alongside GitHub Enterprise Server 3.9, and will be unsupported by CodeQL Action versions 3.26.0 and later and versions 2.26.0 and later. [#2375](https://github.com/github/codeql-action/pull/2375)
|
- Add a deprecation warning for customers using CodeQL version 2.13.4 and earlier. These versions of CodeQL were discontinued on 9 July 2024 alongside GitHub Enterprise Server 3.9, and will be unsupported by CodeQL Action versions 3.26.0 and later and versions 2.26.0 and later. [#2375](https://github.com/github/codeql-action/pull/2375)
|
||||||
- If you are using one of these versions, please update to CodeQL CLI version 2.13.5 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.
|
- If you are using one of these versions, please update to CodeQL CLI version 2.13.5 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.12.6 and 2.13.4, you can replace `github/codeql-action/*@v3` by `github/codeql-action/*@v3.25.13` and `github/codeql-action/*@v2` by `github/codeql-action/*@v2.25.13` in your code scanning workflow to ensure you continue using this version of the CodeQL Action.
|
- Alternatively, if you want to continue using a version of the CodeQL CLI between 2.12.6 and 2.13.4, you can replace `github/codeql-action/*@v3` by `github/codeql-action/*@v3.25.13` and `github/codeql-action/*@v2` by `github/codeql-action/*@v2.25.13` in your code scanning workflow to ensure you continue using this version of the CodeQL Action.
|
||||||
|
|
||||||
## 3.25.12 - 12 Jul 2024
|
## 2.25.12 - 12 Jul 2024
|
||||||
|
|
||||||
- Improve 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) on GitHub Enterprise Server. This feature is already available to GitHub.com users. [#2353](https://github.com/github/codeql-action/pull/2353)
|
- Improve 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) on GitHub Enterprise Server. This feature is already available to GitHub.com users. [#2353](https://github.com/github/codeql-action/pull/2353)
|
||||||
- Update default CodeQL bundle version to 2.18.0. [#2364](https://github.com/github/codeql-action/pull/2364)
|
- Update default CodeQL bundle version to 2.18.0. [#2364](https://github.com/github/codeql-action/pull/2364)
|
||||||
|
|
||||||
## 3.25.11 - 28 Jun 2024
|
## 2.25.11 - 28 Jun 2024
|
||||||
|
|
||||||
- Avoid failing the workflow run if there is an error while uploading debug artifacts. [#2349](https://github.com/github/codeql-action/pull/2349)
|
- Avoid failing the workflow run if there is an error while uploading debug artifacts. [#2349](https://github.com/github/codeql-action/pull/2349)
|
||||||
- Update default CodeQL bundle version to 2.17.6. [#2352](https://github.com/github/codeql-action/pull/2352)
|
- Update default CodeQL bundle version to 2.17.6. [#2352](https://github.com/github/codeql-action/pull/2352)
|
||||||
|
|
||||||
## 3.25.10 - 13 Jun 2024
|
## 2.25.10 - 13 Jun 2024
|
||||||
|
|
||||||
- Update default CodeQL bundle version to 2.17.5. [#2327](https://github.com/github/codeql-action/pull/2327)
|
- Update default CodeQL bundle version to 2.17.5. [#2327](https://github.com/github/codeql-action/pull/2327)
|
||||||
|
|
||||||
## 3.25.9 - 12 Jun 2024
|
## 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)
|
- 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)
|
- 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)
|
||||||
|
|
||||||
## 3.25.8 - 04 Jun 2024
|
## 2.25.8 - 04 Jun 2024
|
||||||
|
|
||||||
- Update default CodeQL bundle version to 2.17.4. [#2321](https://github.com/github/codeql-action/pull/2321)
|
- Update default CodeQL bundle version to 2.17.4. [#2321](https://github.com/github/codeql-action/pull/2321)
|
||||||
|
|
||||||
## 3.25.7 - 31 May 2024
|
## 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)
|
- 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)
|
||||||
|
|
||||||
## 3.25.6 - 20 May 2024
|
## 2.25.6 - 20 May 2024
|
||||||
|
|
||||||
- Update default CodeQL bundle version to 2.17.3. [#2295](https://github.com/github/codeql-action/pull/2295)
|
- Update default CodeQL bundle version to 2.17.3. [#2295](https://github.com/github/codeql-action/pull/2295)
|
||||||
|
|
||||||
## 3.25.5 - 13 May 2024
|
## 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)
|
- 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)
|
- 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)
|
- 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)
|
||||||
|
|
||||||
## 3.25.4 - 08 May 2024
|
## 2.25.4 - 08 May 2024
|
||||||
|
|
||||||
- Update default CodeQL bundle version to 2.17.2. [#2270](https://github.com/github/codeql-action/pull/2270)
|
- Update default CodeQL bundle version to 2.17.2. [#2270](https://github.com/github/codeql-action/pull/2270)
|
||||||
|
|
||||||
## 3.25.3 - 25 Apr 2024
|
## 2.25.3 - 25 Apr 2024
|
||||||
|
|
||||||
- Update default CodeQL bundle version to 2.17.1. [#2247](https://github.com/github/codeql-action/pull/2247)
|
- 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)
|
- 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)
|
||||||
|
|
||||||
## 3.25.2 - 22 Apr 2024
|
## 2.25.2 - 22 Apr 2024
|
||||||
|
|
||||||
No user facing changes.
|
No user facing changes.
|
||||||
|
|
||||||
## 3.25.1 - 17 Apr 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)
|
- 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)
|
- 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)
|
||||||
|
|
||||||
## 3.25.0 - 15 Apr 2024
|
## 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)
|
- 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:
|
As a result, the following inputs and environment variables are now ignored:
|
||||||
|
|
||||||
- The `setup-python-dependencies` input to the `init` Action
|
- The `setup-python-dependencies` input to the `init` Action
|
||||||
- The `CODEQL_ACTION_DISABLE_PYTHON_DEPENDENCY_INSTALLATION` environment variable
|
- 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.
|
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)
|
- 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)
|
- 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)
|
- 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)
|
||||||
|
|
||||||
## 3.24.10 - 05 Apr 2024
|
## 2.24.10 - 05 Apr 2024
|
||||||
|
|
||||||
- Update default CodeQL bundle version to 2.17.0. [#2219](https://github.com/github/codeql-action/pull/2219)
|
- 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)
|
- 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.
|
- 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.
|
- 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.
|
||||||
|
|
||||||
## 3.24.9 - 22 Mar 2024
|
## 2.24.9 - 22 Mar 2024
|
||||||
|
|
||||||
- Update default CodeQL bundle version to 2.16.5. [#2203](https://github.com/github/codeql-action/pull/2203)
|
- Update default CodeQL bundle version to 2.16.5. [#2203](https://github.com/github/codeql-action/pull/2203)
|
||||||
|
|
||||||
## 3.24.8 - 18 Mar 2024
|
## 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)
|
- 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)
|
||||||
|
|
||||||
## 3.24.7 - 12 Mar 2024
|
## 2.24.7 - 12 Mar 2024
|
||||||
|
|
||||||
- Update default CodeQL bundle version to 2.16.4. [#2185](https://github.com/github/codeql-action/pull/2185)
|
- Update default CodeQL bundle version to 2.16.4. [#2185](https://github.com/github/codeql-action/pull/2185)
|
||||||
|
|
||||||
## 3.24.6 - 29 Feb 2024
|
## 2.24.6 - 29 Feb 2024
|
||||||
|
|
||||||
No user facing changes.
|
No user facing changes.
|
||||||
|
|
||||||
## 3.24.5 - 23 Feb 2024
|
## 2.24.5 - 23 Feb 2024
|
||||||
|
|
||||||
- Update default CodeQL bundle version to 2.16.3. [#2156](https://github.com/github/codeql-action/pull/2156)
|
- Update default CodeQL bundle version to 2.16.3. [#2156](https://github.com/github/codeql-action/pull/2156)
|
||||||
|
|
||||||
## 3.24.4 - 21 Feb 2024
|
## 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)
|
- 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)
|
||||||
|
|
||||||
## 3.24.3 - 15 Feb 2024
|
## 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)
|
- 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)
|
||||||
|
|
||||||
## 3.24.2 - 15 Feb 2024
|
## 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)
|
- 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)
|
||||||
|
|
||||||
## 3.24.1 - 13 Feb 2024
|
## 2.24.1 - 13 Feb 2024
|
||||||
|
|
||||||
- Update default CodeQL bundle version to 2.16.2. [#2124](https://github.com/github/codeql-action/pull/2124)
|
- 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)
|
- 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)
|
||||||
|
|
||||||
## 3.24.0 - 02 Feb 2024
|
## 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)
|
- 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)
|
||||||
|
|
||||||
## 3.23.2 - 26 Jan 2024
|
## 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)
|
- 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)
|
- Update default CodeQL bundle version to 2.16.1. [#2096](https://github.com/github/codeql-action/pull/2096)
|
||||||
|
|
||||||
## 3.23.1 - 17 Jan 2024
|
## 2.23.1 - 17 Jan 2024
|
||||||
|
|
||||||
- Update default CodeQL bundle version to 2.16.0. [#2073](https://github.com/github/codeql-action/pull/2073)
|
- 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)
|
- 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)
|
||||||
|
|
||||||
## 3.23.0 - 08 Jan 2024
|
## 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
|
||||||
|
|
||||||
|
|||||||
16
README.md
16
README.md
@@ -33,18 +33,18 @@ To provide the best experience to customers using older versions of GitHub Enter
|
|||||||
|
|
||||||
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/)."
|
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
|
## Supported versions of the CodeQL Bundle 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.
|
We typically release new minor versions of the CodeQL Action and Bundle when a new minor version of GitHub Enterprise Server (GHES) is released. When a version of GHES is deprecated, the CodeQL Action and Bundle releases that shipped with it are deprecated as well.
|
||||||
|
|
||||||
| Recommended CodeQL Action | Recommended CodeQL CLI Version | GitHub Environment |
|
| Recommended CodeQL Action | Recommended CodeQL Bundle Version | GitHub Environment |
|
||||||
|---------|----------|--------------|
|
|---------|----------|--------------|
|
||||||
| `v3` | default (do not pass a `tools` input) | GitHub.com |
|
| `v3` | default (do not pass a `tools` input) | GitHub.com |
|
||||||
| `v3.24.11` | `v2.16.6` | Enterprise Server 3.13 |
|
| `v3.25.11` | `2.17.6` | Enterprise Server 3.14 |
|
||||||
| `3.22.12` | `2.15.5` | Enterprise Server 3.12 |
|
| `v3.24.11` | `2.16.6` | Enterprise Server 3.13 |
|
||||||
| `2.22.1` | `2.14.6` | Enterprise Server 3.11 |
|
| `v3.22.12` | `2.15.5` | Enterprise Server 3.12 |
|
||||||
| `2.20.3` | `2.13.5` | Enterprise Server 3.10 |
|
| `v2.22.1` | `2.14.6` | Enterprise Server 3.11 |
|
||||||
| `2.2.9` | `2.12.5` | Enterprise Server 3.9 |
|
| `v2.20.3` | `2.13.5` | Enterprise Server 3.10 |
|
||||||
|
|
||||||
CodeQL Action `v2` will stop receiving updates when GHES 3.11 is deprecated.
|
CodeQL Action `v2` will stop receiving updates when GHES 3.11 is deprecated.
|
||||||
|
|
||||||
|
|||||||
@@ -86,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"
|
||||||
|
|||||||
@@ -15,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'
|
||||||
|
|||||||
@@ -142,6 +142,6 @@ outputs:
|
|||||||
codeql-version:
|
codeql-version:
|
||||||
description: The version of the CodeQL binary used for analysis
|
description: The version 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'
|
||||||
|
|||||||
6
lib/actions-util.js
generated
6
lib/actions-util.js
generated
@@ -43,7 +43,7 @@ const core = __importStar(require("@actions/core"));
|
|||||||
const toolrunner = __importStar(require("@actions/exec/lib/toolrunner"));
|
const toolrunner = __importStar(require("@actions/exec/lib/toolrunner"));
|
||||||
const safeWhich = __importStar(require("@chrisgavin/safe-which"));
|
const safeWhich = __importStar(require("@chrisgavin/safe-which"));
|
||||||
const util_1 = require("./util");
|
const util_1 = require("./util");
|
||||||
// eslint-disable-next-line import/no-commonjs
|
// eslint-disable-next-line import/no-commonjs, @typescript-eslint/no-require-imports
|
||||||
const pkg = require("../package.json");
|
const pkg = require("../package.json");
|
||||||
/**
|
/**
|
||||||
* Wrapper around core.getInput for inputs that always have a value.
|
* Wrapper around core.getInput for inputs that always have a value.
|
||||||
@@ -104,7 +104,7 @@ const getCommitOid = async function (checkoutPath, ref = "HEAD") {
|
|||||||
}).exec();
|
}).exec();
|
||||||
return commitOid.trim();
|
return commitOid.trim();
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch {
|
||||||
if (stderr.includes("not a git repository")) {
|
if (stderr.includes("not a git repository")) {
|
||||||
core.info("Could not determine current commit SHA using git. Continuing with data from user input or environment. " +
|
core.info("Could not determine current commit SHA using git. Continuing with data from user input or environment. " +
|
||||||
"The checkout path provided to the action does not appear to be a git repository.");
|
"The checkout path provided to the action does not appear to be a git repository.");
|
||||||
@@ -161,7 +161,7 @@ const determineMergeBaseCommitOid = async function (checkoutPathOverride) {
|
|||||||
}
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch {
|
||||||
if (stderr.includes("not a git repository")) {
|
if (stderr.includes("not a git repository")) {
|
||||||
core.info("The checkout path provided to the action does not appear to be a git repository. " +
|
core.info("The checkout path provided to the action does not appear to be a git repository. " +
|
||||||
"Will calculate the merge base on the server.");
|
"Will calculate the merge base on the server.");
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
1
lib/analyze-action-env.test.js
generated
1
lib/analyze-action-env.test.js
generated
@@ -77,6 +77,7 @@ const util = __importStar(require("./util"));
|
|||||||
process.env["CODEQL_RAM"] = "4992";
|
process.env["CODEQL_RAM"] = "4992";
|
||||||
const runFinalizeStub = sinon.stub(analyze, "runFinalize");
|
const runFinalizeStub = sinon.stub(analyze, "runFinalize");
|
||||||
const runQueriesStub = sinon.stub(analyze, "runQueries");
|
const runQueriesStub = sinon.stub(analyze, "runQueries");
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
const analyzeAction = require("./analyze-action");
|
const analyzeAction = require("./analyze-action");
|
||||||
// When analyze-action.ts loads, it runs an async function from the top
|
// When analyze-action.ts loads, it runs an async function from the top
|
||||||
// level but does not wait for it to finish. To ensure that calls to
|
// level but does not wait for it to finish. To ensure that calls to
|
||||||
|
|||||||
@@ -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,4EA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,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"}
|
||||||
1
lib/analyze-action-input.test.js
generated
1
lib/analyze-action-input.test.js
generated
@@ -77,6 +77,7 @@ const util = __importStar(require("./util"));
|
|||||||
optionalInputStub.withArgs("ram").returns("3012");
|
optionalInputStub.withArgs("ram").returns("3012");
|
||||||
const runFinalizeStub = sinon.stub(analyze, "runFinalize");
|
const runFinalizeStub = sinon.stub(analyze, "runFinalize");
|
||||||
const runQueriesStub = sinon.stub(analyze, "runQueries");
|
const runQueriesStub = sinon.stub(analyze, "runQueries");
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
const analyzeAction = require("./analyze-action");
|
const analyzeAction = require("./analyze-action");
|
||||||
// When analyze-action.ts loads, it runs an async function from the top
|
// When analyze-action.ts loads, it runs an async function from the top
|
||||||
// level but does not wait for it to finish. To ensure that calls to
|
// level but does not wait for it to finish. To ensure that calls to
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"analyze-action-input.test.js","sourceRoot":"","sources":["../src/analyze-action-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path.resolve(dbPath, "codeql-database.yml"), "utf8"));
|
const dbInfo = yaml.load(fs.readFileSync(path.resolve(dbPath, "codeql-database.yml"), "utf8"));
|
||||||
return !("inProgress" in dbInfo);
|
return !("inProgress" in dbInfo);
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch {
|
||||||
logger.warning(`Could not check whether database for ${language} was finalized. Assuming it is not.`);
|
logger.warning(`Could not check whether database for ${language} was finalized. Assuming it is not.`);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -192,7 +192,7 @@ async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag,
|
|||||||
return statusReport;
|
return statusReport;
|
||||||
async function runInterpretResults(language, queries, sarifFile, enableDebugLogging) {
|
async function runInterpretResults(language, queries, sarifFile, enableDebugLogging) {
|
||||||
const databasePath = util.getCodeQLDatabasePath(config, language);
|
const databasePath = util.getCodeQLDatabasePath(config, language);
|
||||||
return await codeql.databaseInterpretResults(databasePath, queries, sarifFile, addSnippetsFlag, threadsFlag, enableDebugLogging ? "-vv" : "-v", automationDetailsId, config, features, logger);
|
return await codeql.databaseInterpretResults(databasePath, queries, sarifFile, addSnippetsFlag, threadsFlag, enableDebugLogging ? "-vv" : "-v", automationDetailsId, config, features);
|
||||||
}
|
}
|
||||||
/** Get an object with all queries and their counts parsed from a SARIF file path. */
|
/** Get an object with all queries and their counts parsed from a SARIF file path. */
|
||||||
function getPerQueryAlertCounts(sarifPath, log) {
|
function getPerQueryAlertCounts(sarifPath, log) {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
9
lib/autobuild.js
generated
9
lib/autobuild.js
generated
@@ -30,6 +30,7 @@ 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 codeql_1 = require("./codeql");
|
const codeql_1 = require("./codeql");
|
||||||
|
const doc_url_1 = require("./doc-url");
|
||||||
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");
|
||||||
@@ -103,15 +104,13 @@ async function determineAutobuildLanguages(codeql, config, logger) {
|
|||||||
logger.warning(`We will only automatically build ${languages.join(" and ")} code. If you wish to scan ${autobuildLanguagesWithoutGo
|
logger.warning(`We will only automatically build ${languages.join(" and ")} code. If you wish to scan ${autobuildLanguagesWithoutGo
|
||||||
.slice(1)
|
.slice(1)
|
||||||
.join(" and ")}, you must replace the autobuild step of your workflow with custom build steps. ` +
|
.join(" and ")}, you must replace the autobuild step of your workflow with custom build steps. ` +
|
||||||
"For more information, see " +
|
`See ${doc_url_1.DocUrl.SPECIFY_BUILD_STEPS_MANUALLY} for more information.`);
|
||||||
"https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages#adding-build-steps-for-a-compiled-language");
|
|
||||||
}
|
}
|
||||||
return languages;
|
return languages;
|
||||||
}
|
}
|
||||||
async function setupCppAutobuild(codeql, logger) {
|
async function setupCppAutobuild(codeql, logger) {
|
||||||
const envVar = feature_flags_1.featureConfig[feature_flags_1.Feature.CppDependencyInstallation].envVar;
|
const envVar = feature_flags_1.featureConfig[feature_flags_1.Feature.CppDependencyInstallation].envVar;
|
||||||
const featureName = "C++ automatic installation of dependencies";
|
const featureName = "C++ automatic installation of dependencies";
|
||||||
const envDoc = "https://docs.github.com/en/actions/learn-github-actions/variables#defining-environment-variables-for-a-single-workflow";
|
|
||||||
const gitHubVersion = await (0, api_client_1.getGitHubVersion)();
|
const gitHubVersion = await (0, api_client_1.getGitHubVersion)();
|
||||||
const repositoryNwo = (0, repository_1.parseRepositoryNwo)((0, util_1.getRequiredEnvParam)("GITHUB_REPOSITORY"));
|
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);
|
const features = new feature_flags_1.Features(gitHubVersion, repositoryNwo, (0, actions_util_1.getTemporaryDirectory)(), logger);
|
||||||
@@ -120,12 +119,12 @@ async function setupCppAutobuild(codeql, logger) {
|
|||||||
if (process.env["RUNNER_ENVIRONMENT"] === "self-hosted" &&
|
if (process.env["RUNNER_ENVIRONMENT"] === "self-hosted" &&
|
||||||
process.env[envVar] !== "true") {
|
process.env[envVar] !== "true") {
|
||||||
logger.info(`Disabling ${featureName} as we are on a self-hosted runner.${(0, actions_util_1.getWorkflowEventName)() !== "dynamic"
|
logger.info(`Disabling ${featureName} as we are on a self-hosted runner.${(0, actions_util_1.getWorkflowEventName)() !== "dynamic"
|
||||||
? ` To override this, set the ${envVar} environment variable to 'true' in your workflow (see ${envDoc}).`
|
? ` To override this, set the ${envVar} environment variable to 'true' in your workflow. See ${doc_url_1.DocUrl.DEFINE_ENV_VARIABLES} for more information.`
|
||||||
: ""}`);
|
: ""}`);
|
||||||
core.exportVariable(envVar, "false");
|
core.exportVariable(envVar, "false");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logger.info(`Enabling ${featureName}. This can be disabled by setting the ${envVar} environment variable to 'false' (see ${envDoc}).`);
|
logger.info(`Enabling ${featureName}. This can be disabled by setting the ${envVar} environment variable to 'false'. See ${doc_url_1.DocUrl.DEFINE_ENV_VARIABLES} for more information.`);
|
||||||
core.exportVariable(envVar, "true");
|
core.exportVariable(envVar, "true");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"autobuild.js","sourceRoot":"","sources":["../src/autobuild.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAcA,kEAgGC;AAED,8CAuCC;AAED,oCAsBC;AA/KD,oDAAsC;AAEtC,iDAA6E;AA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d,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,MAAM,CAAC,eAAe,CAAC,6BAAY,CAAC,wBAAwB,CAAC,CAAC,EACrE,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"}
|
||||||
4
lib/cli-errors.js
generated
4
lib/cli-errors.js
generated
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||||||
exports.cliErrorsConfig = exports.CliConfigErrorCategory = exports.CommandInvocationError = void 0;
|
exports.cliErrorsConfig = exports.CliConfigErrorCategory = exports.CommandInvocationError = void 0;
|
||||||
exports.getCliConfigCategoryIfExists = getCliConfigCategoryIfExists;
|
exports.getCliConfigCategoryIfExists = getCliConfigCategoryIfExists;
|
||||||
exports.wrapCliConfigurationError = wrapCliConfigurationError;
|
exports.wrapCliConfigurationError = wrapCliConfigurationError;
|
||||||
|
const doc_url_1 = require("./doc-url");
|
||||||
const util_1 = require("./util");
|
const util_1 = require("./util");
|
||||||
/**
|
/**
|
||||||
* A class of Error that we can classify as an error stemming from a CLI
|
* A class of Error that we can classify as an error stemming from a CLI
|
||||||
@@ -22,10 +23,9 @@ class CommandInvocationError extends Error {
|
|||||||
`Exit code was ${exitCode} and error was: ${ensureEndsInPeriod(fatalErrors.trim())} See the logs for more details.`;
|
`Exit code was ${exitCode} and error was: ${ensureEndsInPeriod(fatalErrors.trim())} See the logs for more details.`;
|
||||||
}
|
}
|
||||||
else if (autobuildErrors) {
|
else if (autobuildErrors) {
|
||||||
const autobuildHelpLink = "https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/automatic-build-failed";
|
|
||||||
message =
|
message =
|
||||||
"We were unable to automatically build your code. Please provide manual build steps. " +
|
"We were unable to automatically build your code. Please provide manual build steps. " +
|
||||||
`For more information, see ${autobuildHelpLink}. ` +
|
`See ${doc_url_1.DocUrl.AUTOMATIC_BUILD_FAILED} for more information. ` +
|
||||||
`Encountered the following error: ${autobuildErrors}`;
|
`Encountered the following error: ${autobuildErrors}`;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
57
lib/codeql.js
generated
57
lib/codeql.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.CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE = exports.CODEQL_VERSION_ANALYSIS_SUMMARY_V2 = exports.CODEQL_VERSION_LANGUAGE_ALIASING = exports.CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG = exports.CODEQL_VERSION_RESOLVE_ENVIRONMENT = exports.CODEQL_VERSION_DIAGNOSTICS_EXPORT_FIXED = void 0;
|
exports.CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE = exports.CODEQL_VERSION_ANALYSIS_SUMMARY_V2 = exports.CODEQL_VERSION_LANGUAGE_ALIASING = exports.CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG = void 0;
|
||||||
exports.setupCodeQL = setupCodeQL;
|
exports.setupCodeQL = setupCodeQL;
|
||||||
exports.getCodeQL = getCodeQL;
|
exports.getCodeQL = getCodeQL;
|
||||||
exports.setCodeQL = setCodeQL;
|
exports.setCodeQL = setCodeQL;
|
||||||
@@ -42,6 +42,7 @@ const yaml = __importStar(require("js-yaml"));
|
|||||||
const semver = __importStar(require("semver"));
|
const semver = __importStar(require("semver"));
|
||||||
const actions_util_1 = require("./actions-util");
|
const actions_util_1 = require("./actions-util");
|
||||||
const cli_errors_1 = require("./cli-errors");
|
const cli_errors_1 = require("./cli-errors");
|
||||||
|
const doc_url_1 = require("./doc-url");
|
||||||
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 setupCodeql = __importStar(require("./setup-codeql"));
|
const setupCodeql = __importStar(require("./setup-codeql"));
|
||||||
@@ -62,7 +63,7 @@ let cachedCodeQL = undefined;
|
|||||||
* The version flags below can be used to conditionally enable certain features
|
* The version flags below can be used to conditionally enable certain features
|
||||||
* on versions newer than this.
|
* on versions newer than this.
|
||||||
*/
|
*/
|
||||||
const CODEQL_MINIMUM_VERSION = "2.12.6";
|
const CODEQL_MINIMUM_VERSION = "2.13.5";
|
||||||
/**
|
/**
|
||||||
* This version will shortly become the oldest version of CodeQL that the Action will run with.
|
* This version will shortly become the oldest version of CodeQL that the Action will run with.
|
||||||
*/
|
*/
|
||||||
@@ -84,14 +85,6 @@ const EXTRACTION_DEBUG_MODE_VERBOSITY = "progress++";
|
|||||||
* For convenience, please keep these in descending order. Once a version
|
* For convenience, please keep these in descending order. Once a version
|
||||||
* flag is older than the oldest supported version above, it may be removed.
|
* flag is older than the oldest supported version above, it may be removed.
|
||||||
*/
|
*/
|
||||||
/**
|
|
||||||
* Versions 2.13.1+ of the CodeQL CLI fix a bug where diagnostics export could produce invalid SARIF.
|
|
||||||
*/
|
|
||||||
exports.CODEQL_VERSION_DIAGNOSTICS_EXPORT_FIXED = "2.13.1";
|
|
||||||
/**
|
|
||||||
* Versions 2.13.4+ of the CodeQL CLI support the `resolve build-environment` command.
|
|
||||||
*/
|
|
||||||
exports.CODEQL_VERSION_RESOLVE_ENVIRONMENT = "2.13.4";
|
|
||||||
/**
|
/**
|
||||||
* Versions 2.14.2+ of the CodeQL CLI support language-specific baseline configuration.
|
* Versions 2.14.2+ of the CodeQL CLI support language-specific baseline configuration.
|
||||||
*/
|
*/
|
||||||
@@ -127,7 +120,7 @@ const CODEQL_VERSION_INCLUDE_QUERY_HELP = "2.15.2";
|
|||||||
*/
|
*/
|
||||||
async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, logger, checkVersion) {
|
async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, logger, checkVersion) {
|
||||||
try {
|
try {
|
||||||
const { codeqlFolder, toolsDownloadDurationMs, toolsSource, toolsVersion } = await setupCodeql.setupCodeQLBundle(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, logger);
|
const { codeqlFolder, toolsDownloadStatusReport, toolsSource, toolsVersion, } = await setupCodeql.setupCodeQLBundle(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, logger);
|
||||||
let codeqlCmd = path.join(codeqlFolder, "codeql", "codeql");
|
let codeqlCmd = path.join(codeqlFolder, "codeql", "codeql");
|
||||||
if (process.platform === "win32") {
|
if (process.platform === "win32") {
|
||||||
codeqlCmd += ".exe";
|
codeqlCmd += ".exe";
|
||||||
@@ -138,7 +131,7 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV
|
|||||||
cachedCodeQL = await getCodeQLForCmd(codeqlCmd, checkVersion);
|
cachedCodeQL = await getCodeQLForCmd(codeqlCmd, checkVersion);
|
||||||
return {
|
return {
|
||||||
codeql: cachedCodeQL,
|
codeql: cachedCodeQL,
|
||||||
toolsDownloadDurationMs,
|
toolsDownloadStatusReport,
|
||||||
toolsSource,
|
toolsSource,
|
||||||
toolsVersion,
|
toolsVersion,
|
||||||
};
|
};
|
||||||
@@ -246,7 +239,7 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||||||
try {
|
try {
|
||||||
result = JSON.parse(output);
|
result = JSON.parse(output);
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch {
|
||||||
throw Error(`Invalid JSON output from \`version --format=json\`: ${output}`);
|
throw Error(`Invalid JSON output from \`version --format=json\`: ${output}`);
|
||||||
}
|
}
|
||||||
util.cacheCodeQlVersion(result);
|
util.cacheCodeQlVersion(result);
|
||||||
@@ -360,8 +353,7 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||||||
if (config.buildMode === util_1.BuildMode.Autobuild) {
|
if (config.buildMode === util_1.BuildMode.Autobuild) {
|
||||||
const prefix = "We were unable to automatically build your code. " +
|
const prefix = "We were unable to automatically build your code. " +
|
||||||
"Please change the build mode for this language to manual and specify build steps " +
|
"Please change the build mode for this language to manual and specify build steps " +
|
||||||
"for your project. For more information, see " +
|
`for your project. See ${doc_url_1.DocUrl.AUTOMATIC_BUILD_FAILED} for more information.`;
|
||||||
"https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/automatic-build-failed.";
|
|
||||||
const ErrorConstructor = e instanceof util.ConfigurationError
|
const ErrorConstructor = e instanceof util.ConfigurationError
|
||||||
? util.ConfigurationError
|
? util.ConfigurationError
|
||||||
: Error;
|
: Error;
|
||||||
@@ -473,20 +465,15 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||||||
}
|
}
|
||||||
await runTool(cmd, codeqlArgs);
|
await runTool(cmd, codeqlArgs);
|
||||||
},
|
},
|
||||||
async databaseInterpretResults(databasePath, querySuitePaths, sarifFile, addSnippetsFlag, threadsFlag, verbosityFlag, automationDetailsId, config, features, logger) {
|
async databaseInterpretResults(databasePath, querySuitePaths, sarifFile, addSnippetsFlag, threadsFlag, verbosityFlag, automationDetailsId, config, features) {
|
||||||
const shouldExportDiagnostics = await features.getValue(feature_flags_1.Feature.ExportDiagnosticsEnabled, this);
|
const shouldExportDiagnostics = await features.getValue(feature_flags_1.Feature.ExportDiagnosticsEnabled, this);
|
||||||
const shouldWorkaroundInvalidNotifications = shouldExportDiagnostics &&
|
|
||||||
!(await isDiagnosticsExportInvalidSarifFixed(this));
|
|
||||||
const codeqlOutputFile = shouldWorkaroundInvalidNotifications
|
|
||||||
? path.join(config.tempDir, "codeql-intermediate-results.sarif")
|
|
||||||
: sarifFile;
|
|
||||||
const codeqlArgs = [
|
const codeqlArgs = [
|
||||||
"database",
|
"database",
|
||||||
"interpret-results",
|
"interpret-results",
|
||||||
threadsFlag,
|
threadsFlag,
|
||||||
"--format=sarif-latest",
|
"--format=sarif-latest",
|
||||||
verbosityFlag,
|
verbosityFlag,
|
||||||
`--output=${codeqlOutputFile}`,
|
`--output=${sarifFile}`,
|
||||||
addSnippetsFlag,
|
addSnippetsFlag,
|
||||||
"--print-diagnostics-summary",
|
"--print-diagnostics-summary",
|
||||||
"--print-metrics-summary",
|
"--print-metrics-summary",
|
||||||
@@ -521,13 +508,9 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||||||
}
|
}
|
||||||
// Capture the stdout, which contains the analysis summary. Don't stream it to the Actions
|
// Capture the stdout, which contains the analysis summary. Don't stream it to the Actions
|
||||||
// logs to avoid printing it twice.
|
// logs to avoid printing it twice.
|
||||||
const analysisSummary = await runTool(cmd, codeqlArgs, {
|
return await runTool(cmd, codeqlArgs, {
|
||||||
noStreamStdout: true,
|
noStreamStdout: true,
|
||||||
});
|
});
|
||||||
if (shouldWorkaroundInvalidNotifications) {
|
|
||||||
util.fixInvalidNotificationsInFile(codeqlOutputFile, sarifFile, logger);
|
|
||||||
}
|
|
||||||
return analysisSummary;
|
|
||||||
},
|
},
|
||||||
async databasePrintBaseline(databasePath) {
|
async databasePrintBaseline(databasePath) {
|
||||||
const codeqlArgs = [
|
const codeqlArgs = [
|
||||||
@@ -603,18 +586,14 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||||||
];
|
];
|
||||||
await new toolrunner.ToolRunner(cmd, args).exec();
|
await new toolrunner.ToolRunner(cmd, args).exec();
|
||||||
},
|
},
|
||||||
async databaseExportDiagnostics(databasePath, sarifFile, automationDetailsId, tempDir, logger) {
|
async databaseExportDiagnostics(databasePath, sarifFile, automationDetailsId) {
|
||||||
const shouldWorkaroundInvalidNotifications = !(await isDiagnosticsExportInvalidSarifFixed(this));
|
|
||||||
const codeqlOutputFile = shouldWorkaroundInvalidNotifications
|
|
||||||
? path.join(tempDir, "codeql-intermediate-results.sarif")
|
|
||||||
: sarifFile;
|
|
||||||
const args = [
|
const args = [
|
||||||
"database",
|
"database",
|
||||||
"export-diagnostics",
|
"export-diagnostics",
|
||||||
`${databasePath}`,
|
`${databasePath}`,
|
||||||
"--db-cluster", // Database is always a cluster for CodeQL versions that support diagnostics.
|
"--db-cluster", // Database is always a cluster for CodeQL versions that support diagnostics.
|
||||||
"--format=sarif-latest",
|
"--format=sarif-latest",
|
||||||
`--output=${codeqlOutputFile}`,
|
`--output=${sarifFile}`,
|
||||||
"--sarif-include-diagnostics", // ExportDiagnosticsEnabled is always true if this command is run.
|
"--sarif-include-diagnostics", // ExportDiagnosticsEnabled is always true if this command is run.
|
||||||
"-vvv",
|
"-vvv",
|
||||||
...getExtraOptionsFromEnv(["diagnostics", "export"]),
|
...getExtraOptionsFromEnv(["diagnostics", "export"]),
|
||||||
@@ -623,10 +602,6 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||||||
args.push("--sarif-category", automationDetailsId);
|
args.push("--sarif-category", automationDetailsId);
|
||||||
}
|
}
|
||||||
await new toolrunner.ToolRunner(cmd, args).exec();
|
await new toolrunner.ToolRunner(cmd, args).exec();
|
||||||
if (shouldWorkaroundInvalidNotifications) {
|
|
||||||
// Fix invalid notifications in the SARIF file output by CodeQL.
|
|
||||||
util.fixInvalidNotificationsInFile(codeqlOutputFile, sarifFile, logger);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
async diagnosticsExport(sarifFile, automationDetailsId, config) {
|
async diagnosticsExport(sarifFile, automationDetailsId, config) {
|
||||||
const args = [
|
const args = [
|
||||||
@@ -813,7 +788,7 @@ async function runTool(cmd, args = [], opts = {}) {
|
|||||||
async function generateCodeScanningConfig(config, logger) {
|
async function generateCodeScanningConfig(config, logger) {
|
||||||
const codeScanningConfigFile = getGeneratedCodeScanningConfigPath(config);
|
const codeScanningConfigFile = getGeneratedCodeScanningConfigPath(config);
|
||||||
// make a copy so we can modify it
|
// make a copy so we can modify it
|
||||||
const augmentedConfig = cloneObject(config.originalUserInput);
|
const augmentedConfig = (0, util_1.cloneObject)(config.originalUserInput);
|
||||||
// Inject the queries from the input
|
// Inject the queries from the input
|
||||||
if (config.augmentationProperties.queriesInput) {
|
if (config.augmentationProperties.queriesInput) {
|
||||||
if (config.augmentationProperties.queriesInputCombines) {
|
if (config.augmentationProperties.queriesInputCombines) {
|
||||||
@@ -857,9 +832,6 @@ async function generateCodeScanningConfig(config, logger) {
|
|||||||
fs.writeFileSync(codeScanningConfigFile, yaml.dump(augmentedConfig));
|
fs.writeFileSync(codeScanningConfigFile, yaml.dump(augmentedConfig));
|
||||||
return codeScanningConfigFile;
|
return codeScanningConfigFile;
|
||||||
}
|
}
|
||||||
function cloneObject(obj) {
|
|
||||||
return JSON.parse(JSON.stringify(obj));
|
|
||||||
}
|
|
||||||
// This constant sets the size of each TRAP cache in megabytes.
|
// This constant sets the size of each TRAP cache in megabytes.
|
||||||
const TRAP_CACHE_SIZE_MB = 1024;
|
const TRAP_CACHE_SIZE_MB = 1024;
|
||||||
async function getTrapCachingExtractorConfigArgs(config) {
|
async function getTrapCachingExtractorConfigArgs(config) {
|
||||||
@@ -887,9 +859,6 @@ async function getTrapCachingExtractorConfigArgsForLang(config, language) {
|
|||||||
function getGeneratedCodeScanningConfigPath(config) {
|
function getGeneratedCodeScanningConfigPath(config) {
|
||||||
return path.resolve(config.tempDir, "user-config.yaml");
|
return path.resolve(config.tempDir, "user-config.yaml");
|
||||||
}
|
}
|
||||||
async function isDiagnosticsExportInvalidSarifFixed(codeql) {
|
|
||||||
return await util.codeQlVersionAtLeast(codeql, exports.CODEQL_VERSION_DIAGNOSTICS_EXPORT_FIXED);
|
|
||||||
}
|
|
||||||
async function getLanguageAliasingArguments(codeql) {
|
async function getLanguageAliasingArguments(codeql) {
|
||||||
if (await util.codeQlVersionAtLeast(codeql, exports.CODEQL_VERSION_LANGUAGE_ALIASING)) {
|
if (await util.codeQlVersionAtLeast(codeql, exports.CODEQL_VERSION_LANGUAGE_ALIASING)) {
|
||||||
return ["--extractor-include-aliases"];
|
return ["--extractor-include-aliases"];
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
87
lib/codeql.test.js
generated
87
lib/codeql.test.js
generated
@@ -40,6 +40,7 @@ const actionsUtil = __importStar(require("./actions-util"));
|
|||||||
const cli_errors_1 = require("./cli-errors");
|
const cli_errors_1 = require("./cli-errors");
|
||||||
const codeql = __importStar(require("./codeql"));
|
const codeql = __importStar(require("./codeql"));
|
||||||
const defaults = __importStar(require("./defaults.json"));
|
const defaults = __importStar(require("./defaults.json"));
|
||||||
|
const doc_url_1 = require("./doc-url");
|
||||||
const languages_1 = require("./languages");
|
const languages_1 = require("./languages");
|
||||||
const logging_1 = require("./logging");
|
const logging_1 = require("./logging");
|
||||||
const setup_codeql_1 = require("./setup-codeql");
|
const setup_codeql_1 = require("./setup-codeql");
|
||||||
@@ -100,7 +101,7 @@ function mockApiDetails(apiDetails) {
|
|||||||
t.assert(toolcache.find("CodeQL", `0.0.0-${version}`));
|
t.assert(toolcache.find("CodeQL", `0.0.0-${version}`));
|
||||||
t.is(result.toolsVersion, `0.0.0-${version}`);
|
t.is(result.toolsVersion, `0.0.0-${version}`);
|
||||||
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Download);
|
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Download);
|
||||||
t.assert(Number.isInteger(result.toolsDownloadDurationMs));
|
t.assert(Number.isInteger(result.toolsDownloadStatusReport?.downloadDurationMs));
|
||||||
}
|
}
|
||||||
t.is(toolcache.findAllVersions("CodeQL").length, 2);
|
t.is(toolcache.findAllVersions("CodeQL").length, 2);
|
||||||
});
|
});
|
||||||
@@ -117,7 +118,7 @@ function mockApiDetails(apiDetails) {
|
|||||||
t.assert(toolcache.find("CodeQL", `2.14.0`));
|
t.assert(toolcache.find("CodeQL", `2.14.0`));
|
||||||
t.is(result.toolsVersion, `2.14.0`);
|
t.is(result.toolsVersion, `2.14.0`);
|
||||||
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Download);
|
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Download);
|
||||||
t.assert(Number.isInteger(result.toolsDownloadDurationMs));
|
t.assert(Number.isInteger(result.toolsDownloadStatusReport?.downloadDurationMs));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
(0, ava_1.default)("downloads an explicitly requested bundle even if a different version is cached", async (t) => {
|
(0, ava_1.default)("downloads an explicitly requested bundle even if a different version is cached", async (t) => {
|
||||||
@@ -135,42 +136,33 @@ function mockApiDetails(apiDetails) {
|
|||||||
t.assert(toolcache.find("CodeQL", "0.0.0-20200610"));
|
t.assert(toolcache.find("CodeQL", "0.0.0-20200610"));
|
||||||
t.deepEqual(result.toolsVersion, "0.0.0-20200610");
|
t.deepEqual(result.toolsVersion, "0.0.0-20200610");
|
||||||
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Download);
|
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Download);
|
||||||
t.assert(Number.isInteger(result.toolsDownloadDurationMs));
|
t.assert(Number.isInteger(result.toolsDownloadStatusReport?.downloadDurationMs));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
const EXPLICITLY_REQUESTED_BUNDLE_TEST_CASES = [
|
const EXPLICITLY_REQUESTED_BUNDLE_TEST_CASES = [
|
||||||
{
|
{
|
||||||
cliVersion: "2.10.0",
|
tagName: "codeql-bundle-2.17.6",
|
||||||
expectedToolcacheVersion: "2.10.0-20200610",
|
expectedToolcacheVersion: "2.17.6",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
cliVersion: "2.10.0-pre",
|
tagName: "codeql-bundle-20240805",
|
||||||
expectedToolcacheVersion: "0.0.0-20200610",
|
expectedToolcacheVersion: "0.0.0-20240805",
|
||||||
},
|
|
||||||
{
|
|
||||||
cliVersion: "2.10.0+202006100101",
|
|
||||||
expectedToolcacheVersion: "0.0.0-20200610",
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
for (const { cliVersion, expectedToolcacheVersion, } of EXPLICITLY_REQUESTED_BUNDLE_TEST_CASES) {
|
for (const { tagName, expectedToolcacheVersion, } of EXPLICITLY_REQUESTED_BUNDLE_TEST_CASES) {
|
||||||
(0, ava_1.default)(`caches an explicitly requested bundle containing CLI ${cliVersion} as ${expectedToolcacheVersion}`, async (t) => {
|
(0, ava_1.default)(`caches explicitly requested bundle ${tagName} as ${expectedToolcacheVersion}`, async (t) => {
|
||||||
await util.withTmpDir(async (tmpDir) => {
|
await util.withTmpDir(async (tmpDir) => {
|
||||||
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
|
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
|
||||||
mockApiDetails(testing_utils_1.SAMPLE_DOTCOM_API_DETAILS);
|
mockApiDetails(testing_utils_1.SAMPLE_DOTCOM_API_DETAILS);
|
||||||
sinon.stub(actionsUtil, "isRunningLocalAction").returns(true);
|
sinon.stub(actionsUtil, "isRunningLocalAction").returns(true);
|
||||||
const releaseApiMock = mockReleaseApi({
|
|
||||||
assetNames: [`cli-version-${cliVersion}.txt`],
|
|
||||||
tagName: "codeql-bundle-20200610",
|
|
||||||
});
|
|
||||||
const url = (0, testing_utils_1.mockBundleDownloadApi)({
|
const url = (0, testing_utils_1.mockBundleDownloadApi)({
|
||||||
tagName: "codeql-bundle-20200610",
|
tagName,
|
||||||
});
|
});
|
||||||
const result = await codeql.setupCodeQL(url, testing_utils_1.SAMPLE_DOTCOM_API_DETAILS, tmpDir, util.GitHubVariant.DOTCOM, testing_utils_1.SAMPLE_DEFAULT_CLI_VERSION, (0, logging_1.getRunnerLogger)(true), false);
|
const result = await codeql.setupCodeQL(url, testing_utils_1.SAMPLE_DOTCOM_API_DETAILS, tmpDir, util.GitHubVariant.DOTCOM, testing_utils_1.SAMPLE_DEFAULT_CLI_VERSION, (0, logging_1.getRunnerLogger)(true), false);
|
||||||
t.assert(releaseApiMock.isDone(), "Releases API should have been called");
|
|
||||||
t.assert(toolcache.find("CodeQL", expectedToolcacheVersion));
|
t.assert(toolcache.find("CodeQL", expectedToolcacheVersion));
|
||||||
t.deepEqual(result.toolsVersion, cliVersion);
|
t.deepEqual(result.toolsVersion, expectedToolcacheVersion);
|
||||||
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Download);
|
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Download);
|
||||||
t.assert(Number.isInteger(result.toolsDownloadDurationMs));
|
t.assert(Number.isInteger(result.toolsDownloadStatusReport?.downloadDurationMs));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -192,7 +184,7 @@ for (const toolcacheVersion of [
|
|||||||
const result = await codeql.setupCodeQL(undefined, testing_utils_1.SAMPLE_DOTCOM_API_DETAILS, tmpDir, util.GitHubVariant.DOTCOM, testing_utils_1.SAMPLE_DEFAULT_CLI_VERSION, (0, logging_1.getRunnerLogger)(true), false);
|
const result = await codeql.setupCodeQL(undefined, testing_utils_1.SAMPLE_DOTCOM_API_DETAILS, tmpDir, util.GitHubVariant.DOTCOM, testing_utils_1.SAMPLE_DEFAULT_CLI_VERSION, (0, logging_1.getRunnerLogger)(true), false);
|
||||||
t.is(result.toolsVersion, testing_utils_1.SAMPLE_DEFAULT_CLI_VERSION.cliVersion);
|
t.is(result.toolsVersion, testing_utils_1.SAMPLE_DEFAULT_CLI_VERSION.cliVersion);
|
||||||
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Toolcache);
|
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Toolcache);
|
||||||
t.is(result.toolsDownloadDurationMs, undefined);
|
t.is(result.toolsDownloadStatusReport?.downloadDurationMs, undefined);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -210,7 +202,7 @@ for (const toolcacheVersion of [
|
|||||||
}, (0, logging_1.getRunnerLogger)(true), false);
|
}, (0, logging_1.getRunnerLogger)(true), false);
|
||||||
t.deepEqual(result.toolsVersion, "0.0.0-20200601");
|
t.deepEqual(result.toolsVersion, "0.0.0-20200601");
|
||||||
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Toolcache);
|
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Toolcache);
|
||||||
t.is(result.toolsDownloadDurationMs, undefined);
|
t.is(result.toolsDownloadStatusReport?.downloadDurationMs, undefined);
|
||||||
const cachedVersions = toolcache.findAllVersions("CodeQL");
|
const cachedVersions = toolcache.findAllVersions("CodeQL");
|
||||||
t.is(cachedVersions.length, 1);
|
t.is(cachedVersions.length, 1);
|
||||||
});
|
});
|
||||||
@@ -232,7 +224,7 @@ for (const toolcacheVersion of [
|
|||||||
}, (0, logging_1.getRunnerLogger)(true), false);
|
}, (0, logging_1.getRunnerLogger)(true), false);
|
||||||
t.deepEqual(result.toolsVersion, defaults.cliVersion);
|
t.deepEqual(result.toolsVersion, defaults.cliVersion);
|
||||||
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Download);
|
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Download);
|
||||||
t.assert(Number.isInteger(result.toolsDownloadDurationMs));
|
t.assert(Number.isInteger(result.toolsDownloadStatusReport?.downloadDurationMs));
|
||||||
const cachedVersions = toolcache.findAllVersions("CodeQL");
|
const cachedVersions = toolcache.findAllVersions("CodeQL");
|
||||||
t.is(cachedVersions.length, 2);
|
t.is(cachedVersions.length, 2);
|
||||||
});
|
});
|
||||||
@@ -251,7 +243,7 @@ for (const toolcacheVersion of [
|
|||||||
const result = await codeql.setupCodeQL("latest", testing_utils_1.SAMPLE_DOTCOM_API_DETAILS, tmpDir, util.GitHubVariant.DOTCOM, testing_utils_1.SAMPLE_DEFAULT_CLI_VERSION, (0, logging_1.getRunnerLogger)(true), false);
|
const result = await codeql.setupCodeQL("latest", testing_utils_1.SAMPLE_DOTCOM_API_DETAILS, tmpDir, util.GitHubVariant.DOTCOM, testing_utils_1.SAMPLE_DEFAULT_CLI_VERSION, (0, logging_1.getRunnerLogger)(true), false);
|
||||||
t.deepEqual(result.toolsVersion, defaults.cliVersion);
|
t.deepEqual(result.toolsVersion, defaults.cliVersion);
|
||||||
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Download);
|
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Download);
|
||||||
t.assert(Number.isInteger(result.toolsDownloadDurationMs));
|
t.assert(Number.isInteger(result.toolsDownloadStatusReport?.downloadDurationMs));
|
||||||
const cachedVersions = toolcache.findAllVersions("CodeQL");
|
const cachedVersions = toolcache.findAllVersions("CodeQL");
|
||||||
t.is(cachedVersions.length, 2);
|
t.is(cachedVersions.length, 2);
|
||||||
});
|
});
|
||||||
@@ -262,7 +254,7 @@ for (const toolcacheVersion of [
|
|||||||
mockApiDetails(testing_utils_1.SAMPLE_DOTCOM_API_DETAILS);
|
mockApiDetails(testing_utils_1.SAMPLE_DOTCOM_API_DETAILS);
|
||||||
sinon.stub(actionsUtil, "isRunningLocalAction").returns(true);
|
sinon.stub(actionsUtil, "isRunningLocalAction").returns(true);
|
||||||
const releasesApiMock = mockReleaseApi({
|
const releasesApiMock = mockReleaseApi({
|
||||||
assetNames: ["cli-version-2.12.6.txt"],
|
assetNames: ["cli-version-2.13.5.txt"],
|
||||||
tagName: "codeql-bundle-20230203",
|
tagName: "codeql-bundle-20230203",
|
||||||
});
|
});
|
||||||
(0, testing_utils_1.mockBundleDownloadApi)({
|
(0, testing_utils_1.mockBundleDownloadApi)({
|
||||||
@@ -273,7 +265,7 @@ for (const toolcacheVersion of [
|
|||||||
const result = await codeql.setupCodeQL("https://github.com/codeql-testing/codeql-cli-nightlies/releases/download/codeql-bundle-20230203/codeql-bundle.tar.gz", testing_utils_1.SAMPLE_DOTCOM_API_DETAILS, tmpDir, util.GitHubVariant.DOTCOM, testing_utils_1.SAMPLE_DEFAULT_CLI_VERSION, (0, logging_1.getRunnerLogger)(true), false);
|
const result = await codeql.setupCodeQL("https://github.com/codeql-testing/codeql-cli-nightlies/releases/download/codeql-bundle-20230203/codeql-bundle.tar.gz", testing_utils_1.SAMPLE_DOTCOM_API_DETAILS, tmpDir, util.GitHubVariant.DOTCOM, testing_utils_1.SAMPLE_DEFAULT_CLI_VERSION, (0, logging_1.getRunnerLogger)(true), false);
|
||||||
t.is(result.toolsVersion, "0.0.0-20230203");
|
t.is(result.toolsVersion, "0.0.0-20230203");
|
||||||
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Download);
|
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Download);
|
||||||
t.true(Number.isInteger(result.toolsDownloadDurationMs));
|
t.true(Number.isInteger(result.toolsDownloadStatusReport?.downloadDurationMs));
|
||||||
const cachedVersions = toolcache.findAllVersions("CodeQL");
|
const cachedVersions = toolcache.findAllVersions("CodeQL");
|
||||||
t.is(cachedVersions.length, 1);
|
t.is(cachedVersions.length, 1);
|
||||||
t.is(cachedVersions[0], "0.0.0-20230203");
|
t.is(cachedVersions[0], "0.0.0-20230203");
|
||||||
@@ -450,7 +442,7 @@ const injectedConfigMacro = ava_1.default.macro({
|
|||||||
await util.withTmpDir(async (tempDir) => {
|
await util.withTmpDir(async (tempDir) => {
|
||||||
const runnerConstructorStub = stubToolRunnerConstructor();
|
const runnerConstructorStub = stubToolRunnerConstructor();
|
||||||
const codeqlObject = await codeql.getCodeQLForTesting();
|
const codeqlObject = await codeql.getCodeQLForTesting();
|
||||||
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.12.6"));
|
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.17.6"));
|
||||||
await codeqlObject.databaseInitCluster({ ...stubConfig, tempDir }, "", undefined, "/path/to/qlconfig.yml", (0, logging_1.getRunnerLogger)(true));
|
await codeqlObject.databaseInitCluster({ ...stubConfig, tempDir }, "", undefined, "/path/to/qlconfig.yml", (0, logging_1.getRunnerLogger)(true));
|
||||||
const args = runnerConstructorStub.firstCall.args[1];
|
const args = runnerConstructorStub.firstCall.args[1];
|
||||||
// should have used a config file
|
// should have used a config file
|
||||||
@@ -465,7 +457,7 @@ const injectedConfigMacro = ava_1.default.macro({
|
|||||||
await util.withTmpDir(async (tempDir) => {
|
await util.withTmpDir(async (tempDir) => {
|
||||||
const runnerConstructorStub = stubToolRunnerConstructor();
|
const runnerConstructorStub = stubToolRunnerConstructor();
|
||||||
const codeqlObject = await codeql.getCodeQLForTesting();
|
const codeqlObject = await codeql.getCodeQLForTesting();
|
||||||
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.12.6"));
|
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.17.6"));
|
||||||
await codeqlObject.databaseInitCluster({ ...stubConfig, tempDir }, "", undefined, undefined, // undefined qlconfigFile
|
await codeqlObject.databaseInitCluster({ ...stubConfig, tempDir }, "", undefined, undefined, // undefined qlconfigFile
|
||||||
(0, logging_1.getRunnerLogger)(true));
|
(0, logging_1.getRunnerLogger)(true));
|
||||||
const args = runnerConstructorStub.firstCall.args[1];
|
const args = runnerConstructorStub.firstCall.args[1];
|
||||||
@@ -496,7 +488,7 @@ const NEW_ANALYSIS_SUMMARY_TEST_CASES = [
|
|||||||
codeqlVersion: (0, testing_utils_1.makeVersionInfo)("2.15.0"),
|
codeqlVersion: (0, testing_utils_1.makeVersionInfo)("2.15.0"),
|
||||||
githubVersion: {
|
githubVersion: {
|
||||||
type: util.GitHubVariant.GHES,
|
type: util.GitHubVariant.GHES,
|
||||||
version: "3.9.0",
|
version: "3.10.0",
|
||||||
},
|
},
|
||||||
flagPassed: true,
|
flagPassed: true,
|
||||||
negativeFlagPassed: false,
|
negativeFlagPassed: false,
|
||||||
@@ -521,25 +513,12 @@ for (const { codeqlVersion, flagPassed, githubVersion, negativeFlagPassed, } of
|
|||||||
sinon.stub(codeqlObject, "getVersion").resolves(codeqlVersion);
|
sinon.stub(codeqlObject, "getVersion").resolves(codeqlVersion);
|
||||||
// safeWhich throws because of the test CodeQL object.
|
// safeWhich throws because of the test CodeQL object.
|
||||||
sinon.stub(safeWhich, "safeWhich").resolves("");
|
sinon.stub(safeWhich, "safeWhich").resolves("");
|
||||||
await codeqlObject.databaseInterpretResults("", [], "", "", "", "-v", "", Object.assign({}, stubConfig, { gitHubVersion: githubVersion }), (0, testing_utils_1.createFeatures)([]), (0, logging_1.getRunnerLogger)(true));
|
await codeqlObject.databaseInterpretResults("", [], "", "", "", "-v", "", Object.assign({}, stubConfig, { gitHubVersion: githubVersion }), (0, testing_utils_1.createFeatures)([]));
|
||||||
const actualArgs = runnerConstructorStub.firstCall.args[1];
|
const actualArgs = runnerConstructorStub.firstCall.args[1];
|
||||||
t.is(actualArgs.includes("--new-analysis-summary"), flagPassed, `--new-analysis-summary should${flagPassed ? "" : "n't"} be passed`);
|
t.is(actualArgs.includes("--new-analysis-summary"), flagPassed, `--new-analysis-summary should${flagPassed ? "" : "n't"} be passed`);
|
||||||
t.is(actualArgs.includes("--no-new-analysis-summary"), negativeFlagPassed, `--no-new-analysis-summary should${negativeFlagPassed ? "" : "n't"} be passed`);
|
t.is(actualArgs.includes("--no-new-analysis-summary"), negativeFlagPassed, `--no-new-analysis-summary should${negativeFlagPassed ? "" : "n't"} be passed`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
(0, ava_1.default)("database finalize does not override no code found error on CodeQL 2.12.6", async (t) => {
|
|
||||||
const cliMessage = "CodeQL did not detect any code written in languages supported by CodeQL. Review our troubleshooting guide at " +
|
|
||||||
"https://gh.io/troubleshooting-code-scanning/no-source-code-seen-during-build.";
|
|
||||||
stubToolRunnerConstructor(32, cliMessage);
|
|
||||||
const codeqlObject = await codeql.getCodeQLForTesting();
|
|
||||||
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.12.6"));
|
|
||||||
// safeWhich throws because of the test CodeQL object.
|
|
||||||
sinon.stub(safeWhich, "safeWhich").resolves("");
|
|
||||||
await t.throwsAsync(async () => await codeqlObject.finalizeDatabase("db", "--threads=2", "--ram=2048", false), {
|
|
||||||
message: 'Encountered a fatal error while running "codeql-for-testing database finalize --finalize-dataset --threads=2 --ram=2048 db". ' +
|
|
||||||
`Exit code was 32 and last log line was: ${cliMessage} See the logs for more details.`,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
(0, ava_1.default)("runTool summarizes several fatal errors", async (t) => {
|
(0, ava_1.default)("runTool summarizes several fatal errors", async (t) => {
|
||||||
const heapError = "A fatal error occurred: Evaluator heap must be at least 384.00 MiB";
|
const heapError = "A fatal error occurred: Evaluator heap must be at least 384.00 MiB";
|
||||||
const datasetImportError = "A fatal error occurred: Dataset import for /home/runner/work/_temp/codeql_databases/javascript/db-javascript failed with code 2";
|
const datasetImportError = "A fatal error occurred: Dataset import for /home/runner/work/_temp/codeql_databases/javascript/db-javascript failed with code 2";
|
||||||
@@ -547,7 +526,7 @@ for (const { codeqlVersion, flagPassed, githubVersion, negativeFlagPassed, } of
|
|||||||
`${heapError}\n${datasetImportError}.`;
|
`${heapError}\n${datasetImportError}.`;
|
||||||
stubToolRunnerConstructor(32, cliStderr);
|
stubToolRunnerConstructor(32, cliStderr);
|
||||||
const codeqlObject = await codeql.getCodeQLForTesting();
|
const codeqlObject = await codeql.getCodeQLForTesting();
|
||||||
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.12.6"));
|
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.17.6"));
|
||||||
// safeWhich throws because of the test CodeQL object.
|
// safeWhich throws because of the test CodeQL object.
|
||||||
sinon.stub(safeWhich, "safeWhich").resolves("");
|
sinon.stub(safeWhich, "safeWhich").resolves("");
|
||||||
await t.throwsAsync(async () => await codeqlObject.finalizeDatabase("db", "--threads=2", "--ram=2048", false), {
|
await t.throwsAsync(async () => await codeqlObject.finalizeDatabase("db", "--threads=2", "--ram=2048", false), {
|
||||||
@@ -569,15 +548,14 @@ for (const { codeqlVersion, flagPassed, githubVersion, negativeFlagPassed, } of
|
|||||||
`;
|
`;
|
||||||
stubToolRunnerConstructor(1, stderr);
|
stubToolRunnerConstructor(1, stderr);
|
||||||
const codeqlObject = await codeql.getCodeQLForTesting();
|
const codeqlObject = await codeql.getCodeQLForTesting();
|
||||||
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.12.6"));
|
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.17.6"));
|
||||||
sinon.stub(codeqlObject, "resolveExtractor").resolves("/path/to/extractor");
|
sinon.stub(codeqlObject, "resolveExtractor").resolves("/path/to/extractor");
|
||||||
// safeWhich throws because of the test CodeQL object.
|
// safeWhich throws because of the test CodeQL object.
|
||||||
sinon.stub(safeWhich, "safeWhich").resolves("");
|
sinon.stub(safeWhich, "safeWhich").resolves("");
|
||||||
await t.throwsAsync(async () => await codeqlObject.runAutobuild(stubConfig, languages_1.Language.java), {
|
await t.throwsAsync(async () => await codeqlObject.runAutobuild(stubConfig, languages_1.Language.java), {
|
||||||
instanceOf: util.ConfigurationError,
|
instanceOf: util.ConfigurationError,
|
||||||
message: "We were unable to automatically build your code. Please provide manual build steps. " +
|
message: "We were unable to automatically build your code. Please provide manual build steps. " +
|
||||||
"For more information, see " +
|
`See ${doc_url_1.DocUrl.AUTOMATIC_BUILD_FAILED} for more information. ` +
|
||||||
"https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/automatic-build-failed. " +
|
|
||||||
"Encountered the following error: Start of the error message\n" +
|
"Encountered the following error: Start of the error message\n" +
|
||||||
" Some more context about the error message\n" +
|
" Some more context about the error message\n" +
|
||||||
" continued\n" +
|
" continued\n" +
|
||||||
@@ -588,15 +566,14 @@ for (const { codeqlVersion, flagPassed, githubVersion, negativeFlagPassed, } of
|
|||||||
const stderr = Array.from({ length: 20 }, (_, i) => `[2019-09-18 12:00:00] [autobuild] [ERROR] line${i + 1}`).join("\n");
|
const stderr = Array.from({ length: 20 }, (_, i) => `[2019-09-18 12:00:00] [autobuild] [ERROR] line${i + 1}`).join("\n");
|
||||||
stubToolRunnerConstructor(1, stderr);
|
stubToolRunnerConstructor(1, stderr);
|
||||||
const codeqlObject = await codeql.getCodeQLForTesting();
|
const codeqlObject = await codeql.getCodeQLForTesting();
|
||||||
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.12.6"));
|
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.17.6"));
|
||||||
sinon.stub(codeqlObject, "resolveExtractor").resolves("/path/to/extractor");
|
sinon.stub(codeqlObject, "resolveExtractor").resolves("/path/to/extractor");
|
||||||
// safeWhich throws because of the test CodeQL object.
|
// safeWhich throws because of the test CodeQL object.
|
||||||
sinon.stub(safeWhich, "safeWhich").resolves("");
|
sinon.stub(safeWhich, "safeWhich").resolves("");
|
||||||
await t.throwsAsync(async () => await codeqlObject.runAutobuild(stubConfig, languages_1.Language.java), {
|
await t.throwsAsync(async () => await codeqlObject.runAutobuild(stubConfig, languages_1.Language.java), {
|
||||||
instanceOf: util.ConfigurationError,
|
instanceOf: util.ConfigurationError,
|
||||||
message: "We were unable to automatically build your code. Please provide manual build steps. " +
|
message: "We were unable to automatically build your code. Please provide manual build steps. " +
|
||||||
"For more information, see " +
|
`See ${doc_url_1.DocUrl.AUTOMATIC_BUILD_FAILED} for more information. ` +
|
||||||
"https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/automatic-build-failed. " +
|
|
||||||
"Encountered the following error: " +
|
"Encountered the following error: " +
|
||||||
`${Array.from({ length: 10 }, (_, i) => `line${i + 1}`).join("\n")}\n(truncated)`,
|
`${Array.from({ length: 10 }, (_, i) => `line${i + 1}`).join("\n")}\n(truncated)`,
|
||||||
});
|
});
|
||||||
@@ -609,13 +586,13 @@ for (const { codeqlVersion, flagPassed, githubVersion, negativeFlagPassed, } of
|
|||||||
Severe disk cache trouble (corruption or out of space) at /home/runner/work/_temp/codeql_databases/go/db-go/default/cache/pages/28/33.pack: Failed to write item to disk`;
|
Severe disk cache trouble (corruption or out of space) at /home/runner/work/_temp/codeql_databases/go/db-go/default/cache/pages/28/33.pack: Failed to write item to disk`;
|
||||||
stubToolRunnerConstructor(1, stderr);
|
stubToolRunnerConstructor(1, stderr);
|
||||||
const codeqlObject = await codeql.getCodeQLForTesting();
|
const codeqlObject = await codeql.getCodeQLForTesting();
|
||||||
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.12.6"));
|
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.17.6"));
|
||||||
sinon.stub(codeqlObject, "resolveExtractor").resolves("/path/to/extractor");
|
sinon.stub(codeqlObject, "resolveExtractor").resolves("/path/to/extractor");
|
||||||
// safeWhich throws because of the test CodeQL object.
|
// safeWhich throws because of the test CodeQL object.
|
||||||
sinon.stub(safeWhich, "safeWhich").resolves("");
|
sinon.stub(safeWhich, "safeWhich").resolves("");
|
||||||
await t.throwsAsync(async () => await codeqlObject.databaseRunQueries(stubConfig.dbLocation, []), {
|
await t.throwsAsync(async () => await codeqlObject.databaseRunQueries(stubConfig.dbLocation, []), {
|
||||||
instanceOf: cli_errors_1.CommandInvocationError,
|
instanceOf: cli_errors_1.CommandInvocationError,
|
||||||
message: `Encountered a fatal error while running "codeql-for-testing database run-queries --expect-discarded-cache --min-disk-free=1024 -v". Exit code was 1 and error was: Oops! A fatal internal error occurred. Details:
|
message: `Encountered a fatal error while running "codeql-for-testing database run-queries --expect-discarded-cache --min-disk-free=1024 -v --intra-layer-parallelism". Exit code was 1 and error was: Oops! A fatal internal error occurred. Details:
|
||||||
com.semmle.util.exception.CatastrophicError: An error occurred while evaluating ControlFlowGraph::ControlFlow::Root.isRootOf/1#dispred#f610e6ed/2@86282cc8
|
com.semmle.util.exception.CatastrophicError: An error occurred while evaluating ControlFlowGraph::ControlFlow::Root.isRootOf/1#dispred#f610e6ed/2@86282cc8
|
||||||
Severe disk cache trouble (corruption or out of space) at /home/runner/work/_temp/codeql_databases/go/db-go/default/cache/pages/28/33.pack: Failed to write item to disk. See the logs for more details.`,
|
Severe disk cache trouble (corruption or out of space) at /home/runner/work/_temp/codeql_databases/go/db-go/default/cache/pages/28/33.pack: Failed to write item to disk. See the logs for more details.`,
|
||||||
});
|
});
|
||||||
@@ -624,7 +601,7 @@ for (const { codeqlVersion, flagPassed, githubVersion, negativeFlagPassed, } of
|
|||||||
const cliStderr = "line1\nline2\nline3\nline4\nline5";
|
const cliStderr = "line1\nline2\nline3\nline4\nline5";
|
||||||
stubToolRunnerConstructor(32, cliStderr);
|
stubToolRunnerConstructor(32, cliStderr);
|
||||||
const codeqlObject = await codeql.getCodeQLForTesting();
|
const codeqlObject = await codeql.getCodeQLForTesting();
|
||||||
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.12.6"));
|
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.17.6"));
|
||||||
// safeWhich throws because of the test CodeQL object.
|
// safeWhich throws because of the test CodeQL object.
|
||||||
sinon.stub(safeWhich, "safeWhich").resolves("");
|
sinon.stub(safeWhich, "safeWhich").resolves("");
|
||||||
await t.throwsAsync(async () => await codeqlObject.finalizeDatabase("db", "--threads=2", "--ram=2048", false), {
|
await t.throwsAsync(async () => await codeqlObject.finalizeDatabase("db", "--threads=2", "--ram=2048", false), {
|
||||||
@@ -636,7 +613,7 @@ for (const { codeqlVersion, flagPassed, githubVersion, negativeFlagPassed, } of
|
|||||||
(0, ava_1.default)("Avoids duplicating --overwrite flag if specified in CODEQL_ACTION_EXTRA_OPTIONS", async (t) => {
|
(0, ava_1.default)("Avoids duplicating --overwrite flag if specified in CODEQL_ACTION_EXTRA_OPTIONS", async (t) => {
|
||||||
const runnerConstructorStub = stubToolRunnerConstructor();
|
const runnerConstructorStub = stubToolRunnerConstructor();
|
||||||
const codeqlObject = await codeql.getCodeQLForTesting();
|
const codeqlObject = await codeql.getCodeQLForTesting();
|
||||||
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.12.6"));
|
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.17.6"));
|
||||||
// safeWhich throws because of the test CodeQL object.
|
// safeWhich throws because of the test CodeQL object.
|
||||||
sinon.stub(safeWhich, "safeWhich").resolves("");
|
sinon.stub(safeWhich, "safeWhich").resolves("");
|
||||||
process.env["CODEQL_ACTION_EXTRA_OPTIONS"] =
|
process.env["CODEQL_ACTION_EXTRA_OPTIONS"] =
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
11
lib/config-utils.js
generated
11
lib/config-utils.js
generated
@@ -42,6 +42,7 @@ exports.parsePacksFromInput = parsePacksFromInput;
|
|||||||
exports.parsePacksSpecification = parsePacksSpecification;
|
exports.parsePacksSpecification = parsePacksSpecification;
|
||||||
exports.validatePackSpecification = validatePackSpecification;
|
exports.validatePackSpecification = validatePackSpecification;
|
||||||
exports.initConfig = initConfig;
|
exports.initConfig = initConfig;
|
||||||
|
exports.parseRegistriesWithoutCredentials = parseRegistriesWithoutCredentials;
|
||||||
exports.getPathToParsedConfigFile = getPathToParsedConfigFile;
|
exports.getPathToParsedConfigFile = getPathToParsedConfigFile;
|
||||||
exports.getConfig = getConfig;
|
exports.getConfig = getConfig;
|
||||||
exports.generateRegistries = generateRegistries;
|
exports.generateRegistries = generateRegistries;
|
||||||
@@ -419,7 +420,7 @@ function parsePacksSpecification(packStr) {
|
|||||||
try {
|
try {
|
||||||
new semver.Range(version);
|
new semver.Range(version);
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch {
|
||||||
// The range string is invalid. OK to ignore the caught error
|
// The range string is invalid. OK to ignore the caught error
|
||||||
throw new util_1.ConfigurationError(getPacksStrInvalid(packStr));
|
throw new util_1.ConfigurationError(getPacksStrInvalid(packStr));
|
||||||
}
|
}
|
||||||
@@ -503,10 +504,16 @@ function parseRegistries(registriesInput) {
|
|||||||
? yaml.load(registriesInput)
|
? yaml.load(registriesInput)
|
||||||
: undefined;
|
: undefined;
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch {
|
||||||
throw new util_1.ConfigurationError("Invalid registries input. Must be a YAML string.");
|
throw new util_1.ConfigurationError("Invalid registries input. Must be a YAML string.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function parseRegistriesWithoutCredentials(registriesInput) {
|
||||||
|
return parseRegistries(registriesInput)?.map((r) => {
|
||||||
|
const { url, packages } = r;
|
||||||
|
return { url, packages };
|
||||||
|
});
|
||||||
|
}
|
||||||
function isLocal(configPath) {
|
function isLocal(configPath) {
|
||||||
// If the path starts with ./, look locally
|
// If the path starts with ./, look locally
|
||||||
if (configPath.indexOf("./") === 0) {
|
if (configPath.indexOf("./") === 0) {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
2
lib/debug-artifacts.js
generated
2
lib/debug-artifacts.js
generated
@@ -55,7 +55,7 @@ async function uploadDebugArtifacts(toUpload, rootDir, artifactName) {
|
|||||||
for (const [, matrixVal] of Object.entries(JSON.parse(matrix)).sort())
|
for (const [, matrixVal] of Object.entries(JSON.parse(matrix)).sort())
|
||||||
suffix += `-${matrixVal}`;
|
suffix += `-${matrixVal}`;
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch {
|
||||||
core.info("Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input.");
|
core.info("Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"debug-artifacts.js","sourceRoot":"","sources":["../src/debug-artifacts.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,kDAEC;AAED,oDAsCC;AAED,4DAgBC;AAED,0DAwBC;AA8CD,8EA0BC;AAnLD,uCAAyB;AACzB,2CAA6B;AAE7B,4DAA8C;AAC9C,oDAAsC;AACtC,sDAA6B;AAC7B,8CAAsB;AAEtB,iDAAkD;AAClD,uCAA0C;AAC1C,qCAAqC;AAIrC,iCAKgB;AAEhB,SAAgB,mBAAmB,CAAC,IAAY;IAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;AAChD,CAAC;AAEM,KAAK,UAAU,oBAAoB,CACxC,QAAkB,EAClB,OAAe,EACf,YAAoB;IAEpB,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1B,OAAO;IACT,CAAC;IACD,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,MAAM,MAAM,GAAG,IAAA,+BAAgB,EAAC,QAAQ,CAAC,CAAC;IAC1C,IAAI,MAAM,EAAE,CAAC;QACX,IAAI,CAAC;YACH,KAAK,MAAM,CAAC,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CACxC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAY,CAC9B,CAAC,IAAI,EAAE;gBACN,MAAM,IAAI,IAAI,SAAS,EAAE,CAAC;QAC9B,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,CAAC,IAAI,CACP,+HAA+H,CAChI,CAAC;QACJ,CAAC;IACH,CAAC;IAED,IAAI,CAAC;QACH,MAAM,QAAQ,CAAC,MAAM,EAAE,CAAC,cAAc,CACpC,mBA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R,MAAM,IAAA,kBAAS,EAAC,MAAM,CAAC,SAAS,CAAC,EACjC,GAAG,MAAM,CAAC,iBAAiB,IAAI,QAAQ,EAAE,CAC1C,CAAC;IACF,OAAO,kBAAkB,CAAC;AAC5B,CAAC;AAEM,KAAK,UAAU,iCAAiC,CACrD,MAAc,EACd,MAAc;IAEd,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC;QACxC,IAAI,CAAC;YACH,IAAI,kBAA0B,CAAC;YAC/B,IAAI,CAAC,IAAA,uBAAa,EAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,CAAC;gBAC7C,kBAAkB,GAAG,MAAM,2BAA2B,CACpD,MAAM,EACN,QAAQ,CACT,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,kBAAkB,GAAG,MAAM,uBAAuB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;YACvE,CAAC;YACD,MAAM,oBAAoB,CACxB,CAAC,kBAAkB,CAAC,EACpB,MAAM,CAAC,UAAU,EACjB,MAAM,CAAC,iBAAiB,CACzB,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,IAAI,CACP,8CAA8C,MAAM,CAAC,iBAAiB,IAAI,QAAQ,KAAK,KAAK,EAAE,CAC/F,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC"}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"bundleVersion": "codeql-bundle-v2.18.0",
|
"bundleVersion": "codeql-bundle-v2.18.2",
|
||||||
"cliVersion": "2.18.0",
|
"cliVersion": "2.18.2",
|
||||||
"priorBundleVersion": "codeql-bundle-v2.17.6",
|
"priorBundleVersion": "codeql-bundle-v2.18.1",
|
||||||
"priorCliVersion": "2.17.6"
|
"priorCliVersion": "2.18.1"
|
||||||
}
|
}
|
||||||
|
|||||||
9
lib/diagnostics.js
generated
9
lib/diagnostics.js
generated
@@ -38,7 +38,9 @@ function makeDiagnostic(id, name, data = undefined) {
|
|||||||
*/
|
*/
|
||||||
function addDiagnostic(config, language, diagnostic) {
|
function addDiagnostic(config, language, diagnostic) {
|
||||||
const logger = (0, logging_1.getActionsLogger)();
|
const logger = (0, logging_1.getActionsLogger)();
|
||||||
const databasePath = (0, util_1.getCodeQLDatabasePath)(config, language);
|
const databasePath = language
|
||||||
|
? (0, util_1.getCodeQLDatabasePath)(config, language)
|
||||||
|
: config.dbLocation;
|
||||||
// Check that the database exists before writing to it. If the database does not yet exist,
|
// Check that the database exists before writing to it. If the database does not yet exist,
|
||||||
// store the diagnostic in memory and write it later.
|
// store the diagnostic in memory and write it later.
|
||||||
if ((0, fs_1.existsSync)(databasePath)) {
|
if ((0, fs_1.existsSync)(databasePath)) {
|
||||||
@@ -58,7 +60,10 @@ function addDiagnostic(config, language, diagnostic) {
|
|||||||
*/
|
*/
|
||||||
function writeDiagnostic(config, language, diagnostic) {
|
function writeDiagnostic(config, language, diagnostic) {
|
||||||
const logger = (0, logging_1.getActionsLogger)();
|
const logger = (0, logging_1.getActionsLogger)();
|
||||||
const diagnosticsPath = path_1.default.resolve((0, util_1.getCodeQLDatabasePath)(config, language), "diagnostic", "codeql-action");
|
const databasePath = language
|
||||||
|
? (0, util_1.getCodeQLDatabasePath)(config, language)
|
||||||
|
: config.dbLocation;
|
||||||
|
const diagnosticsPath = path_1.default.resolve(databasePath, "diagnostic", "codeql-action");
|
||||||
try {
|
try {
|
||||||
// Create the directory if it doesn't exist yet.
|
// Create the directory if it doesn't exist yet.
|
||||||
(0, fs_1.mkdirSync)(diagnosticsPath, { recursive: true });
|
(0, fs_1.mkdirSync)(diagnosticsPath, { recursive: true });
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../src/diagnostics.ts"],"names":[],"mappings":";;;;;AA4EA,wCAUC;AAUD,sCAmBC;AAsCD,0DAYC;AAGD,4CAYC;AApLD,2BAA0D;AAC1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,CAAC;AAED,gDAAgD;AAChD,SAAgB,gBAAgB,CAAC,MAAc;IAC7C,MAAM,MAAM,GAAG,IAAA,0BAAgB,GAAE,CAAC;IAClC,MAAM,CAAC,KAAK,CACV,WAAW,oBAAoB,CAAC,MAAM,6BAA6B,CACpE,CAAC;IAEF,KAAK,MAAM,SAAS,IAAI,oBAAoB,EAAE,CAAC;QAC7C,eAAe,CAAC,MAAM,EAAE,SAAS,CAAC,QAAQ,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;IACpE,CAAC;IAED,yCAAyC;IACzC,oBAAoB,GAAG,EAAE,CAAC;AAC5B,CAAC"}
|
||||||
16
lib/doc-url.js
generated
Normal file
16
lib/doc-url.js
generated
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"use strict";
|
||||||
|
/**
|
||||||
|
* URLs to code scanning docs linked to from CodeQL Action logs.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.DocUrl = void 0;
|
||||||
|
var DocUrl;
|
||||||
|
(function (DocUrl) {
|
||||||
|
DocUrl["ASSIGNING_PERMISSIONS_TO_JOBS"] = "https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs";
|
||||||
|
DocUrl["AUTOMATIC_BUILD_FAILED"] = "https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/automatic-build-failed";
|
||||||
|
DocUrl["DEFINE_ENV_VARIABLES"] = "https://docs.github.com/en/actions/learn-github-actions/variables#defining-environment-variables-for-a-single-workflow";
|
||||||
|
DocUrl["SCANNING_ON_PUSH"] = "https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#scanning-on-push";
|
||||||
|
DocUrl["SPECIFY_BUILD_STEPS_MANUALLY"] = "https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#about-specifying-build-steps-manually";
|
||||||
|
DocUrl["TRACK_CODE_SCANNING_ALERTS_ACROSS_RUNS"] = "https://docs.github.com/en/enterprise-cloud@latest/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning#providing-data-to-track-code-scanning-alerts-across-runs";
|
||||||
|
})(DocUrl || (exports.DocUrl = DocUrl = {}));
|
||||||
|
//# sourceMappingURL=doc-url.js.map
|
||||||
1
lib/doc-url.js.map
Normal file
1
lib/doc-url.js.map
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"doc-url.js","sourceRoot":"","sources":["../src/doc-url.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,IAAY,MAOX;AAPD,WAAY,MAAM;IAChB,uHAA6G,CAAA;IAC7G,gJAAsI,CAAA;IACtI,yJAA+I,CAAA;IAC/I,qMAA2L,CAAA;IAC3L,gOAAsN,CAAA;IACtN,2PAAiP,CAAA;AACnP,CAAC,EAPW,MAAM,sBAAN,MAAM,QAOjB"}
|
||||||
11
lib/feature-flags.js
generated
11
lib/feature-flags.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.Features = exports.FEATURE_FLAGS_FILE_NAME = exports.featureConfig = exports.Feature = exports.CODEQL_VERSION_FINE_GRAINED_PARALLELISM = exports.CODEQL_VERSION_BUNDLE_SEMANTICALLY_VERSIONED = void 0;
|
exports.Features = exports.FEATURE_FLAGS_FILE_NAME = exports.featureConfig = exports.Feature = exports.CODEQL_VERSION_FINE_GRAINED_PARALLELISM = void 0;
|
||||||
const fs = __importStar(require("fs"));
|
const fs = __importStar(require("fs"));
|
||||||
const path = __importStar(require("path"));
|
const path = __importStar(require("path"));
|
||||||
const semver = __importStar(require("semver"));
|
const semver = __importStar(require("semver"));
|
||||||
@@ -32,10 +32,6 @@ const defaults = __importStar(require("./defaults.json"));
|
|||||||
const util = __importStar(require("./util"));
|
const util = __importStar(require("./util"));
|
||||||
const DEFAULT_VERSION_FEATURE_FLAG_PREFIX = "default_codeql_version_";
|
const DEFAULT_VERSION_FEATURE_FLAG_PREFIX = "default_codeql_version_";
|
||||||
const DEFAULT_VERSION_FEATURE_FLAG_SUFFIX = "_enabled";
|
const DEFAULT_VERSION_FEATURE_FLAG_SUFFIX = "_enabled";
|
||||||
/**
|
|
||||||
* Versions 2.13.4+ of the CodeQL CLI have an associated CodeQL Bundle release that is semantically versioned.
|
|
||||||
*/
|
|
||||||
exports.CODEQL_VERSION_BUNDLE_SEMANTICALLY_VERSIONED = "2.13.4";
|
|
||||||
/**
|
/**
|
||||||
* Evaluator fine-grained parallelism (aka intra-layer parallelism) is only safe to enable in 2.15.1 onwards.
|
* Evaluator fine-grained parallelism (aka intra-layer parallelism) is only safe to enable in 2.15.1 onwards.
|
||||||
* (Some earlier versions recognize the command-line flag, but they contain a bug which makes it unsafe to use).
|
* (Some earlier versions recognize the command-line flag, but they contain a bug which makes it unsafe to use).
|
||||||
@@ -213,10 +209,7 @@ class GitHubFeatureFlags {
|
|||||||
const response = await this.getAllFeatures();
|
const response = await this.getAllFeatures();
|
||||||
const enabledFeatureFlagCliVersions = Object.entries(response)
|
const enabledFeatureFlagCliVersions = Object.entries(response)
|
||||||
.map(([f, isEnabled]) => isEnabled ? this.getCliVersionFromFeatureFlag(f) : undefined)
|
.map(([f, isEnabled]) => isEnabled ? this.getCliVersionFromFeatureFlag(f) : undefined)
|
||||||
.filter((f) => f !== undefined &&
|
.filter((f) => f !== undefined);
|
||||||
// Only consider versions that have semantically versioned bundles.
|
|
||||||
semver.gte(f, exports.CODEQL_VERSION_BUNDLE_SEMANTICALLY_VERSIONED))
|
|
||||||
.map((f) => f);
|
|
||||||
if (enabledFeatureFlagCliVersions.length === 0) {
|
if (enabledFeatureFlagCliVersions.length === 0) {
|
||||||
// We expect at least one default CLI version to be enabled on Dotcom at any time. However if
|
// We expect at least one default CLI version to be enabled on Dotcom at any time. However if
|
||||||
// the feature flags are misconfigured, rather than crashing, we fall back to the CLI version
|
// the feature flags are misconfigured, rather than crashing, we fall back to the CLI version
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
17
lib/feature-flags.test.js
generated
17
lib/feature-flags.test.js
generated
@@ -256,7 +256,7 @@ for (const feature of Object.keys(feature_flags_1.featureConfig)) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
(0, ava_1.default)("includes tag name when feature flags enable version greater than v2.13.4", async (t) => {
|
(0, ava_1.default)("includes tag name", async (t) => {
|
||||||
await (0, util_1.withTmpDir)(async (tmpDir) => {
|
await (0, util_1.withTmpDir)(async (tmpDir) => {
|
||||||
const features = setUpFeatureFlagTests(tmpDir);
|
const features = setUpFeatureFlagTests(tmpDir);
|
||||||
const expectedFeatureEnablement = initializeFeatures(true);
|
const expectedFeatureEnablement = initializeFeatures(true);
|
||||||
@@ -283,21 +283,6 @@ for (const feature of Object.keys(feature_flags_1.featureConfig)) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
(0, ava_1.default)(`selects CLI from defaults.json on Dotcom when default version feature flags are unsupported`, async (t) => {
|
|
||||||
await (0, util_1.withTmpDir)(async (tmpDir) => {
|
|
||||||
const features = setUpFeatureFlagTests(tmpDir);
|
|
||||||
const expectedFeatureEnablement = initializeFeatures(true);
|
|
||||||
// Doesn't have a semantically versioned bundle
|
|
||||||
expectedFeatureEnablement["default_codeql_version_2_13_3_enabled"] = true;
|
|
||||||
(0, testing_utils_1.mockFeatureFlagApiEndpoint)(200, expectedFeatureEnablement);
|
|
||||||
const defaultCliVersion = await features.getDefaultCliVersion(util_1.GitHubVariant.DOTCOM);
|
|
||||||
t.deepEqual(defaultCliVersion, {
|
|
||||||
cliVersion: defaults.cliVersion,
|
|
||||||
tagName: defaults.bundleVersion,
|
|
||||||
toolsFeatureFlagsValid: false,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
(0, ava_1.default)("ignores invalid version numbers in default version feature flags", async (t) => {
|
(0, ava_1.default)("ignores invalid version numbers in default version feature flags", async (t) => {
|
||||||
await (0, util_1.withTmpDir)(async (tmpDir) => {
|
await (0, util_1.withTmpDir)(async (tmpDir) => {
|
||||||
const loggedMessages = [];
|
const loggedMessages = [];
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
5
lib/fingerprints.js
generated
5
lib/fingerprints.js
generated
@@ -32,6 +32,7 @@ exports.addFingerprints = addFingerprints;
|
|||||||
const fs = __importStar(require("fs"));
|
const fs = __importStar(require("fs"));
|
||||||
const path_1 = __importDefault(require("path"));
|
const path_1 = __importDefault(require("path"));
|
||||||
const long_1 = __importDefault(require("long"));
|
const long_1 = __importDefault(require("long"));
|
||||||
|
const doc_url_1 = require("./doc-url");
|
||||||
const tab = "\t".charCodeAt(0);
|
const tab = "\t".charCodeAt(0);
|
||||||
const space = " ".charCodeAt(0);
|
const space = " ".charCodeAt(0);
|
||||||
const lf = "\n".charCodeAt(0);
|
const lf = "\n".charCodeAt(0);
|
||||||
@@ -199,7 +200,7 @@ function resolveUriToFile(location, artifacts, sourceRoot, logger) {
|
|||||||
try {
|
try {
|
||||||
uri = decodeURIComponent(location.uri);
|
uri = decodeURIComponent(location.uri);
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch {
|
||||||
logger.debug(`Ignoring location as URI "${location.uri}" is invalid`);
|
logger.debug(`Ignoring location as URI "${location.uri}" is invalid`);
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
@@ -238,7 +239,7 @@ function resolveUriToFile(location, artifacts, sourceRoot, logger) {
|
|||||||
// Compute fingerprints for results in the given sarif file
|
// Compute fingerprints for results in the given sarif file
|
||||||
// and return an updated sarif file contents.
|
// and return an updated sarif file contents.
|
||||||
async function addFingerprints(sarif, sourceRoot, logger) {
|
async function addFingerprints(sarif, sourceRoot, logger) {
|
||||||
logger.info("Adding fingerprints to SARIF file. For more information, see https://docs.github.com/en/enterprise-cloud@latest/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning#providing-data-to-track-code-scanning-alerts-across-runs");
|
logger.info(`Adding fingerprints to SARIF file. See ${doc_url_1.DocUrl.TRACK_CODE_SCANNING_ALERTS_ACROSS_RUNS} for more information.`);
|
||||||
// Gather together results for the same file and construct
|
// Gather together results for the same file and construct
|
||||||
// callbacks to accept hashes for that file and update the location
|
// callbacks to accept hashes for that file and update the location
|
||||||
const callbacksByFile = {};
|
const callbacksByFile = {};
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
2
lib/init-action-post-helper.js
generated
2
lib/init-action-post-helper.js
generated
@@ -74,7 +74,7 @@ async function maybeUploadFailedSarif(config, repositoryNwo, features, logger) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// We call 'database export-diagnostics' to find any per-database diagnostics.
|
// We call 'database export-diagnostics' to find any per-database diagnostics.
|
||||||
await codeql.databaseExportDiagnostics(databasePath, sarifFile, category, config.tempDir, logger);
|
await codeql.databaseExportDiagnostics(databasePath, sarifFile, category);
|
||||||
}
|
}
|
||||||
logger.info(`Uploading failed SARIF file ${sarifFile}`);
|
logger.info(`Uploading failed SARIF file ${sarifFile}`);
|
||||||
const uploadResult = await uploadLib.uploadFiles(sarifFile, checkoutPath, category, features, logger);
|
const uploadResult = await uploadLib.uploadFiles(sarifFile, checkoutPath, category, features, logger);
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
4
lib/init-action-post-helper.test.js
generated
4
lib/init-action-post-helper.test.js
generated
@@ -315,7 +315,7 @@ async function testFailedSarifUpload(t, actionsWorkflow, { category, databaseExi
|
|||||||
.returns(JSON.stringify(matrix));
|
.returns(JSON.stringify(matrix));
|
||||||
const codeqlObject = await codeql.getCodeQLForTesting();
|
const codeqlObject = await codeql.getCodeQLForTesting();
|
||||||
sinon.stub(codeql, "getCodeQL").resolves(codeqlObject);
|
sinon.stub(codeql, "getCodeQL").resolves(codeqlObject);
|
||||||
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.12.6"));
|
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.17.6"));
|
||||||
const databaseExportDiagnosticsStub = sinon.stub(codeqlObject, "databaseExportDiagnostics");
|
const databaseExportDiagnosticsStub = sinon.stub(codeqlObject, "databaseExportDiagnostics");
|
||||||
const diagnosticsExportStub = sinon.stub(codeqlObject, "diagnosticsExport");
|
const diagnosticsExportStub = sinon.stub(codeqlObject, "diagnosticsExport");
|
||||||
sinon.stub(workflow, "getWorkflow").resolves(actionsWorkflow);
|
sinon.stub(workflow, "getWorkflow").resolves(actionsWorkflow);
|
||||||
@@ -337,7 +337,7 @@ async function testFailedSarifUpload(t, actionsWorkflow, { category, databaseExi
|
|||||||
zipped_upload_size_bytes: 10,
|
zipped_upload_size_bytes: 10,
|
||||||
});
|
});
|
||||||
if (databaseExists && exportDiagnosticsEnabled) {
|
if (databaseExists && exportDiagnosticsEnabled) {
|
||||||
t.true(databaseExportDiagnosticsStub.calledOnceWith(config.dbLocation, sinon.match.string, category, sinon.match.any, sinon.match.any), `Actual args were: ${databaseExportDiagnosticsStub.args}`);
|
t.true(databaseExportDiagnosticsStub.calledOnceWith(config.dbLocation, sinon.match.string, category), `Actual args were: ${databaseExportDiagnosticsStub.args}`);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
t.true(diagnosticsExportStub.calledOnceWith(sinon.match.string, category, config), `Actual args were: ${diagnosticsExportStub.args}`);
|
t.true(diagnosticsExportStub.calledOnceWith(sinon.match.string, category, config), `Actual args were: ${diagnosticsExportStub.args}`);
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
68
lib/init-action.js
generated
68
lib/init-action.js
generated
@@ -30,6 +30,7 @@ const safe_which_1 = require("@chrisgavin/safe-which");
|
|||||||
const uuid_1 = require("uuid");
|
const uuid_1 = require("uuid");
|
||||||
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 configUtils = __importStar(require("./config-utils"));
|
||||||
const diagnostics_1 = require("./diagnostics");
|
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");
|
||||||
@@ -43,7 +44,7 @@ const tools_features_1 = require("./tools-features");
|
|||||||
const trap_caching_1 = require("./trap-caching");
|
const trap_caching_1 = require("./trap-caching");
|
||||||
const util_1 = require("./util");
|
const util_1 = require("./util");
|
||||||
const workflow_1 = require("./workflow");
|
const workflow_1 = require("./workflow");
|
||||||
async function sendCompletedStatusReport(startedAt, config, toolsDownloadDurationMs, toolsFeatureFlagsValid, toolsSource, toolsVersion, logger, error) {
|
async function sendCompletedStatusReport(startedAt, config, toolsDownloadStatusReport, toolsFeatureFlagsValid, toolsSource, toolsVersion, logger, error) {
|
||||||
const statusReportBase = await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.Init, (0, status_report_1.getActionsStatus)(error), startedAt, config, await (0, util_1.checkDiskUsage)(logger), logger, error?.message, error?.stack);
|
const statusReportBase = await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.Init, (0, status_report_1.getActionsStatus)(error), startedAt, config, await (0, util_1.checkDiskUsage)(logger), logger, error?.message, error?.stack);
|
||||||
if (statusReportBase === undefined) {
|
if (statusReportBase === undefined) {
|
||||||
return;
|
return;
|
||||||
@@ -57,9 +58,9 @@ async function sendCompletedStatusReport(startedAt, config, toolsDownloadDuratio
|
|||||||
workflow_languages: workflowLanguages || "",
|
workflow_languages: workflowLanguages || "",
|
||||||
};
|
};
|
||||||
const initToolsDownloadFields = {};
|
const initToolsDownloadFields = {};
|
||||||
if (toolsDownloadDurationMs !== undefined) {
|
if (toolsDownloadStatusReport !== undefined) {
|
||||||
initToolsDownloadFields.tools_download_duration_ms =
|
initToolsDownloadFields.tools_download_duration_ms =
|
||||||
toolsDownloadDurationMs;
|
toolsDownloadStatusReport.downloadDurationMs;
|
||||||
}
|
}
|
||||||
if (toolsFeatureFlagsValid !== undefined) {
|
if (toolsFeatureFlagsValid !== undefined) {
|
||||||
initToolsDownloadFields.tools_feature_flags_valid = toolsFeatureFlagsValid;
|
initToolsDownloadFields.tools_feature_flags_valid = toolsFeatureFlagsValid;
|
||||||
@@ -82,6 +83,24 @@ async function sendCompletedStatusReport(startedAt, config, toolsDownloadDuratio
|
|||||||
: queriesInput;
|
: queriesInput;
|
||||||
queries.push(...queriesInput.split(","));
|
queries.push(...queriesInput.split(","));
|
||||||
}
|
}
|
||||||
|
let packs = {};
|
||||||
|
if ((config.augmentationProperties.packsInputCombines ||
|
||||||
|
!config.augmentationProperties.packsInput) &&
|
||||||
|
config.originalUserInput.packs) {
|
||||||
|
// Make a copy, because we might modify `packs`.
|
||||||
|
const copyPacksFromOriginalUserInput = (0, util_1.cloneObject)(config.originalUserInput.packs);
|
||||||
|
// If it is an array, then assume there is only a single language being analyzed.
|
||||||
|
if (Array.isArray(copyPacksFromOriginalUserInput)) {
|
||||||
|
packs[config.languages[0]] = copyPacksFromOriginalUserInput;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
packs = copyPacksFromOriginalUserInput;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (config.augmentationProperties.packsInput) {
|
||||||
|
packs[config.languages[0]] ??= [];
|
||||||
|
packs[config.languages[0]].push(...config.augmentationProperties.packsInput);
|
||||||
|
}
|
||||||
// Append fields that are dependent on `config`
|
// Append fields that are dependent on `config`
|
||||||
const initWithConfigStatusReport = {
|
const initWithConfigStatusReport = {
|
||||||
...initStatusReport,
|
...initStatusReport,
|
||||||
@@ -89,9 +108,12 @@ async function sendCompletedStatusReport(startedAt, config, toolsDownloadDuratio
|
|||||||
paths,
|
paths,
|
||||||
paths_ignore: pathsIgnore,
|
paths_ignore: pathsIgnore,
|
||||||
queries: queries.join(","),
|
queries: queries.join(","),
|
||||||
|
packs: JSON.stringify(packs),
|
||||||
trap_cache_languages: Object.keys(config.trapCaches).join(","),
|
trap_cache_languages: Object.keys(config.trapCaches).join(","),
|
||||||
trap_cache_download_size_bytes: Math.round(await (0, trap_caching_1.getTotalCacheSize)(config.trapCaches, logger)),
|
trap_cache_download_size_bytes: Math.round(await (0, trap_caching_1.getTotalCacheSize)(config.trapCaches, logger)),
|
||||||
trap_cache_download_duration_ms: Math.round(config.trapCacheDownloadTime),
|
trap_cache_download_duration_ms: Math.round(config.trapCacheDownloadTime),
|
||||||
|
query_filters: JSON.stringify(config.originalUserInput["query-filters"] ?? []),
|
||||||
|
registries: JSON.stringify(configUtils.parseRegistriesWithoutCredentials((0, actions_util_1.getOptionalInput)("registries")) ?? []),
|
||||||
};
|
};
|
||||||
await (0, status_report_1.sendStatusReport)({
|
await (0, status_report_1.sendStatusReport)({
|
||||||
...initWithConfigStatusReport,
|
...initWithConfigStatusReport,
|
||||||
@@ -108,7 +130,7 @@ async function run() {
|
|||||||
(0, util_1.initializeEnvironment)((0, actions_util_1.getActionVersion)());
|
(0, util_1.initializeEnvironment)((0, actions_util_1.getActionVersion)());
|
||||||
let config;
|
let config;
|
||||||
let codeql;
|
let codeql;
|
||||||
let toolsDownloadDurationMs;
|
let toolsDownloadStatusReport;
|
||||||
let toolsFeatureFlagsValid;
|
let toolsFeatureFlagsValid;
|
||||||
let toolsSource;
|
let toolsSource;
|
||||||
let toolsVersion;
|
let toolsVersion;
|
||||||
@@ -123,7 +145,9 @@ async function run() {
|
|||||||
(0, util_1.checkActionVersion)((0, actions_util_1.getActionVersion)(), gitHubVersion);
|
(0, util_1.checkActionVersion)((0, actions_util_1.getActionVersion)(), gitHubVersion);
|
||||||
const repositoryNwo = (0, repository_1.parseRepositoryNwo)((0, util_1.getRequiredEnvParam)("GITHUB_REPOSITORY"));
|
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);
|
const features = new feature_flags_1.Features(gitHubVersion, repositoryNwo, (0, actions_util_1.getTemporaryDirectory)(), logger);
|
||||||
core.exportVariable(environment_1.EnvVar.JOB_RUN_UUID, (0, uuid_1.v4)());
|
const jobRunUuid = (0, uuid_1.v4)();
|
||||||
|
logger.info(`Job run UUID is ${jobRunUuid}.`);
|
||||||
|
core.exportVariable(environment_1.EnvVar.JOB_RUN_UUID, jobRunUuid);
|
||||||
core.exportVariable(environment_1.EnvVar.INIT_ACTION_HAS_RUN, "true");
|
core.exportVariable(environment_1.EnvVar.INIT_ACTION_HAS_RUN, "true");
|
||||||
try {
|
try {
|
||||||
const statusReportBase = await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.Init, "starting", startedAt, config, await (0, util_1.checkDiskUsage)(logger), logger);
|
const statusReportBase = await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.Init, "starting", startedAt, config, await (0, util_1.checkDiskUsage)(logger), logger);
|
||||||
@@ -134,7 +158,7 @@ async function run() {
|
|||||||
toolsFeatureFlagsValid = codeQLDefaultVersionInfo.toolsFeatureFlagsValid;
|
toolsFeatureFlagsValid = codeQLDefaultVersionInfo.toolsFeatureFlagsValid;
|
||||||
const initCodeQLResult = await (0, init_1.initCodeQL)((0, actions_util_1.getOptionalInput)("tools"), apiDetails, (0, actions_util_1.getTemporaryDirectory)(), gitHubVersion.type, codeQLDefaultVersionInfo, logger);
|
const initCodeQLResult = await (0, init_1.initCodeQL)((0, actions_util_1.getOptionalInput)("tools"), apiDetails, (0, actions_util_1.getTemporaryDirectory)(), gitHubVersion.type, codeQLDefaultVersionInfo, logger);
|
||||||
codeql = initCodeQLResult.codeql;
|
codeql = initCodeQLResult.codeql;
|
||||||
toolsDownloadDurationMs = initCodeQLResult.toolsDownloadDurationMs;
|
toolsDownloadStatusReport = initCodeQLResult.toolsDownloadStatusReport;
|
||||||
toolsVersion = initCodeQLResult.toolsVersion;
|
toolsVersion = initCodeQLResult.toolsVersion;
|
||||||
toolsSource = initCodeQLResult.toolsSource;
|
toolsSource = initCodeQLResult.toolsSource;
|
||||||
core.startGroup("Validating workflow");
|
core.startGroup("Validating workflow");
|
||||||
@@ -182,12 +206,30 @@ async function run() {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
(0, init_1.cleanupDatabaseClusterDirectory)(config, logger);
|
(0, init_1.cleanupDatabaseClusterDirectory)(config, logger);
|
||||||
|
// Log CodeQL download telemetry, if appropriate
|
||||||
|
if (toolsDownloadStatusReport) {
|
||||||
|
(0, diagnostics_1.addDiagnostic)(config,
|
||||||
|
// Arbitrarily choose the first language. We could also choose all languages, but that
|
||||||
|
// increases the risk of misinterpreting the data.
|
||||||
|
config.languages[0], (0, diagnostics_1.makeDiagnostic)("codeql-action/bundle-download-telemetry", "CodeQL bundle download telemetry", {
|
||||||
|
attributes: toolsDownloadStatusReport,
|
||||||
|
visibility: {
|
||||||
|
cliSummaryTable: false,
|
||||||
|
statusPage: false,
|
||||||
|
telemetry: true,
|
||||||
|
},
|
||||||
|
}));
|
||||||
|
}
|
||||||
// Forward Go flags
|
// Forward Go flags
|
||||||
const goFlags = process.env["GOFLAGS"];
|
const goFlags = process.env["GOFLAGS"];
|
||||||
if (goFlags) {
|
if (goFlags) {
|
||||||
core.exportVariable("GOFLAGS", goFlags);
|
core.exportVariable("GOFLAGS", goFlags);
|
||||||
core.warning("Passing the GOFLAGS env parameter to the init action is deprecated. Please move this to the analyze action.");
|
core.warning("Passing the GOFLAGS env parameter to the init action is deprecated. Please move this to the analyze action.");
|
||||||
}
|
}
|
||||||
|
if (config.languages.includes(languages_1.Language.swift) &&
|
||||||
|
process.platform === "linux") {
|
||||||
|
logger.warning(`Swift analysis on Ubuntu runner images is no longer supported. Please migrate to a macOS runner if this affects you.`);
|
||||||
|
}
|
||||||
if (config.languages.includes(languages_1.Language.go) &&
|
if (config.languages.includes(languages_1.Language.go) &&
|
||||||
process.platform === "linux") {
|
process.platform === "linux") {
|
||||||
try {
|
try {
|
||||||
@@ -251,8 +293,7 @@ async function run() {
|
|||||||
core.exportVariable("CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN", "true");
|
core.exportVariable("CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN", "true");
|
||||||
}
|
}
|
||||||
const kotlinLimitVar = "CODEQL_EXTRACTOR_KOTLIN_OVERRIDE_MAXIMUM_VERSION_LIMIT";
|
const kotlinLimitVar = "CODEQL_EXTRACTOR_KOTLIN_OVERRIDE_MAXIMUM_VERSION_LIMIT";
|
||||||
if ((await (0, util_1.codeQlVersionAtLeast)(codeql, "2.13.4")) &&
|
if (!(await (0, util_1.codeQlVersionAtLeast)(codeql, "2.14.4"))) {
|
||||||
!(await (0, util_1.codeQlVersionAtLeast)(codeql, "2.14.4"))) {
|
|
||||||
core.exportVariable(kotlinLimitVar, "1.9.20");
|
core.exportVariable(kotlinLimitVar, "1.9.20");
|
||||||
}
|
}
|
||||||
if (config.languages.includes(languages_1.Language.java) &&
|
if (config.languages.includes(languages_1.Language.java) &&
|
||||||
@@ -293,7 +334,7 @@ async function run() {
|
|||||||
}
|
}
|
||||||
// From 2.16.0 the default for the python extractor is to not perform any
|
// From 2.16.0 the default for the python extractor is to not perform any
|
||||||
// dependency extraction. For versions before that, you needed to set this flag to
|
// dependency extraction. For versions before that, you needed to set this flag to
|
||||||
// enable this behavior (supported since 2.13.1).
|
// enable this behavior.
|
||||||
if (await (0, util_1.codeQlVersionAtLeast)(codeql, "2.17.1")) {
|
if (await (0, util_1.codeQlVersionAtLeast)(codeql, "2.17.1")) {
|
||||||
// disabled by default, no warning
|
// disabled by default, no warning
|
||||||
}
|
}
|
||||||
@@ -301,11 +342,8 @@ async function run() {
|
|||||||
// disabled by default, prints warning if environment variable is not set
|
// disabled by default, prints warning if environment variable is not set
|
||||||
core.exportVariable("CODEQL_EXTRACTOR_PYTHON_DISABLE_LIBRARY_EXTRACTION", "true");
|
core.exportVariable("CODEQL_EXTRACTOR_PYTHON_DISABLE_LIBRARY_EXTRACTION", "true");
|
||||||
}
|
}
|
||||||
else if (await (0, util_1.codeQlVersionAtLeast)(codeql, "2.13.1")) {
|
|
||||||
core.exportVariable("CODEQL_EXTRACTOR_PYTHON_DISABLE_LIBRARY_EXTRACTION", "true");
|
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
logger.warning(`CodeQL Action versions 3.25.0 and later, and versions 2.25.0 and later no longer install Python dependencies. We recommend upgrading to at least CodeQL Bundle 2.16.0 to avoid any potential problems due to this (you are currently using ${(await codeql.getVersion()).version}). Alternatively, we recommend downgrading the CodeQL Action to version 3.24.10 (for customers using GitHub.com or GitHub Enterprise Server v3.12 or later) or 2.24.10 (for customers using GitHub Enterprise Server v3.11 or earlier).`);
|
core.exportVariable("CODEQL_EXTRACTOR_PYTHON_DISABLE_LIBRARY_EXTRACTION", "true");
|
||||||
}
|
}
|
||||||
if ((0, actions_util_1.getOptionalInput)("setup-python-dependencies") !== undefined) {
|
if ((0, actions_util_1.getOptionalInput)("setup-python-dependencies") !== undefined) {
|
||||||
logger.warning("The setup-python-dependencies input is deprecated and no longer has any effect. We recommend removing any references from your workflows. See https://github.blog/changelog/2024-01-23-codeql-2-16-python-dependency-installation-disabled-new-queries-and-bug-fixes/ for more information.");
|
logger.warning("The setup-python-dependencies input is deprecated and no longer has any effect. We recommend removing any references from your workflows. See https://github.blog/changelog/2024-01-23-codeql-2-16-python-dependency-installation-disabled-new-queries-and-bug-fixes/ for more information.");
|
||||||
@@ -330,13 +368,13 @@ async function run() {
|
|||||||
catch (unwrappedError) {
|
catch (unwrappedError) {
|
||||||
const error = (0, util_1.wrapError)(unwrappedError);
|
const error = (0, util_1.wrapError)(unwrappedError);
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
await sendCompletedStatusReport(startedAt, config, toolsDownloadDurationMs, toolsFeatureFlagsValid, toolsSource, toolsVersion, logger, error);
|
await sendCompletedStatusReport(startedAt, config, toolsDownloadStatusReport, toolsFeatureFlagsValid, toolsSource, toolsVersion, logger, error);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
(0, diagnostics_1.logUnwrittenDiagnostics)();
|
(0, diagnostics_1.logUnwrittenDiagnostics)();
|
||||||
}
|
}
|
||||||
await sendCompletedStatusReport(startedAt, config, toolsDownloadDurationMs, toolsFeatureFlagsValid, toolsSource, toolsVersion, logger);
|
await sendCompletedStatusReport(startedAt, config, toolsDownloadStatusReport, toolsFeatureFlagsValid, toolsSource, toolsVersion, logger);
|
||||||
}
|
}
|
||||||
function getTrapCachingEnabled() {
|
function getTrapCachingEnabled() {
|
||||||
// If the workflow specified something always respect that
|
// If the workflow specified something always respect that
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
4
lib/init.js
generated
4
lib/init.js
generated
@@ -44,10 +44,10 @@ const tracer_config_1 = require("./tracer-config");
|
|||||||
const util = __importStar(require("./util"));
|
const util = __importStar(require("./util"));
|
||||||
async function initCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, logger) {
|
async function initCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, logger) {
|
||||||
logger.startGroup("Setup CodeQL tools");
|
logger.startGroup("Setup CodeQL tools");
|
||||||
const { codeql, toolsDownloadDurationMs, toolsSource, toolsVersion } = await (0, codeql_1.setupCodeQL)(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, logger, true);
|
const { codeql, toolsDownloadStatusReport, toolsSource, toolsVersion } = await (0, codeql_1.setupCodeQL)(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, logger, true);
|
||||||
await codeql.printVersion();
|
await codeql.printVersion();
|
||||||
logger.endGroup();
|
logger.endGroup();
|
||||||
return { codeql, toolsDownloadDurationMs, toolsSource, toolsVersion };
|
return { codeql, toolsDownloadStatusReport, toolsSource, toolsVersion };
|
||||||
}
|
}
|
||||||
async function initConfig(inputs, codeql) {
|
async function initConfig(inputs, codeql) {
|
||||||
const logger = inputs.logger;
|
const logger = inputs.logger;
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"init.js","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,gCA2BC;AAED,gCAgBC;AAED,0BAkCC;AAED,0DAeC;AAMD,sDAkBC;AAID,oCA4BC;AAED,0EAoDC;AAnOD,uCAAyB;AACzB,2CAA6B;AAE7B,6DAA+C;AAC/C,yEAA2D;AAC3D,kEAAoD;AAEpD,iDAAsE;AAEtE,qCAA+C;AAC/C,4DAA8C;AAE9C,2CAA0D;AAG1D,qDAAgD;AAChD,mDAAwE;AACxE,6CAA+B;AAExB,KAAK,UAAU,UAAU,CAC9B,UAA8B,EAC9B,UAA4B,EAC5B,OAAe,EACf,OAA2B,EAC3B,iBAA2C,EAC3C,MAAc;IAOd,MAAM,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;IACxC,MAAM,EAAE,MAAM,EAAE,uBAAuB,EAAE,WAAW,EAAE,YAAY,EAAE,GAClE,MAAM,IAAA,oBAAW,EACf,UAAU,EACV,UAAU,EACV,OAAO,EACP,OAAO,EACP,iBAAiB,EACjB,MAAM,EACN,IAAI,CACL,CAAC;IACJ,MAAM,MAAM,CAAC,YAAY,EAAE,CAAC;IAC5B,MAAM,CAAC,QAAQ,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,uBAAuB,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC;AACxE,CAAC;AAEM,KAAK,UAAU,UAAU,CAC9B,MAAoC,EACpC,MAAc;IAEd,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7B,MAAM,CAAC,UAAU,CAAC,6BAA6B,CAAC,CAAC;IACjD,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IACpD,IACE,CAAC,CAAC,M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C,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,EAC3C,CAAC;QACD,MAAM,CAAC,OAAO,CACZ,kCAAkC,MAAM,CAAC,UAAU,4CAA4C,CAChG,CAAC;QACF,IAAI,CAAC;YACH,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE;gBACxB,KAAK,EAAE,IAAI;gBACX,UAAU,EAAE,CAAC;gBACb,SAAS,EAAE,IAAI;aAChB,CAAC,CAAC;YAEH,MAAM,CAAC,IAAI,CACT,yCAAyC,MAAM,CAAC,UAAU,GAAG,CAC9D,CAAC;QACJ,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,KAAK,GAAG,mEACZ,IAAA,+BAAgB,EAAC,aAAa,CAAC;gBAC7B,CAAC,CAAC,sCAAsC,MAAM,CAAC,UAAU,IAAI;gBAC7D,CAAC,CAAC,kCAAkC,MAAM,CAAC,UAAU,IAAI;oBACvD,yEACN,iEAAiE,CAAC;YAElE,kGAAkG;YAClG,IAAI,IAAA,iCAAkB,GAAE,EAAE,CAAC;gBACzB,MAAM,IAAI,IAAI,CAAC,kBAAkB,CAC/B,GAAG,KAAK,4GAA4G;oBAClH,sEACE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,OACpB,EAAE,CACL,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,MAAM,IAAI,KAAK,CACb,GAAG,KAAK,sDAAsD;oBAC5D,+EAA+E;oBAC/E,yCACE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,OACpB,EAAE,CACL,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC"}
|
||||||
11
lib/resolve-environment.js
generated
11
lib/resolve-environment.js
generated
@@ -40,19 +40,10 @@ async function runResolveBuildEnvironment(cmd, logger, workingDir, languageInput
|
|||||||
}
|
}
|
||||||
language = parsedLanguage;
|
language = parsedLanguage;
|
||||||
}
|
}
|
||||||
let result = {};
|
|
||||||
// If the CodeQL version in use does not support the `resolve build-environment`
|
|
||||||
// command, just return an empty configuration. Otherwise invoke the CLI.
|
|
||||||
if (!(await util.codeQlVersionAtLeast(codeql, codeql_1.CODEQL_VERSION_RESOLVE_ENVIRONMENT))) {
|
|
||||||
logger.warning("Unsupported CodeQL CLI version for `resolve build-environment` command, " +
|
|
||||||
"returning an empty configuration.");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (workingDir !== undefined) {
|
if (workingDir !== undefined) {
|
||||||
logger.info(`Using ${workingDir} as the working directory.`);
|
logger.info(`Using ${workingDir} as the working directory.`);
|
||||||
}
|
}
|
||||||
result = await codeql.resolveBuildEnvironment(workingDir, language);
|
const result = await codeql.resolveBuildEnvironment(workingDir, language);
|
||||||
}
|
|
||||||
logger.endGroup();
|
logger.endGroup();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"resolve-environment.js","sourceRoot":"","sources":["../src/resolve-environment.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AASA,gEAmDC;AA5DD,qCAIkB;AAClB,2CAA4C;AAE5C,6CAA+B;AAExB,KAAK,UAAU,0BAA0B,CAC9C,GAAW,EACX,MAAc,EACd,UAA8B,EAC9B,aAAqB;IAErB,MAAM,CAAC,UAAU,CACf,+CAA+C,aAAa,EAAE,CAC/D,CAAC;IAEF,MAAM,MAAM,GAAG,MAAM,IAAA,kBAAS,EAAC,GAAG,CAAC,CAAC;IAEpC,IAAI,QAAQ,GAAG,aAAa,CAAC;IAC7B,6FAA6F;IAC7F,mFAAmF;IACnF,IACE,CAAC,CAAC,MAAM,IAAI,CAAC,oBAAoB,CAAC,MAAM,EAAE,yCAAgC,CAAC,CAAC,EAC5E,CAAC;QACD,MAAM,cAAc,GAAG,IAAA,yBAAa,EAAC,aAAa,CAAC,EAAE,QAAQ,EAAE,CAAC;QAChE,IAAI,cAAc,KAAK,SAAS,EAAE,CA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G,IAAA,yBAAa,EAAC,aAAa,CAAC,EAAE,QAAQ,EAAE,CAAC;QAChE,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,IAAI,IAAI,CAAC,kBAAkB,CAC/B,mCAAmC,aAAa,IAAI,CACrD,CAAC;QACJ,CAAC;QACD,QAAQ,GAAG,cAAc,CAAC;IAC5B,CAAC;IAED,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC7B,MAAM,CAAC,IAAI,CAAC,SAAS,UAAU,4BAA4B,CAAC,CAAC;IAC/D,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,uBAAuB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAE1E,MAAM,CAAC,QAAQ,EAAE,CAAC;IAClB,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
||||||
81
lib/setup-codeql.js
generated
81
lib/setup-codeql.js
generated
@@ -28,7 +28,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.downloadCodeQL = exports.CODEQL_DEFAULT_ACTION_REPOSITORY = exports.ToolsSource = void 0;
|
exports.downloadCodeQL = exports.CODEQL_DEFAULT_ACTION_REPOSITORY = exports.ToolsSource = void 0;
|
||||||
exports.getCodeQLActionRepository = getCodeQLActionRepository;
|
exports.getCodeQLActionRepository = getCodeQLActionRepository;
|
||||||
exports.tryFindCliVersionDotcomOnly = tryFindCliVersionDotcomOnly;
|
|
||||||
exports.tryGetBundleVersionFromUrl = tryGetBundleVersionFromUrl;
|
exports.tryGetBundleVersionFromUrl = tryGetBundleVersionFromUrl;
|
||||||
exports.convertToSemVer = convertToSemVer;
|
exports.convertToSemVer = convertToSemVer;
|
||||||
exports.getCodeQLSource = getCodeQLSource;
|
exports.getCodeQLSource = getCodeQLSource;
|
||||||
@@ -49,7 +48,6 @@ const api = __importStar(require("./api-client"));
|
|||||||
// creation scripts. Ensure that any changes to the format of this file are compatible with both of
|
// creation scripts. Ensure that any changes to the format of this file are compatible with both of
|
||||||
// these dependents.
|
// these dependents.
|
||||||
const defaults = __importStar(require("./defaults.json"));
|
const defaults = __importStar(require("./defaults.json"));
|
||||||
const feature_flags_1 = require("./feature-flags");
|
|
||||||
const util = __importStar(require("./util"));
|
const util = __importStar(require("./util"));
|
||||||
const util_1 = require("./util");
|
const util_1 = require("./util");
|
||||||
var ToolsSource;
|
var ToolsSource;
|
||||||
@@ -87,38 +85,6 @@ function getCodeQLActionRepository(logger) {
|
|||||||
}
|
}
|
||||||
return util.getRequiredEnvParam("GITHUB_ACTION_REPOSITORY");
|
return util.getRequiredEnvParam("GITHUB_ACTION_REPOSITORY");
|
||||||
}
|
}
|
||||||
function tryGetCodeQLCliVersionForRelease(release, logger) {
|
|
||||||
const cliVersionsFromMarkerFiles = release.assets
|
|
||||||
.map((asset) => asset.name.match(/cli-version-(.*)\.txt/)?.[1])
|
|
||||||
.filter((v) => v)
|
|
||||||
.map((v) => v);
|
|
||||||
if (cliVersionsFromMarkerFiles.length > 1) {
|
|
||||||
logger.warning(`Ignoring release ${release.tag_name} with multiple CLI version marker files.`);
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
else if (cliVersionsFromMarkerFiles.length === 0) {
|
|
||||||
logger.debug(`Failed to find the CodeQL CLI version for release ${release.tag_name}.`);
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
return cliVersionsFromMarkerFiles[0];
|
|
||||||
}
|
|
||||||
async function tryFindCliVersionDotcomOnly(tagName, logger) {
|
|
||||||
try {
|
|
||||||
logger.debug(`Fetching the GitHub Release for the CodeQL bundle tagged ${tagName}.`);
|
|
||||||
const apiClient = api.getApiClient();
|
|
||||||
const codeQLActionRepository = getCodeQLActionRepository(logger);
|
|
||||||
const release = await apiClient.rest.repos.getReleaseByTag({
|
|
||||||
owner: codeQLActionRepository.split("/")[0],
|
|
||||||
repo: codeQLActionRepository.split("/")[1],
|
|
||||||
tag: tagName,
|
|
||||||
});
|
|
||||||
return tryGetCodeQLCliVersionForRelease(release.data, logger);
|
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
logger.debug(`Failed to find the CLI version for the CodeQL bundle tagged ${tagName}. ${(0, util_1.wrapError)(e).message}`);
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
async function getCodeQLBundleDownloadURL(tagName, apiDetails, logger) {
|
async function getCodeQLBundleDownloadURL(tagName, apiDetails, logger) {
|
||||||
const codeQLActionRepository = getCodeQLActionRepository(logger);
|
const codeQLActionRepository = getCodeQLActionRepository(logger);
|
||||||
const potentialDownloadSources = [
|
const potentialDownloadSources = [
|
||||||
@@ -400,7 +366,7 @@ async function tryGetFallbackToolcacheVersion(cliVersion, tagName, logger) {
|
|||||||
}
|
}
|
||||||
// Exported using `export const` for testing purposes. Specifically, we want to
|
// Exported using `export const` for testing purposes. Specifically, we want to
|
||||||
// be able to stub this function and have other functions in this file use that stub.
|
// be able to stub this function and have other functions in this file use that stub.
|
||||||
const downloadCodeQL = async function (codeqlURL, maybeBundleVersion, maybeCliVersion, apiDetails, variant, tempDir, logger) {
|
const downloadCodeQL = async function (codeqlURL, maybeBundleVersion, maybeCliVersion, apiDetails, tempDir, logger) {
|
||||||
const parsedCodeQLURL = new URL(codeqlURL);
|
const parsedCodeQLURL = new URL(codeqlURL);
|
||||||
const searchParams = new URLSearchParams(parsedCodeQLURL.search);
|
const searchParams = new URLSearchParams(parsedCodeQLURL.search);
|
||||||
const headers = {
|
const headers = {
|
||||||
@@ -427,30 +393,27 @@ const downloadCodeQL = async function (codeqlURL, maybeBundleVersion, maybeCliVe
|
|||||||
const finalHeaders = Object.assign({ "User-Agent": "CodeQL Action" }, headers);
|
const finalHeaders = Object.assign({ "User-Agent": "CodeQL Action" }, headers);
|
||||||
const toolsDownloadStart = perf_hooks_1.performance.now();
|
const toolsDownloadStart = perf_hooks_1.performance.now();
|
||||||
const archivedBundlePath = await toolcache.downloadTool(codeqlURL, dest, authorization, finalHeaders);
|
const archivedBundlePath = await toolcache.downloadTool(codeqlURL, dest, authorization, finalHeaders);
|
||||||
const toolsDownloadDurationMs = Math.round(perf_hooks_1.performance.now() - toolsDownloadStart);
|
const downloadDurationMs = Math.round(perf_hooks_1.performance.now() - toolsDownloadStart);
|
||||||
logger.debug(`Finished downloading CodeQL bundle to ${archivedBundlePath} (${toolsDownloadDurationMs} ms).`);
|
logger.debug(`Finished downloading CodeQL bundle to ${archivedBundlePath} (${downloadDurationMs} ms).`);
|
||||||
logger.debug("Extracting CodeQL bundle.");
|
logger.debug("Extracting CodeQL bundle.");
|
||||||
const extractionStart = perf_hooks_1.performance.now();
|
const extractionStart = perf_hooks_1.performance.now();
|
||||||
const extractedBundlePath = await toolcache.extractTar(archivedBundlePath);
|
const extractedBundlePath = await toolcache.extractTar(archivedBundlePath);
|
||||||
const extractionMs = Math.round(perf_hooks_1.performance.now() - extractionStart);
|
const extractionDurationMs = Math.round(perf_hooks_1.performance.now() - extractionStart);
|
||||||
logger.debug(`Finished extracting CodeQL bundle to ${extractedBundlePath} (${extractionMs} ms).`);
|
logger.debug(`Finished extracting CodeQL bundle to ${extractedBundlePath} (${extractionDurationMs} ms).`);
|
||||||
await cleanUpGlob(archivedBundlePath, "CodeQL bundle archive", logger);
|
await cleanUpGlob(archivedBundlePath, "CodeQL bundle archive", logger);
|
||||||
const bundleVersion = maybeBundleVersion ?? tryGetBundleVersionFromUrl(codeqlURL, logger);
|
const bundleVersion = maybeBundleVersion ?? tryGetBundleVersionFromUrl(codeqlURL, logger);
|
||||||
if (bundleVersion === undefined) {
|
if (bundleVersion === undefined) {
|
||||||
logger.debug("Could not cache CodeQL tools because we could not determine the bundle version from the " +
|
logger.debug("Could not cache CodeQL tools because we could not determine the bundle version from the " +
|
||||||
`URL ${codeqlURL}.`);
|
`URL ${codeqlURL}.`);
|
||||||
return {
|
return {
|
||||||
toolsVersion: maybeCliVersion ?? "unknown",
|
|
||||||
codeqlFolder: extractedBundlePath,
|
codeqlFolder: extractedBundlePath,
|
||||||
toolsDownloadDurationMs,
|
statusReport: {
|
||||||
|
downloadDurationMs,
|
||||||
|
extractionDurationMs,
|
||||||
|
},
|
||||||
|
toolsVersion: maybeCliVersion ?? "unknown",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// Try to compute the CLI version for this bundle
|
|
||||||
if (maybeCliVersion === undefined &&
|
|
||||||
variant === util.GitHubVariant.DOTCOM &&
|
|
||||||
codeqlURL.includes(`/${exports.CODEQL_DEFAULT_ACTION_REPOSITORY}/`)) {
|
|
||||||
maybeCliVersion = await tryFindCliVersionDotcomOnly(`codeql-bundle-${bundleVersion}`, logger);
|
|
||||||
}
|
|
||||||
logger.debug("Caching CodeQL bundle.");
|
logger.debug("Caching CodeQL bundle.");
|
||||||
const toolcacheVersion = getCanonicalToolcacheVersion(maybeCliVersion, bundleVersion, logger);
|
const toolcacheVersion = getCanonicalToolcacheVersion(maybeCliVersion, bundleVersion, logger);
|
||||||
const toolcachedBundlePath = await toolcache.cacheDir(extractedBundlePath, "CodeQL", toolcacheVersion);
|
const toolcachedBundlePath = await toolcache.cacheDir(extractedBundlePath, "CodeQL", toolcacheVersion);
|
||||||
@@ -459,9 +422,12 @@ const downloadCodeQL = async function (codeqlURL, maybeBundleVersion, maybeCliVe
|
|||||||
await cleanUpGlob(extractedBundlePath, "CodeQL bundle from temporary directory", logger);
|
await cleanUpGlob(extractedBundlePath, "CodeQL bundle from temporary directory", logger);
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
toolsVersion: maybeCliVersion ?? toolcacheVersion,
|
|
||||||
codeqlFolder: toolcachedBundlePath,
|
codeqlFolder: toolcachedBundlePath,
|
||||||
toolsDownloadDurationMs,
|
statusReport: {
|
||||||
|
downloadDurationMs,
|
||||||
|
extractionDurationMs,
|
||||||
|
},
|
||||||
|
toolsVersion: maybeCliVersion ?? toolcacheVersion,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
exports.downloadCodeQL = downloadCodeQL;
|
exports.downloadCodeQL = downloadCodeQL;
|
||||||
@@ -490,15 +456,10 @@ function getCanonicalToolcacheVersion(cliVersion, bundleVersion, logger) {
|
|||||||
if (!cliVersion?.match(/^[0-9]+\.[0-9]+\.[0-9]+$/)) {
|
if (!cliVersion?.match(/^[0-9]+\.[0-9]+\.[0-9]+$/)) {
|
||||||
return convertToSemVer(bundleVersion, logger);
|
return convertToSemVer(bundleVersion, logger);
|
||||||
}
|
}
|
||||||
// If the bundle is semantically versioned, it can be looked up based on just the CLI version
|
// Bundles are now semantically versioned and can be looked up based on just the CLI version
|
||||||
// number, so version it in the toolcache using just the CLI version number.
|
// number, so we can version them in the toolcache using just the CLI version number.
|
||||||
if (semver.gte(cliVersion, feature_flags_1.CODEQL_VERSION_BUNDLE_SEMANTICALLY_VERSIONED)) {
|
|
||||||
return cliVersion;
|
return cliVersion;
|
||||||
}
|
}
|
||||||
// Include both the CLI version and the bundle version in the toolcache version number. That way
|
|
||||||
// we can find the bundle in the toolcache based on either the CLI version or the bundle version.
|
|
||||||
return `${cliVersion}-${bundleVersion}`;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* Obtains the CodeQL bundle, installs it in the toolcache if appropriate, and extracts it.
|
* Obtains the CodeQL bundle, installs it in the toolcache if appropriate, and extracts it.
|
||||||
*
|
*
|
||||||
@@ -516,7 +477,7 @@ async function setupCodeQLBundle(toolsInput, apiDetails, tempDir, variant, defau
|
|||||||
const source = await getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, variant, logger);
|
const source = await getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, variant, logger);
|
||||||
let codeqlFolder;
|
let codeqlFolder;
|
||||||
let toolsVersion = source.toolsVersion;
|
let toolsVersion = source.toolsVersion;
|
||||||
let toolsDownloadDurationMs;
|
let toolsDownloadStatusReport;
|
||||||
let toolsSource;
|
let toolsSource;
|
||||||
switch (source.sourceType) {
|
switch (source.sourceType) {
|
||||||
case "local":
|
case "local":
|
||||||
@@ -529,17 +490,17 @@ async function setupCodeQLBundle(toolsInput, apiDetails, tempDir, variant, defau
|
|||||||
toolsSource = ToolsSource.Toolcache;
|
toolsSource = ToolsSource.Toolcache;
|
||||||
break;
|
break;
|
||||||
case "download": {
|
case "download": {
|
||||||
const result = await (0, exports.downloadCodeQL)(source.codeqlURL, source.bundleVersion, source.cliVersion, apiDetails, variant, tempDir, logger);
|
const result = await (0, exports.downloadCodeQL)(source.codeqlURL, source.bundleVersion, source.cliVersion, apiDetails, tempDir, logger);
|
||||||
toolsVersion = result.toolsVersion;
|
toolsVersion = result.toolsVersion;
|
||||||
codeqlFolder = result.codeqlFolder;
|
codeqlFolder = result.codeqlFolder;
|
||||||
toolsDownloadDurationMs = result.toolsDownloadDurationMs;
|
toolsDownloadStatusReport = result.statusReport;
|
||||||
toolsSource = ToolsSource.Download;
|
toolsSource = ToolsSource.Download;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
util.assertNever(source);
|
util.assertNever(source);
|
||||||
}
|
}
|
||||||
return { codeqlFolder, toolsDownloadDurationMs, toolsSource, toolsVersion };
|
return { codeqlFolder, toolsDownloadStatusReport, toolsSource, toolsVersion };
|
||||||
}
|
}
|
||||||
async function cleanUpGlob(glob, name, logger) {
|
async function cleanUpGlob(glob, name, logger) {
|
||||||
logger.debug(`Cleaning up ${name}.`);
|
logger.debug(`Cleaning up ${name}.`);
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user