mirror of
https://github.com/github/codeql-action.git
synced 2025-12-06 15:58:06 +08:00
Compare commits
456 Commits
codeql-bun
...
v3.27.9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
df409f7d92 | ||
|
|
feca44ddf6 | ||
|
|
7972a42f3d | ||
|
|
44bf16d3a1 | ||
|
|
f124ad0e7e | ||
|
|
92753708cf | ||
|
|
a059a7a0ee | ||
|
|
8a93837afd | ||
|
|
90a270091b | ||
|
|
9cfbef4bda | ||
|
|
9a8645df7a | ||
|
|
78d0136ff7 | ||
|
|
c4bbe15558 | ||
|
|
47dd68ef62 | ||
|
|
849b60e504 | ||
|
|
f327a84ce5 | ||
|
|
1e5b59114b | ||
|
|
9e8cd42adc | ||
|
|
88bcf64e02 | ||
|
|
932369573c | ||
|
|
4d64ab66ad | ||
|
|
c6454d58c8 | ||
|
|
300d251cd6 | ||
|
|
b2c41ecd38 | ||
|
|
b0cd76b9fb | ||
|
|
dfed55caa4 | ||
|
|
417bb84fbc | ||
|
|
18cf30d984 | ||
|
|
9fd5c24857 | ||
|
|
babb554ede | ||
|
|
0a5a1c0d75 | ||
|
|
4c20d4f58a | ||
|
|
51e71f81a0 | ||
|
|
3951a82275 | ||
|
|
f9b0c1f2ea | ||
|
|
57a28594b9 | ||
|
|
3e10d3452b | ||
|
|
dd4aa40016 | ||
|
|
70aac4e018 | ||
|
|
c901aeec28 | ||
|
|
89757925c7 | ||
|
|
d853bec339 | ||
|
|
aab34601c1 | ||
|
|
0d3e640d0c | ||
|
|
b13515409a | ||
|
|
a89fbc80a2 | ||
|
|
3d09005851 | ||
|
|
8ba1205033 | ||
|
|
182c5e787f | ||
|
|
6f9e628e6f | ||
|
|
b706e37699 | ||
|
|
b4bc093eca | ||
|
|
9c48c8bf18 | ||
|
|
0bb80075c0 | ||
|
|
25488cc9b0 | ||
|
|
87548a27e8 | ||
|
|
78be2f1333 | ||
|
|
8f2cb3a931 | ||
|
|
0dc76a996d | ||
|
|
3096afedf9 | ||
|
|
5d7e6289af | ||
|
|
4a7b2d6c90 | ||
|
|
978ed829bd | ||
|
|
9922856ac1 | ||
|
|
f1c289a551 | ||
|
|
44e03577b2 | ||
|
|
5261a1223f | ||
|
|
49f7b34c3d | ||
|
|
7bcf845de9 | ||
|
|
93f3303766 | ||
|
|
b2a4442810 | ||
|
|
d5bcf48469 | ||
|
|
d57328a17b | ||
|
|
f8ccf38bb2 | ||
|
|
8c0517fff8 | ||
|
|
0b2048550c | ||
|
|
ef2fd42bcf | ||
|
|
fb1b8e22d9 | ||
|
|
a1a5527927 | ||
|
|
aa57810251 | ||
|
|
34e77b772d | ||
|
|
028cece17f | ||
|
|
198fb4b4b2 | ||
|
|
6695503422 | ||
|
|
be26fe61b5 | ||
|
|
af49565b85 | ||
|
|
5659f01a9c | ||
|
|
5333ff3db7 | ||
|
|
e4fb28de52 | ||
|
|
3d3d628990 | ||
|
|
2eea97e7b9 | ||
|
|
f8e782af56 | ||
|
|
49b7c9791d | ||
|
|
743a855bb8 | ||
|
|
f09c1c0a94 | ||
|
|
40daece232 | ||
|
|
67b73eaba5 | ||
|
|
a6c8729a5d | ||
|
|
8f3b48727f | ||
|
|
cba5fb58d4 | ||
|
|
e782c3a145 | ||
|
|
db6788195b | ||
|
|
ecde4d232d | ||
|
|
e3c67a01d3 | ||
|
|
f9ada54538 | ||
|
|
9222a972b5 | ||
|
|
b500b62cea | ||
|
|
946526174b | ||
|
|
43b75f7d9e | ||
|
|
a1695c562b | ||
|
|
1443ef52d1 | ||
|
|
49ec97c6f7 | ||
|
|
69656af4fe | ||
|
|
ea9e4e3799 | ||
|
|
845ea9230b | ||
|
|
3ab67a2193 | ||
|
|
58f2dfcb47 | ||
|
|
6e3a010dfe | ||
|
|
1c83cd1292 | ||
|
|
024283fcc9 | ||
|
|
613fe96926 | ||
|
|
e35d4aa1da | ||
|
|
396bb3e453 | ||
|
|
2b1319450a | ||
|
|
f047903675 | ||
|
|
427ce4600e | ||
|
|
5445a29a97 | ||
|
|
e6dd4048e9 | ||
|
|
7bc6222c12 | ||
|
|
b0c0aadc56 | ||
|
|
5cb4249dc7 | ||
|
|
a4ee280ec9 | ||
|
|
9a25759866 | ||
|
|
9278e42166 | ||
|
|
d6b248d50c | ||
|
|
02167d77fb | ||
|
|
4dc1519e3c | ||
|
|
7deb17efa4 | ||
|
|
682c2f71d2 | ||
|
|
965c472723 | ||
|
|
fe6283ba12 | ||
|
|
7f7df4b3fa | ||
|
|
8a5e9bca59 | ||
|
|
d899314bed | ||
|
|
ebbe050cf6 | ||
|
|
acb9cb18ee | ||
|
|
faa963470d | ||
|
|
3821acc64d | ||
|
|
abbbbf5f6d | ||
|
|
3a2edc656d | ||
|
|
f43e2e0027 | ||
|
|
07d238f66e | ||
|
|
51f133c8dc | ||
|
|
4f3212b617 | ||
|
|
63b548d59e | ||
|
|
1489c9c992 | ||
|
|
0f71e87464 | ||
|
|
4b58c1e3ee | ||
|
|
6a73972d77 | ||
|
|
1676468622 | ||
|
|
8b4526fbb9 | ||
|
|
3ef4c08457 | ||
|
|
4e033f0e26 | ||
|
|
34919cb664 | ||
|
|
45a6057506 | ||
|
|
5ac2ddd6fc | ||
|
|
3b7b85fbe8 | ||
|
|
688ea5370d | ||
|
|
1e6d67b138 | ||
|
|
d5e73848c4 | ||
|
|
756aa649df | ||
|
|
28e7fca08f | ||
|
|
3fe305410e | ||
|
|
16e8ccc657 | ||
|
|
cbe1897960 | ||
|
|
ca91b63a7d | ||
|
|
bfa8cb319d | ||
|
|
4e764dc701 | ||
|
|
aecadfe12a | ||
|
|
26077f3119 | ||
|
|
33f2dc57a4 | ||
|
|
2a3ca27b96 | ||
|
|
48c3e26756 | ||
|
|
a28215865a | ||
|
|
9f93f47966 | ||
|
|
19484c7e44 | ||
|
|
6554251ea7 | ||
|
|
1df65907e5 | ||
|
|
a883cff4b0 | ||
|
|
dfc2731f08 | ||
|
|
94b5d396bc | ||
|
|
f7935cc485 | ||
|
|
bab8f1df69 | ||
|
|
ed74b24893 | ||
|
|
21e6a62b15 | ||
|
|
0cb71294e5 | ||
|
|
79faaf1396 | ||
|
|
668531eca8 | ||
|
|
7d69964c80 | ||
|
|
c0b5869910 | ||
|
|
8f657e857d | ||
|
|
1338dbce25 | ||
|
|
f3714aed1f | ||
|
|
5b057af8ce | ||
|
|
471ed9f4c5 | ||
|
|
259cc5a39c | ||
|
|
f0bcca1598 | ||
|
|
5afaeede1c | ||
|
|
9d1353fe5f | ||
|
|
5e11d57e17 | ||
|
|
f64038fc40 | ||
|
|
2b7af49a3d | ||
|
|
51d90f48a6 | ||
|
|
19e7c25974 | ||
|
|
1922a489a8 | ||
|
|
1a7989f395 | ||
|
|
6a38de6872 | ||
|
|
1f4b0cb523 | ||
|
|
b07135c4b8 | ||
|
|
3dfa09571f | ||
|
|
3d19b71b35 | ||
|
|
3aa71356c7 | ||
|
|
fddb49dc77 | ||
|
|
65117851a6 | ||
|
|
1a02ac9a03 | ||
|
|
b91f43b4e4 | ||
|
|
f88a648aad | ||
|
|
802a7ed0bc | ||
|
|
0d2a78f583 | ||
|
|
b311eee555 | ||
|
|
db539989ff | ||
|
|
467d7e6d9e | ||
|
|
48fd9d715c | ||
|
|
6498663097 | ||
|
|
d8fa821764 | ||
|
|
b97ec3aa00 | ||
|
|
972eba1b90 | ||
|
|
e5048f5d84 | ||
|
|
06361b4d2b | ||
|
|
a5eda49bf5 | ||
|
|
b7cdb7fd39 | ||
|
|
8c3a732e36 | ||
|
|
a06ecd7587 | ||
|
|
5d7a7be853 | ||
|
|
662472033e | ||
|
|
ce7c2b560d | ||
|
|
b35b023d9b | ||
|
|
dafc762411 | ||
|
|
0d1eb88b60 | ||
|
|
0a30541440 | ||
|
|
2a6a6ad1c8 | ||
|
|
26c18c2c1f | ||
|
|
5e475b7659 | ||
|
|
2bfc468cd8 | ||
|
|
7080a68cbc | ||
|
|
63eb7bbf1f | ||
|
|
b15a5b50cb | ||
|
|
9bc4ee10c7 | ||
|
|
cdceebcb88 | ||
|
|
0c7697c619 | ||
|
|
bd02c19352 | ||
|
|
165a22e317 | ||
|
|
2a8a5ccf3b | ||
|
|
6026274108 | ||
|
|
95cae075a7 | ||
|
|
7e9defdf1b | ||
|
|
6682b14bf4 | ||
|
|
e1763c0db9 | ||
|
|
e03721a8ba | ||
|
|
f55f629544 | ||
|
|
9bf6b0a822 | ||
|
|
af56b044b5 | ||
|
|
5d314b71b0 | ||
|
|
d591d172c8 | ||
|
|
c4700633cb | ||
|
|
ad94f2fbab | ||
|
|
57f465f829 | ||
|
|
9ccb1b7b21 | ||
|
|
4f2715bf38 | ||
|
|
66ebfdfab6 | ||
|
|
2f0f924bb0 | ||
|
|
ded11c662c | ||
|
|
619f0d628b | ||
|
|
fc983c82c2 | ||
|
|
d77a73b68c | ||
|
|
563627499b | ||
|
|
a469ecdf39 | ||
|
|
99e8aaf0c4 | ||
|
|
2c8edf7179 | ||
|
|
5f519a326a | ||
|
|
b0b722f202 | ||
|
|
039b1b8b67 | ||
|
|
7ad2732661 | ||
|
|
f779452ac5 | ||
|
|
532932479b | ||
|
|
5fb6f1257e | ||
|
|
ea2cd92c21 | ||
|
|
007ba25648 | ||
|
|
0c3e006416 | ||
|
|
2b89f7bcf6 | ||
|
|
7d365b9940 | ||
|
|
ab636d7049 | ||
|
|
565880b86a | ||
|
|
38469af228 | ||
|
|
4dca88a5fc | ||
|
|
222ac621e3 | ||
|
|
edd7713837 | ||
|
|
90c42c41ec | ||
|
|
df0590b2ee | ||
|
|
d70300d9f5 | ||
|
|
79e826e0a2 | ||
|
|
ddead5420c | ||
|
|
cd83b08c78 | ||
|
|
5b6984ee4d | ||
|
|
eefb943f7e | ||
|
|
d545e9b4a6 | ||
|
|
201e02efe2 | ||
|
|
ce5f900bfc | ||
|
|
65dd816de1 | ||
|
|
502028f6bc | ||
|
|
9d1e406cd6 | ||
|
|
dafc7dd67c | ||
|
|
f31ce56e77 | ||
|
|
422a2796f6 | ||
|
|
47dd08d5fa | ||
|
|
572cc5268d | ||
|
|
690a986f16 | ||
|
|
c0098c850a | ||
|
|
c36620d31a | ||
|
|
570aecb95f | ||
|
|
c9a70ff45f | ||
|
|
d65a17605a | ||
|
|
bf2e624d0b | ||
|
|
56d197570a | ||
|
|
7cf65a5b2e | ||
|
|
8a56dd2e53 | ||
|
|
1532671351 | ||
|
|
64871a860c | ||
|
|
057e1ecd3d | ||
|
|
46d955c51a | ||
|
|
215ff9cf2e | ||
|
|
6c8758fcd6 | ||
|
|
76aafb9ddb | ||
|
|
bed2a47f20 | ||
|
|
3b143d4ee5 | ||
|
|
c768f67a10 | ||
|
|
873c91c4f7 | ||
|
|
8b33300963 | ||
|
|
15649f638c | ||
|
|
a83506b7c8 | ||
|
|
495ca588a4 | ||
|
|
6db8d6351f | ||
|
|
389647f398 | ||
|
|
d64cca4b60 | ||
|
|
955d00143d | ||
|
|
01007b8429 | ||
|
|
15f615c384 | ||
|
|
35de01e395 | ||
|
|
868284ba01 | ||
|
|
4beccf73ad | ||
|
|
08bec82e80 | ||
|
|
f0c7f1d0c0 | ||
|
|
a66a5fe0e4 | ||
|
|
8aba5f2c42 | ||
|
|
9b4db1efbf | ||
|
|
ecac2c6d53 | ||
|
|
e85017e674 | ||
|
|
a60db1d7ff | ||
|
|
28db28fc03 | ||
|
|
3da852e107 | ||
|
|
c4d433c562 | ||
|
|
2f6cf481fd | ||
|
|
3c13be0632 | ||
|
|
a196a714b8 | ||
|
|
1aa7f6f05d | ||
|
|
931cd264c2 | ||
|
|
3fe5410805 | ||
|
|
cf5b0a9041 | ||
|
|
5f2a79b975 | ||
|
|
e3889114a4 | ||
|
|
e2b3eafc8d | ||
|
|
7dbbf6d542 | ||
|
|
2617ff2d3f | ||
|
|
46e0c78da9 | ||
|
|
da7be78a1e | ||
|
|
ae1c6a2b12 | ||
|
|
461ef6c76d | ||
|
|
00b1146c45 | ||
|
|
f861efb2b3 | ||
|
|
6b2f7e7c28 | ||
|
|
af8e2bc4a1 | ||
|
|
bc68dc9d95 | ||
|
|
67b30f7c39 | ||
|
|
fa91789e81 | ||
|
|
426821d803 | ||
|
|
37309b9318 | ||
|
|
20bd6feb0b | ||
|
|
0abc1ec90b | ||
|
|
4d015b8cba | ||
|
|
07e8133971 | ||
|
|
662c71aa9e | ||
|
|
a7a6a6951e | ||
|
|
db98c27941 | ||
|
|
b1ca017eae | ||
|
|
990feb59a4 | ||
|
|
ac3fca3e9f | ||
|
|
e7309d2b5c | ||
|
|
e0a151e64e | ||
|
|
6b0ce4e274 | ||
|
|
07fd497921 | ||
|
|
2cddcb1990 | ||
|
|
6225a95822 | ||
|
|
9580b7e6d5 | ||
|
|
b436a5fca7 | ||
|
|
7a2719db05 | ||
|
|
65e62c7ee1 | ||
|
|
ef130516b1 | ||
|
|
132b18f2f0 | ||
|
|
edf2ee9ac8 | ||
|
|
74e989e9a5 | ||
|
|
bff5ba0a53 | ||
|
|
ed5036d7fa | ||
|
|
f9ae1f1149 | ||
|
|
b78ab6c660 | ||
|
|
a7b66734cc | ||
|
|
323f5ef653 | ||
|
|
a41f61f2b3 | ||
|
|
7513a95cdc | ||
|
|
574aaa5812 | ||
|
|
3b3a4a69cf | ||
|
|
799e477cb3 | ||
|
|
c38521e711 | ||
|
|
65efd221e9 | ||
|
|
294a9d9291 | ||
|
|
00b3604ce7 | ||
|
|
64431c66d0 | ||
|
|
e0e2d7557d | ||
|
|
6fc72c19db | ||
|
|
cb28816228 | ||
|
|
498c508900 | ||
|
|
a1a585f2ab | ||
|
|
34666c10b6 | ||
|
|
6e24973d7a | ||
|
|
d0a3cf2152 | ||
|
|
78d398ebc6 | ||
|
|
782de45248 | ||
|
|
642bbfc83a | ||
|
|
213bf3678c | ||
|
|
dd7307d603 | ||
|
|
bbd7c801a0 | ||
|
|
80d7a6c8d4 | ||
|
|
6989ba7bd2 | ||
|
|
1afca056e3 | ||
|
|
6cc325341d | ||
|
|
bbd9c4a63d | ||
|
|
d061f2cdd0 |
18
.github/actions/prepare-test/action.yml
vendored
18
.github/actions/prepare-test/action.yml
vendored
@@ -2,7 +2,7 @@ name: "Prepare test"
|
||||
description: Performs some preparation to run tests
|
||||
inputs:
|
||||
version:
|
||||
description: "The version of the CodeQL CLI to use. Can be 'linked', 'default', 'nightly-latest', 'nightly-YYYY-MM-DD', or 'stable-YYYY-MM-DD'."
|
||||
description: "The version of the CodeQL CLI to use. Can be 'linked', 'default', 'nightly-latest', 'nightly-YYYYMMDD', or 'stable-vX.Y.Z"
|
||||
required: true
|
||||
use-all-platform-bundle:
|
||||
description: "If true, we output a tools URL with codeql-bundle.tar.gz file rather than platform-specific URL"
|
||||
@@ -32,7 +32,15 @@ runs:
|
||||
run: |
|
||||
set -e # Fail this Action if `gh release list` fails.
|
||||
|
||||
if [[ ${{ inputs.version }} == "nightly-latest" ]]; then
|
||||
if [[ ${{ inputs.version }} == "linked" ]]; then
|
||||
echo "tools-url=linked" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
elif [[ ${{ inputs.version }} == "default" ]]; then
|
||||
echo "tools-url=" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ ${{ inputs.version }} == "nightly-latest" && "$RUNNER_OS" != "Windows" ]]; then
|
||||
extension="tar.zst"
|
||||
else
|
||||
extension="tar.gz"
|
||||
@@ -56,14 +64,10 @@ runs:
|
||||
echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/$tag/$artifact_name" >> $GITHUB_OUTPUT
|
||||
elif [[ ${{ inputs.version }} == *"nightly"* ]]; then
|
||||
version=`echo ${{ inputs.version }} | sed -e 's/^.*\-//'`
|
||||
echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/codeql-bundle-$version-manual/$artifact_name" >> $GITHUB_OUTPUT
|
||||
echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/codeql-bundle-$version/$artifact_name" >> $GITHUB_OUTPUT
|
||||
elif [[ ${{ inputs.version }} == *"stable"* ]]; then
|
||||
version=`echo ${{ inputs.version }} | sed -e 's/^.*\-//'`
|
||||
echo "tools-url=https://github.com/github/codeql-action/releases/download/codeql-bundle-$version/$artifact_name" >> $GITHUB_OUTPUT
|
||||
elif [[ ${{ inputs.version }} == "linked" ]]; then
|
||||
echo "tools-url=linked" >> $GITHUB_OUTPUT
|
||||
elif [[ ${{ inputs.version }} == "default" ]]; then
|
||||
echo "tools-url=" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "::error::Unrecognized version specified!"
|
||||
exit 1
|
||||
|
||||
4
.github/dependabot.yml
vendored
4
.github/dependabot.yml
vendored
@@ -16,6 +16,10 @@ updates:
|
||||
# v7 requires ESM
|
||||
- dependency-name: "del"
|
||||
versions: ["^7.0.0"]
|
||||
# This is broken due to the way configuration files have changed.
|
||||
# This might be fixed when we move to eslint v9.
|
||||
- dependency-name: "eslint-plugin-import"
|
||||
versions: [">=2.30.0"]
|
||||
groups:
|
||||
npm:
|
||||
patterns:
|
||||
|
||||
9
.github/workflows/__all-platform-bundle.yml
generated
vendored
9
.github/workflows/__all-platform-bundle.yml
generated
vendored
@@ -36,14 +36,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
9
.github/workflows/__analyze-ref-input.yml
generated
vendored
9
.github/workflows/__analyze-ref-input.yml
generated
vendored
@@ -40,14 +40,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
9
.github/workflows/__autobuild-action.yml
generated
vendored
9
.github/workflows/__autobuild-action.yml
generated
vendored
@@ -40,14 +40,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
9
.github/workflows/__autobuild-direct-tracing-with-working-dir.yml
generated
vendored
9
.github/workflows/__autobuild-direct-tracing-with-working-dir.yml
generated
vendored
@@ -42,14 +42,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
9
.github/workflows/__autobuild-direct-tracing.yml
generated
vendored
9
.github/workflows/__autobuild-direct-tracing.yml
generated
vendored
@@ -42,14 +42,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
9
.github/workflows/__build-mode-autobuild.yml
generated
vendored
9
.github/workflows/__build-mode-autobuild.yml
generated
vendored
@@ -36,14 +36,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
9
.github/workflows/__build-mode-manual.yml
generated
vendored
9
.github/workflows/__build-mode-manual.yml
generated
vendored
@@ -36,14 +36,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
9
.github/workflows/__build-mode-none.yml
generated
vendored
9
.github/workflows/__build-mode-none.yml
generated
vendored
@@ -38,14 +38,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
9
.github/workflows/__build-mode-rollback.yml
generated
vendored
9
.github/workflows/__build-mode-rollback.yml
generated
vendored
@@ -36,14 +36,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
9
.github/workflows/__cleanup-db-cluster-dir.yml
generated
vendored
9
.github/workflows/__cleanup-db-cluster-dir.yml
generated
vendored
@@ -36,14 +36,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
11
.github/workflows/__config-export.yml
generated
vendored
11
.github/workflows/__config-export.yml
generated
vendored
@@ -46,14 +46,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
@@ -75,7 +70,7 @@ jobs:
|
||||
output: ${{ runner.temp }}/results
|
||||
upload-database: false
|
||||
- name: Upload SARIF
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: config-export-${{ matrix.os }}-${{ matrix.version }}.sarif.json
|
||||
path: ${{ runner.temp }}/results/javascript.sarif
|
||||
|
||||
9
.github/workflows/__config-input.yml
generated
vendored
9
.github/workflows/__config-input.yml
generated
vendored
@@ -36,14 +36,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
9
.github/workflows/__cpp-deptrace-disabled.yml
generated
vendored
9
.github/workflows/__cpp-deptrace-disabled.yml
generated
vendored
@@ -40,14 +40,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
9
.github/workflows/__cpp-deptrace-enabled-on-macos.yml
generated
vendored
9
.github/workflows/__cpp-deptrace-enabled-on-macos.yml
generated
vendored
@@ -36,14 +36,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
9
.github/workflows/__cpp-deptrace-enabled.yml
generated
vendored
9
.github/workflows/__cpp-deptrace-enabled.yml
generated
vendored
@@ -40,14 +40,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
11
.github/workflows/__diagnostics-export.yml
generated
vendored
11
.github/workflows/__diagnostics-export.yml
generated
vendored
@@ -46,14 +46,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
@@ -87,7 +82,7 @@ jobs:
|
||||
output: ${{ runner.temp }}/results
|
||||
upload-database: false
|
||||
- name: Upload SARIF
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: diagnostics-export-${{ matrix.os }}-${{ matrix.version }}.sarif.json
|
||||
path: ${{ runner.temp }}/results/javascript.sarif
|
||||
|
||||
12
.github/workflows/__export-file-baseline-information.yml
generated
vendored
12
.github/workflows/__export-file-baseline-information.yml
generated
vendored
@@ -40,14 +40,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
@@ -65,6 +60,7 @@ jobs:
|
||||
languages: javascript
|
||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||
- uses: ./../action/.github/actions/setup-swift
|
||||
if: runner.os == 'macOS'
|
||||
with:
|
||||
codeql-path: ${{ steps.init.outputs.codeql-path }}
|
||||
- name: Build code
|
||||
@@ -74,7 +70,7 @@ jobs:
|
||||
with:
|
||||
output: ${{ runner.temp }}/results
|
||||
- name: Upload SARIF
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: with-baseline-information-${{ matrix.os }}-${{ matrix.version }}.sarif.json
|
||||
path: ${{ runner.temp }}/results/javascript.sarif
|
||||
|
||||
101
.github/workflows/__extract-direct-to-toolcache.yml
generated
vendored
Normal file
101
.github/workflows/__extract-direct-to-toolcache.yml
generated
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
# 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 - Extract directly to toolcache
|
||||
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:
|
||||
extract-direct-to-toolcache:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: macos-latest
|
||||
version: linked
|
||||
- os: ubuntu-latest
|
||||
version: linked
|
||||
- os: windows-latest
|
||||
version: linked
|
||||
name: Extract directly to toolcache
|
||||
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-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'
|
||||
- name: Remove CodeQL from toolcache
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const codeqlPath = path.join(process.env['RUNNER_TOOL_CACHE'], 'CodeQL');
|
||||
fs.rmdirSync(codeqlPath, { recursive: true });
|
||||
- name: Install @actions/tool-cache
|
||||
run: npm install @actions/tool-cache
|
||||
- name: Check toolcache does not contain CodeQL
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const toolcache = require('@actions/tool-cache');
|
||||
const allCodeqlVersions = toolcache.findAllVersions('CodeQL');
|
||||
if (allCodeqlVersions.length !== 0) {
|
||||
throw new Error(`CodeQL should not be found in the toolcache, but found ${allCodeqlVersions}`);
|
||||
}
|
||||
console.log('No versions of CodeQL found in the toolcache');
|
||||
- id: init
|
||||
uses: ./../action/init
|
||||
with:
|
||||
languages: javascript
|
||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||
- uses: ./../action/analyze
|
||||
with:
|
||||
output: ${{ runner.temp }}/results
|
||||
upload-database: false
|
||||
- name: Check CodeQL is installed within the toolcache
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const toolcache = require('@actions/tool-cache');
|
||||
const allCodeqlVersions = toolcache.findAllVersions('CodeQL');
|
||||
console.log(`Found CodeQL versions: ${allCodeqlVersions}`);
|
||||
if (allCodeqlVersions.length === 0) {
|
||||
throw new Error('CodeQL not found in toolcache');
|
||||
}
|
||||
if (allCodeqlVersions.length > 1) {
|
||||
throw new Error('Multiple CodeQL versions found in toolcache');
|
||||
}
|
||||
env:
|
||||
CODEQL_ACTION_EXTRACT_TOOLCACHE: true
|
||||
CODEQL_ACTION_TEST_MODE: true
|
||||
9
.github/workflows/__extractor-ram-threads.yml
generated
vendored
9
.github/workflows/__extractor-ram-threads.yml
generated
vendored
@@ -36,14 +36,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
53
.github/workflows/__go-custom-queries.yml
generated
vendored
53
.github/workflows/__go-custom-queries.yml
generated
vendored
@@ -28,53 +28,9 @@ jobs:
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.13.5
|
||||
- os: macos-12
|
||||
version: stable-v2.13.5
|
||||
- os: windows-latest
|
||||
version: stable-v2.13.5
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.14.6
|
||||
- os: macos-12
|
||||
version: stable-v2.14.6
|
||||
- os: windows-latest
|
||||
version: stable-v2.14.6
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.15.5
|
||||
- os: macos-latest
|
||||
version: stable-v2.15.5
|
||||
- os: windows-latest
|
||||
version: stable-v2.15.5
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.16.6
|
||||
- os: macos-latest
|
||||
version: stable-v2.16.6
|
||||
- os: windows-latest
|
||||
version: stable-v2.16.6
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.17.6
|
||||
- os: macos-latest
|
||||
version: stable-v2.17.6
|
||||
- os: windows-latest
|
||||
version: stable-v2.17.6
|
||||
- os: ubuntu-latest
|
||||
version: default
|
||||
- os: macos-latest
|
||||
version: default
|
||||
- os: windows-latest
|
||||
version: default
|
||||
- os: ubuntu-latest
|
||||
version: linked
|
||||
- os: macos-latest
|
||||
version: linked
|
||||
- os: windows-latest
|
||||
version: linked
|
||||
- os: ubuntu-latest
|
||||
version: nightly-latest
|
||||
- os: macos-latest
|
||||
version: nightly-latest
|
||||
- os: windows-latest
|
||||
version: nightly-latest
|
||||
name: 'Go: Custom queries'
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -82,14 +38,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
9
.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml
generated
vendored
9
.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml
generated
vendored
@@ -36,14 +36,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
9
.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml
generated
vendored
9
.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml
generated
vendored
@@ -36,14 +36,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
9
.github/workflows/__go-indirect-tracing-workaround.yml
generated
vendored
9
.github/workflows/__go-indirect-tracing-workaround.yml
generated
vendored
@@ -36,14 +36,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
19
.github/workflows/__go-tracing-autobuilder.yml
generated
vendored
19
.github/workflows/__go-tracing-autobuilder.yml
generated
vendored
@@ -27,13 +27,9 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.13.5
|
||||
- os: macos-12
|
||||
version: stable-v2.13.5
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.14.6
|
||||
- os: macos-12
|
||||
- os: macos-13
|
||||
version: stable-v2.14.6
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.15.5
|
||||
@@ -47,6 +43,10 @@ jobs:
|
||||
version: stable-v2.17.6
|
||||
- os: macos-latest
|
||||
version: stable-v2.17.6
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.18.4
|
||||
- os: macos-latest
|
||||
version: stable-v2.18.4
|
||||
- os: ubuntu-latest
|
||||
version: default
|
||||
- os: macos-latest
|
||||
@@ -66,14 +66,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
19
.github/workflows/__go-tracing-custom-build-steps.yml
generated
vendored
19
.github/workflows/__go-tracing-custom-build-steps.yml
generated
vendored
@@ -27,13 +27,9 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.13.5
|
||||
- os: macos-12
|
||||
version: stable-v2.13.5
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.14.6
|
||||
- os: macos-12
|
||||
- os: macos-13
|
||||
version: stable-v2.14.6
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.15.5
|
||||
@@ -47,6 +43,10 @@ jobs:
|
||||
version: stable-v2.17.6
|
||||
- os: macos-latest
|
||||
version: stable-v2.17.6
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.18.4
|
||||
- os: macos-latest
|
||||
version: stable-v2.18.4
|
||||
- os: ubuntu-latest
|
||||
version: default
|
||||
- os: macos-latest
|
||||
@@ -66,14 +66,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
19
.github/workflows/__go-tracing-legacy-workflow.yml
generated
vendored
19
.github/workflows/__go-tracing-legacy-workflow.yml
generated
vendored
@@ -27,13 +27,9 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.13.5
|
||||
- os: macos-12
|
||||
version: stable-v2.13.5
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.14.6
|
||||
- os: macos-12
|
||||
- os: macos-13
|
||||
version: stable-v2.14.6
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.15.5
|
||||
@@ -47,6 +43,10 @@ jobs:
|
||||
version: stable-v2.17.6
|
||||
- os: macos-latest
|
||||
version: stable-v2.17.6
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.18.4
|
||||
- os: macos-latest
|
||||
version: stable-v2.18.4
|
||||
- os: ubuntu-latest
|
||||
version: default
|
||||
- os: macos-latest
|
||||
@@ -66,14 +66,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
9
.github/workflows/__init-with-registries.yml
generated
vendored
9
.github/workflows/__init-with-registries.yml
generated
vendored
@@ -53,14 +53,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
9
.github/workflows/__javascript-source-root.yml
generated
vendored
9
.github/workflows/__javascript-source-root.yml
generated
vendored
@@ -40,14 +40,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
11
.github/workflows/__job-run-uuid-sarif.yml
generated
vendored
11
.github/workflows/__job-run-uuid-sarif.yml
generated
vendored
@@ -36,14 +36,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
@@ -64,7 +59,7 @@ jobs:
|
||||
with:
|
||||
output: ${{ runner.temp }}/results
|
||||
- name: Upload SARIF
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.os }}-${{ matrix.version }}.sarif.json
|
||||
path: ${{ runner.temp }}/results/javascript.sarif
|
||||
|
||||
9
.github/workflows/__language-aliases.yml
generated
vendored
9
.github/workflows/__language-aliases.yml
generated
vendored
@@ -36,14 +36,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
34
.github/workflows/__multi-language-autodetect.yml
generated
vendored
34
.github/workflows/__multi-language-autodetect.yml
generated
vendored
@@ -27,11 +27,7 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: macos-12
|
||||
version: stable-v2.13.5
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.13.5
|
||||
- os: macos-12
|
||||
- os: macos-13
|
||||
version: stable-v2.14.6
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.14.6
|
||||
@@ -47,6 +43,10 @@ jobs:
|
||||
version: stable-v2.17.6
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.17.6
|
||||
- os: macos-latest
|
||||
version: stable-v2.18.4
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.18.4
|
||||
- os: macos-latest
|
||||
version: default
|
||||
- os: ubuntu-latest
|
||||
@@ -66,14 +66,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
@@ -93,13 +88,15 @@ jobs:
|
||||
id: init
|
||||
with:
|
||||
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'
|
||||
|| '' }}
|
||||
# Swift is not supported on Ubuntu or codeql 2.14 so we manually exclude it from the list here
|
||||
languages: ${{ (runner.os == 'Linux' || (runner.os == 'macOS' && matrix.version
|
||||
== 'stable-v2.14.6')) && 'cpp,csharp,go,java,javascript,python,ruby' ||
|
||||
'' }}
|
||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||
|
||||
- uses: ./../action/.github/actions/setup-swift
|
||||
if: runner.os == 'macOS'
|
||||
# Exclude macos on v2.14.6 since we can not longer run swift on ARM runners
|
||||
if: runner.os == 'macOS' && matrix.version != 'stable-v2.14.6'
|
||||
with:
|
||||
codeql-path: ${{ steps.init.outputs.codeql-path }}
|
||||
|
||||
@@ -151,8 +148,9 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Check language autodetect for Swift on MacOS
|
||||
if: runner.os == 'macOS'
|
||||
- name: Check language autodetect for Swift on macOS
|
||||
# Exclude macos on v2.14.6 since we can not longer run swift on ARM runners
|
||||
if: runner.os == 'macOS' && matrix.version != 'stable-v2.14.6'
|
||||
shell: bash
|
||||
run: |
|
||||
SWIFT_DB=${{ fromJson(steps.analysis.outputs.db-locations).swift }}
|
||||
|
||||
11
.github/workflows/__packaging-codescanning-config-inputs-js.yml
generated
vendored
11
.github/workflows/__packaging-codescanning-config-inputs-js.yml
generated
vendored
@@ -52,14 +52,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
@@ -89,7 +84,7 @@ jobs:
|
||||
uses: ./../action/.github/actions/check-sarif
|
||||
with:
|
||||
sarif-file: ${{ runner.temp }}/results/javascript.sarif
|
||||
queries-run:
|
||||
queries-run:
|
||||
javascript/example/empty-or-one-block,javascript/example/empty-or-one-block,javascript/example/other-query-block,javascript/example/two-block
|
||||
queries-not-run: foo,bar
|
||||
|
||||
|
||||
11
.github/workflows/__packaging-config-inputs-js.yml
generated
vendored
11
.github/workflows/__packaging-config-inputs-js.yml
generated
vendored
@@ -52,14 +52,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
@@ -89,7 +84,7 @@ jobs:
|
||||
uses: ./../action/.github/actions/check-sarif
|
||||
with:
|
||||
sarif-file: ${{ runner.temp }}/results/javascript.sarif
|
||||
queries-run:
|
||||
queries-run:
|
||||
javascript/example/empty-or-one-block,javascript/example/empty-or-one-block,javascript/example/other-query-block,javascript/example/two-block
|
||||
queries-not-run: foo,bar
|
||||
|
||||
|
||||
11
.github/workflows/__packaging-config-js.yml
generated
vendored
11
.github/workflows/__packaging-config-js.yml
generated
vendored
@@ -52,14 +52,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
@@ -88,7 +83,7 @@ jobs:
|
||||
uses: ./../action/.github/actions/check-sarif
|
||||
with:
|
||||
sarif-file: ${{ runner.temp }}/results/javascript.sarif
|
||||
queries-run:
|
||||
queries-run:
|
||||
javascript/example/empty-or-one-block,javascript/example/empty-or-one-block,javascript/example/other-query-block,javascript/example/two-block
|
||||
queries-not-run: foo,bar
|
||||
|
||||
|
||||
11
.github/workflows/__packaging-inputs-js.yml
generated
vendored
11
.github/workflows/__packaging-inputs-js.yml
generated
vendored
@@ -52,14 +52,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
@@ -88,7 +83,7 @@ jobs:
|
||||
uses: ./../action/.github/actions/check-sarif
|
||||
with:
|
||||
sarif-file: ${{ runner.temp }}/results/javascript.sarif
|
||||
queries-run:
|
||||
queries-run:
|
||||
javascript/example/empty-or-one-block,javascript/example/empty-or-one-block,javascript/example/other-query-block,javascript/example/two-block
|
||||
queries-not-run: foo,bar
|
||||
|
||||
|
||||
53
.github/workflows/__remote-config.yml
generated
vendored
53
.github/workflows/__remote-config.yml
generated
vendored
@@ -28,53 +28,9 @@ jobs:
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.13.5
|
||||
- os: macos-12
|
||||
version: stable-v2.13.5
|
||||
- os: windows-latest
|
||||
version: stable-v2.13.5
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.14.6
|
||||
- os: macos-12
|
||||
version: stable-v2.14.6
|
||||
- os: windows-latest
|
||||
version: stable-v2.14.6
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.15.5
|
||||
- os: macos-latest
|
||||
version: stable-v2.15.5
|
||||
- os: windows-latest
|
||||
version: stable-v2.15.5
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.16.6
|
||||
- os: macos-latest
|
||||
version: stable-v2.16.6
|
||||
- os: windows-latest
|
||||
version: stable-v2.16.6
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.17.6
|
||||
- os: macos-latest
|
||||
version: stable-v2.17.6
|
||||
- os: windows-latest
|
||||
version: stable-v2.17.6
|
||||
- os: ubuntu-latest
|
||||
version: default
|
||||
- os: macos-latest
|
||||
version: default
|
||||
- os: windows-latest
|
||||
version: default
|
||||
- os: ubuntu-latest
|
||||
version: linked
|
||||
- os: macos-latest
|
||||
version: linked
|
||||
- os: windows-latest
|
||||
version: linked
|
||||
- os: ubuntu-latest
|
||||
version: nightly-latest
|
||||
- os: macos-latest
|
||||
version: nightly-latest
|
||||
- os: windows-latest
|
||||
version: nightly-latest
|
||||
name: Remote config file
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -82,14 +38,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
21
.github/workflows/__resolve-environment-action.yml
generated
vendored
21
.github/workflows/__resolve-environment-action.yml
generated
vendored
@@ -27,12 +27,6 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.13.5
|
||||
- os: macos-12
|
||||
version: stable-v2.13.5
|
||||
- os: windows-latest
|
||||
version: stable-v2.13.5
|
||||
- os: ubuntu-latest
|
||||
version: default
|
||||
- os: macos-latest
|
||||
@@ -58,14 +52,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
@@ -79,8 +68,7 @@ jobs:
|
||||
setup-kotlin: 'true'
|
||||
- uses: ./../action/init
|
||||
with:
|
||||
languages: ${{ matrix.version == 'stable-v2.13.5' && 'go' || 'go,javascript-typescript'
|
||||
}}
|
||||
languages: go,javascript-typescript
|
||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||
|
||||
- name: Resolve environment for Go
|
||||
@@ -94,14 +82,13 @@ jobs:
|
||||
run: exit 1
|
||||
|
||||
- name: Resolve environment for JavaScript/TypeScript
|
||||
if: matrix.version != 'stable-v2.13.5'
|
||||
uses: ./../action/resolve-environment
|
||||
id: resolve-environment-js
|
||||
with:
|
||||
language: javascript-typescript
|
||||
|
||||
- name: Fail if JavaScript/TypeScript configuration present
|
||||
if: matrix.version != 'stable-v2.13.5' &&
|
||||
if:
|
||||
fromJSON(steps.resolve-environment-js.outputs.environment).configuration.javascript
|
||||
run: exit 1
|
||||
env:
|
||||
|
||||
9
.github/workflows/__rubocop-multi-language.yml
generated
vendored
9
.github/workflows/__rubocop-multi-language.yml
generated
vendored
@@ -36,14 +36,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
9
.github/workflows/__ruby.yml
generated
vendored
9
.github/workflows/__ruby.yml
generated
vendored
@@ -46,14 +46,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
9
.github/workflows/__split-workflow.yml
generated
vendored
9
.github/workflows/__split-workflow.yml
generated
vendored
@@ -46,14 +46,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
9
.github/workflows/__submit-sarif-failure.yml
generated
vendored
9
.github/workflows/__submit-sarif-failure.yml
generated
vendored
@@ -40,14 +40,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
9
.github/workflows/__swift-autobuild.yml
generated
vendored
9
.github/workflows/__swift-autobuild.yml
generated
vendored
@@ -36,14 +36,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
9
.github/workflows/__swift-custom-build.yml
generated
vendored
9
.github/workflows/__swift-custom-build.yml
generated
vendored
@@ -40,14 +40,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
9
.github/workflows/__test-autobuild-working-dir.yml
generated
vendored
9
.github/workflows/__test-autobuild-working-dir.yml
generated
vendored
@@ -36,14 +36,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
9
.github/workflows/__test-local-codeql.yml
generated
vendored
9
.github/workflows/__test-local-codeql.yml
generated
vendored
@@ -36,14 +36,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
24
.github/workflows/__test-proxy.yml
generated
vendored
24
.github/workflows/__test-proxy.yml
generated
vendored
@@ -29,6 +29,8 @@ jobs:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
version: linked
|
||||
- os: ubuntu-latest
|
||||
version: nightly-latest
|
||||
name: Proxy test
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -36,14 +38,21 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
# These steps are required to initialise the `gh` cli in a container that doesn't
|
||||
# come pre-installed with it. The reason for that is that this is later
|
||||
# needed by the `prepare-test` workflow to find the latest release of CodeQL.
|
||||
- name: Set up GitHub CLI
|
||||
run: |
|
||||
apt update
|
||||
apt install -y curl libreadline8 gnupg2 software-properties-common zstd
|
||||
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
|
||||
apt-key add /usr/share/keyrings/githubcli-archive-keyring.gpg
|
||||
apt-add-repository https://cli.github.com/packages
|
||||
apt install -y gh
|
||||
env: {}
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
@@ -65,7 +74,6 @@ jobs:
|
||||
CODEQL_ACTION_TEST_MODE: true
|
||||
container:
|
||||
image: ubuntu:22.04
|
||||
options: --dns 127.0.0.1
|
||||
services:
|
||||
squid-proxy:
|
||||
image: ubuntu/squid:latest
|
||||
|
||||
21
.github/workflows/__unset-environment.yml
generated
vendored
21
.github/workflows/__unset-environment.yml
generated
vendored
@@ -27,18 +27,6 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
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
|
||||
version: default
|
||||
- os: ubuntu-latest
|
||||
version: linked
|
||||
- os: ubuntu-latest
|
||||
@@ -50,14 +38,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
9
.github/workflows/__upload-ref-sha-input.yml
generated
vendored
9
.github/workflows/__upload-ref-sha-input.yml
generated
vendored
@@ -40,14 +40,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
9
.github/workflows/__with-checkout-path.yml
generated
vendored
9
.github/workflows/__with-checkout-path.yml
generated
vendored
@@ -40,14 +40,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Python on MacOS
|
||||
- name: Setup Python on macOS
|
||||
uses: actions/setup-python@v5
|
||||
if: >-
|
||||
runner.os == 'macOS' && (
|
||||
|
||||
matrix.version == 'stable-v2.13.5' ||
|
||||
|
||||
matrix.version == 'stable-v2.14.6')
|
||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out repository
|
||||
|
||||
115
.github/workflows/__zstd-bundle-streaming.yml
generated
vendored
Normal file
115
.github/workflows/__zstd-bundle-streaming.yml
generated
vendored
Normal file
@@ -0,0 +1,115 @@
|
||||
# Warning: This file is generated automatically, and should not be modified.
|
||||
# Instead, please modify the template in the pr-checks directory and run:
|
||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||
# to regenerate this file.
|
||||
|
||||
name: PR Check - Zstandard bundle (streaming)
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GO111MODULE: auto
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- releases/v*
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
schedule:
|
||||
- cron: '0 5 * * *'
|
||||
workflow_dispatch: {}
|
||||
jobs:
|
||||
zstd-bundle-streaming:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: macos-latest
|
||||
version: linked
|
||||
- os: ubuntu-latest
|
||||
version: linked
|
||||
name: Zstandard bundle (streaming)
|
||||
permissions:
|
||||
contents: read
|
||||
security-events: 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-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'
|
||||
- name: Remove CodeQL from toolcache
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const codeqlPath = path.join(process.env['RUNNER_TOOL_CACHE'], 'CodeQL');
|
||||
if (codeqlPath !== undefined) {
|
||||
fs.rmdirSync(codeqlPath, { recursive: true });
|
||||
}
|
||||
- id: init
|
||||
uses: ./../action/init
|
||||
with:
|
||||
languages: javascript
|
||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||
- uses: ./../action/analyze
|
||||
with:
|
||||
output: ${{ runner.temp }}/results
|
||||
upload-database: false
|
||||
- name: Upload SARIF
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.os }}-zstd-bundle.sarif
|
||||
path: ${{ runner.temp }}/results/javascript.sarif
|
||||
retention-days: 7
|
||||
- name: Check diagnostic with expected tools URL appears in SARIF
|
||||
uses: actions/github-script@v7
|
||||
env:
|
||||
SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
|
||||
with:
|
||||
script: |
|
||||
const fs = require('fs');
|
||||
|
||||
const sarif = JSON.parse(fs.readFileSync(process.env['SARIF_PATH'], 'utf8'));
|
||||
const run = sarif.runs[0];
|
||||
|
||||
const toolExecutionNotifications = run.invocations[0].toolExecutionNotifications;
|
||||
const downloadTelemetryNotifications = toolExecutionNotifications.filter(n =>
|
||||
n.descriptor.id === 'codeql-action/bundle-download-telemetry'
|
||||
);
|
||||
if (downloadTelemetryNotifications.length !== 1) {
|
||||
core.setFailed(
|
||||
'Expected exactly one reporting descriptor in the ' +
|
||||
`'runs[].invocations[].toolExecutionNotifications[]' SARIF property, but found ` +
|
||||
`${downloadTelemetryNotifications.length}. All notification reporting descriptors: ` +
|
||||
`${JSON.stringify(toolExecutionNotifications)}.`
|
||||
);
|
||||
}
|
||||
|
||||
const toolsUrl = downloadTelemetryNotifications[0].properties.attributes.toolsUrl;
|
||||
console.log(`Found tools URL: ${toolsUrl}`);
|
||||
|
||||
if (!toolsUrl.endsWith('.tar.zst')) {
|
||||
core.setFailed(
|
||||
`Expected the tools URL to be a .tar.zst file, but found ${toolsUrl}.`
|
||||
);
|
||||
}
|
||||
env:
|
||||
CODEQL_ACTION_ZSTD_BUNDLE: true
|
||||
CODEQL_ACTION_ZSTD_BUNDLE_STREAMING_EXTRACTION: true
|
||||
CODEQL_ACTION_TEST_MODE: true
|
||||
118
.github/workflows/__zstd-bundle.yml
generated
vendored
Normal file
118
.github/workflows/__zstd-bundle.yml
generated
vendored
Normal file
@@ -0,0 +1,118 @@
|
||||
# Warning: This file is generated automatically, and should not be modified.
|
||||
# Instead, please modify the template in the pr-checks directory and run:
|
||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||
# to regenerate this file.
|
||||
|
||||
name: PR Check - Zstandard bundle
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GO111MODULE: auto
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- releases/v*
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
schedule:
|
||||
- cron: '0 5 * * *'
|
||||
workflow_dispatch: {}
|
||||
jobs:
|
||||
zstd-bundle:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: macos-latest
|
||||
version: linked
|
||||
- os: ubuntu-latest
|
||||
version: linked
|
||||
- os: windows-latest
|
||||
version: linked
|
||||
name: Zstandard bundle
|
||||
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-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'
|
||||
- name: Remove CodeQL from toolcache
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const codeqlPath = path.join(process.env['RUNNER_TOOL_CACHE'], 'CodeQL');
|
||||
if (codeqlPath !== undefined) {
|
||||
fs.rmdirSync(codeqlPath, { recursive: true });
|
||||
}
|
||||
- id: init
|
||||
uses: ./../action/init
|
||||
with:
|
||||
languages: javascript
|
||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||
- uses: ./../action/analyze
|
||||
with:
|
||||
output: ${{ runner.temp }}/results
|
||||
upload-database: false
|
||||
- name: Upload SARIF
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.os }}-zstd-bundle.sarif
|
||||
path: ${{ runner.temp }}/results/javascript.sarif
|
||||
retention-days: 7
|
||||
- name: Check diagnostic with expected tools URL appears in SARIF
|
||||
uses: actions/github-script@v7
|
||||
env:
|
||||
SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
|
||||
with:
|
||||
script: |
|
||||
const fs = require('fs');
|
||||
|
||||
const sarif = JSON.parse(fs.readFileSync(process.env['SARIF_PATH'], 'utf8'));
|
||||
const run = sarif.runs[0];
|
||||
|
||||
const toolExecutionNotifications = run.invocations[0].toolExecutionNotifications;
|
||||
const downloadTelemetryNotifications = toolExecutionNotifications.filter(n =>
|
||||
n.descriptor.id === 'codeql-action/bundle-download-telemetry'
|
||||
);
|
||||
if (downloadTelemetryNotifications.length !== 1) {
|
||||
core.setFailed(
|
||||
'Expected exactly one reporting descriptor in the ' +
|
||||
`'runs[].invocations[].toolExecutionNotifications[]' SARIF property, but found ` +
|
||||
`${downloadTelemetryNotifications.length}. All notification reporting descriptors: ` +
|
||||
`${JSON.stringify(toolExecutionNotifications)}.`
|
||||
);
|
||||
}
|
||||
|
||||
const toolsUrl = downloadTelemetryNotifications[0].properties.attributes.toolsUrl;
|
||||
console.log(`Found tools URL: ${toolsUrl}`);
|
||||
|
||||
const expectedExtension = process.env['RUNNER_OS'] === 'Windows' ? '.tar.gz' : '.tar.zst';
|
||||
|
||||
if (!toolsUrl.endsWith(expectedExtension)) {
|
||||
core.setFailed(
|
||||
`Expected the tools URL to be a ${expectedExtension} file, but found ${toolsUrl}.`
|
||||
);
|
||||
}
|
||||
env:
|
||||
CODEQL_ACTION_ZSTD_BUNDLE: true
|
||||
CODEQL_ACTION_TEST_MODE: true
|
||||
2
.github/workflows/codeql.yml
vendored
2
.github/workflows/codeql.yml
vendored
@@ -75,7 +75,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-20.04,ubuntu-22.04,windows-2019,windows-2022,macos-12,macos-13,macos-14]
|
||||
os: [ubuntu-20.04,ubuntu-22.04,windows-2019,windows-2022,macos-13,macos-14]
|
||||
tools: ${{ fromJson(needs.check-codeql-versions.outputs.versions) }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ jobs:
|
||||
run: ./build.sh
|
||||
- uses: ./../action/analyze
|
||||
id: analysis
|
||||
env:
|
||||
env:
|
||||
# Forces a failure in this step.
|
||||
CODEQL_ACTION_EXTRA_OPTIONS: '{ "database": { "finalize": ["--invalid-option"] } }'
|
||||
with:
|
||||
@@ -61,7 +61,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download all artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
- name: Check expected artifacts exist
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
8
.github/workflows/debug-artifacts.yml
vendored
8
.github/workflows/debug-artifacts.yml
vendored
@@ -22,11 +22,11 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version:
|
||||
- stable-v2.13.5
|
||||
- stable-v2.14.6
|
||||
- stable-v2.15.5
|
||||
- stable-v2.16.6
|
||||
- stable-v2.17.6
|
||||
- stable-v2.18.4
|
||||
- default
|
||||
- linked
|
||||
- nightly-latest
|
||||
@@ -54,7 +54,7 @@ jobs:
|
||||
debug-artifact-name: my-debug-artifacts
|
||||
debug-database-name: my-db
|
||||
# We manually exclude Swift from the languages list here, as it is not supported on Ubuntu
|
||||
languages: cpp,csharp,go,java,javascript,python,ruby
|
||||
languages: cpp,csharp,go,java,javascript,python,ruby
|
||||
- name: Build code
|
||||
shell: bash
|
||||
run: ./build.sh
|
||||
@@ -67,11 +67,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download all artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
- name: Check expected artifacts exist
|
||||
shell: bash
|
||||
run: |
|
||||
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"
|
||||
VERSIONS="stable-v2.14.6 stable-v2.15.5 stable-v2.16.6 stable-v2.17.6 stable-v2.18.4 default linked nightly-latest"
|
||||
LANGUAGES="cpp csharp go java javascript python"
|
||||
for version in $VERSIONS; do
|
||||
pushd "./my-debug-artifacts-${version//./}"
|
||||
|
||||
3
.github/workflows/expected-queries-runs.yml
vendored
3
.github/workflows/expected-queries-runs.yml
vendored
@@ -22,6 +22,9 @@ jobs:
|
||||
CODEQL_ACTION_TEST_MODE: true
|
||||
timeout-minutes: 45
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
security-events: write
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
32
.github/workflows/post-release-mergeback.yml
vendored
32
.github/workflows/post-release-mergeback.yml
vendored
@@ -21,6 +21,7 @@ on:
|
||||
jobs:
|
||||
merge-back:
|
||||
runs-on: ubuntu-latest
|
||||
environment: Automation
|
||||
if: github.repository == 'github/codeql-action'
|
||||
env:
|
||||
BASE_BRANCH: "${{ github.event.inputs.baseBranch || 'main' }}"
|
||||
@@ -108,6 +109,17 @@ jobs:
|
||||
# - `--force` since we're overwriting the `vN` tag
|
||||
git push origin --atomic --force refs/tags/"${VERSION}" refs/tags/"${major_version_tag}"
|
||||
|
||||
- name: Prepare partial Changelog
|
||||
env:
|
||||
PARTIAL_CHANGELOG: "${{ runner.temp }}/partial_changelog.md"
|
||||
VERSION: "${{ steps.getVersion.outputs.version }}"
|
||||
run: |
|
||||
python .github/workflows/script/prepare_changelog.py CHANGELOG.md "$VERSION" > $PARTIAL_CHANGELOG
|
||||
|
||||
echo "::group::Partial CHANGELOG"
|
||||
cat $PARTIAL_CHANGELOG
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Create mergeback branch
|
||||
if: ${{ steps.check.outputs.exists != 'true' && endsWith(github.ref_name, steps.getVersion.outputs.latest_release_branch) }}
|
||||
env:
|
||||
@@ -150,3 +162,23 @@ jobs:
|
||||
--body "${pr_body}" \
|
||||
--assignee "${GITHUB_ACTOR}" \
|
||||
--draft
|
||||
|
||||
- name: Generate token
|
||||
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69
|
||||
id: app-token
|
||||
with:
|
||||
app-id: ${{ vars.AUTOMATION_APP_ID }}
|
||||
private-key: ${{ secrets.AUTOMATION_PRIVATE_KEY }}
|
||||
|
||||
- name: Create the GitHub release
|
||||
env:
|
||||
PARTIAL_CHANGELOG: "${{ runner.temp }}/partial_changelog.md"
|
||||
VERSION: "${{ steps.getVersion.outputs.version }}"
|
||||
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
run: |
|
||||
# Do not mark this release as latest. The most recent CLI release must be marked as latest.
|
||||
gh release create \
|
||||
"$VERSION" \
|
||||
--latest=false \
|
||||
--title "$VERSION" \
|
||||
--notes-file "$PARTIAL_CHANGELOG"
|
||||
|
||||
5
.github/workflows/pr-checks.yml
vendored
5
.github/workflows/pr-checks.yml
vendored
@@ -13,6 +13,9 @@ jobs:
|
||||
name: Check JS
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 45
|
||||
permissions:
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -30,7 +33,7 @@ jobs:
|
||||
- name: Upload sarif
|
||||
uses: github/codeql-action/upload-sarif@v3
|
||||
# Only upload SARIF for the latest version of Node.js
|
||||
if: "always() && matrix.node-types-version == 'current'"
|
||||
if: "!cancelled() && matrix.node-types-version == 'current' && !startsWith(github.head_ref, 'dependabot/')"
|
||||
with:
|
||||
sarif_file: eslint.sarif
|
||||
category: eslint
|
||||
|
||||
35
.github/workflows/publish-immutable-action.yml
vendored
Normal file
35
.github/workflows/publish-immutable-action.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
name: 'Publish Immutable Action Version'
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Check release name
|
||||
id: check
|
||||
env:
|
||||
RELEASE_NAME: ${{ github.event.release.name }}
|
||||
run: |
|
||||
echo "Release name: ${{ github.event.release.name }}"
|
||||
if [[ $RELEASE_NAME == v* ]]; then
|
||||
echo "This is a CodeQL Action release. Create an Immutable Action"
|
||||
echo "is-action-release=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "This is a CodeQL Bundle release. Do not create an Immutable Action"
|
||||
echo "is-action-release=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
- name: Checking out
|
||||
if: steps.check.outputs.is-action-release == 'true'
|
||||
uses: actions/checkout@v4
|
||||
- name: Publish
|
||||
if: steps.check.outputs.is-action-release == 'true'
|
||||
id: publish
|
||||
uses: actions/publish-immutable-action@v0.0.4
|
||||
3
.github/workflows/rebuild.yml
vendored
3
.github/workflows/rebuild.yml
vendored
@@ -69,7 +69,8 @@ jobs:
|
||||
if [ ! -z "$(git status --porcelain)" ]; then
|
||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git commit -am "Rebuild"
|
||||
git add --all
|
||||
git commit -m "Rebuild"
|
||||
git push origin "HEAD:$BRANCH"
|
||||
echo "Pushed a commit to rebuild the Action." \
|
||||
"Please mark the PR as ready for review to trigger PR checks." |
|
||||
|
||||
2
.github/workflows/script/check-js.sh
vendored
2
.github/workflows/script/check-js.sh
vendored
@@ -7,7 +7,7 @@ if [ ! -z "$(git status --porcelain)" ]; then
|
||||
>&2 echo "Failed: Repo should be clean before testing!"
|
||||
exit 1
|
||||
fi
|
||||
# Wipe the lib directory incase there are extra unnecessary files in there
|
||||
# Wipe the lib directory in case there are extra unnecessary files in there
|
||||
rm -rf lib
|
||||
# Generate the JavaScript files
|
||||
npm run-script build
|
||||
|
||||
37
.github/workflows/script/prepare_changelog.py
vendored
Normal file
37
.github/workflows/script/prepare_changelog.py
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
EMPTY_CHANGELOG = 'No changes.\n\n'
|
||||
|
||||
# Prepare the changelog for the new release
|
||||
# This function will extract the part of the changelog that
|
||||
# we want to include in the new release.
|
||||
def extract_changelog_snippet(changelog_file, version_tag):
|
||||
output = ''
|
||||
if (not os.path.exists(changelog_file)):
|
||||
output = EMPTY_CHANGELOG
|
||||
|
||||
else:
|
||||
with open('CHANGELOG.md', 'r') as f:
|
||||
lines = f.readlines()
|
||||
|
||||
# Include everything up to, but excluding the second heading
|
||||
found_first_section = False
|
||||
for i, line in enumerate(lines):
|
||||
if line.startswith('## '):
|
||||
if found_first_section:
|
||||
break
|
||||
found_first_section = True
|
||||
output += line
|
||||
|
||||
output += f"See the full [CHANGELOG.md](https://github.com/github/codeql-action/blob/{version_tag}/CHANGELOG.md) for more information."
|
||||
|
||||
return output
|
||||
|
||||
|
||||
if len(sys.argv) < 3:
|
||||
raise Exception('Expecting argument: changelog_file version_tag')
|
||||
changelog_file = sys.argv[1]
|
||||
version_tag = sys.argv[2]
|
||||
|
||||
print(extract_changelog_snippet(changelog_file, version_tag))
|
||||
@@ -27,8 +27,8 @@ fi
|
||||
|
||||
echo "Getting checks for $GITHUB_SHA"
|
||||
|
||||
# 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.[] | 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')"
|
||||
# Ignore any checks with "https://", CodeQL, LGTM, Update, and ESLint checks.
|
||||
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("ESLint") or contains("update") or contains("test-setup-python-scripts") | not)] | unique | sort')"
|
||||
|
||||
echo "$CHECKS" | jq
|
||||
|
||||
|
||||
4
.github/workflows/update-release-branch.yml
vendored
4
.github/workflows/update-release-branch.yml
vendored
@@ -116,7 +116,7 @@ jobs:
|
||||
TARGET_BRANCH: ${{ matrix.target_branch }}
|
||||
steps:
|
||||
- name: Generate token
|
||||
uses: actions/create-github-app-token@31c86eb3b33c9b601a1f60f98dcbfd1d70f379b4
|
||||
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69
|
||||
id: app-token
|
||||
with:
|
||||
app-id: ${{ vars.AUTOMATION_APP_ID }}
|
||||
@@ -134,7 +134,7 @@ jobs:
|
||||
echo SOURCE_BRANCH=${SOURCE_BRANCH}
|
||||
echo TARGET_BRANCH=${TARGET_BRANCH}
|
||||
python .github/update-release-branch.py \
|
||||
--github-token ${GITHUB_TOKEN} \
|
||||
--github-token ${{ secrets.GITHUB_TOKEN }} \
|
||||
--repository-nwo ${{ github.repository }} \
|
||||
--source-branch ${SOURCE_BRANCH} \
|
||||
--target-branch ${TARGET_BRANCH} \
|
||||
|
||||
@@ -54,7 +54,8 @@ jobs:
|
||||
git push origin update-supported-enterprise-server-versions
|
||||
|
||||
body="This PR updates the list of supported GitHub Enterprise Server versions, either because a new "
|
||||
body+="version is about to be feature frozen, or because an old release has been deprecated.\n\n"
|
||||
body+="version is about to be feature frozen, or because an old release has been deprecated."
|
||||
body+=$'\n\n'
|
||||
body+="If an old release has been deprecated, please follow the instructions in CONTRIBUTING.md to "
|
||||
body+="deprecate the corresponding version of CodeQL."
|
||||
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -7,3 +7,5 @@ node_modules/.cache/
|
||||
.DS_Store
|
||||
# eslint sarif report
|
||||
eslint.sarif
|
||||
# for local incremental compilation
|
||||
tsconfig.tsbuildinfo
|
||||
81
CHANGELOG.md
81
CHANGELOG.md
@@ -4,10 +4,83 @@ 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.
|
||||
|
||||
## [UNRELEASED]
|
||||
## 3.27.9 - 12 Dec 2024
|
||||
|
||||
No user facing changes.
|
||||
|
||||
## 3.27.8 - 12 Dec 2024
|
||||
|
||||
- Fixed an issue where streaming the download and extraction of the CodeQL bundle did not respect proxy settings. [#2624](https://github.com/github/codeql-action/pull/2624)
|
||||
|
||||
## 3.27.7 - 10 Dec 2024
|
||||
|
||||
- We are rolling out a change in December 2024 that will extract the CodeQL bundle directly to the toolcache to improve performance. [#2631](https://github.com/github/codeql-action/pull/2631)
|
||||
- Update default CodeQL bundle version to 2.20.0. [#2636](https://github.com/github/codeql-action/pull/2636)
|
||||
|
||||
## 3.27.6 - 03 Dec 2024
|
||||
|
||||
- Update default CodeQL bundle version to 2.19.4. [#2626](https://github.com/github/codeql-action/pull/2626)
|
||||
|
||||
## 3.27.5 - 19 Nov 2024
|
||||
|
||||
No user facing changes.
|
||||
|
||||
## 3.27.4 - 14 Nov 2024
|
||||
|
||||
No user facing changes.
|
||||
|
||||
## 3.27.3 - 12 Nov 2024
|
||||
|
||||
No user facing changes.
|
||||
|
||||
## 3.27.2 - 12 Nov 2024
|
||||
|
||||
- Fixed an issue where setting up the CodeQL tools would sometimes fail with the message "Invalid value 'undefined' for header 'authorization'". [#2590](https://github.com/github/codeql-action/pull/2590)
|
||||
|
||||
## 3.27.1 - 08 Nov 2024
|
||||
|
||||
- The CodeQL Action now downloads bundles compressed using Zstandard on GitHub Enterprise Server when using Linux or macOS runners. This speeds up the installation of the CodeQL tools. This feature is already available to GitHub.com users. [#2573](https://github.com/github/codeql-action/pull/2573)
|
||||
- Update default CodeQL bundle version to 2.19.3. [#2576](https://github.com/github/codeql-action/pull/2576)
|
||||
|
||||
## 3.27.0 - 22 Oct 2024
|
||||
|
||||
- Bump the minimum CodeQL bundle version to 2.14.6. [#2549](https://github.com/github/codeql-action/pull/2549)
|
||||
- Fix an issue where the `upload-sarif` Action would fail with "upload-sarif post-action step failed: Input required and not supplied: token" when called in a composite Action that had a different set of inputs to the ones expected by the `upload-sarif` Action. [#2557](https://github.com/github/codeql-action/pull/2557)
|
||||
- Update default CodeQL bundle version to 2.19.2. [#2552](https://github.com/github/codeql-action/pull/2552)
|
||||
|
||||
## 3.26.13 - 14 Oct 2024
|
||||
|
||||
No user facing changes.
|
||||
|
||||
## 3.26.12 - 07 Oct 2024
|
||||
|
||||
- _Upcoming breaking change_: Add a deprecation warning for customers using CodeQL version 2.14.5 and earlier. These versions of CodeQL were discontinued on 24 September 2024 alongside GitHub Enterprise Server 3.10, and will be unsupported by CodeQL Action versions 3.27.0 and later and versions 2.27.0 and later. [#2520](https://github.com/github/codeql-action/pull/2520)
|
||||
|
||||
- If you are using one of these versions, please update to CodeQL CLI version 2.14.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.13.5 and 2.14.5, you can replace `github/codeql-action/*@v3` by `github/codeql-action/*@v3.26.11` and `github/codeql-action/*@v2` by `github/codeql-action/*@v2.26.11` in your code scanning workflow to ensure you continue using this version of the CodeQL Action.
|
||||
|
||||
## 3.26.11 - 03 Oct 2024
|
||||
|
||||
- _Upcoming breaking change_: Add support for using `actions/download-artifact@v4` to programmatically consume CodeQL Action debug artifacts.
|
||||
|
||||
Starting November 30, 2024, GitHub.com customers will [no longer be able to use `actions/download-artifact@v3`](https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/). Therefore, to avoid breakage, customers who programmatically download the CodeQL Action debug artifacts should set the `CODEQL_ACTION_ARTIFACT_V4_UPGRADE` environment variable to `true` and bump `actions/download-artifact@v3` to `actions/download-artifact@v4` in their workflows. The CodeQL Action will enable this behavior by default in early November and workflows that have not yet bumped to `actions/download-artifact@v3` to `actions/download-artifact@v4` will begin failing then.
|
||||
|
||||
This change is currently unavailable for GitHub Enterprise Server customers, as `actions/upload-artifact@v4` and `actions/download-artifact@v4` are not yet compatible with GHES.
|
||||
- Update default CodeQL bundle version to 2.19.1. [#2519](https://github.com/github/codeql-action/pull/2519)
|
||||
|
||||
## 3.26.10 - 30 Sep 2024
|
||||
|
||||
- We are rolling out a feature in September/October 2024 that sets up CodeQL using a bundle compressed with [Zstandard](http://facebook.github.io/zstd/). Our aim is to improve the performance of setting up CodeQL. [#2502](https://github.com/github/codeql-action/pull/2502)
|
||||
|
||||
## 3.26.9 - 24 Sep 2024
|
||||
|
||||
No user facing changes.
|
||||
|
||||
## 3.26.8 - 19 Sep 2024
|
||||
|
||||
- Update default CodeQL bundle version to 2.19.0. [#2483](https://github.com/github/codeql-action/pull/2483)
|
||||
|
||||
## 3.26.7 - 13 Sep 2024
|
||||
|
||||
- Update default CodeQL bundle version to 2.18.4. [#2471](https://github.com/github/codeql-action/pull/2471)
|
||||
@@ -18,12 +91,12 @@ No user facing changes.
|
||||
|
||||
## 3.26.5 - 23 Aug 2024
|
||||
|
||||
- Fix an issue where the `csrutil` system call used for telemetry would fail on MacOS ARM machines with System Integrity Protection disabled. [#2441](https://github.com/github/codeql-action/pull/2441)
|
||||
- Fix an issue where the `csrutil` system call used for telemetry would fail on macOS ARM machines with System Integrity Protection disabled. [#2441](https://github.com/github/codeql-action/pull/2441)
|
||||
|
||||
## 3.26.4 - 21 Aug 2024
|
||||
|
||||
- _Deprecation:_ The `add-snippets` input on the `analyze` Action is deprecated and will be removed in the first release in August 2025. [#2436](https://github.com/github/codeql-action/pull/2436)
|
||||
- Fix an issue where the disk usage system call used for telemetry would fail on MacOS ARM machines with System Integrity Protection disabled, and then surface a warning. The system call is now disabled for these machines. [#2434](https://github.com/github/codeql-action/pull/2434)
|
||||
- Fix an issue where the disk usage system call used for telemetry would fail on macOS ARM machines with System Integrity Protection disabled, and then surface a warning. The system call is now disabled for these machines. [#2434](https://github.com/github/codeql-action/pull/2434)
|
||||
|
||||
## 3.26.3 - 19 Aug 2024
|
||||
|
||||
@@ -101,7 +174,7 @@ No user facing changes.
|
||||
## 3.25.3 - 25 Apr 2024
|
||||
|
||||
- Update default CodeQL bundle version to 2.17.1. [#2247](https://github.com/github/codeql-action/pull/2247)
|
||||
- Workflows running on `macos-latest` using CodeQL CLI versions before v2.15.1 will need to either upgrade their CLI version to v2.15.1 or newer, or change the platform to an Intel MacOS runner, such as `macos-12`. ARM machines with SIP disabled, including the newest `macos-latest` image, are unsupported for CLI versions before 2.15.1. [#2261](https://github.com/github/codeql-action/pull/2261)
|
||||
- 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
|
||||
|
||||
|
||||
44
README.md
44
README.md
@@ -16,10 +16,48 @@ We recommend using default setup to configure CodeQL analysis for your repositor
|
||||
|
||||
You can also configure advanced setup for a repository to find security vulnerabilities in your code using a highly customizable code scanning configuration. For more information, see "[Configuring advanced setup for code scanning](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/configuring-advanced-setup-for-code-scanning)" and "[Customizing your advanced setup for code scanning](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning)."
|
||||
|
||||
### Permissions
|
||||
### Actions
|
||||
|
||||
This repository contains several actions that enable you to analyze code in your repository using CodeQL and upload the analysis to GitHub Code Scanning. Actions in this repository also allow you to upload to GitHub analyses generated by any SARIF-producing SAST tool.
|
||||
|
||||
Actions for CodeQL analyses:
|
||||
|
||||
- `init`: Sets up CodeQL for analysis. For information about input parameters, see the [init action definition](https://github.com/github/codeql-action/blob/main/init/action.yml).
|
||||
- `analyze`: Finalizes the CodeQL database, runs the analysis, and uploads the results to Code Scanning. For information about input parameters, see the [analyze action definition](https://github.com/github/codeql-action/blob/main/analyze/action.yml).
|
||||
|
||||
Actions for uploading analyses generated by third-party tools:
|
||||
|
||||
- `upload-sarif`: Uploads a SARIF file to Code Scanning. If you are using the `analyze` action, there is no reason to use this action as well. For information about input parameters, see the [upload-sarif action definition](https://github.com/github/codeql-action/blob/main/upload-sarif/action.yml).
|
||||
|
||||
Actions with special purposes and unlikely to be used directly:
|
||||
|
||||
- `autobuild`: Attempts to automatically build the code. Only used for analyzing languages that require a build. Use the `build-mode: autobuild` input in the `init` action instead. For information about input parameters, see the [autobuild action definition](https://github.com/github/codeql-action/blob/main/autobuild/action.yml).
|
||||
- `resolve-environment`: [Experimental] Attempts to infer a build environment suitable for automatic builds. For information about input parameters, see the [resolve-environment action definition](https://github.com/github/codeql-action/blob/main/resolve-environment/action.yml).
|
||||
- `start-proxy`: [Experimental] Start the HTTP proxy server. Internal use only and will change without notice. For information about input parameters, see the [start-proxy action definition](https://github.com/github/codeql-action/blob/main/start-proxy/action.yml).
|
||||
|
||||
### Workflow Permissions
|
||||
|
||||
All advanced setup code scanning workflows must have the `security-events: write` permission. Workflows in private repositories must additionally have the `contents: read` permission. For more information, see "[Assigning permissions to jobs](https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs)."
|
||||
|
||||
### Build Modes
|
||||
|
||||
The CodeQL Action supports different build modes for analyzing the source code. The available build modes are:
|
||||
|
||||
- `none`: The database will be created without building the source code. Available for all interpreted languages and some compiled languages.
|
||||
- `autobuild`: The database will be created by attempting to automatically build the source code. Available for all compiled languages.
|
||||
- `manual`: The database will be created by building the source code using a manually specified build command. To use this build mode, specify manual build steps in your workflow between the `init` and `analyze` steps. Available for all compiled languages.
|
||||
|
||||
#### Which build mode should I use?
|
||||
|
||||
Interpreted languages must use `none` for the build mode.
|
||||
|
||||
For compiled languages:
|
||||
|
||||
- `manual` build mode will typically produce the most precise results, but it is more difficult to set up and will cause the analysis to take slightly more time to run.
|
||||
- `autobuild` build mode is simpler to set up, but will only work for projects with generic build steps that can be guessed by the heuristics of the autobuild scripts. If `autobuild` fails, then you must switch to `manual` or `none`. If `autobuild` succeeds, then the results and run time will be the same as `manual` mode.
|
||||
- `none` build mode is also simpler to set up and is slightly faster to run, but there is a possibility that some alerts will be missed. This may happen if your repository does any code generation during compilation or if there are any dependencies downloaded from registries that the workflow does not have access to. `none` is not yet supported by C/C++, Swift, Go, or Kotlin.
|
||||
|
||||
|
||||
## Supported versions of the CodeQL Action
|
||||
|
||||
The following versions of the CodeQL Action are currently supported:
|
||||
@@ -39,13 +77,13 @@ We typically release new minor versions of the CodeQL Action and Bundle when a n
|
||||
|
||||
| Minimum CodeQL Action | Minimum CodeQL Bundle Version | GitHub Environment | Notes |
|
||||
|-----------------------|-------------------------------|--------------------|-------|
|
||||
| `v3.26.6` | `2.18.4` | Enterprise Server 3.15 | |
|
||||
| `v3.25.11` | `2.17.6` | Enterprise Server 3.14 | |
|
||||
| `v3.24.11` | `2.16.6` | Enterprise Server 3.13 | |
|
||||
| `v3.22.12` | `2.15.5` | Enterprise Server 3.12 | |
|
||||
| `v2.22.1` | `2.14.6` | Enterprise Server 3.11 | Supports CodeQL Action v3, but did not ship with CodeQL Action v3. 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/#users-of-github-enterprise-server-311)." |
|
||||
| `v2.20.3` | `2.13.5` | Enterprise Server 3.10 | Does not support CodeQL Action v3. |
|
||||
|
||||
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.
|
||||
|
||||
See the full list of GHES release and deprecation dates at [GitHub Enterprise Server releases](https://docs.github.com/en/enterprise-server/admin/all-releases#releases-of-github-enterprise-server).
|
||||
|
||||
|
||||
11
action.yml
Normal file
11
action.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
name: 'CodeQL: Stub'
|
||||
description: "Stub: Don't use this action directly. Read [the documentation](https://docs.github.com/en/code-security/code-scanning/introduction-to-code-scanning/about-code-scanning-with-codeql) instead."
|
||||
author: 'GitHub'
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: 'Stub'
|
||||
run: |
|
||||
echo 'This is a stub. Read [the documentation](https://docs.github.com/en/code-security/code-scanning/introduction-to-code-scanning/about-code-scanning-with-codeql) instead.'
|
||||
exit 1
|
||||
shell: bash
|
||||
44
actions-extractor/codeql-extractor.yml
Normal file
44
actions-extractor/codeql-extractor.yml
Normal file
@@ -0,0 +1,44 @@
|
||||
name: "actions"
|
||||
aliases: []
|
||||
display_name: "GitHub Actions"
|
||||
version: 0.0.1
|
||||
column_kind: "utf16"
|
||||
unicode_newlines: true
|
||||
build_modes:
|
||||
- none
|
||||
file_coverage_languages: []
|
||||
github_api_languages: []
|
||||
scc_languages: []
|
||||
file_types:
|
||||
- name: workflow
|
||||
display_name: GitHub Actions workflow files
|
||||
extensions:
|
||||
- .yml
|
||||
- .yaml
|
||||
forwarded_extractor_name: javascript
|
||||
options:
|
||||
trap:
|
||||
title: TRAP options
|
||||
description: Options about how the extractor handles TRAP files
|
||||
type: object
|
||||
visibility: 3
|
||||
properties:
|
||||
cache:
|
||||
title: TRAP cache options
|
||||
description: Options about how the extractor handles its TRAP cache
|
||||
type: object
|
||||
properties:
|
||||
dir:
|
||||
title: TRAP cache directory
|
||||
description: The directory of the TRAP cache to use
|
||||
type: string
|
||||
bound:
|
||||
title: TRAP cache bound
|
||||
description: A soft limit (in MB) on the size of the TRAP cache
|
||||
type: string
|
||||
pattern: "[0-9]+"
|
||||
write:
|
||||
title: TRAP cache writeable
|
||||
description: Whether to write to the TRAP cache as well as reading it
|
||||
type: string
|
||||
pattern: "(true|TRUE|false|FALSE)"
|
||||
40
actions-extractor/tools/autobuild-impl.ps1
Normal file
40
actions-extractor/tools/autobuild-impl.ps1
Normal file
@@ -0,0 +1,40 @@
|
||||
if (($null -ne $env:LGTM_INDEX_INCLUDE) -or ($null -ne $env:LGTM_INDEX_EXCLUDE) -or ($null -ne $env:LGTM_INDEX_FILTERS)) {
|
||||
Write-Output 'Path filters set. Passing them through to the JavaScript extractor.'
|
||||
} else {
|
||||
Write-Output 'No path filters set. Using the default filters.'
|
||||
$DefaultPathFilters = @(
|
||||
'exclude:**/*',
|
||||
'include:.github/workflows/**/*.yml',
|
||||
'include:.github/workflows/**/*.yaml',
|
||||
'include:**/action.yml',
|
||||
'include:**/action.yaml'
|
||||
)
|
||||
|
||||
$env:LGTM_INDEX_FILTERS = $DefaultPathFilters -join "`n"
|
||||
}
|
||||
|
||||
# Find the JavaScript extractor directory via `codeql resolve extractor`.
|
||||
$CodeQL = Join-Path $env:CODEQL_DIST 'codeql.exe'
|
||||
$env:CODEQL_EXTRACTOR_JAVASCRIPT_ROOT = &$CodeQL resolve extractor --language javascript
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw 'Failed to resolve JavaScript extractor.'
|
||||
}
|
||||
|
||||
Write-Output "Found JavaScript extractor at '${env:CODEQL_EXTRACTOR_JAVASCRIPT_ROOT}'."
|
||||
|
||||
# Run the JavaScript autobuilder.
|
||||
$JavaScriptAutoBuild = Join-Path $env:CODEQL_EXTRACTOR_JAVASCRIPT_ROOT 'tools\autobuild.cmd'
|
||||
Write-Output "Running JavaScript autobuilder at '${JavaScriptAutoBuild}'."
|
||||
|
||||
# Copy the values of the Actions extractor environment variables to the JavaScript extractor environment variables.
|
||||
$env:CODEQL_EXTRACTOR_JAVASCRIPT_DIAGNOSTIC_DIR = $env:CODEQL_EXTRACTOR_ACTIONS_DIAGNOSTIC_DIR
|
||||
$env:CODEQL_EXTRACTOR_JAVASCRIPT_LOG_DIR = $env:CODEQL_EXTRACTOR_ACTIONS_LOG_DIR
|
||||
$env:CODEQL_EXTRACTOR_JAVASCRIPT_SCRATCH_DIR = $env:CODEQL_EXTRACTOR_ACTIONS_SCRATCH_DIR
|
||||
$env:CODEQL_EXTRACTOR_JAVASCRIPT_SOURCE_ARCHIVE_DIR = $env:CODEQL_EXTRACTOR_ACTIONS_SOURCE_ARCHIVE_DIR
|
||||
$env:CODEQL_EXTRACTOR_JAVASCRIPT_TRAP_DIR = $env:CODEQL_EXTRACTOR_ACTIONS_TRAP_DIR
|
||||
$env:CODEQL_EXTRACTOR_JAVASCRIPT_WIP_DATABASE = $env:CODEQL_EXTRACTOR_ACTIONS_WIP_DATABASE
|
||||
|
||||
&$JavaScriptAutoBuild
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "JavaScript autobuilder failed."
|
||||
}
|
||||
3
actions-extractor/tools/autobuild.cmd
Normal file
3
actions-extractor/tools/autobuild.cmd
Normal file
@@ -0,0 +1,3 @@
|
||||
@echo off
|
||||
rem All of the work is done in the PowerShell script
|
||||
powershell.exe %~dp0autobuild-impl.ps1
|
||||
39
actions-extractor/tools/autobuild.sh
Executable file
39
actions-extractor/tools/autobuild.sh
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
DEFAULT_PATH_FILTERS=$(cat << END
|
||||
exclude:**/*
|
||||
include:.github/workflows/**/*.yml
|
||||
include:.github/workflows/**/*.yaml
|
||||
include:**/action.yml
|
||||
include:**/action.yaml
|
||||
END
|
||||
)
|
||||
|
||||
if [ -n "${LGTM_INDEX_INCLUDE:-}" ] || [ -n "${LGTM_INDEX_EXCLUDE:-}" ] || [ -n "${LGTM_INDEX_FILTERS:-}" ] ; then
|
||||
echo "Path filters set. Passing them through to the JavaScript extractor."
|
||||
else
|
||||
echo "No path filters set. Using the default filters."
|
||||
LGTM_INDEX_FILTERS="${DEFAULT_PATH_FILTERS}"
|
||||
export LGTM_INDEX_FILTERS
|
||||
fi
|
||||
|
||||
# Find the JavaScript extractor directory via `codeql resolve extractor`.
|
||||
CODEQL_EXTRACTOR_JAVASCRIPT_ROOT="$($CODEQL_DIST/codeql resolve extractor --language javascript)"
|
||||
export CODEQL_EXTRACTOR_JAVASCRIPT_ROOT
|
||||
|
||||
echo "Found JavaScript extractor at '${CODEQL_EXTRACTOR_JAVASCRIPT_ROOT}'."
|
||||
|
||||
# Run the JavaScript autobuilder
|
||||
JAVASCRIPT_AUTO_BUILD="${CODEQL_EXTRACTOR_JAVASCRIPT_ROOT}/tools/autobuild.sh"
|
||||
echo "Running JavaScript autobuilder at '${JAVASCRIPT_AUTO_BUILD}'."
|
||||
|
||||
# Copy the values of the Actions extractor environment variables to the JavaScript extractor environment variables.
|
||||
env CODEQL_EXTRACTOR_JAVASCRIPT_DIAGNOSTIC_DIR="${CODEQL_EXTRACTOR_ACTIONS_DIAGNOSTIC_DIR}" \
|
||||
CODEQL_EXTRACTOR_JAVASCRIPT_LOG_DIR="${CODEQL_EXTRACTOR_ACTIONS_LOG_DIR}" \
|
||||
CODEQL_EXTRACTOR_JAVASCRIPT_SCRATCH_DIR="${CODEQL_EXTRACTOR_ACTIONS_SCRATCH_DIR}" \
|
||||
CODEQL_EXTRACTOR_JAVASCRIPT_SOURCE_ARCHIVE_DIR="${CODEQL_EXTRACTOR_ACTIONS_SOURCE_ARCHIVE_DIR}" \
|
||||
CODEQL_EXTRACTOR_JAVASCRIPT_TRAP_DIR="${CODEQL_EXTRACTOR_ACTIONS_TRAP_DIR}" \
|
||||
CODEQL_EXTRACTOR_JAVASCRIPT_WIP_DATABASE="${CODEQL_EXTRACTOR_ACTIONS_WIP_DATABASE}" \
|
||||
${JAVASCRIPT_AUTO_BUILD}
|
||||
@@ -1,5 +1,5 @@
|
||||
name: 'CodeQL: Autobuild'
|
||||
description: 'Attempt to automatically build code'
|
||||
description: 'Attempt to automatically build the code. Only used for analyzing languages that require a build. Use the `build-mode: autobuild` input in the `init` action instead.'
|
||||
author: 'GitHub'
|
||||
inputs:
|
||||
token:
|
||||
|
||||
@@ -136,6 +136,10 @@ inputs:
|
||||
description: >-
|
||||
Explicitly enable or disable TRAP caching rather than respecting the feature flag for it.
|
||||
required: false
|
||||
dependency-caching:
|
||||
description: >-
|
||||
Explicitly enable or disable caching of project build dependencies.
|
||||
required: false
|
||||
outputs:
|
||||
codeql-path:
|
||||
description: The path of the CodeQL binary used for analysis
|
||||
|
||||
325
lib/actions-util.js
generated
325
lib/actions-util.js
generated
@@ -15,28 +15,40 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __importStar = (this && this.__importStar) || (function () {
|
||||
var ownKeys = function(o) {
|
||||
ownKeys = Object.getOwnPropertyNames || function (o) {
|
||||
var ar = [];
|
||||
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
||||
return ar;
|
||||
};
|
||||
return ownKeys(o);
|
||||
};
|
||||
return function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getFileType = exports.FileCmdNotFoundError = exports.determineMergeBaseCommitOid = exports.getCommitOid = exports.getOptionalInput = exports.getRequiredInput = void 0;
|
||||
exports.restoreInputs = exports.persistInputs = exports.CommandInvocationError = exports.getFileType = exports.FileCmdNotFoundError = exports.getOptionalInput = exports.getRequiredInput = void 0;
|
||||
exports.getTemporaryDirectory = getTemporaryDirectory;
|
||||
exports.getRef = getRef;
|
||||
exports.getActionVersion = getActionVersion;
|
||||
exports.getWorkflowEventName = getWorkflowEventName;
|
||||
exports.isRunningLocalAction = isRunningLocalAction;
|
||||
exports.getRelativeScriptPath = getRelativeScriptPath;
|
||||
exports.getWorkflowEvent = getWorkflowEvent;
|
||||
exports.isAnalyzingDefaultBranch = isAnalyzingDefaultBranch;
|
||||
exports.printDebugLogs = printDebugLogs;
|
||||
exports.getUploadValue = getUploadValue;
|
||||
exports.getWorkflowRunID = getWorkflowRunID;
|
||||
exports.getWorkflowRunAttempt = getWorkflowRunAttempt;
|
||||
exports.isSelfHostedRunner = isSelfHostedRunner;
|
||||
exports.isDefaultSetup = isDefaultSetup;
|
||||
exports.prettyPrintInvocation = prettyPrintInvocation;
|
||||
exports.ensureEndsInPeriod = ensureEndsInPeriod;
|
||||
exports.runTool = runTool;
|
||||
const fs = __importStar(require("fs"));
|
||||
const path = __importStar(require("path"));
|
||||
const core = __importStar(require("@actions/core"));
|
||||
@@ -76,173 +88,6 @@ function getTemporaryDirectory() {
|
||||
? value
|
||||
: (0, util_1.getRequiredEnvParam)("RUNNER_TEMP");
|
||||
}
|
||||
/**
|
||||
* Gets the SHA of the commit that is currently checked out.
|
||||
*/
|
||||
const getCommitOid = async function (checkoutPath, ref = "HEAD") {
|
||||
// Try to use git to get the current commit SHA. If that fails then
|
||||
// log but otherwise silently fall back to using the SHA from the environment.
|
||||
// The only time these two values will differ is during analysis of a PR when
|
||||
// the workflow has changed the current commit to the head commit instead of
|
||||
// the merge commit, which must mean that git is available.
|
||||
// Even if this does go wrong, it's not a huge problem for the alerts to
|
||||
// reported on the merge commit.
|
||||
let stderr = "";
|
||||
try {
|
||||
let commitOid = "";
|
||||
await new toolrunner.ToolRunner(await safeWhich.safeWhich("git"), ["rev-parse", ref], {
|
||||
silent: true,
|
||||
listeners: {
|
||||
stdout: (data) => {
|
||||
commitOid += data.toString();
|
||||
},
|
||||
stderr: (data) => {
|
||||
stderr += data.toString();
|
||||
},
|
||||
},
|
||||
cwd: checkoutPath,
|
||||
}).exec();
|
||||
return commitOid.trim();
|
||||
}
|
||||
catch {
|
||||
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. " +
|
||||
"The checkout path provided to the action does not appear to be a git repository.");
|
||||
}
|
||||
else {
|
||||
core.info(`Could not determine current commit SHA using git. Continuing with data from user input or environment. ${stderr}`);
|
||||
}
|
||||
return (0, exports.getOptionalInput)("sha") || (0, util_1.getRequiredEnvParam)("GITHUB_SHA");
|
||||
}
|
||||
};
|
||||
exports.getCommitOid = getCommitOid;
|
||||
/**
|
||||
* If the action was triggered by a pull request, determine the commit sha of the merge base.
|
||||
* Returns undefined if run by other triggers or the merge base cannot be determined.
|
||||
*/
|
||||
const determineMergeBaseCommitOid = async function (checkoutPathOverride) {
|
||||
if (getWorkflowEventName() !== "pull_request") {
|
||||
return undefined;
|
||||
}
|
||||
const mergeSha = (0, util_1.getRequiredEnvParam)("GITHUB_SHA");
|
||||
const checkoutPath = checkoutPathOverride ?? (0, exports.getOptionalInput)("checkout_path");
|
||||
let stderr = "";
|
||||
try {
|
||||
let commitOid = "";
|
||||
let baseOid = "";
|
||||
let headOid = "";
|
||||
await new toolrunner.ToolRunner(await safeWhich.safeWhich("git"), ["show", "-s", "--format=raw", mergeSha], {
|
||||
silent: true,
|
||||
listeners: {
|
||||
stdline: (data) => {
|
||||
if (data.startsWith("commit ") && commitOid === "") {
|
||||
commitOid = data.substring(7);
|
||||
}
|
||||
else if (data.startsWith("parent ")) {
|
||||
if (baseOid === "") {
|
||||
baseOid = data.substring(7);
|
||||
}
|
||||
else if (headOid === "") {
|
||||
headOid = data.substring(7);
|
||||
}
|
||||
}
|
||||
},
|
||||
stderr: (data) => {
|
||||
stderr += data.toString();
|
||||
},
|
||||
},
|
||||
cwd: checkoutPath,
|
||||
}).exec();
|
||||
// Let's confirm our assumptions: We had a merge commit and the parsed parent data looks correct
|
||||
if (commitOid === mergeSha &&
|
||||
headOid.length === 40 &&
|
||||
baseOid.length === 40) {
|
||||
return baseOid;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
catch {
|
||||
if (stderr.includes("not 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.");
|
||||
}
|
||||
else {
|
||||
core.info(`Failed to call git to determine merge base. Will calculate the merge base on ` +
|
||||
`the server. Reason: ${stderr}`);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
};
|
||||
exports.determineMergeBaseCommitOid = determineMergeBaseCommitOid;
|
||||
/**
|
||||
* Get the ref currently being analyzed.
|
||||
*/
|
||||
async function getRef() {
|
||||
// Will be in the form "refs/heads/master" on a push event
|
||||
// or in the form "refs/pull/N/merge" on a pull_request event
|
||||
const refInput = (0, exports.getOptionalInput)("ref");
|
||||
const shaInput = (0, exports.getOptionalInput)("sha");
|
||||
const checkoutPath = (0, exports.getOptionalInput)("checkout_path") ||
|
||||
(0, exports.getOptionalInput)("source-root") ||
|
||||
(0, util_1.getRequiredEnvParam)("GITHUB_WORKSPACE");
|
||||
const hasRefInput = !!refInput;
|
||||
const hasShaInput = !!shaInput;
|
||||
// If one of 'ref' or 'sha' are provided, both are required
|
||||
if ((hasRefInput || hasShaInput) && !(hasRefInput && hasShaInput)) {
|
||||
throw new util_1.ConfigurationError("Both 'ref' and 'sha' are required if one of them is provided.");
|
||||
}
|
||||
const ref = refInput || getRefFromEnv();
|
||||
const sha = shaInput || (0, util_1.getRequiredEnvParam)("GITHUB_SHA");
|
||||
// If the ref is a user-provided input, we have to skip logic
|
||||
// and assume that it is really where they want to upload the results.
|
||||
if (refInput) {
|
||||
return refInput;
|
||||
}
|
||||
// For pull request refs we want to detect whether the workflow
|
||||
// has run `git checkout HEAD^2` to analyze the 'head' ref rather
|
||||
// than the 'merge' ref. If so, we want to convert the ref that
|
||||
// we report back.
|
||||
const pull_ref_regex = /refs\/pull\/(\d+)\/merge/;
|
||||
if (!pull_ref_regex.test(ref)) {
|
||||
return ref;
|
||||
}
|
||||
const head = await (0, exports.getCommitOid)(checkoutPath, "HEAD");
|
||||
// in actions/checkout@v2+ we can check if git rev-parse HEAD == GITHUB_SHA
|
||||
// in actions/checkout@v1 this may not be true as it checks out the repository
|
||||
// using GITHUB_REF. There is a subtle race condition where
|
||||
// git rev-parse GITHUB_REF != GITHUB_SHA, so we must check
|
||||
// git rev-parse GITHUB_REF == git rev-parse HEAD instead.
|
||||
const hasChangedRef = sha !== head &&
|
||||
(await (0, exports.getCommitOid)(checkoutPath, ref.replace(/^refs\/pull\//, "refs/remotes/pull/"))) !== head;
|
||||
if (hasChangedRef) {
|
||||
const newRef = ref.replace(pull_ref_regex, "refs/pull/$1/head");
|
||||
core.debug(`No longer on merge commit, rewriting ref from ${ref} to ${newRef}.`);
|
||||
return newRef;
|
||||
}
|
||||
else {
|
||||
return ref;
|
||||
}
|
||||
}
|
||||
function getRefFromEnv() {
|
||||
// To workaround a limitation of Actions dynamic workflows not setting
|
||||
// the GITHUB_REF in some cases, we accept also the ref within the
|
||||
// CODE_SCANNING_REF variable. When possible, however, we prefer to use
|
||||
// the GITHUB_REF as that is a protected variable and cannot be overwritten.
|
||||
let refEnv;
|
||||
try {
|
||||
refEnv = (0, util_1.getRequiredEnvParam)("GITHUB_REF");
|
||||
}
|
||||
catch (e) {
|
||||
// If the GITHUB_REF is not set, we try to rescue by getting the
|
||||
// CODE_SCANNING_REF.
|
||||
const maybeRef = process.env["CODE_SCANNING_REF"];
|
||||
if (maybeRef === undefined || maybeRef.length === 0) {
|
||||
throw e;
|
||||
}
|
||||
refEnv = maybeRef;
|
||||
}
|
||||
return refEnv;
|
||||
}
|
||||
function getActionVersion() {
|
||||
return pkg.version;
|
||||
}
|
||||
@@ -282,30 +127,6 @@ function getWorkflowEvent() {
|
||||
throw new Error(`Unable to read workflow event JSON from ${eventJsonFile}: ${e}`);
|
||||
}
|
||||
}
|
||||
function removeRefsHeadsPrefix(ref) {
|
||||
return ref.startsWith("refs/heads/") ? ref.slice("refs/heads/".length) : ref;
|
||||
}
|
||||
/**
|
||||
* Returns whether we are analyzing the default branch for the repository.
|
||||
*
|
||||
* This first checks the environment variable `CODE_SCANNING_IS_ANALYZING_DEFAULT_BRANCH`. This
|
||||
* environment variable can be set in cases where repository information might not be available, for
|
||||
* example dynamic workflows.
|
||||
*/
|
||||
async function isAnalyzingDefaultBranch() {
|
||||
if (process.env.CODE_SCANNING_IS_ANALYZING_DEFAULT_BRANCH === "true") {
|
||||
return true;
|
||||
}
|
||||
// Get the current ref and trim and refs/heads/ prefix
|
||||
let currentRef = await getRef();
|
||||
currentRef = removeRefsHeadsPrefix(currentRef);
|
||||
const event = getWorkflowEvent();
|
||||
let defaultBranch = event?.repository?.default_branch;
|
||||
if (getWorkflowEventName() === "schedule") {
|
||||
defaultBranch = removeRefsHeadsPrefix(getRefFromEnv());
|
||||
}
|
||||
return currentRef === defaultBranch;
|
||||
}
|
||||
async function printDebugLogs(config) {
|
||||
for (const language of config.languages) {
|
||||
const databaseDirectory = (0, util_1.getCodeQLDatabasePath)(config, language);
|
||||
@@ -429,4 +250,106 @@ exports.getFileType = getFileType;
|
||||
function isSelfHostedRunner() {
|
||||
return process.env.RUNNER_ENVIRONMENT === "self-hosted";
|
||||
}
|
||||
/** Determines whether we are running in default setup. */
|
||||
function isDefaultSetup() {
|
||||
return getWorkflowEventName() === "dynamic";
|
||||
}
|
||||
function prettyPrintInvocation(cmd, args) {
|
||||
return [cmd, ...args].map((x) => (x.includes(" ") ? `'${x}'` : x)).join(" ");
|
||||
}
|
||||
/**
|
||||
* An error from a tool invocation, with associated exit code, stderr, etc.
|
||||
*/
|
||||
class CommandInvocationError extends Error {
|
||||
constructor(cmd, args, exitCode, stderr, stdout) {
|
||||
const prettyCommand = prettyPrintInvocation(cmd, args);
|
||||
const lastLine = ensureEndsInPeriod(stderr.trim().split("\n").pop()?.trim() || "n/a");
|
||||
super(`Failed to run "${prettyCommand}". ` +
|
||||
`Exit code was ${exitCode} and last log line was: ${lastLine} See the logs for more details.`);
|
||||
this.cmd = cmd;
|
||||
this.args = args;
|
||||
this.exitCode = exitCode;
|
||||
this.stderr = stderr;
|
||||
this.stdout = stdout;
|
||||
}
|
||||
}
|
||||
exports.CommandInvocationError = CommandInvocationError;
|
||||
function ensureEndsInPeriod(text) {
|
||||
return text[text.length - 1] === "." ? text : `${text}.`;
|
||||
}
|
||||
/**
|
||||
* A constant defining the maximum number of characters we will keep from
|
||||
* the programs stderr for logging.
|
||||
*
|
||||
* This serves two purposes:
|
||||
* 1. It avoids an OOM if a program fails in a way that results it
|
||||
* printing many log lines.
|
||||
* 2. It avoids us hitting the limit of how much data we can send in our
|
||||
* status reports on GitHub.com.
|
||||
*/
|
||||
const MAX_STDERR_BUFFER_SIZE = 20000;
|
||||
/**
|
||||
* Runs a CLI tool.
|
||||
*
|
||||
* @returns Standard output produced by the tool.
|
||||
* @throws A `CommandInvocationError` if the tool exits with a non-zero status code.
|
||||
*/
|
||||
async function runTool(cmd, args = [], opts = {}) {
|
||||
let stdout = "";
|
||||
let stderr = "";
|
||||
if (!opts.noStreamStdout) {
|
||||
process.stdout.write(`[command]${cmd} ${args.join(" ")}\n`);
|
||||
}
|
||||
const exitCode = await new toolrunner.ToolRunner(cmd, args, {
|
||||
ignoreReturnCode: true,
|
||||
listeners: {
|
||||
stdout: (data) => {
|
||||
stdout += data.toString("utf8");
|
||||
if (!opts.noStreamStdout) {
|
||||
process.stdout.write(data);
|
||||
}
|
||||
},
|
||||
stderr: (data) => {
|
||||
let readStartIndex = 0;
|
||||
// If the error is too large, then we only take the last MAX_STDERR_BUFFER_SIZE characters
|
||||
if (data.length - MAX_STDERR_BUFFER_SIZE > 0) {
|
||||
// Eg: if we have MAX_STDERR_BUFFER_SIZE the start index should be 2.
|
||||
readStartIndex = data.length - MAX_STDERR_BUFFER_SIZE + 1;
|
||||
}
|
||||
stderr += data.toString("utf8", readStartIndex);
|
||||
// Mimic the standard behavior of the toolrunner by writing stderr to stdout
|
||||
process.stdout.write(data);
|
||||
},
|
||||
},
|
||||
silent: true,
|
||||
...(opts.stdin ? { input: Buffer.from(opts.stdin || "") } : {}),
|
||||
}).exec();
|
||||
if (exitCode !== 0) {
|
||||
throw new CommandInvocationError(cmd, args, exitCode, stderr, stdout);
|
||||
}
|
||||
return stdout;
|
||||
}
|
||||
const persistedInputsKey = "persisted_inputs";
|
||||
/**
|
||||
* Persists all inputs to the action as state that can be retrieved later in the post-action.
|
||||
* This would be simplified if actions/runner#3514 is addressed.
|
||||
* https://github.com/actions/runner/issues/3514
|
||||
*/
|
||||
const persistInputs = function () {
|
||||
const inputEnvironmentVariables = Object.entries(process.env).filter(([name]) => name.startsWith("INPUT_"));
|
||||
core.saveState(persistedInputsKey, JSON.stringify(inputEnvironmentVariables));
|
||||
};
|
||||
exports.persistInputs = persistInputs;
|
||||
/**
|
||||
* Restores all inputs to the action from the persisted state.
|
||||
*/
|
||||
const restoreInputs = function () {
|
||||
const persistedInputs = core.getState(persistedInputsKey);
|
||||
if (persistedInputs) {
|
||||
for (const [name, value] of JSON.parse(persistedInputs)) {
|
||||
process.env[name] = value;
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.restoreInputs = restoreInputs;
|
||||
//# sourceMappingURL=actions-util.js.map
|
||||
File diff suppressed because one or more lines are too long
215
lib/actions-util.test.js
generated
215
lib/actions-util.test.js
generated
@@ -1,159 +1,14 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const fs = __importStar(require("fs"));
|
||||
const path = __importStar(require("path"));
|
||||
const core = __importStar(require("@actions/core"));
|
||||
const ava_1 = __importDefault(require("ava"));
|
||||
const sinon = __importStar(require("sinon"));
|
||||
const actionsUtil = __importStar(require("./actions-util"));
|
||||
const api_client_1 = require("./api-client");
|
||||
const environment_1 = require("./environment");
|
||||
const testing_utils_1 = require("./testing-utils");
|
||||
const util_1 = require("./util");
|
||||
(0, testing_utils_1.setupTests)(ava_1.default);
|
||||
(0, ava_1.default)("getRef() throws on the empty string", async (t) => {
|
||||
process.env["GITHUB_REF"] = "";
|
||||
await t.throwsAsync(actionsUtil.getRef);
|
||||
});
|
||||
(0, ava_1.default)("getRef() returns merge PR ref if GITHUB_SHA still checked out", async (t) => {
|
||||
await (0, util_1.withTmpDir)(async (tmpDir) => {
|
||||
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
|
||||
const expectedRef = "refs/pull/1/merge";
|
||||
const currentSha = "a".repeat(40);
|
||||
process.env["GITHUB_REF"] = expectedRef;
|
||||
process.env["GITHUB_SHA"] = currentSha;
|
||||
const callback = sinon.stub(actionsUtil, "getCommitOid");
|
||||
callback.withArgs("HEAD").resolves(currentSha);
|
||||
const actualRef = await actionsUtil.getRef();
|
||||
t.deepEqual(actualRef, expectedRef);
|
||||
callback.restore();
|
||||
});
|
||||
});
|
||||
(0, ava_1.default)("getRef() returns merge PR ref if GITHUB_REF still checked out but sha has changed (actions checkout@v1)", async (t) => {
|
||||
await (0, util_1.withTmpDir)(async (tmpDir) => {
|
||||
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
|
||||
const expectedRef = "refs/pull/1/merge";
|
||||
process.env["GITHUB_REF"] = expectedRef;
|
||||
process.env["GITHUB_SHA"] = "b".repeat(40);
|
||||
const sha = "a".repeat(40);
|
||||
const callback = sinon.stub(actionsUtil, "getCommitOid");
|
||||
callback.withArgs("refs/remotes/pull/1/merge").resolves(sha);
|
||||
callback.withArgs("HEAD").resolves(sha);
|
||||
const actualRef = await actionsUtil.getRef();
|
||||
t.deepEqual(actualRef, expectedRef);
|
||||
callback.restore();
|
||||
});
|
||||
});
|
||||
(0, ava_1.default)("getRef() returns head PR ref if GITHUB_REF no longer checked out", async (t) => {
|
||||
await (0, util_1.withTmpDir)(async (tmpDir) => {
|
||||
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
|
||||
process.env["GITHUB_REF"] = "refs/pull/1/merge";
|
||||
process.env["GITHUB_SHA"] = "a".repeat(40);
|
||||
const callback = sinon.stub(actionsUtil, "getCommitOid");
|
||||
callback.withArgs(tmpDir, "refs/pull/1/merge").resolves("a".repeat(40));
|
||||
callback.withArgs(tmpDir, "HEAD").resolves("b".repeat(40));
|
||||
const actualRef = await actionsUtil.getRef();
|
||||
t.deepEqual(actualRef, "refs/pull/1/head");
|
||||
callback.restore();
|
||||
});
|
||||
});
|
||||
(0, ava_1.default)("getRef() returns ref provided as an input and ignores current HEAD", async (t) => {
|
||||
await (0, util_1.withTmpDir)(async (tmpDir) => {
|
||||
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
|
||||
const getAdditionalInputStub = sinon.stub(actionsUtil, "getOptionalInput");
|
||||
getAdditionalInputStub.withArgs("ref").resolves("refs/pull/2/merge");
|
||||
getAdditionalInputStub.withArgs("sha").resolves("b".repeat(40));
|
||||
// These values are be ignored
|
||||
process.env["GITHUB_REF"] = "refs/pull/1/merge";
|
||||
process.env["GITHUB_SHA"] = "a".repeat(40);
|
||||
const callback = sinon.stub(actionsUtil, "getCommitOid");
|
||||
callback.withArgs("refs/pull/1/merge").resolves("b".repeat(40));
|
||||
callback.withArgs("HEAD").resolves("b".repeat(40));
|
||||
const actualRef = await actionsUtil.getRef();
|
||||
t.deepEqual(actualRef, "refs/pull/2/merge");
|
||||
callback.restore();
|
||||
getAdditionalInputStub.restore();
|
||||
});
|
||||
});
|
||||
(0, ava_1.default)("getRef() returns CODE_SCANNING_REF as a fallback for GITHUB_REF", async (t) => {
|
||||
await (0, util_1.withTmpDir)(async (tmpDir) => {
|
||||
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
|
||||
const expectedRef = "refs/pull/1/HEAD";
|
||||
const currentSha = "a".repeat(40);
|
||||
process.env["CODE_SCANNING_REF"] = expectedRef;
|
||||
process.env["GITHUB_REF"] = "";
|
||||
process.env["GITHUB_SHA"] = currentSha;
|
||||
const actualRef = await actionsUtil.getRef();
|
||||
t.deepEqual(actualRef, expectedRef);
|
||||
});
|
||||
});
|
||||
(0, ava_1.default)("getRef() returns GITHUB_REF over CODE_SCANNING_REF if both are provided", async (t) => {
|
||||
await (0, util_1.withTmpDir)(async (tmpDir) => {
|
||||
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
|
||||
const expectedRef = "refs/pull/1/merge";
|
||||
const currentSha = "a".repeat(40);
|
||||
process.env["CODE_SCANNING_REF"] = "refs/pull/1/HEAD";
|
||||
process.env["GITHUB_REF"] = expectedRef;
|
||||
process.env["GITHUB_SHA"] = currentSha;
|
||||
const actualRef = await actionsUtil.getRef();
|
||||
t.deepEqual(actualRef, expectedRef);
|
||||
});
|
||||
});
|
||||
(0, ava_1.default)("getRef() throws an error if only `ref` is provided as an input", async (t) => {
|
||||
await (0, util_1.withTmpDir)(async (tmpDir) => {
|
||||
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
|
||||
const getAdditionalInputStub = sinon.stub(actionsUtil, "getOptionalInput");
|
||||
getAdditionalInputStub.withArgs("ref").resolves("refs/pull/1/merge");
|
||||
await t.throwsAsync(async () => {
|
||||
await actionsUtil.getRef();
|
||||
}, {
|
||||
instanceOf: Error,
|
||||
message: "Both 'ref' and 'sha' are required if one of them is provided.",
|
||||
});
|
||||
getAdditionalInputStub.restore();
|
||||
});
|
||||
});
|
||||
(0, ava_1.default)("getRef() throws an error if only `sha` is provided as an input", async (t) => {
|
||||
await (0, util_1.withTmpDir)(async (tmpDir) => {
|
||||
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
|
||||
process.env["GITHUB_WORKSPACE"] = "/tmp";
|
||||
const getAdditionalInputStub = sinon.stub(actionsUtil, "getOptionalInput");
|
||||
getAdditionalInputStub.withArgs("sha").resolves("a".repeat(40));
|
||||
await t.throwsAsync(async () => {
|
||||
await actionsUtil.getRef();
|
||||
}, {
|
||||
instanceOf: Error,
|
||||
message: "Both 'ref' and 'sha' are required if one of them is provided.",
|
||||
});
|
||||
getAdditionalInputStub.restore();
|
||||
});
|
||||
});
|
||||
(0, ava_1.default)("computeAutomationID()", async (t) => {
|
||||
let actualAutomationID = (0, api_client_1.computeAutomationID)(".github/workflows/codeql-analysis.yml:analyze", '{"language": "javascript", "os": "linux"}');
|
||||
t.deepEqual(actualAutomationID, ".github/workflows/codeql-analysis.yml:analyze/language:javascript/os:linux/");
|
||||
@@ -174,74 +29,4 @@ const util_1 = require("./util");
|
||||
(0, util_1.initializeEnvironment)("1.2.3");
|
||||
t.deepEqual(process.env[environment_1.EnvVar.VERSION], "1.2.3");
|
||||
});
|
||||
(0, ava_1.default)("isAnalyzingDefaultBranch()", async (t) => {
|
||||
process.env["GITHUB_EVENT_NAME"] = "push";
|
||||
process.env["CODE_SCANNING_IS_ANALYZING_DEFAULT_BRANCH"] = "true";
|
||||
t.deepEqual(await actionsUtil.isAnalyzingDefaultBranch(), true);
|
||||
process.env["CODE_SCANNING_IS_ANALYZING_DEFAULT_BRANCH"] = "false";
|
||||
await (0, util_1.withTmpDir)(async (tmpDir) => {
|
||||
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
|
||||
const envFile = path.join(tmpDir, "event.json");
|
||||
fs.writeFileSync(envFile, JSON.stringify({
|
||||
repository: {
|
||||
default_branch: "main",
|
||||
},
|
||||
}));
|
||||
process.env["GITHUB_EVENT_PATH"] = envFile;
|
||||
process.env["GITHUB_REF"] = "main";
|
||||
process.env["GITHUB_SHA"] = "1234";
|
||||
t.deepEqual(await actionsUtil.isAnalyzingDefaultBranch(), true);
|
||||
process.env["GITHUB_REF"] = "refs/heads/main";
|
||||
t.deepEqual(await actionsUtil.isAnalyzingDefaultBranch(), true);
|
||||
process.env["GITHUB_REF"] = "feature";
|
||||
t.deepEqual(await actionsUtil.isAnalyzingDefaultBranch(), false);
|
||||
fs.writeFileSync(envFile, JSON.stringify({
|
||||
schedule: "0 0 * * *",
|
||||
}));
|
||||
process.env["GITHUB_EVENT_NAME"] = "schedule";
|
||||
process.env["GITHUB_REF"] = "refs/heads/main";
|
||||
t.deepEqual(await actionsUtil.isAnalyzingDefaultBranch(), true);
|
||||
const getAdditionalInputStub = sinon.stub(actionsUtil, "getOptionalInput");
|
||||
getAdditionalInputStub
|
||||
.withArgs("ref")
|
||||
.resolves("refs/heads/something-else");
|
||||
getAdditionalInputStub
|
||||
.withArgs("sha")
|
||||
.resolves("0000000000000000000000000000000000000000");
|
||||
process.env["GITHUB_EVENT_NAME"] = "schedule";
|
||||
process.env["GITHUB_REF"] = "refs/heads/main";
|
||||
t.deepEqual(await actionsUtil.isAnalyzingDefaultBranch(), false);
|
||||
getAdditionalInputStub.restore();
|
||||
});
|
||||
});
|
||||
(0, ava_1.default)("determineMergeBaseCommitOid non-pullrequest", async (t) => {
|
||||
const infoStub = sinon.stub(core, "info");
|
||||
process.env["GITHUB_EVENT_NAME"] = "hucairz";
|
||||
process.env["GITHUB_SHA"] = "100912429fab4cb230e66ffb11e738ac5194e73a";
|
||||
const result = await actionsUtil.determineMergeBaseCommitOid(__dirname);
|
||||
t.deepEqual(result, undefined);
|
||||
t.deepEqual(0, infoStub.callCount);
|
||||
infoStub.restore();
|
||||
});
|
||||
(0, ava_1.default)("determineMergeBaseCommitOid no error", async (t) => {
|
||||
const infoStub = sinon.stub(core, "info");
|
||||
process.env["GITHUB_EVENT_NAME"] = "pull_request";
|
||||
process.env["GITHUB_SHA"] = "100912429fab4cb230e66ffb11e738ac5194e73a";
|
||||
await (0, util_1.withTmpDir)(async (tmpDir) => {
|
||||
await actionsUtil.determineMergeBaseCommitOid(tmpDir);
|
||||
});
|
||||
t.deepEqual(1, infoStub.callCount);
|
||||
t.assert(infoStub.firstCall.args[0].startsWith("The checkout path provided to the action does not appear to be a git repository."));
|
||||
infoStub.restore();
|
||||
});
|
||||
(0, ava_1.default)("determineMergeBaseCommitOid other error", async (t) => {
|
||||
const infoStub = sinon.stub(core, "info");
|
||||
process.env["GITHUB_EVENT_NAME"] = "pull_request";
|
||||
process.env["GITHUB_SHA"] = "100912429fab4cb230e66ffb11e738ac5194e73a";
|
||||
const result = await actionsUtil.determineMergeBaseCommitOid(path.join(__dirname, "../../i-dont-exist"));
|
||||
t.deepEqual(result, undefined);
|
||||
t.deepEqual(1, infoStub.callCount);
|
||||
t.assert(infoStub.firstCall.args[0].startsWith("Failed to call git to determine merge base."));
|
||||
infoStub.restore();
|
||||
});
|
||||
//# sourceMappingURL=actions-util.test.js.map
|
||||
File diff suppressed because one or more lines are too long
27
lib/analyze-action-env.test.js
generated
27
lib/analyze-action-env.test.js
generated
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __importStar = (this && this.__importStar) || (function () {
|
||||
var ownKeys = function(o) {
|
||||
ownKeys = Object.getOwnPropertyNames || function (o) {
|
||||
var ar = [];
|
||||
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
||||
return ar;
|
||||
};
|
||||
return ownKeys(o);
|
||||
};
|
||||
return function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
})();
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
@@ -32,6 +42,7 @@ const actionsUtil = __importStar(require("./actions-util"));
|
||||
const analyze = __importStar(require("./analyze"));
|
||||
const api = __importStar(require("./api-client"));
|
||||
const configUtils = __importStar(require("./config-utils"));
|
||||
const gitUtils = __importStar(require("./git-utils"));
|
||||
const statusReport = __importStar(require("./status-report"));
|
||||
const testing_utils_1 = require("./testing-utils");
|
||||
const util = __importStar(require("./util"));
|
||||
@@ -51,7 +62,7 @@ const util = __importStar(require("./util"));
|
||||
.stub(statusReport, "createStatusReportBase")
|
||||
.resolves({});
|
||||
sinon.stub(statusReport, "sendStatusReport").resolves();
|
||||
sinon.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(true);
|
||||
sinon.stub(gitUtils, "isAnalyzingDefaultBranch").resolves(true);
|
||||
const gitHubVersion = {
|
||||
type: util.GitHubVariant.DOTCOM,
|
||||
};
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"analyze-action-env.test.js","sourceRoot":"","sources":["../src/analyze-action-env.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAuB;AACvB,6CAA+B;AAE/B,4DAA8C;AAC9C,mDAAqC;AACrC,kDAAoC;AACpC,4DAA8C;AAC9C,8DAAgD;AAChD,mDAIyB;AACzB,6CAA+B;AAE/B,IAAA,0BAAU,EAAC,aAAI,CAAC,CAAC;AAEjB,4EAA4E;AAC5E,4EAA4E;AAC5E,+EAA+E;AAC/E,+EAA+E;AAC/E,gFAAgF;AAChF,iCAAiC;AAEjC,IAAA,aAAI,EAAC,8DAA8D,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IAC/E,MAAM,IAAI,CAAC,UAA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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"}
|
||||
27
lib/analyze-action-input.test.js
generated
27
lib/analyze-action-input.test.js
generated
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __importStar = (this && this.__importStar) || (function () {
|
||||
var ownKeys = function(o) {
|
||||
ownKeys = Object.getOwnPropertyNames || function (o) {
|
||||
var ar = [];
|
||||
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
||||
return ar;
|
||||
};
|
||||
return ownKeys(o);
|
||||
};
|
||||
return function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
})();
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
@@ -32,6 +42,7 @@ const actionsUtil = __importStar(require("./actions-util"));
|
||||
const analyze = __importStar(require("./analyze"));
|
||||
const api = __importStar(require("./api-client"));
|
||||
const configUtils = __importStar(require("./config-utils"));
|
||||
const gitUtils = __importStar(require("./git-utils"));
|
||||
const statusReport = __importStar(require("./status-report"));
|
||||
const testing_utils_1 = require("./testing-utils");
|
||||
const util = __importStar(require("./util"));
|
||||
@@ -67,7 +78,7 @@ const util = __importStar(require("./util"));
|
||||
optionalInputStub.withArgs("cleanup-level").returns("none");
|
||||
optionalInputStub.withArgs("expect-error").returns("false");
|
||||
sinon.stub(api, "getGitHubVersion").resolves(gitHubVersion);
|
||||
sinon.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(true);
|
||||
sinon.stub(gitUtils, "isAnalyzingDefaultBranch").resolves(true);
|
||||
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
|
||||
(0, testing_utils_1.mockFeatureFlagApiEndpoint)(200, {});
|
||||
process.env["CODEQL_THREADS"] = "1";
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"analyze-action-input.test.js","sourceRoot":"","sources":["../src/analyze-action-input.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAuB;AACvB,6CAA+B;AAE/B,4DAA8C;AAC9C,mDAAqC;AACrC,kDAAoC;AACpC,4DAA8C;AAC9C,8DAAgD;AAChD,mDAIyB;AACzB,6CAA+B;AAE/B,IAAA,0BAAU,EAAC,aAAI,CAAC,CAAC;AAEjB,4EAA4E;AAC5E,4EAA4E;AAC5E,+EAA+E;AAC/E,+EAA+E;AAC/E,gFAAgF;AAChF,iCAAiC;AAEjC,IAAA,aAAI,EAAC,sDAAsD,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IACvE,MAAM,IAAI,CAAC,UAA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O,EAAE,aAAa,CAAC,CAAC;QAC3D,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QACzD,iEAAiE;QACjE,MAAM,aAAa,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;QAElD,uEAAuE;QACvE,oEAAoE;QACpE,4EAA4E;QAC5E,wEAAwE;QACxE,MAAM,aAAa,CAAC,UAAU,CAAC;QAE/B,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;QAC/D,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;QAC7D,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;QAC9D,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
||||
39
lib/analyze-action-post.js
generated
39
lib/analyze-action-post.js
generated
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __importStar = (this && this.__importStar) || (function () {
|
||||
var ownKeys = function(o) {
|
||||
ownKeys = Object.getOwnPropertyNames || function (o) {
|
||||
var ar = [];
|
||||
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
||||
return ar;
|
||||
};
|
||||
return ownKeys(o);
|
||||
};
|
||||
return function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
/**
|
||||
* This file is the entry point for the `post:` hook of `analyze-action.yml`.
|
||||
@@ -29,19 +39,30 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||
* other `post:` hooks.
|
||||
*/
|
||||
const core = __importStar(require("@actions/core"));
|
||||
const actionsUtil = __importStar(require("./actions-util"));
|
||||
const api_client_1 = require("./api-client");
|
||||
const config_utils_1 = require("./config-utils");
|
||||
const debugArtifacts = __importStar(require("./debug-artifacts"));
|
||||
const environment_1 = require("./environment");
|
||||
const logging_1 = require("./logging");
|
||||
const util_1 = require("./util");
|
||||
async function runWrapper() {
|
||||
try {
|
||||
actionsUtil.restoreInputs();
|
||||
const logger = (0, logging_1.getActionsLogger)();
|
||||
const gitHubVersion = await (0, api_client_1.getGitHubVersion)();
|
||||
(0, util_1.checkGitHubVersionInRange)(gitHubVersion, logger);
|
||||
// Upload SARIF artifacts if we determine that this is a first-party analysis run.
|
||||
// For third-party runs, this artifact will be uploaded in the `upload-sarif-post` step.
|
||||
if (process.env[environment_1.EnvVar.INIT_ACTION_HAS_RUN] === "true") {
|
||||
await debugArtifacts.uploadCombinedSarifArtifacts();
|
||||
const config = await (0, config_utils_1.getConfig)(actionsUtil.getTemporaryDirectory(), logger);
|
||||
if (config !== undefined) {
|
||||
await (0, logging_1.withGroup)("Uploading combined SARIF debug artifact", () => debugArtifacts.uploadCombinedSarifArtifacts(logger, config.gitHubVersion.type));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
core.setFailed(`analyze post-action step failed: ${(0, util_1.wrapError)(error).message}`);
|
||||
core.setFailed(`analyze post-action step failed: ${(0, util_1.getErrorMessage)(error)}`);
|
||||
}
|
||||
}
|
||||
void runWrapper();
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"analyze-action-post.js","sourceRoot":"","sources":["../src/analyze-action-post.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,oDAAsC;AAEtC,kEAAoD;AACpD,+CAAuC;AACvC,iCAAmC;AAEnC,KAAK,UAAU,UAAU;IACvB,IAAI,CAAC;QACH,kFAAkF;QAClF,wFAAwF;QACxF,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAM,CAAC,mBAAmB,CAAC,KAAK,MAAM,EAAE,CAAC;YACvD,MAAM,cAAc,CAAC,4BAA4B,EAAE,CAAC;QACtD,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,SAAS,CACZ,oCAAoC,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAC/D,CAAC;IACJ,CAAC;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}
|
||||
{"version":3,"file":"analyze-action-post.js","sourceRoot":"","sources":["../src/analyze-action-post.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,oDAAsC;AAEtC,4DAA8C;AAC9C,6CAAgD;AAChD,iDAA2C;AAC3C,kEAAoD;AACpD,+CAAuC;AACvC,uCAAwD;AACxD,iCAAoE;AAEpE,KAAK,UAAU,UAAU;IACvB,IAAI,CAAC;QACH,WAAW,CAAC,aAAa,EAAE,CAAC;QAC5B,MAAM,MAAM,GAAG,IAAA,0BAAgB,GAAE,CAAC;QAClC,MAAM,aAAa,GAAG,MAAM,IAAA,6BAAgB,GAAE,CAAC;QAC/C,IAAA,gCAAyB,EAAC,aAAa,EAAE,MAAM,CAAC,CAAC;QAEjD,kFAAkF;QAClF,wFAAwF;QACxF,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAM,CAAC,mBAAmB,CAAC,KAAK,MAAM,EAAE,CAAC;YACvD,MAAM,MAAM,GAAG,MAAM,IAAA,wBAAS,EAC5B,WAAW,CAAC,qBAAqB,EAAE,EACnC,MAAM,CACP,CAAC;YACF,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;gBACzB,MAAM,IAAA,mBAAS,EAAC,yCAAyC,EAAE,GAAG,EAAE,CAC9D,cAAc,CAAC,4BAA4B,CACzC,MAAM,EACN,MAAM,CAAC,aAAa,CAAC,IAAI,CAC1B,CACF,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,SAAS,CACZ,oCAAoC,IAAA,sBAAe,EAAC,KAAK,CAAC,EAAE,CAC7D,CAAC;IACJ,CAAC;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}
|
||||
43
lib/analyze-action.js
generated
43
lib/analyze-action.js
generated
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __importStar = (this && this.__importStar) || (function () {
|
||||
var ownKeys = function(o) {
|
||||
ownKeys = Object.getOwnPropertyNames || function (o) {
|
||||
var ar = [];
|
||||
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
||||
return ar;
|
||||
};
|
||||
return ownKeys(o);
|
||||
};
|
||||
return function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
})();
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
@@ -31,13 +41,16 @@ const fs = __importStar(require("fs"));
|
||||
const path_1 = __importDefault(require("path"));
|
||||
const perf_hooks_1 = require("perf_hooks");
|
||||
const core = __importStar(require("@actions/core"));
|
||||
const github = __importStar(require("@actions/github"));
|
||||
const actionsUtil = __importStar(require("./actions-util"));
|
||||
const analyze_1 = require("./analyze");
|
||||
const api_client_1 = require("./api-client");
|
||||
const autobuild_1 = require("./autobuild");
|
||||
const caching_utils_1 = require("./caching-utils");
|
||||
const codeql_1 = require("./codeql");
|
||||
const config_utils_1 = require("./config-utils");
|
||||
const database_upload_1 = require("./database-upload");
|
||||
const dependency_caching_1 = require("./dependency-caching");
|
||||
const environment_1 = require("./environment");
|
||||
const feature_flags_1 = require("./feature-flags");
|
||||
const languages_1 = require("./languages");
|
||||
@@ -62,7 +75,7 @@ async function sendStatusReport(startedAt, config, stats, error, trapCacheUpload
|
||||
const trapCacheUploadStatusReport = {
|
||||
...report,
|
||||
trap_cache_upload_duration_ms: Math.round(trapCacheUploadTime || 0),
|
||||
trap_cache_upload_size_bytes: Math.round(await (0, trap_caching_1.getTotalCacheSize)(config.trapCaches, logger)),
|
||||
trap_cache_upload_size_bytes: Math.round(await (0, caching_utils_1.getTotalCacheSize)(Object.values(config.trapCaches), logger)),
|
||||
};
|
||||
await statusReport.sendStatusReport(trapCacheUploadStatusReport);
|
||||
}
|
||||
@@ -147,6 +160,9 @@ async function run() {
|
||||
let dbCreationTimings = undefined;
|
||||
let didUploadTrapCaches = false;
|
||||
util.initializeEnvironment(actionsUtil.getActionVersion());
|
||||
// Make inputs accessible in the `post` step, details at
|
||||
// https://github.com/github/codeql-action/issues/2553
|
||||
actionsUtil.persistInputs();
|
||||
const logger = (0, logging_1.getActionsLogger)();
|
||||
try {
|
||||
const statusReportBase = await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.Analyze, "starting", startedAt, config, await util.checkDiskUsage(logger), logger);
|
||||
@@ -170,11 +186,14 @@ async function run() {
|
||||
util.checkActionVersion(actionsUtil.getActionVersion(), gitHubVersion);
|
||||
const features = new feature_flags_1.Features(gitHubVersion, repositoryNwo, actionsUtil.getTemporaryDirectory(), logger);
|
||||
const memory = util.getMemoryFlag(actionsUtil.getOptionalInput("ram") || process.env["CODEQL_RAM"], logger);
|
||||
const pull_request = github.context.payload.pull_request;
|
||||
const diffRangePackDir = pull_request &&
|
||||
(await (0, analyze_1.setupDiffInformedQueryRun)(pull_request.base.ref, pull_request.head.ref, codeql, logger, features));
|
||||
await (0, analyze_1.warnIfGoInstalledAfterInit)(config, logger);
|
||||
await runAutobuildIfLegacyGoWorkflow(config, logger);
|
||||
dbCreationTimings = await (0, analyze_1.runFinalize)(outputDir, threads, memory, codeql, config, logger);
|
||||
if (actionsUtil.getRequiredInput("skip-queries") !== "true") {
|
||||
runStats = await (0, analyze_1.runQueries)(outputDir, memory, util.getAddSnippetsFlag(actionsUtil.getRequiredInput("add-snippets")), threads, actionsUtil.getOptionalInput("category"), config, logger, features);
|
||||
runStats = await (0, analyze_1.runQueries)(outputDir, memory, util.getAddSnippetsFlag(actionsUtil.getRequiredInput("add-snippets")), threads, diffRangePackDir, actionsUtil.getOptionalInput("category"), config, logger, features);
|
||||
}
|
||||
if (actionsUtil.getOptionalInput("cleanup-level") !== "none") {
|
||||
await (0, analyze_1.runCleanup)(config, actionsUtil.getOptionalInput("cleanup-level") || "brutal", logger);
|
||||
@@ -201,6 +220,10 @@ async function run() {
|
||||
trapCacheUploadTime = perf_hooks_1.performance.now() - trapCacheUploadStartTime;
|
||||
// Clean up TRAP caches
|
||||
trapCacheCleanupTelemetry = await (0, trap_caching_1.cleanupTrapCaches)(config, features, logger);
|
||||
// Store dependency cache(s) if dependency caching is enabled.
|
||||
if ((0, caching_utils_1.shouldStoreCache)(config.dependencyCachingEnabled)) {
|
||||
await (0, dependency_caching_1.uploadDependencyCaches)(config, logger);
|
||||
}
|
||||
// We don't upload results in test mode, so don't wait for processing
|
||||
if (util.isInTestMode()) {
|
||||
logger.debug("In test mode. Waiting for processing is disabled.");
|
||||
@@ -245,7 +268,7 @@ async function runWrapper() {
|
||||
await exports.runPromise;
|
||||
}
|
||||
catch (error) {
|
||||
core.setFailed(`analyze action failed: ${util.wrapError(error).message}`);
|
||||
core.setFailed(`analyze action failed: ${util.getErrorMessage(error)}`);
|
||||
}
|
||||
await util.checkForTimeout();
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
213
lib/analyze.js
generated
213
lib/analyze.js
generated
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __importStar = (this && this.__importStar) || (function () {
|
||||
var ownKeys = function(o) {
|
||||
ownKeys = Object.getOwnPropertyNames || function (o) {
|
||||
var ar = [];
|
||||
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
||||
return ar;
|
||||
};
|
||||
return ownKeys(o);
|
||||
};
|
||||
return function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
})();
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
@@ -29,6 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CodeQLAnalysisError = void 0;
|
||||
exports.runExtraction = runExtraction;
|
||||
exports.dbIsFinalized = dbIsFinalized;
|
||||
exports.setupDiffInformedQueryRun = setupDiffInformedQueryRun;
|
||||
exports.runQueries = runQueries;
|
||||
exports.runFinalize = runFinalize;
|
||||
exports.warnIfGoInstalledAfterInit = warnIfGoInstalledAfterInit;
|
||||
@@ -39,12 +50,15 @@ const perf_hooks_1 = require("perf_hooks");
|
||||
const safe_which_1 = require("@chrisgavin/safe-which");
|
||||
const del_1 = __importDefault(require("del"));
|
||||
const yaml = __importStar(require("js-yaml"));
|
||||
const actionsUtil = __importStar(require("./actions-util"));
|
||||
const autobuild_1 = require("./autobuild");
|
||||
const codeql_1 = require("./codeql");
|
||||
const diagnostics_1 = require("./diagnostics");
|
||||
const environment_1 = require("./environment");
|
||||
const feature_flags_1 = require("./feature-flags");
|
||||
const gitUtils = __importStar(require("./git-utils"));
|
||||
const languages_1 = require("./languages");
|
||||
const logging_1 = require("./logging");
|
||||
const tools_features_1 = require("./tools-features");
|
||||
const tracer_config_1 = require("./tracer-config");
|
||||
const upload_lib_1 = require("./upload-lib");
|
||||
@@ -134,11 +148,188 @@ async function finalizeDatabaseCreation(codeql, config, threadsFlag, memoryFlag,
|
||||
trap_import_duration_ms: Math.round(trapImportTime),
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Set up the diff-informed analysis feature.
|
||||
*
|
||||
* @param baseRef The base branch name, used for calculating the diff range.
|
||||
* @param headRef The head branch name, used for calculating the diff range.
|
||||
* @param codeql
|
||||
* @param logger
|
||||
* @param features
|
||||
* @returns Absolute path to the directory containing the extension pack for
|
||||
* the diff range information, or `undefined` if the feature is disabled.
|
||||
*/
|
||||
async function setupDiffInformedQueryRun(baseRef, headRef, codeql, logger, features) {
|
||||
if (!(await features.getValue(feature_flags_1.Feature.DiffInformedQueries, codeql))) {
|
||||
return undefined;
|
||||
}
|
||||
return await (0, logging_1.withGroupAsync)("Generating diff range extension pack", async () => {
|
||||
const diffRanges = await getPullRequestEditedDiffRanges(baseRef, headRef, logger);
|
||||
return writeDiffRangeDataExtensionPack(logger, diffRanges);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Return the file line ranges that were added or modified in the pull request.
|
||||
*
|
||||
* @param baseRef The base branch name, used for calculating the diff range.
|
||||
* @param headRef The head branch name, used for calculating the diff range.
|
||||
* @param logger
|
||||
* @returns An array of tuples, where each tuple contains the absolute path of a
|
||||
* file, the start line and the end line (both 1-based and inclusive) of an
|
||||
* added or modified range in that file. Returns `undefined` if the action was
|
||||
* not triggered by a pull request or if there was an error.
|
||||
*/
|
||||
async function getPullRequestEditedDiffRanges(baseRef, headRef, logger) {
|
||||
const checkoutPath = actionsUtil.getOptionalInput("checkout_path");
|
||||
if (checkoutPath === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
// To compute the merge bases between the base branch and the PR topic branch,
|
||||
// we need to fetch the commit graph from the branch heads to those merge
|
||||
// babes. The following 6-step procedure does so while limiting the amount of
|
||||
// history fetched.
|
||||
// Step 1: Deepen from the PR merge commit to the base branch head and the PR
|
||||
// topic branch head, so that the PR merge commit is no longer considered a
|
||||
// grafted commit.
|
||||
await gitUtils.deepenGitHistory();
|
||||
// Step 2: Fetch the base branch shallow history. This step ensures that the
|
||||
// base branch name is present in the local repository. Normally the base
|
||||
// branch name would be added by Step 4. However, if the base branch head is
|
||||
// an ancestor of the PR topic branch head, Step 4 would fail without doing
|
||||
// anything, so we need to fetch the base branch explicitly.
|
||||
await gitUtils.gitFetch(baseRef, ["--depth=1"]);
|
||||
// Step 3: Fetch the PR topic branch history, stopping when we reach commits
|
||||
// that are reachable from the base branch head.
|
||||
await gitUtils.gitFetch(headRef, [`--shallow-exclude=${baseRef}`]);
|
||||
// Step 4: Fetch the base branch history, stopping when we reach commits that
|
||||
// are reachable from the PR topic branch head.
|
||||
await gitUtils.gitFetch(baseRef, [`--shallow-exclude=${headRef}`]);
|
||||
// Step 5: Repack the history to remove the shallow grafts that were added by
|
||||
// the previous fetches. This step works around a bug that causes subsequent
|
||||
// deepening fetches to fail with "fatal: error in object: unshallow <SHA>".
|
||||
// See https://stackoverflow.com/q/63878612
|
||||
await gitUtils.gitRepack(["-d"]);
|
||||
// Step 6: Deepen the history so that we have the merge bases between the base
|
||||
// branch and the PR topic branch.
|
||||
await gitUtils.deepenGitHistory();
|
||||
// To compute the exact same diff as GitHub would compute for the PR, we need
|
||||
// to use the same merge base as GitHub. That is easy to do if there is only
|
||||
// one merge base, which is by far the most common case. If there are multiple
|
||||
// merge bases, we stop without producing a diff range.
|
||||
const mergeBases = await gitUtils.getAllGitMergeBases([baseRef, headRef]);
|
||||
logger.info(`Merge bases: ${mergeBases.join(", ")}`);
|
||||
if (mergeBases.length !== 1) {
|
||||
logger.info("Cannot compute diff range because baseRef and headRef " +
|
||||
`have ${mergeBases.length} merge bases (instead of exactly 1).`);
|
||||
return undefined;
|
||||
}
|
||||
const diffHunkHeaders = await gitUtils.getGitDiffHunkHeaders(mergeBases[0], headRef);
|
||||
if (diffHunkHeaders === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
const results = new Array();
|
||||
let changedFile = "";
|
||||
for (const line of diffHunkHeaders) {
|
||||
if (line.startsWith("+++ ")) {
|
||||
const filePath = gitUtils.decodeGitFilePath(line.substring(4));
|
||||
if (filePath.startsWith("b/")) {
|
||||
// The file was edited: track all hunks in the file
|
||||
changedFile = filePath.substring(2);
|
||||
}
|
||||
else if (filePath === "/dev/null") {
|
||||
// The file was deleted: skip all hunks in the file
|
||||
changedFile = "";
|
||||
}
|
||||
else {
|
||||
logger.warning(`Failed to parse diff hunk header line: ${line}`);
|
||||
return undefined;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (line.startsWith("@@ ")) {
|
||||
if (changedFile === "")
|
||||
continue;
|
||||
const match = line.match(/^@@ -\d+(?:,\d+)? \+(\d+)(?:,(\d+))? @@/);
|
||||
if (match === null) {
|
||||
logger.warning(`Failed to parse diff hunk header line: ${line}`);
|
||||
return undefined;
|
||||
}
|
||||
const startLine = parseInt(match[1], 10);
|
||||
const numLines = parseInt(match[2], 10);
|
||||
if (numLines === 0) {
|
||||
// The hunk was a deletion: skip it
|
||||
continue;
|
||||
}
|
||||
const endLine = startLine + (numLines || 1) - 1;
|
||||
results.push({
|
||||
path: path.join(checkoutPath, changedFile),
|
||||
startLine,
|
||||
endLine,
|
||||
});
|
||||
}
|
||||
}
|
||||
return results;
|
||||
}
|
||||
/**
|
||||
* Create an extension pack in the temporary directory that contains the file
|
||||
* line ranges that were added or modified in the pull request.
|
||||
*
|
||||
* @param logger
|
||||
* @param ranges The file line ranges, as returned by
|
||||
* `getPullRequestEditedDiffRanges`.
|
||||
* @returns The absolute path of the directory containing the extension pack, or
|
||||
* `undefined` if no extension pack was created.
|
||||
*/
|
||||
function writeDiffRangeDataExtensionPack(logger, ranges) {
|
||||
if (ranges === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
const diffRangeDir = path.join(actionsUtil.getTemporaryDirectory(), "pr-diff-range");
|
||||
fs.mkdirSync(diffRangeDir);
|
||||
fs.writeFileSync(path.join(diffRangeDir, "qlpack.yml"), `
|
||||
name: codeql-action/pr-diff-range
|
||||
version: 0.0.0
|
||||
library: true
|
||||
extensionTargets:
|
||||
codeql/util: '*'
|
||||
dataExtensions:
|
||||
- pr-diff-range.yml
|
||||
`);
|
||||
const header = `
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/util
|
||||
extensible: restrictAlertsTo
|
||||
data:
|
||||
`;
|
||||
let data = ranges
|
||||
.map((range) => ` - ["${range.path}", ${range.startLine}, ${range.endLine}]\n`)
|
||||
.join("");
|
||||
if (!data) {
|
||||
// Ensure that the data extension is not empty, so that a pull request with
|
||||
// no edited lines would exclude (instead of accepting) all alerts.
|
||||
data = ' - ["", 0, 0]\n';
|
||||
}
|
||||
const extensionContents = header + data;
|
||||
const extensionFilePath = path.join(diffRangeDir, "pr-diff-range.yml");
|
||||
fs.writeFileSync(extensionFilePath, extensionContents);
|
||||
logger.debug(`Wrote pr-diff-range extension pack to ${extensionFilePath}:\n${extensionContents}`);
|
||||
return diffRangeDir;
|
||||
}
|
||||
// Runs queries and creates sarif files in the given folder
|
||||
async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag, automationDetailsId, config, logger, features) {
|
||||
async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag, diffRangePackDir, automationDetailsId, config, logger, features) {
|
||||
const statusReport = {};
|
||||
const dataExtensionFlags = diffRangePackDir
|
||||
? [
|
||||
`--additional-packs=${diffRangePackDir}`,
|
||||
"--extension-packs=codeql-action/pr-diff-range",
|
||||
]
|
||||
: [];
|
||||
const sarifRunPropertyFlag = diffRangePackDir
|
||||
? "--sarif-run-property=incrementalMode=diff-informed"
|
||||
: undefined;
|
||||
const codeql = await (0, codeql_1.getCodeQL)(config.codeQLCmd);
|
||||
const queryFlags = [memoryFlag, threadsFlag];
|
||||
const queryFlags = [memoryFlag, threadsFlag, ...dataExtensionFlags];
|
||||
for (const language of config.languages) {
|
||||
try {
|
||||
const sarifFile = path.join(sarifFolder, `${language}.sarif`);
|
||||
@@ -186,13 +377,13 @@ async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag,
|
||||
}
|
||||
catch (e) {
|
||||
statusReport.analyze_failure_language = language;
|
||||
throw new CodeQLAnalysisError(statusReport, `Error running analysis for ${language}: ${util.wrapError(e).message}`, util.wrapError(e));
|
||||
throw new CodeQLAnalysisError(statusReport, `Error running analysis for ${language}: ${util.getErrorMessage(e)}`, util.wrapError(e));
|
||||
}
|
||||
}
|
||||
return statusReport;
|
||||
async function runInterpretResults(language, queries, sarifFile, enableDebugLogging) {
|
||||
const databasePath = util.getCodeQLDatabasePath(config, language);
|
||||
return await codeql.databaseInterpretResults(databasePath, queries, sarifFile, addSnippetsFlag, threadsFlag, enableDebugLogging ? "-vv" : "-v", automationDetailsId, config, features);
|
||||
return await codeql.databaseInterpretResults(databasePath, queries, sarifFile, addSnippetsFlag, threadsFlag, enableDebugLogging ? "-vv" : "-v", sarifRunPropertyFlag, automationDetailsId, config, features);
|
||||
}
|
||||
/** Get an object with all queries and their counts parsed from a SARIF file path. */
|
||||
function getPerQueryAlertCounts(sarifPath, log) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
26
lib/analyze.test.js
generated
26
lib/analyze.test.js
generated
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __importStar = (this && this.__importStar) || (function () {
|
||||
var ownKeys = function(o) {
|
||||
ownKeys = Object.getOwnPropertyNames || function (o) {
|
||||
var ar = [];
|
||||
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
||||
return ar;
|
||||
};
|
||||
return ownKeys(o);
|
||||
};
|
||||
return function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
})();
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
@@ -103,7 +113,7 @@ const util = __importStar(require("./util"));
|
||||
fs.mkdirSync(util.getCodeQLDatabasePath(config, language), {
|
||||
recursive: true,
|
||||
});
|
||||
const statusReport = await (0, analyze_1.runQueries)(tmpDir, memoryFlag, addSnippetsFlag, threadsFlag, undefined, config, (0, logging_1.getRunnerLogger)(true), (0, testing_utils_1.createFeatures)([feature_flags_1.Feature.QaTelemetryEnabled]));
|
||||
const statusReport = await (0, analyze_1.runQueries)(tmpDir, memoryFlag, addSnippetsFlag, threadsFlag, undefined, undefined, config, (0, logging_1.getRunnerLogger)(true), (0, testing_utils_1.createFeatures)([feature_flags_1.Feature.QaTelemetryEnabled]));
|
||||
t.deepEqual(Object.keys(statusReport).sort(), [
|
||||
`analyze_builtin_queries_${language}_duration_ms`,
|
||||
"event_reports",
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"analyze.test.js","sourceRoot":"","sources":["../src/analyze.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,8CAAuB;AACvB,6CAA+B;AAE/B,uCAAuC;AACvC,qCAAqC;AACrC,mDAA0C;AAC1C,2CAAuC;AACvC,uCAA4C;AAC5C,mDAKyB;AACzB,wDAA0C;AAC1C,6CAA+B;AAE/B,IAAA,0BAAU,EAAC,aAAI,CAAC,CAAC;AAEjB;;;;;GAKG;AACH,IAAA,aAAI,EAAC,sBAAsB,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IACvC,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;QAC5C,IAAA,gCAAgB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAEjC,MAAM,UAAU,GAAG,EAAE,CAAC;QACtB,MAAM,eAAe,GAAG,EAAE,CAAC;QAC3B,MAAM,WAAW,GAAG,EAAE,CAAC;QACvB,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,yBAAyB,CAAC,CAAC;QAEjD,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,MAAM,CAAC,oBA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ACf,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,kBAAkB,CAAC;aACrD,CAAC,CAAC;YACH,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,qBAAqB,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE;gBACzD,SAAS,EAAE,IAAI;aAChB,CAAC,CAAC;YAEH,MAAM,YAAY,GAAG,MAAM,IAAA,oBAAU,EACnC,MAAM,EACN,UAAU,EACV,eAAe,EACf,WAAW,EACX,SAAS,EACT,SAAS,EACT,MAAM,EACN,IAAA,yBAAe,EAAC,IAAI,CAAC,EACrB,IAAA,8BAAc,EAAC,CAAC,uBAAO,CAAC,kBAAkB,CAAC,CAAC,CAC7C,CAAC;YACF,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,IAAI,EAAE,EAAE;gBAC5C,2BAA2B,QAAQ,cAAc;gBACjD,eAAe;gBACf,qBAAqB,QAAQ,cAAc;aAC5C,CAAC,CAAC;YACH,KAAK,MAAM,WAAW,IAAI,YAAY,CAAC,aAAc,EAAE,CAAC;gBACtD,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,EAAE,mCAAmC,CAAC,CAAC;gBACpE,CAAC,CAAC,IAAI,CAAC,YAAY,IAAI,WAAW,CAAC,CAAC;gBACpC,CAAC,CAAC,IAAI,CAAC,aAAa,IAAI,WAAW,CAAC,UAAW,CAAC,CAAC;YACnD,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
||||
24
lib/api-client.js
generated
24
lib/api-client.js
generated
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __importStar = (this && this.__importStar) || (function () {
|
||||
var ownKeys = function(o) {
|
||||
ownKeys = Object.getOwnPropertyNames || function (o) {
|
||||
var ar = [];
|
||||
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
||||
return ar;
|
||||
};
|
||||
return ownKeys(o);
|
||||
};
|
||||
return function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
})();
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
|
||||
File diff suppressed because one or more lines are too long
24
lib/api-client.test.js
generated
24
lib/api-client.test.js
generated
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __importStar = (this && this.__importStar) || (function () {
|
||||
var ownKeys = function(o) {
|
||||
ownKeys = Object.getOwnPropertyNames || function (o) {
|
||||
var ar = [];
|
||||
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
||||
return ar;
|
||||
};
|
||||
return ownKeys(o);
|
||||
};
|
||||
return function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
})();
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"api-client.test.js","sourceRoot":"","sources":["../src/api-client.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wDAA0C;AAC1C,uEAAyD;AACzD,8CAAuB;AACvB,6CAA+B;AAE/B,4DAA8C;AAC9C,kDAAoC;AACpC,mDAA6C;AAC7C,6CAA+B;AAE/B,IAAA,0BAAU,EAAC,aAAI,CAAC,CAAC;AAEjB,aAAI,CAAC,UAAU,CAAC,GAAG,EAAE;IACnB,IAAI,CAAC,qBAAqB,CAAC,WAAW,CAAC,gBAAgB,EAAE,CAAC,CAAC;AAC7D,CAAC,CAAC,CAAC;AAEH,IAAA,aAAI,EAAC,cAAc,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IAC/B,MAAM,UAAU,GAAoB,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC7E,MAAM,UAAU,GAAoB,KAAK,CAAC,IAAI,EAAE,CAAC;IACjD,UAAU,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAE/B,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC7E,MAAM,oBAAoB,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC;IACrE,oBAAoB;SACjB,QAAQ,CAAC,mBAAmB,CAAC;SAC7B,OAAO,CAAC,yBAAyB,CAAC,CAAC;IACtC,oBAAoB;SACjB,QAAQ,CAAC,gBAA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SAAS,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,EAAE,SAAS,CAAC,CAAC;AAClE,CAAC,CAAC,CAAC"}
|
||||
@@ -1 +1 @@
|
||||
{ "maximumVersion": "3.15", "minimumVersion": "3.10" }
|
||||
{ "maximumVersion": "3.16", "minimumVersion": "3.11" }
|
||||
|
||||
26
lib/autobuild-action.js
generated
26
lib/autobuild-action.js
generated
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __importStar = (this && this.__importStar) || (function () {
|
||||
var ownKeys = function(o) {
|
||||
ownKeys = Object.getOwnPropertyNames || function (o) {
|
||||
var ar = [];
|
||||
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
||||
return ar;
|
||||
};
|
||||
return ownKeys(o);
|
||||
};
|
||||
return function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const core = __importStar(require("@actions/core"));
|
||||
const actions_util_1 = require("./actions-util");
|
||||
@@ -96,7 +106,7 @@ async function runWrapper() {
|
||||
await run();
|
||||
}
|
||||
catch (error) {
|
||||
core.setFailed(`autobuild action failed. ${(0, util_1.wrapError)(error).message}`);
|
||||
core.setFailed(`autobuild action failed. ${(0, util_1.getErrorMessage)(error)}`);
|
||||
}
|
||||
}
|
||||
void runWrapper();
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"autobuild-action.js","sourceRoot":"","sources":["../src/autobuild-action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AAEtC,iDAIwB;AACxB,6CAAgD;AAChD,2CAAwE;AACxE,qCAAqC;AACrC,iDAAmD;AACnD,+CAAuC;AAEvC,uCAAqD;AACrD,mDAMyB;AACzB,mDAAuD;AACvD,iCAMgB;AAShB,KAAK,UAAU,yBAAyB,CACtC,MAA0B,EAC1B,MAAc,EACd,SAAe,EACf,YAAsB,EACtB,eAAwB,EACxB,KAAa;IAEb,IAAA,4BAAqB,EAAC,IAAA,+BAAgB,GAAE,CAAC,CAAC;IAE1C,MAAM,MAAM,GAAG,IAAA,gCAAgB,EAAC,KAAK,EAAE,eAAe,CAAC,CAAC;IACxD,MAAM,gBAAgB,GAAG,MAAM,IAAA,sCAAsB,EACnD,0BAAU,CAAC,SAAS,EACpB,MAAM,EACN,SAAS,EACT,MAAM,EACN,MAAM,IAAA,qBAAc,EAAC,MAAM,CAAC,EAC5B,MAAM,EACN,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,KAAK,CACb,CAAC;IACF,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;QACnC,MAAM,YAAY,GAA0B;YAC1C,GAAG,gBAAgB;YACnB,mBAAmB,EAAE,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC;YAC3C,iBAAiB,EAAE,eAAe;SACnC,CAAC;QACF,MAAM,IAAA,gCAAgB,EAAC,YAAY,CAAC,CAAC;IACvC,CAAC;AACH,CAAC;AAED,KAAK,UAAU,GAAG;IAChB,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC;IAC7B,MAAM,MAAM,GAAG,IAAA,0BAAgB,GAAE,CAAC;IAClC,IAAI,MAA0B,CAAC;IAC/B,IAAI,eAAqC,CAAC;IAC1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AAE,CAClJ,CAAC;QACF,MAAM,yBAAyB,CAC7B,MAAM,EACN,MAAM,EACN,SAAS,EACT,SAAS,IAAI,EAAE,EACf,eAAe,EACf,KAAK,CACN,CAAC;QACF,OAAO;IACT,CAAC;IAED,IAAI,CAAC,cAAc,CAAC,oBAAM,CAAC,mCAAmC,EAAE,MAAM,CAAC,CAAC;IAExE,MAAM,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,IAAI,EAAE,CAAC,CAAC;AAC9E,CAAC;AAED,KAAK,UAAU,UAAU;IACvB,IAAI,CAAC;QACH,MAAM,GAAG,EAAE,CAAC;IACd,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,SAAS,CAAC,4BAA4B,IAAA,sBAAe,EAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACvE,CAAC;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}
|
||||
24
lib/autobuild.js
generated
24
lib/autobuild.js
generated
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __importStar = (this && this.__importStar) || (function () {
|
||||
var ownKeys = function(o) {
|
||||
ownKeys = Object.getOwnPropertyNames || function (o) {
|
||||
var ar = [];
|
||||
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
||||
return ar;
|
||||
};
|
||||
return ownKeys(o);
|
||||
};
|
||||
return function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.determineAutobuildLanguages = determineAutobuildLanguages;
|
||||
exports.setupCppAutobuild = setupCppAutobuild;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user