mirror of
https://github.com/github/codeql-action.git
synced 2026-01-01 20:20:07 +08:00
Compare commits
96 Commits
codeql-bun
...
v3.24.10
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4355270be1 | ||
|
|
3f041c51a5 | ||
|
|
7df281f2fe | ||
|
|
f421cda8e7 | ||
|
|
5f535debfe | ||
|
|
278465cdfb | ||
|
|
65e69c8a4b | ||
|
|
c037115ddf | ||
|
|
d3c32a84cb | ||
|
|
26540626a5 | ||
|
|
d3257627d7 | ||
|
|
978bdd643f | ||
|
|
2cc8bbd0e0 | ||
|
|
3bd9c3e65c | ||
|
|
dcf00b3fd4 | ||
|
|
f8dd543c81 | ||
|
|
6514cbb626 | ||
|
|
f06c933b16 | ||
|
|
eda4878a3d | ||
|
|
eeaea14a62 | ||
|
|
ec214df87a | ||
|
|
f4936c4c20 | ||
|
|
99c9897648 | ||
|
|
d7c4cc360c | ||
|
|
048b508a9d | ||
|
|
84ba7fb56d | ||
|
|
016720d81f | ||
|
|
f835435c19 | ||
|
|
58194bf81a | ||
|
|
956f09c2ef | ||
|
|
a99c6230dc | ||
|
|
155888c08e | ||
|
|
82b82e58c0 | ||
|
|
3c4b8bc120 | ||
|
|
a0a63a2dd4 | ||
|
|
3bd271cec3 | ||
|
|
70aa50b057 | ||
|
|
6ac57535de | ||
|
|
e20c273295 | ||
|
|
2bbafcdd7f | ||
|
|
7e30c622b0 | ||
|
|
ccc609bf1a | ||
|
|
a12b868bbc | ||
|
|
3d817349a4 | ||
|
|
ca4079b3a2 | ||
|
|
7cdd97256b | ||
|
|
1b1aada464 | ||
|
|
6505708f95 | ||
|
|
09d4101d2b | ||
|
|
a3ab02e645 | ||
|
|
9cf4574790 | ||
|
|
964f5e7811 | ||
|
|
9c0c35b370 | ||
|
|
c84e4c8e7b | ||
|
|
4aca720110 | ||
|
|
7f375aeb76 | ||
|
|
294b6df61d | ||
|
|
1aae1e7090 | ||
|
|
ea1261a218 | ||
|
|
66736a1775 | ||
|
|
dfb0fd0039 | ||
|
|
423a04bb2c | ||
|
|
6a57a861ab | ||
|
|
4b2a78627b | ||
|
|
05963f47d8 | ||
|
|
2b9b521560 | ||
|
|
1ecc2779e9 | ||
|
|
e28ae3a84c | ||
|
|
bddfc7c6d5 | ||
|
|
3edd1bf725 | ||
|
|
88a0b7abb3 | ||
|
|
88b28eb70d | ||
|
|
f055b5e672 | ||
|
|
0d680ab61c | ||
|
|
3d82264f40 | ||
|
|
e402144d13 | ||
|
|
a009e4d1af | ||
|
|
3b6ebfb5f8 | ||
|
|
8da95d81a8 | ||
|
|
070b05147a | ||
|
|
649f3e87e1 | ||
|
|
362c407426 | ||
|
|
f195496548 | ||
|
|
a7b089b87e | ||
|
|
ef507e1748 | ||
|
|
3ab4101902 | ||
|
|
a006adfa77 | ||
|
|
5e882999f1 | ||
|
|
69e120d747 | ||
|
|
5ec06c71f0 | ||
|
|
caf377935a | ||
|
|
532ca5486e | ||
|
|
2fa207a8b7 | ||
|
|
24c3eda0e3 | ||
|
|
27a6cd0a11 | ||
|
|
1bac334738 |
2
.github/actions/setup-swift/action.yml
vendored
2
.github/actions/setup-swift/action.yml
vendored
@@ -33,7 +33,7 @@ runs:
|
|||||||
fi
|
fi
|
||||||
echo "version=$VERSION" | tee -a $GITHUB_OUTPUT
|
echo "version=$VERSION" | tee -a $GITHUB_OUTPUT
|
||||||
|
|
||||||
- uses: swift-actions/setup-swift@cdbe0f7f4c77929b6580e71983e8606e55ffe7e4 # Please update the corresponding SHA in the CLI's CodeQL Action Integration Test.
|
- uses: swift-actions/setup-swift@e1dca7c4a36344146bbc2803f0d538462477bb37 # Please update the corresponding SHA in the CLI's CodeQL Action Integration Test.
|
||||||
if: runner.os == 'Linux' && steps.get_swift_version.outputs.version != 'null'
|
if: runner.os == 'Linux' && steps.get_swift_version.outputs.version != 'null'
|
||||||
with:
|
with:
|
||||||
swift-version: "${{ steps.get_swift_version.outputs.version }}"
|
swift-version: "${{ steps.get_swift_version.outputs.version }}"
|
||||||
|
|||||||
2
.github/workflows/__all-platform-bundle.yml
generated
vendored
2
.github/workflows/__all-platform-bundle.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
all-platform-bundle:
|
all-platform-bundle:
|
||||||
|
|||||||
2
.github/workflows/__analyze-ref-input.yml
generated
vendored
2
.github/workflows/__analyze-ref-input.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
analyze-ref-input:
|
analyze-ref-input:
|
||||||
|
|||||||
2
.github/workflows/__autobuild-action.yml
generated
vendored
2
.github/workflows/__autobuild-action.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
autobuild-action:
|
autobuild-action:
|
||||||
|
|||||||
2
.github/workflows/__build-mode-autobuild.yml
generated
vendored
2
.github/workflows/__build-mode-autobuild.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
build-mode-autobuild:
|
build-mode-autobuild:
|
||||||
|
|||||||
2
.github/workflows/__build-mode-manual.yml
generated
vendored
2
.github/workflows/__build-mode-manual.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
build-mode-manual:
|
build-mode-manual:
|
||||||
|
|||||||
2
.github/workflows/__build-mode-none.yml
generated
vendored
2
.github/workflows/__build-mode-none.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
build-mode-none:
|
build-mode-none:
|
||||||
|
|||||||
2
.github/workflows/__build-mode-rollback.yml
generated
vendored
2
.github/workflows/__build-mode-rollback.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
build-mode-rollback:
|
build-mode-rollback:
|
||||||
|
|||||||
2
.github/workflows/__config-export.yml
generated
vendored
2
.github/workflows/__config-export.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
config-export:
|
config-export:
|
||||||
|
|||||||
2
.github/workflows/__config-input.yml
generated
vendored
2
.github/workflows/__config-input.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
config-input:
|
config-input:
|
||||||
|
|||||||
2
.github/workflows/__cpp-deptrace-disabled.yml
generated
vendored
2
.github/workflows/__cpp-deptrace-disabled.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
cpp-deptrace-disabled:
|
cpp-deptrace-disabled:
|
||||||
|
|||||||
2
.github/workflows/__cpp-deptrace-enabled-on-macos.yml
generated
vendored
2
.github/workflows/__cpp-deptrace-enabled-on-macos.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
cpp-deptrace-enabled-on-macos:
|
cpp-deptrace-enabled-on-macos:
|
||||||
|
|||||||
2
.github/workflows/__cpp-deptrace-enabled.yml
generated
vendored
2
.github/workflows/__cpp-deptrace-enabled.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
cpp-deptrace-enabled:
|
cpp-deptrace-enabled:
|
||||||
|
|||||||
2
.github/workflows/__diagnostics-export.yml
generated
vendored
2
.github/workflows/__diagnostics-export.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
diagnostics-export:
|
diagnostics-export:
|
||||||
|
|||||||
2
.github/workflows/__export-file-baseline-information.yml
generated
vendored
2
.github/workflows/__export-file-baseline-information.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
export-file-baseline-information:
|
export-file-baseline-information:
|
||||||
|
|||||||
2
.github/workflows/__extractor-ram-threads.yml
generated
vendored
2
.github/workflows/__extractor-ram-threads.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
extractor-ram-threads:
|
extractor-ram-threads:
|
||||||
|
|||||||
2
.github/workflows/__go-custom-queries.yml
generated
vendored
2
.github/workflows/__go-custom-queries.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
go-custom-queries:
|
go-custom-queries:
|
||||||
|
|||||||
2
.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml
generated
vendored
2
.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
go-indirect-tracing-workaround-diagnostic:
|
go-indirect-tracing-workaround-diagnostic:
|
||||||
|
|||||||
2
.github/workflows/__go-indirect-tracing-workaround.yml
generated
vendored
2
.github/workflows/__go-indirect-tracing-workaround.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
go-indirect-tracing-workaround:
|
go-indirect-tracing-workaround:
|
||||||
|
|||||||
2
.github/workflows/__go-tracing-autobuilder.yml
generated
vendored
2
.github/workflows/__go-tracing-autobuilder.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
go-tracing-autobuilder:
|
go-tracing-autobuilder:
|
||||||
|
|||||||
2
.github/workflows/__go-tracing-custom-build-steps.yml
generated
vendored
2
.github/workflows/__go-tracing-custom-build-steps.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
go-tracing-custom-build-steps:
|
go-tracing-custom-build-steps:
|
||||||
|
|||||||
2
.github/workflows/__go-tracing-legacy-workflow.yml
generated
vendored
2
.github/workflows/__go-tracing-legacy-workflow.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
go-tracing-legacy-workflow:
|
go-tracing-legacy-workflow:
|
||||||
|
|||||||
2
.github/workflows/__init-with-registries.yml
generated
vendored
2
.github/workflows/__init-with-registries.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
init-with-registries:
|
init-with-registries:
|
||||||
|
|||||||
2
.github/workflows/__javascript-source-root.yml
generated
vendored
2
.github/workflows/__javascript-source-root.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
javascript-source-root:
|
javascript-source-root:
|
||||||
|
|||||||
2
.github/workflows/__language-aliases.yml
generated
vendored
2
.github/workflows/__language-aliases.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
language-aliases:
|
language-aliases:
|
||||||
|
|||||||
2
.github/workflows/__multi-language-autodetect.yml
generated
vendored
2
.github/workflows/__multi-language-autodetect.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
multi-language-autodetect:
|
multi-language-autodetect:
|
||||||
|
|||||||
2
.github/workflows/__packaging-codescanning-config-inputs-js.yml
generated
vendored
2
.github/workflows/__packaging-codescanning-config-inputs-js.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
packaging-codescanning-config-inputs-js:
|
packaging-codescanning-config-inputs-js:
|
||||||
|
|||||||
2
.github/workflows/__packaging-config-inputs-js.yml
generated
vendored
2
.github/workflows/__packaging-config-inputs-js.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
packaging-config-inputs-js:
|
packaging-config-inputs-js:
|
||||||
|
|||||||
2
.github/workflows/__packaging-config-js.yml
generated
vendored
2
.github/workflows/__packaging-config-js.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
packaging-config-js:
|
packaging-config-js:
|
||||||
|
|||||||
2
.github/workflows/__packaging-inputs-js.yml
generated
vendored
2
.github/workflows/__packaging-inputs-js.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
packaging-inputs-js:
|
packaging-inputs-js:
|
||||||
|
|||||||
2
.github/workflows/__remote-config.yml
generated
vendored
2
.github/workflows/__remote-config.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
remote-config:
|
remote-config:
|
||||||
|
|||||||
2
.github/workflows/__resolve-environment-action.yml
generated
vendored
2
.github/workflows/__resolve-environment-action.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
resolve-environment-action:
|
resolve-environment-action:
|
||||||
|
|||||||
2
.github/workflows/__rubocop-multi-language.yml
generated
vendored
2
.github/workflows/__rubocop-multi-language.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
rubocop-multi-language:
|
rubocop-multi-language:
|
||||||
|
|||||||
2
.github/workflows/__ruby.yml
generated
vendored
2
.github/workflows/__ruby.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
ruby:
|
ruby:
|
||||||
|
|||||||
2
.github/workflows/__scaling-reserved-ram.yml
generated
vendored
2
.github/workflows/__scaling-reserved-ram.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
scaling-reserved-ram:
|
scaling-reserved-ram:
|
||||||
|
|||||||
2
.github/workflows/__split-workflow.yml
generated
vendored
2
.github/workflows/__split-workflow.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
split-workflow:
|
split-workflow:
|
||||||
|
|||||||
2
.github/workflows/__submit-sarif-failure.yml
generated
vendored
2
.github/workflows/__submit-sarif-failure.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
submit-sarif-failure:
|
submit-sarif-failure:
|
||||||
|
|||||||
2
.github/workflows/__swift-custom-build.yml
generated
vendored
2
.github/workflows/__swift-custom-build.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
swift-custom-build:
|
swift-custom-build:
|
||||||
|
|||||||
2
.github/workflows/__test-autobuild-working-dir.yml
generated
vendored
2
.github/workflows/__test-autobuild-working-dir.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
test-autobuild-working-dir:
|
test-autobuild-working-dir:
|
||||||
|
|||||||
2
.github/workflows/__test-local-codeql.yml
generated
vendored
2
.github/workflows/__test-local-codeql.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
test-local-codeql:
|
test-local-codeql:
|
||||||
|
|||||||
2
.github/workflows/__test-proxy.yml
generated
vendored
2
.github/workflows/__test-proxy.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
test-proxy:
|
test-proxy:
|
||||||
|
|||||||
2
.github/workflows/__unset-environment.yml
generated
vendored
2
.github/workflows/__unset-environment.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
unset-environment:
|
unset-environment:
|
||||||
|
|||||||
2
.github/workflows/__upload-ref-sha-input.yml
generated
vendored
2
.github/workflows/__upload-ref-sha-input.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
upload-ref-sha-input:
|
upload-ref-sha-input:
|
||||||
|
|||||||
2
.github/workflows/__with-checkout-path.yml
generated
vendored
2
.github/workflows/__with-checkout-path.yml
generated
vendored
@@ -19,6 +19,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
with-checkout-path:
|
with-checkout-path:
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
upload-artifacts:
|
upload-artifacts:
|
||||||
@@ -50,9 +52,11 @@ jobs:
|
|||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
id: analysis
|
id: analysis
|
||||||
|
env:
|
||||||
|
# Forces a failure in this step.
|
||||||
|
CODEQL_ACTION_EXTRA_OPTIONS: '{ "database": { "finalize": ["--invalid-option"] } }'
|
||||||
with:
|
with:
|
||||||
expect-error: true
|
expect-error: true
|
||||||
ram: 1
|
|
||||||
download-and-check-artifacts:
|
download-and-check-artifacts:
|
||||||
name: Download and check debug artifacts after failure in analyze
|
name: Download and check debug artifacts after failure in analyze
|
||||||
needs: upload-artifacts
|
needs: upload-artifacts
|
||||||
|
|||||||
2
.github/workflows/debug-artifacts.yml
vendored
2
.github/workflows/debug-artifacts.yml
vendored
@@ -16,6 +16,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
upload-artifacts:
|
upload-artifacts:
|
||||||
|
|||||||
2
.github/workflows/expected-queries-runs.yml
vendored
2
.github/workflows/expected-queries-runs.yml
vendored
@@ -11,6 +11,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
2
.github/workflows/query-filters.yml
vendored
2
.github/workflows/query-filters.yml
vendored
@@ -11,6 +11,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
2
.github/workflows/test-codeql-bundle-all.yml
vendored
2
.github/workflows/test-codeql-bundle-all.yml
vendored
@@ -16,6 +16,8 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
test-codeql-bundle-all:
|
test-codeql-bundle-all:
|
||||||
|
|||||||
19
CHANGELOG.md
19
CHANGELOG.md
@@ -4,9 +4,24 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th
|
|||||||
|
|
||||||
Note that the only difference between `v2` and `v3` of the CodeQL Action is the node version they support, with `v3` running on node 20 while we continue to release `v2` to support running on node 16. For example `3.22.11` was the first `v3` release and is functionally identical to `2.22.11`. This approach ensures an easy way to track exactly which features are included in different versions, indicated by the minor and patch version numbers.
|
Note that the only difference between `v2` and `v3` of the CodeQL Action is the node version they support, with `v3` running on node 20 while we continue to release `v2` to support running on node 16. For example `3.22.11` was the first `v3` release and is functionally identical to `2.22.11`. This approach ensures an easy way to track exactly which features are included in different versions, indicated by the minor and patch version numbers.
|
||||||
|
|
||||||
## [UNRELEASED]
|
## 3.24.10 - 05 Apr 2024
|
||||||
|
|
||||||
No user facing changes.
|
- Update default CodeQL bundle version to 2.17.0. [#2219](https://github.com/github/codeql-action/pull/2219)
|
||||||
|
- Add a deprecation warning for customers using CodeQL version 2.12.5 and earlier. These versions of CodeQL were discontinued on 26 March 2024 alongside GitHub Enterprise Server 3.8, and will be unsupported by CodeQL Action versions 3.25.0 and later and versions 2.25.0 and later. [#2220](https://github.com/github/codeql-action/pull/2220)
|
||||||
|
- If you are using one of these versions, please update to CodeQL CLI version 2.12.6 or later. For instance, if you have specified a custom version of the CLI using the 'tools' input to the 'init' Action, you can remove this input to use the default version.
|
||||||
|
- Alternatively, if you want to continue using a version of the CodeQL CLI between 2.11.6 and 2.12.5, you can replace `github/codeql-action/*@v3` by `github/codeql-action/*@v3.24.10` and `github/codeql-action/*@v2` by `github/codeql-action/*@v2.24.10` in your code scanning workflow to ensure you continue using this version of the CodeQL Action.
|
||||||
|
|
||||||
|
## 3.24.9 - 22 Mar 2024
|
||||||
|
|
||||||
|
- Update default CodeQL bundle version to 2.16.5. [#2203](https://github.com/github/codeql-action/pull/2203)
|
||||||
|
|
||||||
|
## 3.24.8 - 18 Mar 2024
|
||||||
|
|
||||||
|
- Improve the ease of debugging extraction issues by increasing the verbosity of the extractor logs when running in debug mode. [#2195](https://github.com/github/codeql-action/pull/2195)
|
||||||
|
|
||||||
|
## 3.24.7 - 12 Mar 2024
|
||||||
|
|
||||||
|
- Update default CodeQL bundle version to 2.16.4. [#2185](https://github.com/github/codeql-action/pull/2185)
|
||||||
|
|
||||||
## 3.24.6 - 29 Feb 2024
|
## 3.24.6 - 29 Feb 2024
|
||||||
|
|
||||||
|
|||||||
@@ -7,25 +7,33 @@ inputs:
|
|||||||
required: false
|
required: false
|
||||||
# If not specified the Action will check in several places until it finds the CodeQL tools.
|
# If not specified the Action will check in several places until it finds the CodeQL tools.
|
||||||
languages:
|
languages:
|
||||||
description: |
|
description: >-
|
||||||
A comma-separated value of the languages to be analysed e.g. python,javascript
|
A comma-separated list of CodeQL languages to analyze.
|
||||||
|
|
||||||
|
Due to the performance benefit of parallelizing builds, we recommend specifying languages to
|
||||||
|
analyze using a matrix and providing `\$\{{ matrix.language }}` as this input.
|
||||||
|
|
||||||
|
For more information, see
|
||||||
|
https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#changing-the-languages-that-are-analyzed.
|
||||||
required: false
|
required: false
|
||||||
build-mode:
|
build-mode:
|
||||||
description: >-
|
description: >-
|
||||||
[Experimental, for internal testing only] The build mode that will be used to analyze the language.
|
The build mode that will be used to analyze the language. This input is only available when
|
||||||
This input is only available in single-language analyses.
|
analyzing a single CodeQL language per job, for example using a matrix.
|
||||||
|
|
||||||
Available build modes will differ based on the language being analyzed. One of:
|
Available build modes will differ based on the language being analyzed. One of:
|
||||||
|
|
||||||
- none: The database will be created without building the source code.
|
- `none`: The database will be created without building the source code.
|
||||||
Available for all interpreted languages and some compiled languages.
|
Available for all interpreted languages and some compiled languages.
|
||||||
- autobuild: The database will be created by attempting to automatically build the source code.
|
- `autobuild`: The database will be created by attempting to automatically build the source
|
||||||
|
code.
|
||||||
To use this build mode, ensure that your workflow calls the `autobuild` action
|
To use this build mode, ensure that your workflow calls the `autobuild` action
|
||||||
between the `init` and `analyze` steps.
|
between the `init` and `analyze` steps.
|
||||||
Available for all compiled languages.
|
Available for all compiled languages.
|
||||||
- manual: The database will be created by building the source code using a manually specified
|
- `manual`: The database will be created by building the source code using a manually
|
||||||
build command. To use this build mode, specify manual build steps in your workflow
|
specified build command. To use this build mode, specify manual build steps in
|
||||||
between the `init` and `analyze` steps. Available for all compiled languages.
|
your workflow between the `init` and `analyze` steps. Available for all
|
||||||
|
compiled languages.
|
||||||
required: false
|
required: false
|
||||||
token:
|
token:
|
||||||
description: GitHub token to use for authenticating with this instance of GitHub. To download custom packs from multiple registries, use the registries input.
|
description: GitHub token to use for authenticating with this instance of GitHub. To download custom packs from multiple registries, use the registries input.
|
||||||
@@ -70,7 +78,7 @@ inputs:
|
|||||||
required: false
|
required: false
|
||||||
packs:
|
packs:
|
||||||
description: >-
|
description: >-
|
||||||
[Experimental] Comma-separated list of packs to run. Reference a pack in the format `scope/name[@version]`. If `version` is not
|
Comma-separated list of packs to run. Reference a pack in the format `scope/name[@version]`. If `version` is not
|
||||||
specified, then the latest version of the pack is used. By default, this overrides the same setting in a
|
specified, then the latest version of the pack is used. By default, this overrides the same setting in a
|
||||||
configuration file; prefix with "+" to use both sets of packs.
|
configuration file; prefix with "+" to use both sets of packs.
|
||||||
|
|
||||||
|
|||||||
4
lib/actions-util.test.js
generated
4
lib/actions-util.test.js
generated
@@ -227,7 +227,9 @@ const util_1 = require("./util");
|
|||||||
const infoStub = sinon.stub(core, "info");
|
const infoStub = sinon.stub(core, "info");
|
||||||
process.env["GITHUB_EVENT_NAME"] = "pull_request";
|
process.env["GITHUB_EVENT_NAME"] = "pull_request";
|
||||||
process.env["GITHUB_SHA"] = "100912429fab4cb230e66ffb11e738ac5194e73a";
|
process.env["GITHUB_SHA"] = "100912429fab4cb230e66ffb11e738ac5194e73a";
|
||||||
await actionsUtil.determineMergeBaseCommitOid(path.join(__dirname, "../.."));
|
await (0, util_1.withTmpDir)(async (tmpDir) => {
|
||||||
|
await actionsUtil.determineMergeBaseCommitOid(tmpDir);
|
||||||
|
});
|
||||||
t.deepEqual(1, infoStub.callCount);
|
t.deepEqual(1, infoStub.callCount);
|
||||||
t.assert(infoStub.firstCall.args[0].startsWith("The checkout path provided to the action does not appear to be a git repository."));
|
t.assert(infoStub.firstCall.args[0].startsWith("The checkout path provided to the action does not appear to be a git repository."));
|
||||||
infoStub.restore();
|
infoStub.restore();
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
4
lib/analyze-action-post.js
generated
4
lib/analyze-action-post.js
generated
@@ -31,10 +31,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||||||
const core = __importStar(require("@actions/core"));
|
const core = __importStar(require("@actions/core"));
|
||||||
const analyzeActionPostHelper = __importStar(require("./analyze-action-post-helper"));
|
const analyzeActionPostHelper = __importStar(require("./analyze-action-post-helper"));
|
||||||
const debugArtifacts = __importStar(require("./debug-artifacts"));
|
const debugArtifacts = __importStar(require("./debug-artifacts"));
|
||||||
|
const uploadSarifActionPostHelper = __importStar(require("./upload-sarif-action-post-helper"));
|
||||||
const util_1 = require("./util");
|
const util_1 = require("./util");
|
||||||
async function runWrapper() {
|
async function runWrapper() {
|
||||||
try {
|
try {
|
||||||
await analyzeActionPostHelper.run(debugArtifacts.uploadSarifDebugArtifact);
|
await analyzeActionPostHelper.run(debugArtifacts.uploadSarifDebugArtifact);
|
||||||
|
// Also run the upload-sarif post action since we're potentially running
|
||||||
|
// the same steps in the analyze action.
|
||||||
|
await uploadSarifActionPostHelper.uploadArtifacts(debugArtifacts.uploadDebugArtifacts);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
core.setFailed(`analyze post-action step failed: ${(0, util_1.wrapError)(error).message}`);
|
core.setFailed(`analyze post-action step failed: ${(0, util_1.wrapError)(error).message}`);
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"analyze-action-post.js","sourceRoot":"","sources":["../src/analyze-action-post.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,oDAAsC;AAEtC,sFAAwE;AACxE,kEAAoD;AACpD,iCAAmC;AAEnC,KAAK,UAAU,UAAU;IACvB,IAAI,CAAC;QACH,MAAM,uBAAuB,CAAC,GAAG,CAAC,cAAc,CAAC,wBAAwB,CAAC,CAAC;IAC7E,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,SAAS,CACZ,oCAAoC,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAC/D,CAAC;IACJ,CAAC;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}
|
{"version":3,"file":"analyze-action-post.js","sourceRoot":"","sources":["../src/analyze-action-post.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,oDAAsC;AAEtC,sFAAwE;AACxE,kEAAoD;AACpD,+FAAiF;AACjF,iCAAmC;AAEnC,KAAK,UAAU,UAAU;IACvB,IAAI,CAAC;QACH,MAAM,uBAAuB,CAAC,GAAG,CAAC,cAAc,CAAC,wBAAwB,CAAC,CAAC;QAE3E,wEAAwE;QACxE,wCAAwC;QACxC,MAAM,2BAA2B,CAAC,eAAe,CAC/C,cAAc,CAAC,oBAAoB,CACpC,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,SAAS,CACZ,oCAAoC,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAC/D,CAAC;IACJ,CAAC;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}
|
||||||
7
lib/analyze-action.js
generated
7
lib/analyze-action.js
generated
@@ -51,6 +51,7 @@ const util = __importStar(require("./util"));
|
|||||||
async function sendStatusReport(startedAt, config, stats, error, trapCacheUploadTime, dbCreationTimings, didUploadTrapCaches, logger) {
|
async function sendStatusReport(startedAt, config, stats, error, trapCacheUploadTime, dbCreationTimings, didUploadTrapCaches, logger) {
|
||||||
const status = (0, status_report_1.getActionsStatus)(error, stats?.analyze_failure_language);
|
const status = (0, status_report_1.getActionsStatus)(error, stats?.analyze_failure_language);
|
||||||
const statusReportBase = await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.Analyze, status, startedAt, config, await util.checkDiskUsage(), logger, error?.message, error?.stack);
|
const statusReportBase = await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.Analyze, status, startedAt, config, await util.checkDiskUsage(), logger, error?.message, error?.stack);
|
||||||
|
if (statusReportBase !== undefined) {
|
||||||
const report = {
|
const report = {
|
||||||
...statusReportBase,
|
...statusReportBase,
|
||||||
...(stats || {}),
|
...(stats || {}),
|
||||||
@@ -67,6 +68,7 @@ async function sendStatusReport(startedAt, config, stats, error, trapCacheUpload
|
|||||||
else {
|
else {
|
||||||
await statusReport.sendStatusReport(report);
|
await statusReport.sendStatusReport(report);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// `expect-error` should only be set to a non-false value by the CodeQL Action PR checks.
|
// `expect-error` should only be set to a non-false value by the CodeQL Action PR checks.
|
||||||
function hasBadExpectErrorInput() {
|
function hasBadExpectErrorInput() {
|
||||||
@@ -145,7 +147,10 @@ async function run() {
|
|||||||
util.initializeEnvironment(actionsUtil.getActionVersion());
|
util.initializeEnvironment(actionsUtil.getActionVersion());
|
||||||
const logger = (0, logging_1.getActionsLogger)();
|
const logger = (0, logging_1.getActionsLogger)();
|
||||||
try {
|
try {
|
||||||
await statusReport.sendStatusReport(await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.Analyze, "starting", startedAt, config, await util.checkDiskUsage(logger), logger));
|
const statusReportBase = await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.Analyze, "starting", startedAt, config, await util.checkDiskUsage(logger), logger);
|
||||||
|
if (statusReportBase !== undefined) {
|
||||||
|
await statusReport.sendStatusReport(statusReportBase);
|
||||||
|
}
|
||||||
config = await (0, config_utils_1.getConfig)(actionsUtil.getTemporaryDirectory(), logger);
|
config = await (0, config_utils_1.getConfig)(actionsUtil.getTemporaryDirectory(), logger);
|
||||||
if (config === undefined) {
|
if (config === undefined) {
|
||||||
throw new Error("Config file could not be found at expected location. Has the 'init' action been called?");
|
throw new Error("Config file could not be found at expected location. Has the 'init' action been called?");
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
19
lib/analyze.js
generated
19
lib/analyze.js
generated
@@ -98,8 +98,25 @@ async function runExtraction(codeql, config, logger, features) {
|
|||||||
config.buildMode === config_utils_1.BuildMode.Autobuild) {
|
config.buildMode === config_utils_1.BuildMode.Autobuild) {
|
||||||
await (0, autobuild_1.setupCppAutobuild)(codeql, logger);
|
await (0, autobuild_1.setupCppAutobuild)(codeql, logger);
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
await codeql.extractUsingBuildMode(config, language);
|
await codeql.extractUsingBuildMode(config, language);
|
||||||
}
|
}
|
||||||
|
catch (e) {
|
||||||
|
if (config.buildMode === config_utils_1.BuildMode.Autobuild) {
|
||||||
|
const prefix = "We were unable to automatically build your code. " +
|
||||||
|
"Please change the build mode for this language to manual and specify build steps " +
|
||||||
|
"for your project. For more information, see " +
|
||||||
|
"https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/automatic-build-failed.";
|
||||||
|
const ErrorConstructor = e instanceof util.ConfigurationError
|
||||||
|
? util.ConfigurationError
|
||||||
|
: Error;
|
||||||
|
throw new ErrorConstructor(`${prefix} ${util.wrapError(e).message}`);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
await codeql.extractScannedLanguage(config, language);
|
await codeql.extractScannedLanguage(config, language);
|
||||||
}
|
}
|
||||||
@@ -138,7 +155,7 @@ async function finalizeDatabaseCreation(config, threadsFlag, memoryFlag, logger,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logger.startGroup(`Finalizing ${language}`);
|
logger.startGroup(`Finalizing ${language}`);
|
||||||
await codeql.finalizeDatabase(util.getCodeQLDatabasePath(config, language), threadsFlag, memoryFlag);
|
await codeql.finalizeDatabase(util.getCodeQLDatabasePath(config, language), threadsFlag, memoryFlag, config.debugMode);
|
||||||
logger.endGroup();
|
logger.endGroup();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
{ "maximumVersion": "3.13", "minimumVersion": "3.8" }
|
{ "maximumVersion": "3.13", "minimumVersion": "3.9" }
|
||||||
|
|||||||
7
lib/autobuild-action.js
generated
7
lib/autobuild-action.js
generated
@@ -37,12 +37,14 @@ async function sendCompletedStatusReport(config, logger, startedAt, allLanguages
|
|||||||
(0, util_1.initializeEnvironment)((0, actions_util_1.getActionVersion)());
|
(0, util_1.initializeEnvironment)((0, actions_util_1.getActionVersion)());
|
||||||
const status = (0, status_report_1.getActionsStatus)(cause, failingLanguage);
|
const status = (0, status_report_1.getActionsStatus)(cause, failingLanguage);
|
||||||
const statusReportBase = await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.Autobuild, status, startedAt, config, await (0, util_1.checkDiskUsage)(logger), logger, cause?.message, cause?.stack);
|
const statusReportBase = await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.Autobuild, status, startedAt, config, await (0, util_1.checkDiskUsage)(logger), logger, cause?.message, cause?.stack);
|
||||||
|
if (statusReportBase !== undefined) {
|
||||||
const statusReport = {
|
const statusReport = {
|
||||||
...statusReportBase,
|
...statusReportBase,
|
||||||
autobuild_languages: allLanguages.join(","),
|
autobuild_languages: allLanguages.join(","),
|
||||||
autobuild_failure: failingLanguage,
|
autobuild_failure: failingLanguage,
|
||||||
};
|
};
|
||||||
await (0, status_report_1.sendStatusReport)(statusReport);
|
await (0, status_report_1.sendStatusReport)(statusReport);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
async function run() {
|
async function run() {
|
||||||
const startedAt = new Date();
|
const startedAt = new Date();
|
||||||
@@ -51,7 +53,10 @@ async function run() {
|
|||||||
let currentLanguage;
|
let currentLanguage;
|
||||||
let languages;
|
let languages;
|
||||||
try {
|
try {
|
||||||
await (0, status_report_1.sendStatusReport)(await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.Autobuild, "starting", startedAt, config, await (0, util_1.checkDiskUsage)(logger), logger));
|
const statusReportBase = await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.Autobuild, "starting", startedAt, config, await (0, util_1.checkDiskUsage)(logger), logger);
|
||||||
|
if (statusReportBase !== undefined) {
|
||||||
|
await (0, status_report_1.sendStatusReport)(statusReportBase);
|
||||||
|
}
|
||||||
const gitHubVersion = await (0, api_client_1.getGitHubVersion)();
|
const gitHubVersion = await (0, api_client_1.getGitHubVersion)();
|
||||||
(0, util_1.checkGitHubVersionInRange)(gitHubVersion, logger);
|
(0, util_1.checkGitHubVersionInRange)(gitHubVersion, logger);
|
||||||
(0, util_1.checkActionVersion)((0, actions_util_1.getActionVersion)(), gitHubVersion);
|
(0, util_1.checkActionVersion)((0, actions_util_1.getActionVersion)(), gitHubVersion);
|
||||||
|
|||||||
@@ -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,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,GA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,wBAAY,EAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;YAC/C,CAAC;QACH,CAAC;IACH,CAAC;IAAC,OAAO,cAAc,EAAE,CAAC;QACxB,MAAM,KAAK,GAAG,IAAA,gBAAS,EAAC,cAAc,CAAC,CAAC;QACxC,IAAI,CAAC,SAAS,CACZ,kIAAkI,KAAK,CAAC,OAAO,EAAE,CAClJ,CAAC;QACF,MAAM,yBAAyB,CAC7B,MAAM,EACN,MAAM,EACN,SAAS,EACT,SAAS,IAAI,EAAE,EACf,eAAe,EACf,KAAK,CACN,CAAC;QACF,OAAO;IACT,CAAC;IAED,IAAI,CAAC,cAAc,CAAC,oBAAM,CAAC,mCAAmC,EAAE,MAAM,CAAC,CAAC;IAExE,MAAM,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,IAAI,EAAE,CAAC,CAAC;AAC9E,CAAC;AAED,KAAK,UAAU,UAAU;IACvB,IAAI,CAAC;QACH,MAAM,GAAG,EAAE,CAAC;IACd,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,SAAS,CAAC,4BAA4B,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}
|
||||||
2
lib/autobuild.js
generated
2
lib/autobuild.js
generated
@@ -141,7 +141,7 @@ async function runAutobuild(language, config, logger) {
|
|||||||
if (language === languages_1.Language.cpp) {
|
if (language === languages_1.Language.cpp) {
|
||||||
await setupCppAutobuild(codeQL, logger);
|
await setupCppAutobuild(codeQL, logger);
|
||||||
}
|
}
|
||||||
await codeQL.runAutobuild(language);
|
await codeQL.runAutobuild(language, config.debugMode);
|
||||||
if (language === languages_1.Language.go) {
|
if (language === languages_1.Language.go) {
|
||||||
core.exportVariable(environment_1.EnvVar.DID_AUTOBUILD_GOLANG, "true");
|
core.exportVariable(environment_1.EnvVar.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EAC1B,MAAc;IAEd,MAAM,CAAC,UAAU,CAAC,qCAAqC,QAAQ,OAAO,CAAC,CAAC;IACxE,MAAM,MAAM,GAAG,MAAM,IAAA,kBAAS,EAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACjD,IAAI,QAAQ,KAAK,oBAAQ,CAAC,GAAG,EAAE,CAAC;QAC9B,MAAM,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,CAAC;IACD,MAAM,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;IACtD,IAAI,QAAQ,KAAK,oBAAQ,CAAC,EAAE,EAAE,CAAC;QAC7B,IAAI,CAAC,cAAc,CAAC,oBAAM,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC;IAC3D,CAAC;IACD,MAAM,CAAC,QAAQ,EAAE,CAAC;AACpB,CAAC;AAfD,oCAeC"}
|
||||||
61
lib/cli-errors.js
generated
61
lib/cli-errors.js
generated
@@ -13,17 +13,30 @@ class CommandInvocationError extends Error {
|
|||||||
.map((x) => (x.includes(" ") ? `'${x}'` : x))
|
.map((x) => (x.includes(" ") ? `'${x}'` : x))
|
||||||
.join(" ");
|
.join(" ");
|
||||||
const fatalErrors = extractFatalErrors(stderr);
|
const fatalErrors = extractFatalErrors(stderr);
|
||||||
const lastLine = stderr.trim().split("\n").pop()?.trim();
|
const autobuildErrors = extractAutobuildErrors(stderr);
|
||||||
let error = fatalErrors
|
let message;
|
||||||
? ` and error was: ${fatalErrors.trim()}`
|
if (fatalErrors) {
|
||||||
: lastLine
|
message =
|
||||||
? ` and last log line was: ${lastLine}`
|
`Encountered a fatal error while running "${prettyCommand}". ` +
|
||||||
: "";
|
`Exit code was ${exitCode} and error was: ${fatalErrors.trim()} See the logs for more details.`;
|
||||||
if (error[error.length - 1] !== ".") {
|
|
||||||
error += ".";
|
|
||||||
}
|
}
|
||||||
super(`Encountered a fatal error while running "${prettyCommand}". ` +
|
else if (autobuildErrors) {
|
||||||
`Exit code was ${exitCode}${error} See the logs for more details.`);
|
const autobuildHelpLink = "https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/automatic-build-failed";
|
||||||
|
message =
|
||||||
|
"We were unable to automatically build your code. Please provide manual build steps. " +
|
||||||
|
`For more information, see ${autobuildHelpLink}. ` +
|
||||||
|
`Encountered the following error: ${autobuildErrors}`;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
let lastLine = stderr.trim().split("\n").pop()?.trim() || "";
|
||||||
|
if (lastLine[lastLine.length - 1] !== ".") {
|
||||||
|
lastLine += ".";
|
||||||
|
}
|
||||||
|
message =
|
||||||
|
`Encountered a fatal error while running "${prettyCommand}". ` +
|
||||||
|
`Exit code was ${exitCode} and last log line was: ${lastLine} See the logs for more details.`;
|
||||||
|
}
|
||||||
|
super(message);
|
||||||
this.exitCode = exitCode;
|
this.exitCode = exitCode;
|
||||||
this.stderr = stderr;
|
this.stderr = stderr;
|
||||||
this.stdout = stdout;
|
this.stdout = stdout;
|
||||||
@@ -88,26 +101,44 @@ function extractFatalErrors(error) {
|
|||||||
}
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
function extractAutobuildErrors(error) {
|
||||||
|
const pattern = /.*\[autobuild\] \[ERROR\] (.*)/gi;
|
||||||
|
let errorLines = [...error.matchAll(pattern)].map((match) => match[1]);
|
||||||
|
// Truncate if there are more than 10 matching lines.
|
||||||
|
if (errorLines.length > 10) {
|
||||||
|
errorLines = errorLines.slice(0, 10);
|
||||||
|
errorLines.push("(truncated)");
|
||||||
|
}
|
||||||
|
return errorLines.join("\n") || undefined;
|
||||||
|
}
|
||||||
function ensureEndsInPeriod(text) {
|
function ensureEndsInPeriod(text) {
|
||||||
return text[text.length - 1] === "." ? text : `${text}.`;
|
return text[text.length - 1] === "." ? text : `${text}.`;
|
||||||
}
|
}
|
||||||
/** Error messages from the CLI that we consider configuration errors and handle specially. */
|
/** Error messages from the CLI that we consider configuration errors and handle specially. */
|
||||||
var CliConfigErrorCategory;
|
var CliConfigErrorCategory;
|
||||||
(function (CliConfigErrorCategory) {
|
(function (CliConfigErrorCategory) {
|
||||||
|
CliConfigErrorCategory["GradleBuildFailed"] = "GradleBuildFailed";
|
||||||
CliConfigErrorCategory["IncompatibleWithActionVersion"] = "IncompatibleWithActionVersion";
|
CliConfigErrorCategory["IncompatibleWithActionVersion"] = "IncompatibleWithActionVersion";
|
||||||
CliConfigErrorCategory["InitCalledTwice"] = "InitCalledTwice";
|
CliConfigErrorCategory["InitCalledTwice"] = "InitCalledTwice";
|
||||||
CliConfigErrorCategory["InvalidSourceRoot"] = "InvalidSourceRoot";
|
CliConfigErrorCategory["InvalidSourceRoot"] = "InvalidSourceRoot";
|
||||||
|
CliConfigErrorCategory["MavenBuildFailed"] = "MavenBuildFailed";
|
||||||
CliConfigErrorCategory["NoBuildCommandAutodetected"] = "NoBuildCommandAutodetected";
|
CliConfigErrorCategory["NoBuildCommandAutodetected"] = "NoBuildCommandAutodetected";
|
||||||
CliConfigErrorCategory["NoBuildMethodAutodetected"] = "NoBuildMethodAutodetected";
|
CliConfigErrorCategory["NoBuildMethodAutodetected"] = "NoBuildMethodAutodetected";
|
||||||
CliConfigErrorCategory["NoSourceCodeSeen"] = "NoSourceCodeSeen";
|
CliConfigErrorCategory["NoSourceCodeSeen"] = "NoSourceCodeSeen";
|
||||||
CliConfigErrorCategory["NoSupportedBuildCommandSucceeded"] = "NoSupportedBuildCommandSucceeded";
|
CliConfigErrorCategory["NoSupportedBuildCommandSucceeded"] = "NoSupportedBuildCommandSucceeded";
|
||||||
CliConfigErrorCategory["NoSupportedBuildSystemDetected"] = "NoSupportedBuildSystemDetected";
|
CliConfigErrorCategory["NoSupportedBuildSystemDetected"] = "NoSupportedBuildSystemDetected";
|
||||||
|
CliConfigErrorCategory["SwiftBuildFailed"] = "SwiftBuildFailed";
|
||||||
})(CliConfigErrorCategory || (exports.CliConfigErrorCategory = CliConfigErrorCategory = {}));
|
})(CliConfigErrorCategory || (exports.CliConfigErrorCategory = CliConfigErrorCategory = {}));
|
||||||
/**
|
/**
|
||||||
* All of our caught CLI error messages that we handle specially: ie. if we
|
* All of our caught CLI error messages that we handle specially: ie. if we
|
||||||
* would like to categorize an error as a configuration error or not.
|
* would like to categorize an error as a configuration error or not.
|
||||||
*/
|
*/
|
||||||
exports.cliErrorsConfig = {
|
exports.cliErrorsConfig = {
|
||||||
|
[CliConfigErrorCategory.GradleBuildFailed]: {
|
||||||
|
cliErrorMessageCandidates: [
|
||||||
|
new RegExp("[autobuild] FAILURE: Build failed with an exception."),
|
||||||
|
],
|
||||||
|
},
|
||||||
// Version of CodeQL CLI is incompatible with this version of the CodeQL Action
|
// Version of CodeQL CLI is incompatible with this version of the CodeQL Action
|
||||||
[CliConfigErrorCategory.IncompatibleWithActionVersion]: {
|
[CliConfigErrorCategory.IncompatibleWithActionVersion]: {
|
||||||
cliErrorMessageCandidates: [
|
cliErrorMessageCandidates: [
|
||||||
@@ -124,6 +155,11 @@ exports.cliErrorsConfig = {
|
|||||||
[CliConfigErrorCategory.InvalidSourceRoot]: {
|
[CliConfigErrorCategory.InvalidSourceRoot]: {
|
||||||
cliErrorMessageCandidates: [new RegExp("Invalid source root")],
|
cliErrorMessageCandidates: [new RegExp("Invalid source root")],
|
||||||
},
|
},
|
||||||
|
[CliConfigErrorCategory.MavenBuildFailed]: {
|
||||||
|
cliErrorMessageCandidates: [
|
||||||
|
new RegExp("\\[autobuild\\] \\[ERROR\\] Failed to execute goal"),
|
||||||
|
],
|
||||||
|
},
|
||||||
[CliConfigErrorCategory.NoBuildCommandAutodetected]: {
|
[CliConfigErrorCategory.NoBuildCommandAutodetected]: {
|
||||||
cliErrorMessageCandidates: [
|
cliErrorMessageCandidates: [
|
||||||
new RegExp("Could not auto-detect a suitable build method"),
|
new RegExp("Could not auto-detect a suitable build method"),
|
||||||
@@ -162,6 +198,11 @@ exports.cliErrorsConfig = {
|
|||||||
new RegExp("No supported build system detected"),
|
new RegExp("No supported build system detected"),
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
[CliConfigErrorCategory.SwiftBuildFailed]: {
|
||||||
|
cliErrorMessageCandidates: [
|
||||||
|
new RegExp("\\[autobuilder/build\\] \\[build-command-failed\\] `autobuild` failed to run the build command"),
|
||||||
|
],
|
||||||
|
},
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* Check if the given CLI error or exit code, if applicable, apply to any known
|
* Check if the given CLI error or exit code, if applicable, apply to any known
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
109
lib/codeql.js
generated
109
lib/codeql.js
generated
@@ -56,15 +56,17 @@ const CODEQL_MINIMUM_VERSION = "2.11.6";
|
|||||||
/**
|
/**
|
||||||
* This version will shortly become the oldest version of CodeQL that the Action will run with.
|
* This version will shortly become the oldest version of CodeQL that the Action will run with.
|
||||||
*/
|
*/
|
||||||
const CODEQL_NEXT_MINIMUM_VERSION = "2.11.6";
|
const CODEQL_NEXT_MINIMUM_VERSION = "2.12.6";
|
||||||
/**
|
/**
|
||||||
* This is the version of GHES that was most recently deprecated.
|
* This is the version of GHES that was most recently deprecated.
|
||||||
*/
|
*/
|
||||||
const GHES_VERSION_MOST_RECENTLY_DEPRECATED = "3.7";
|
const GHES_VERSION_MOST_RECENTLY_DEPRECATED = "3.8";
|
||||||
/**
|
/**
|
||||||
* This is the deprecation date for the version of GHES that was most recently deprecated.
|
* This is the deprecation date for the version of GHES that was most recently deprecated.
|
||||||
*/
|
*/
|
||||||
const GHES_MOST_RECENT_DEPRECATION_DATE = "2023-11-08";
|
const GHES_MOST_RECENT_DEPRECATION_DATE = "2024-03-26";
|
||||||
|
/** The CLI verbosity level to use for extraction in debug mode. */
|
||||||
|
const EXTRACTION_DEBUG_MODE_VERBOSITY = "progress++";
|
||||||
/*
|
/*
|
||||||
* Deprecated in favor of ToolsFeature.
|
* Deprecated in favor of ToolsFeature.
|
||||||
*
|
*
|
||||||
@@ -110,6 +112,10 @@ exports.CODEQL_VERSION_ANALYSIS_SUMMARY_V2 = "2.15.0";
|
|||||||
* Versions 2.15.0+ of the CodeQL CLI support sub-language file coverage information.
|
* Versions 2.15.0+ of the CodeQL CLI support sub-language file coverage information.
|
||||||
*/
|
*/
|
||||||
exports.CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE = "2.15.0";
|
exports.CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE = "2.15.0";
|
||||||
|
/**
|
||||||
|
* Versions 2.15.2+ of the CodeQL CLI support the `--sarif-include-query-help` option.
|
||||||
|
*/
|
||||||
|
const CODEQL_VERSION_INCLUDE_QUERY_HELP = "2.15.2";
|
||||||
/**
|
/**
|
||||||
* Set up CodeQL CLI access.
|
* Set up CodeQL CLI access.
|
||||||
*
|
*
|
||||||
@@ -201,6 +207,7 @@ function setCodeQL(partialCodeql) {
|
|||||||
databaseExportDiagnostics: resolveFunction(partialCodeql, "databaseExportDiagnostics"),
|
databaseExportDiagnostics: resolveFunction(partialCodeql, "databaseExportDiagnostics"),
|
||||||
diagnosticsExport: resolveFunction(partialCodeql, "diagnosticsExport"),
|
diagnosticsExport: resolveFunction(partialCodeql, "diagnosticsExport"),
|
||||||
resolveExtractor: resolveFunction(partialCodeql, "resolveExtractor"),
|
resolveExtractor: resolveFunction(partialCodeql, "resolveExtractor"),
|
||||||
|
mergeResults: resolveFunction(partialCodeql, "mergeResults"),
|
||||||
};
|
};
|
||||||
return cachedCodeQL;
|
return cachedCodeQL;
|
||||||
}
|
}
|
||||||
@@ -291,7 +298,6 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||||||
else if (await util.codeQlVersionAbove(this, exports.CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE)) {
|
else if (await util.codeQlVersionAbove(this, exports.CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE)) {
|
||||||
extraArgs.push("--no-sublanguage-file-coverage");
|
extraArgs.push("--no-sublanguage-file-coverage");
|
||||||
}
|
}
|
||||||
try {
|
|
||||||
await runTool(cmd, [
|
await runTool(cmd, [
|
||||||
"database",
|
"database",
|
||||||
"init",
|
"init",
|
||||||
@@ -302,15 +308,8 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||||||
...extraArgs,
|
...extraArgs,
|
||||||
...getExtraOptionsFromEnv(["database", "init"]),
|
...getExtraOptionsFromEnv(["database", "init"]),
|
||||||
], { stdin: externalRepositoryToken });
|
], { stdin: externalRepositoryToken });
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
if (e instanceof Error) {
|
|
||||||
throw (0, cli_errors_1.wrapCliConfigurationError)(e);
|
|
||||||
}
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
async runAutobuild(language) {
|
async runAutobuild(language, enableDebugLogging) {
|
||||||
const autobuildCmd = path.join(await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh");
|
const autobuildCmd = path.join(await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh");
|
||||||
// Update JAVA_TOOL_OPTIONS to contain '-Dhttp.keepAlive=false'
|
// Update JAVA_TOOL_OPTIONS to contain '-Dhttp.keepAlive=false'
|
||||||
// This is because of an issue with Azure pipelines timing out connections after 4 minutes
|
// This is because of an issue with Azure pipelines timing out connections after 4 minutes
|
||||||
@@ -323,6 +322,11 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||||||
"-Dhttp.keepAlive=false",
|
"-Dhttp.keepAlive=false",
|
||||||
"-Dmaven.wagon.http.pool=false",
|
"-Dmaven.wagon.http.pool=false",
|
||||||
].join(" ");
|
].join(" ");
|
||||||
|
// Bump the verbosity of the autobuild command if we're in debug mode
|
||||||
|
if (enableDebugLogging) {
|
||||||
|
process.env[environment_1.EnvVar.CLI_VERBOSITY] =
|
||||||
|
process.env[environment_1.EnvVar.CLI_VERBOSITY] || EXTRACTION_DEBUG_MODE_VERBOSITY;
|
||||||
|
}
|
||||||
// On macOS, System Integrity Protection (SIP) typically interferes with
|
// On macOS, System Integrity Protection (SIP) typically interferes with
|
||||||
// CodeQL build tracing of protected binaries.
|
// CodeQL build tracing of protected binaries.
|
||||||
// The usual workaround is to prefix `$CODEQL_RUNNER` to build commands:
|
// The usual workaround is to prefix `$CODEQL_RUNNER` to build commands:
|
||||||
@@ -336,15 +340,7 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||||||
// When `DYLD_INSERT_LIBRARIES` is set in the environment for a step,
|
// When `DYLD_INSERT_LIBRARIES` is set in the environment for a step,
|
||||||
// the Actions runtime introduces its own workaround for SIP
|
// the Actions runtime introduces its own workaround for SIP
|
||||||
// (https://github.com/actions/runner/pull/416).
|
// (https://github.com/actions/runner/pull/416).
|
||||||
try {
|
|
||||||
await runTool(autobuildCmd);
|
await runTool(autobuildCmd);
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
if (e instanceof Error) {
|
|
||||||
throw (0, cli_errors_1.wrapCliConfigurationError)(e);
|
|
||||||
}
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
async extractScannedLanguage(config, language) {
|
async extractScannedLanguage(config, language) {
|
||||||
await runTool(cmd, [
|
await runTool(cmd, [
|
||||||
@@ -352,6 +348,7 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||||||
"trace-command",
|
"trace-command",
|
||||||
"--index-traceless-dbs",
|
"--index-traceless-dbs",
|
||||||
...(await getTrapCachingExtractorConfigArgsForLang(config, language)),
|
...(await getTrapCachingExtractorConfigArgsForLang(config, language)),
|
||||||
|
...getExtractionVerbosityArguments(config.debugMode),
|
||||||
...getExtraOptionsFromEnv(["database", "trace-command"]),
|
...getExtraOptionsFromEnv(["database", "trace-command"]),
|
||||||
util.getCodeQLDatabasePath(config, language),
|
util.getCodeQLDatabasePath(config, language),
|
||||||
]);
|
]);
|
||||||
@@ -362,29 +359,23 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||||||
"trace-command",
|
"trace-command",
|
||||||
"--use-build-mode",
|
"--use-build-mode",
|
||||||
...(await getTrapCachingExtractorConfigArgsForLang(config, language)),
|
...(await getTrapCachingExtractorConfigArgsForLang(config, language)),
|
||||||
|
...getExtractionVerbosityArguments(config.debugMode),
|
||||||
...getExtraOptionsFromEnv(["database", "trace-command"]),
|
...getExtraOptionsFromEnv(["database", "trace-command"]),
|
||||||
util.getCodeQLDatabasePath(config, language),
|
util.getCodeQLDatabasePath(config, language),
|
||||||
]);
|
]);
|
||||||
},
|
},
|
||||||
async finalizeDatabase(databasePath, threadsFlag, memoryFlag) {
|
async finalizeDatabase(databasePath, threadsFlag, memoryFlag, enableDebugLogging) {
|
||||||
const args = [
|
const args = [
|
||||||
"database",
|
"database",
|
||||||
"finalize",
|
"finalize",
|
||||||
"--finalize-dataset",
|
"--finalize-dataset",
|
||||||
threadsFlag,
|
threadsFlag,
|
||||||
memoryFlag,
|
memoryFlag,
|
||||||
|
...getExtractionVerbosityArguments(enableDebugLogging),
|
||||||
...getExtraOptionsFromEnv(["database", "finalize"]),
|
...getExtraOptionsFromEnv(["database", "finalize"]),
|
||||||
databasePath,
|
databasePath,
|
||||||
];
|
];
|
||||||
try {
|
|
||||||
await runTool(cmd, args);
|
await runTool(cmd, args);
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
if (e instanceof Error) {
|
|
||||||
throw (0, cli_errors_1.wrapCliConfigurationError)(e);
|
|
||||||
}
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
async resolveLanguages() {
|
async resolveLanguages() {
|
||||||
const codeqlArgs = [
|
const codeqlArgs = [
|
||||||
@@ -492,9 +483,9 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||||||
"--print-diagnostics-summary",
|
"--print-diagnostics-summary",
|
||||||
"--print-metrics-summary",
|
"--print-metrics-summary",
|
||||||
"--sarif-add-baseline-file-info",
|
"--sarif-add-baseline-file-info",
|
||||||
"--sarif-add-query-help",
|
|
||||||
"--sarif-group-rules-by-pack",
|
|
||||||
...(await getCodeScanningConfigExportArguments(config, this)),
|
...(await getCodeScanningConfigExportArguments(config, this)),
|
||||||
|
"--sarif-group-rules-by-pack",
|
||||||
|
...(await getCodeScanningQueryHelpArguments(this)),
|
||||||
...getExtraOptionsFromEnv(["database", "interpret-results"]),
|
...getExtraOptionsFromEnv(["database", "interpret-results"]),
|
||||||
];
|
];
|
||||||
if (automationDetailsId !== undefined) {
|
if (automationDetailsId !== undefined) {
|
||||||
@@ -512,17 +503,10 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||||||
else if (await util.codeQlVersionAbove(this, "2.12.4")) {
|
else if (await util.codeQlVersionAbove(this, "2.12.4")) {
|
||||||
codeqlArgs.push("--no-sarif-include-diagnostics");
|
codeqlArgs.push("--no-sarif-include-diagnostics");
|
||||||
}
|
}
|
||||||
if (
|
if ((await util.codeQlVersionAbove(this, exports.CODEQL_VERSION_ANALYSIS_SUMMARY_V2)) &&
|
||||||
// Analysis summary v2 links to the status page, so check the GHES version we're running on
|
!(0, tools_features_1.isSupportedToolsFeature)(await this.getVersion(), tools_features_1.ToolsFeature.AnalysisSummaryV2IsDefault)) {
|
||||||
// supports the status page.
|
|
||||||
(config.gitHubVersion.type !== util.GitHubVariant.GHES ||
|
|
||||||
semver.gte(config.gitHubVersion.version, "3.9.0")) &&
|
|
||||||
(await util.codeQlVersionAbove(this, exports.CODEQL_VERSION_ANALYSIS_SUMMARY_V2))) {
|
|
||||||
codeqlArgs.push("--new-analysis-summary");
|
codeqlArgs.push("--new-analysis-summary");
|
||||||
}
|
}
|
||||||
else if (await util.codeQlVersionAbove(this, exports.CODEQL_VERSION_ANALYSIS_SUMMARY_V2)) {
|
|
||||||
codeqlArgs.push("--no-new-analysis-summary");
|
|
||||||
}
|
|
||||||
codeqlArgs.push(databasePath);
|
codeqlArgs.push(databasePath);
|
||||||
if (querySuitePaths) {
|
if (querySuitePaths) {
|
||||||
codeqlArgs.push(...querySuitePaths);
|
codeqlArgs.push(...querySuitePaths);
|
||||||
@@ -674,6 +658,22 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||||||
}).exec();
|
}).exec();
|
||||||
return JSON.parse(extractorPath);
|
return JSON.parse(extractorPath);
|
||||||
},
|
},
|
||||||
|
async mergeResults(sarifFiles, outputFile, { mergeRunsFromEqualCategory = false, }) {
|
||||||
|
const args = [
|
||||||
|
"github",
|
||||||
|
"merge-results",
|
||||||
|
"--output",
|
||||||
|
outputFile,
|
||||||
|
...getExtraOptionsFromEnv(["github", "merge-results"]),
|
||||||
|
];
|
||||||
|
for (const sarifFile of sarifFiles) {
|
||||||
|
args.push("--sarif", sarifFile);
|
||||||
|
}
|
||||||
|
if (mergeRunsFromEqualCategory) {
|
||||||
|
args.push("--sarif-merge-runs-from-equal-category");
|
||||||
|
}
|
||||||
|
await runTool(cmd, args);
|
||||||
|
},
|
||||||
};
|
};
|
||||||
// To ensure that status reports include the CodeQL CLI version wherever
|
// To ensure that status reports include the CodeQL CLI version wherever
|
||||||
// possible, we want to call getVersion(), which populates the version value
|
// possible, we want to call getVersion(), which populates the version value
|
||||||
@@ -699,8 +699,7 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||||||
"version of the CLI using the 'tools' input to the 'init' Action, you can remove this " +
|
"version of the CLI using the 'tools' input to the 'init' Action, you can remove this " +
|
||||||
"input to use the default version.\n\n" +
|
"input to use the default version.\n\n" +
|
||||||
"Alternatively, if you want to continue using CodeQL CLI version " +
|
"Alternatively, if you want to continue using CodeQL CLI version " +
|
||||||
`${result.version}, you can replace 'github/codeql-action/*@v3' by ` +
|
`${result.version}, you can replace 'github/codeql-action/*@v${(0, actions_util_1.getActionVersion)().split(".")[0]}' by 'github/codeql-action/*@v${(0, actions_util_1.getActionVersion)()}' in your code scanning workflow to ` +
|
||||||
`'github/codeql-action/*@v${(0, actions_util_1.getActionVersion)()}' in your code scanning workflow to ` +
|
|
||||||
"continue using this version of the CodeQL Action.");
|
"continue using this version of the CodeQL Action.");
|
||||||
core.exportVariable(environment_1.EnvVar.SUPPRESS_DEPRECATED_SOON_WARNING, "true");
|
core.exportVariable(environment_1.EnvVar.SUPPRESS_DEPRECATED_SOON_WARNING, "true");
|
||||||
}
|
}
|
||||||
@@ -760,16 +759,16 @@ exports.getExtraOptions = getExtraOptions;
|
|||||||
* (2) It avoids us hitting the limit of how much data we can send in our
|
* (2) It avoids us hitting the limit of how much data we can send in our
|
||||||
* status reports on GitHub.com.
|
* status reports on GitHub.com.
|
||||||
*/
|
*/
|
||||||
const maxErrorSize = 20000;
|
const maxErrorSize = 20_000;
|
||||||
async function runTool(cmd, args = [], opts = {}) {
|
async function runTool(cmd, args = [], opts = {}) {
|
||||||
let output = "";
|
let stdout = "";
|
||||||
let error = "";
|
let stderr = "";
|
||||||
process.stdout.write(`[command]${cmd} ${args.join(" ")}\n`);
|
process.stdout.write(`[command]${cmd} ${args.join(" ")}\n`);
|
||||||
const exitCode = await new toolrunner.ToolRunner(cmd, args, {
|
const exitCode = await new toolrunner.ToolRunner(cmd, args, {
|
||||||
ignoreReturnCode: true,
|
ignoreReturnCode: true,
|
||||||
listeners: {
|
listeners: {
|
||||||
stdout: (data) => {
|
stdout: (data) => {
|
||||||
output += data.toString("utf8");
|
stdout += data.toString("utf8");
|
||||||
if (!opts.noStreamStdout) {
|
if (!opts.noStreamStdout) {
|
||||||
process.stdout.write(data);
|
process.stdout.write(data);
|
||||||
}
|
}
|
||||||
@@ -781,7 +780,7 @@ async function runTool(cmd, args = [], opts = {}) {
|
|||||||
// Eg: if we have 20,000 the start index should be 2.
|
// Eg: if we have 20,000 the start index should be 2.
|
||||||
readStartIndex = data.length - maxErrorSize + 1;
|
readStartIndex = data.length - maxErrorSize + 1;
|
||||||
}
|
}
|
||||||
error += data.toString("utf8", readStartIndex);
|
stderr += data.toString("utf8", readStartIndex);
|
||||||
// Mimic the standard behavior of the toolrunner by writing stderr to stdout
|
// Mimic the standard behavior of the toolrunner by writing stderr to stdout
|
||||||
process.stdout.write(data);
|
process.stdout.write(data);
|
||||||
},
|
},
|
||||||
@@ -790,9 +789,10 @@ async function runTool(cmd, args = [], opts = {}) {
|
|||||||
...(opts.stdin ? { input: Buffer.from(opts.stdin || "") } : {}),
|
...(opts.stdin ? { input: Buffer.from(opts.stdin || "") } : {}),
|
||||||
}).exec();
|
}).exec();
|
||||||
if (exitCode !== 0) {
|
if (exitCode !== 0) {
|
||||||
throw new cli_errors_1.CommandInvocationError(cmd, args, exitCode, error, output);
|
const e = new cli_errors_1.CommandInvocationError(cmd, args, exitCode, stderr, stdout);
|
||||||
|
throw (0, cli_errors_1.wrapCliConfigurationError)(e);
|
||||||
}
|
}
|
||||||
return output;
|
return stdout;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Generates a code scanning configuration that is to be used for a scan.
|
* Generates a code scanning configuration that is to be used for a scan.
|
||||||
@@ -911,4 +911,15 @@ async function isSublanguageFileCoverageEnabled(config, codeql) {
|
|||||||
semver.gte(config.gitHubVersion.version, "3.12.0")) &&
|
semver.gte(config.gitHubVersion.version, "3.12.0")) &&
|
||||||
(await util.codeQlVersionAbove(codeql, exports.CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE)));
|
(await util.codeQlVersionAbove(codeql, exports.CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE)));
|
||||||
}
|
}
|
||||||
|
async function getCodeScanningQueryHelpArguments(codeql) {
|
||||||
|
if (await util.codeQlVersionAbove(codeql, CODEQL_VERSION_INCLUDE_QUERY_HELP)) {
|
||||||
|
return ["--sarif-include-query-help=always"];
|
||||||
|
}
|
||||||
|
return ["--sarif-add-query-help"];
|
||||||
|
}
|
||||||
|
function getExtractionVerbosityArguments(enableDebugLogging) {
|
||||||
|
return enableDebugLogging
|
||||||
|
? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`]
|
||||||
|
: [];
|
||||||
|
}
|
||||||
//# sourceMappingURL=codeql.js.map
|
//# sourceMappingURL=codeql.js.map
|
||||||
File diff suppressed because one or more lines are too long
88
lib/codeql.test.js
generated
88
lib/codeql.test.js
generated
@@ -37,12 +37,14 @@ const yaml = __importStar(require("js-yaml"));
|
|||||||
const nock_1 = __importDefault(require("nock"));
|
const nock_1 = __importDefault(require("nock"));
|
||||||
const sinon = __importStar(require("sinon"));
|
const sinon = __importStar(require("sinon"));
|
||||||
const actionsUtil = __importStar(require("./actions-util"));
|
const actionsUtil = __importStar(require("./actions-util"));
|
||||||
|
const cli_errors_1 = require("./cli-errors");
|
||||||
const codeql = __importStar(require("./codeql"));
|
const codeql = __importStar(require("./codeql"));
|
||||||
const defaults = __importStar(require("./defaults.json"));
|
const defaults = __importStar(require("./defaults.json"));
|
||||||
const languages_1 = require("./languages");
|
const languages_1 = require("./languages");
|
||||||
const logging_1 = require("./logging");
|
const logging_1 = require("./logging");
|
||||||
const setup_codeql_1 = require("./setup-codeql");
|
const setup_codeql_1 = require("./setup-codeql");
|
||||||
const testing_utils_1 = require("./testing-utils");
|
const testing_utils_1 = require("./testing-utils");
|
||||||
|
const tools_features_1 = require("./tools-features");
|
||||||
const util = __importStar(require("./util"));
|
const util = __importStar(require("./util"));
|
||||||
const util_1 = require("./util");
|
const util_1 = require("./util");
|
||||||
(0, testing_utils_1.setupTests)(ava_1.default);
|
(0, testing_utils_1.setupTests)(ava_1.default);
|
||||||
@@ -492,7 +494,17 @@ const injectedConfigMacro = ava_1.default.macro({
|
|||||||
});
|
});
|
||||||
const NEW_ANALYSIS_SUMMARY_TEST_CASES = [
|
const NEW_ANALYSIS_SUMMARY_TEST_CASES = [
|
||||||
{
|
{
|
||||||
codeqlVersion: "2.15.0",
|
codeqlVersion: (0, testing_utils_1.makeVersionInfo)("2.15.0", {
|
||||||
|
[tools_features_1.ToolsFeature.AnalysisSummaryV2IsDefault]: true,
|
||||||
|
}),
|
||||||
|
githubVersion: {
|
||||||
|
type: util.GitHubVariant.DOTCOM,
|
||||||
|
},
|
||||||
|
flagPassed: false,
|
||||||
|
negativeFlagPassed: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
codeqlVersion: (0, testing_utils_1.makeVersionInfo)("2.15.0"),
|
||||||
githubVersion: {
|
githubVersion: {
|
||||||
type: util.GitHubVariant.DOTCOM,
|
type: util.GitHubVariant.DOTCOM,
|
||||||
},
|
},
|
||||||
@@ -500,7 +512,7 @@ const NEW_ANALYSIS_SUMMARY_TEST_CASES = [
|
|||||||
negativeFlagPassed: false,
|
negativeFlagPassed: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
codeqlVersion: "2.15.0",
|
codeqlVersion: (0, testing_utils_1.makeVersionInfo)("2.15.0"),
|
||||||
githubVersion: {
|
githubVersion: {
|
||||||
type: util.GitHubVariant.GHES,
|
type: util.GitHubVariant.GHES,
|
||||||
version: "3.9.0",
|
version: "3.9.0",
|
||||||
@@ -509,16 +521,7 @@ const NEW_ANALYSIS_SUMMARY_TEST_CASES = [
|
|||||||
negativeFlagPassed: false,
|
negativeFlagPassed: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
codeqlVersion: "2.15.0",
|
codeqlVersion: (0, testing_utils_1.makeVersionInfo)("2.14.6"),
|
||||||
githubVersion: {
|
|
||||||
type: util.GitHubVariant.GHES,
|
|
||||||
version: "3.8.6",
|
|
||||||
},
|
|
||||||
flagPassed: false,
|
|
||||||
negativeFlagPassed: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
codeqlVersion: "2.14.6",
|
|
||||||
githubVersion: {
|
githubVersion: {
|
||||||
type: util.GitHubVariant.DOTCOM,
|
type: util.GitHubVariant.DOTCOM,
|
||||||
},
|
},
|
||||||
@@ -531,12 +534,10 @@ for (const { codeqlVersion, flagPassed, githubVersion, negativeFlagPassed, } of
|
|||||||
? "--new-analysis-summary"
|
? "--new-analysis-summary"
|
||||||
: negativeFlagPassed
|
: negativeFlagPassed
|
||||||
? "--no-new-analysis-summary"
|
? "--no-new-analysis-summary"
|
||||||
: "nothing"} for CodeQL CLI v${codeqlVersion} and ${util.GitHubVariant[githubVersion.type]} ${githubVersion.version ? ` ${githubVersion.version}` : ""}`, async (t) => {
|
: "nothing"} for CodeQL version ${JSON.stringify(codeqlVersion)} and ${util.GitHubVariant[githubVersion.type]} ${githubVersion.version ? ` ${githubVersion.version}` : ""}`, async (t) => {
|
||||||
const runnerConstructorStub = stubToolRunnerConstructor();
|
const runnerConstructorStub = stubToolRunnerConstructor();
|
||||||
const codeqlObject = await codeql.getCodeQLForTesting();
|
const codeqlObject = await codeql.getCodeQLForTesting();
|
||||||
sinon
|
sinon.stub(codeqlObject, "getVersion").resolves(codeqlVersion);
|
||||||
.stub(codeqlObject, "getVersion")
|
|
||||||
.resolves((0, testing_utils_1.makeVersionInfo)(codeqlVersion));
|
|
||||||
// safeWhich throws because of the test CodeQL object.
|
// safeWhich throws because of the test CodeQL object.
|
||||||
sinon.stub(safeWhich, "safeWhich").resolves("");
|
sinon.stub(safeWhich, "safeWhich").resolves("");
|
||||||
await codeqlObject.databaseInterpretResults("", [], "", "", "", "-v", "", Object.assign({}, stubConfig, { gitHubVersion: githubVersion }), (0, testing_utils_1.createFeatures)([]), (0, logging_1.getRunnerLogger)(true));
|
await codeqlObject.databaseInterpretResults("", [], "", "", "", "-v", "", Object.assign({}, stubConfig, { gitHubVersion: githubVersion }), (0, testing_utils_1.createFeatures)([]), (0, logging_1.getRunnerLogger)(true));
|
||||||
@@ -553,7 +554,7 @@ for (const { codeqlVersion, flagPassed, githubVersion, negativeFlagPassed, } of
|
|||||||
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.11.6"));
|
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.11.6"));
|
||||||
// safeWhich throws because of the test CodeQL object.
|
// safeWhich throws because of the test CodeQL object.
|
||||||
sinon.stub(safeWhich, "safeWhich").resolves("");
|
sinon.stub(safeWhich, "safeWhich").resolves("");
|
||||||
await t.throwsAsync(async () => await codeqlObject.finalizeDatabase("", "", ""), {
|
await t.throwsAsync(async () => await codeqlObject.finalizeDatabase("", "", "", false), {
|
||||||
instanceOf: util.ConfigurationError,
|
instanceOf: util.ConfigurationError,
|
||||||
message: new RegExp("No code found during the build\\. Please see: " +
|
message: new RegExp("No code found during the build\\. Please see: " +
|
||||||
"https://gh\\.io/troubleshooting-code-scanning/no-source-code-seen-during-build\\."),
|
"https://gh\\.io/troubleshooting-code-scanning/no-source-code-seen-during-build\\."),
|
||||||
@@ -565,7 +566,7 @@ for (const { codeqlVersion, flagPassed, githubVersion, negativeFlagPassed, } of
|
|||||||
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.11.6"));
|
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.11.6"));
|
||||||
// safeWhich throws because of the test CodeQL object.
|
// safeWhich throws because of the test CodeQL object.
|
||||||
sinon.stub(safeWhich, "safeWhich").resolves("");
|
sinon.stub(safeWhich, "safeWhich").resolves("");
|
||||||
await t.throwsAsync(async () => await codeqlObject.finalizeDatabase("", "", ""), {
|
await t.throwsAsync(async () => await codeqlObject.finalizeDatabase("", "", "", false), {
|
||||||
instanceOf: util.ConfigurationError,
|
instanceOf: util.ConfigurationError,
|
||||||
message: new RegExp("No code found during the build\\. Please see: " +
|
message: new RegExp("No code found during the build\\. Please see: " +
|
||||||
"https://gh\\.io/troubleshooting-code-scanning/no-source-code-seen-during-build\\."),
|
"https://gh\\.io/troubleshooting-code-scanning/no-source-code-seen-during-build\\."),
|
||||||
@@ -579,7 +580,7 @@ for (const { codeqlVersion, flagPassed, githubVersion, negativeFlagPassed, } of
|
|||||||
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.12.4"));
|
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.12.4"));
|
||||||
// safeWhich throws because of the test CodeQL object.
|
// safeWhich throws because of the test CodeQL object.
|
||||||
sinon.stub(safeWhich, "safeWhich").resolves("");
|
sinon.stub(safeWhich, "safeWhich").resolves("");
|
||||||
await t.throwsAsync(async () => await codeqlObject.finalizeDatabase("db", "--threads=2", "--ram=2048"), {
|
await t.throwsAsync(async () => await codeqlObject.finalizeDatabase("db", "--threads=2", "--ram=2048", false), {
|
||||||
message: 'Encountered a fatal error while running "codeql-for-testing database finalize --finalize-dataset --threads=2 --ram=2048 db". ' +
|
message: 'Encountered a fatal error while running "codeql-for-testing database finalize --finalize-dataset --threads=2 --ram=2048 db". ' +
|
||||||
`Exit code was 32 and last log line was: ${cliMessage} See the logs for more details.`,
|
`Exit code was 32 and last log line was: ${cliMessage} See the logs for more details.`,
|
||||||
});
|
});
|
||||||
@@ -594,12 +595,57 @@ for (const { codeqlVersion, flagPassed, githubVersion, negativeFlagPassed, } of
|
|||||||
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.12.4"));
|
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.12.4"));
|
||||||
// safeWhich throws because of the test CodeQL object.
|
// safeWhich throws because of the test CodeQL object.
|
||||||
sinon.stub(safeWhich, "safeWhich").resolves("");
|
sinon.stub(safeWhich, "safeWhich").resolves("");
|
||||||
await t.throwsAsync(async () => await codeqlObject.finalizeDatabase("db", "--threads=2", "--ram=2048"), {
|
await t.throwsAsync(async () => await codeqlObject.finalizeDatabase("db", "--threads=2", "--ram=2048", false), {
|
||||||
instanceOf: util.ConfigurationError,
|
instanceOf: util.ConfigurationError,
|
||||||
message: new RegExp('Encountered a fatal error while running \\"codeql-for-testing database finalize --finalize-dataset --threads=2 --ram=2048 db\\"\\. ' +
|
message: new RegExp('Encountered a fatal error while running \\"codeql-for-testing database finalize --finalize-dataset --threads=2 --ram=2048 db\\"\\. ' +
|
||||||
`Exit code was 32 and error was: ${datasetImportError.replaceAll(".", "\\.")}\\. Context: ${heapError.replaceAll(".", "\\.")}\\. See the logs for more details\\.`),
|
`Exit code was 32 and error was: ${datasetImportError.replaceAll(".", "\\.")}\\. Context: ${heapError.replaceAll(".", "\\.")}\\. See the logs for more details\\.`),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
(0, ava_1.default)("runTool summarizes autobuilder errors", async (t) => {
|
||||||
|
const stderr = `
|
||||||
|
[2019-09-18 12:00:00] [autobuild] A non-error message
|
||||||
|
[2019-09-18 12:00:00] Untagged message
|
||||||
|
[2019-09-18 12:00:00] [autobuild] [ERROR] Start of the error message
|
||||||
|
[2019-09-18 12:00:00] [autobuild] An interspersed non-error message
|
||||||
|
[2019-09-18 12:00:01] [autobuild] [ERROR] Some more context about the error message
|
||||||
|
[2019-09-18 12:00:01] [autobuild] [ERROR] continued
|
||||||
|
[2019-09-18 12:00:01] [autobuild] [ERROR] and finished here.
|
||||||
|
[2019-09-18 12:00:01] [autobuild] A non-error message
|
||||||
|
`;
|
||||||
|
stubToolRunnerConstructor(1, stderr);
|
||||||
|
const codeqlObject = await codeql.getCodeQLForTesting();
|
||||||
|
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.12.4"));
|
||||||
|
sinon.stub(codeqlObject, "resolveExtractor").resolves("/path/to/extractor");
|
||||||
|
// safeWhich throws because of the test CodeQL object.
|
||||||
|
sinon.stub(safeWhich, "safeWhich").resolves("");
|
||||||
|
await t.throwsAsync(async () => await codeqlObject.runAutobuild(languages_1.Language.java, false), {
|
||||||
|
instanceOf: cli_errors_1.CommandInvocationError,
|
||||||
|
message: "We were unable to automatically build your code. Please provide manual build steps. " +
|
||||||
|
"For more information, see " +
|
||||||
|
"https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/automatic-build-failed. " +
|
||||||
|
"Encountered the following error: Start of the error message\n" +
|
||||||
|
" Some more context about the error message\n" +
|
||||||
|
" continued\n" +
|
||||||
|
" and finished here.",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
(0, ava_1.default)("runTool truncates long autobuilder errors", async (t) => {
|
||||||
|
const stderr = Array.from({ length: 20 }, (_, i) => `[2019-09-18 12:00:00] [autobuild] [ERROR] line${i + 1}`).join("\n");
|
||||||
|
stubToolRunnerConstructor(1, stderr);
|
||||||
|
const codeqlObject = await codeql.getCodeQLForTesting();
|
||||||
|
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.12.4"));
|
||||||
|
sinon.stub(codeqlObject, "resolveExtractor").resolves("/path/to/extractor");
|
||||||
|
// safeWhich throws because of the test CodeQL object.
|
||||||
|
sinon.stub(safeWhich, "safeWhich").resolves("");
|
||||||
|
await t.throwsAsync(async () => await codeqlObject.runAutobuild(languages_1.Language.java, false), {
|
||||||
|
instanceOf: cli_errors_1.CommandInvocationError,
|
||||||
|
message: "We were unable to automatically build your code. Please provide manual build steps. " +
|
||||||
|
"For more information, see " +
|
||||||
|
"https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/automatic-build-failed. " +
|
||||||
|
"Encountered the following error: " +
|
||||||
|
`${Array.from({ length: 10 }, (_, i) => `line${i + 1}`).join("\n")}\n(truncated)`,
|
||||||
|
});
|
||||||
|
});
|
||||||
(0, ava_1.default)("runTool outputs last line of stderr if fatal error could not be found", async (t) => {
|
(0, ava_1.default)("runTool outputs last line of stderr if fatal error could not be found", async (t) => {
|
||||||
const cliStderr = "line1\nline2\nline3\nline4\nline5";
|
const cliStderr = "line1\nline2\nline3\nline4\nline5";
|
||||||
stubToolRunnerConstructor(32, cliStderr);
|
stubToolRunnerConstructor(32, cliStderr);
|
||||||
@@ -607,7 +653,7 @@ for (const { codeqlVersion, flagPassed, githubVersion, negativeFlagPassed, } of
|
|||||||
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.12.4"));
|
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.12.4"));
|
||||||
// safeWhich throws because of the test CodeQL object.
|
// safeWhich throws because of the test CodeQL object.
|
||||||
sinon.stub(safeWhich, "safeWhich").resolves("");
|
sinon.stub(safeWhich, "safeWhich").resolves("");
|
||||||
await t.throwsAsync(async () => await codeqlObject.finalizeDatabase("db", "--threads=2", "--ram=2048"), {
|
await t.throwsAsync(async () => await codeqlObject.finalizeDatabase("db", "--threads=2", "--ram=2048", false), {
|
||||||
instanceOf: util.ConfigurationError,
|
instanceOf: util.ConfigurationError,
|
||||||
message: new RegExp('Encountered a fatal error while running \\"codeql-for-testing database finalize --finalize-dataset --threads=2 --ram=2048 db\\"\\. ' +
|
message: new RegExp('Encountered a fatal error while running \\"codeql-for-testing database finalize --finalize-dataset --threads=2 --ram=2048 db\\"\\. ' +
|
||||||
"Exit code was 32 and last log line was: line5\\. See the logs for more details\\."),
|
"Exit code was 32 and last log line was: line5\\. See the logs for more details\\."),
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"bundleVersion": "codeql-bundle-v2.16.3",
|
"bundleVersion": "codeql-bundle-v2.17.0",
|
||||||
"cliVersion": "2.16.3",
|
"cliVersion": "2.17.0",
|
||||||
"priorBundleVersion": "codeql-bundle-v2.16.2",
|
"priorBundleVersion": "codeql-bundle-v2.16.5",
|
||||||
"priorCliVersion": "2.16.2"
|
"priorCliVersion": "2.16.5"
|
||||||
}
|
}
|
||||||
|
|||||||
5
lib/environment.js
generated
5
lib/environment.js
generated
@@ -13,6 +13,11 @@ var EnvVar;
|
|||||||
EnvVar["ANALYZE_DID_COMPLETE_SUCCESSFULLY"] = "CODEQL_ACTION_ANALYZE_DID_COMPLETE_SUCCESSFULLY";
|
EnvVar["ANALYZE_DID_COMPLETE_SUCCESSFULLY"] = "CODEQL_ACTION_ANALYZE_DID_COMPLETE_SUCCESSFULLY";
|
||||||
/** Whether the `autobuild` Action completes successfully. */
|
/** Whether the `autobuild` Action completes successfully. */
|
||||||
EnvVar["AUTOBUILD_DID_COMPLETE_SUCCESSFULLY"] = "CODEQL_ACTION_AUTOBUILD_DID_COMPLETE_SUCCESSFULLY";
|
EnvVar["AUTOBUILD_DID_COMPLETE_SUCCESSFULLY"] = "CODEQL_ACTION_AUTOBUILD_DID_COMPLETE_SUCCESSFULLY";
|
||||||
|
/**
|
||||||
|
* The verbosity level of the CLI. One of the following: `errors`, `warnings`, `progress`,
|
||||||
|
* `progress+`, `progress++`, `progress+++`.
|
||||||
|
*/
|
||||||
|
EnvVar["CLI_VERBOSITY"] = "CODEQL_VERBOSITY";
|
||||||
/** Whether the CodeQL Action has invoked the Go autobuilder. */
|
/** Whether the CodeQL Action has invoked the Go autobuilder. */
|
||||||
EnvVar["DID_AUTOBUILD_GOLANG"] = "CODEQL_ACTION_DID_AUTOBUILD_GOLANG";
|
EnvVar["DID_AUTOBUILD_GOLANG"] = "CODEQL_ACTION_DID_AUTOBUILD_GOLANG";
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../src/environment.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,IAAY,MA+EX;AA/ED,WAAY,MAAM;IAChB,2DAA2D;IAC3D,+FAAqF,CAAA;IAErF,6DAA6D;IAC7D,mGAAyF,CAAA;IAEzF,gEAAgE;IAChE,qEAA2D,CAAA;IAE3D;;;OAGG;IACH,yFAA+E,CAAA;IAE/E;;;OAGG;IACH,yEAA+D,CAAA;IAE/D,gFAAgF;IAChF,6DAAmD,CAAA;IAEnD;;;OAGG;IACH,uEAA6D,CAAA;IAE7D,gEAAgE;IAChE,mEAAyD,CAAA;IAEzD,kFAAkF;IAClF,mFAAyE,CAAA;IAEzE,4CAA4C;IAC5C,4DAAkD,CAAA;IAElD,6CAA6C;IAC7C,uCAA6B,CAAA;IAE7B,+EAA+E;IAC/E,iDAAuC,CAAA;IAEvC,mEAAyD,CAAA;IAEzD;;;OAGG;IACH,2FAAiF,CAAA;IAEjF,mFAAmF;IACnF,6FAAmF,CAAA;IAEnF,qFAAqF;IACrF,+CAAqC,CAAA;IAErC,mEAAyD,CAAA;IAEzD,kEAAkE;IAClE,2CAAiC,CAAA;IAEjC;;;;;;OAMG;IACH,4DAAkD,CAAA;IAElD;;;OAGG;IACH,wDAA8C,CAAA;AAChD,CAAC,EA/EW,MAAM,sBAAN,MAAM,QA+EjB"}
|
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../src/environment.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,IAAY,MAqFX;AArFD,WAAY,MAAM;IAChB,2DAA2D;IAC3D,+FAAqF,CAAA;IAErF,6DAA6D;IAC7D,mGAAyF,CAAA;IAEzF;;;OAGG;IACH,4CAAkC,CAAA;IAElC,gEAAgE;IAChE,qEAA2D,CAAA;IAE3D;;;OAGG;IACH,yFAA+E,CAAA;IAE/E;;;OAGG;IACH,yEAA+D,CAAA;IAE/D,gFAAgF;IAChF,6DAAmD,CAAA;IAEnD;;;OAGG;IACH,uEAA6D,CAAA;IAE7D,gEAAgE;IAChE,mEAAyD,CAAA;IAEzD,kFAAkF;IAClF,mFAAyE,CAAA;IAEzE,4CAA4C;IAC5C,4DAAkD,CAAA;IAElD,6CAA6C;IAC7C,uCAA6B,CAAA;IAE7B,+EAA+E;IAC/E,iDAAuC,CAAA;IAEvC,mEAAyD,CAAA;IAEzD;;;OAGG;IACH,2FAAiF,CAAA;IAEjF,mFAAmF;IACnF,6FAAmF,CAAA;IAEnF,qFAAqF;IACrF,+CAAqC,CAAA;IAErC,mEAAyD,CAAA;IAEzD,kEAAkE;IAClE,2CAAiC,CAAA;IAEjC;;;;;;OAMG;IACH,4DAAkD,CAAA;IAElD;;;OAGG;IACH,wDAA8C,CAAA;AAChD,CAAC,EArFW,MAAM,sBAAN,MAAM,QAqFjB"}
|
||||||
7
lib/feature-flags.js
generated
7
lib/feature-flags.js
generated
@@ -48,6 +48,7 @@ exports.CODEQL_VERSION_FINE_GRAINED_PARALLELISM = "2.15.1";
|
|||||||
*/
|
*/
|
||||||
var Feature;
|
var Feature;
|
||||||
(function (Feature) {
|
(function (Feature) {
|
||||||
|
Feature["CliSarifMerge"] = "cli_sarif_merge_enabled";
|
||||||
Feature["CppDependencyInstallation"] = "cpp_dependency_installation_enabled";
|
Feature["CppDependencyInstallation"] = "cpp_dependency_installation_enabled";
|
||||||
Feature["CppTrapCachingEnabled"] = "cpp_trap_caching_enabled";
|
Feature["CppTrapCachingEnabled"] = "cpp_trap_caching_enabled";
|
||||||
Feature["DisableJavaBuildlessEnabled"] = "disable_java_buildless_enabled";
|
Feature["DisableJavaBuildlessEnabled"] = "disable_java_buildless_enabled";
|
||||||
@@ -58,6 +59,12 @@ var Feature;
|
|||||||
Feature["QaTelemetryEnabled"] = "qa_telemetry_enabled";
|
Feature["QaTelemetryEnabled"] = "qa_telemetry_enabled";
|
||||||
})(Feature || (exports.Feature = Feature = {}));
|
})(Feature || (exports.Feature = Feature = {}));
|
||||||
exports.featureConfig = {
|
exports.featureConfig = {
|
||||||
|
[Feature.CliSarifMerge]: {
|
||||||
|
envVar: "CODEQL_ACTION_CLI_SARIF_MERGE",
|
||||||
|
// This is guarded by a `supportsFeature` check rather than by a version check.
|
||||||
|
minimumVersion: undefined,
|
||||||
|
defaultValue: false,
|
||||||
|
},
|
||||||
[Feature.CppDependencyInstallation]: {
|
[Feature.CppDependencyInstallation]: {
|
||||||
envVar: "CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES",
|
envVar: "CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES",
|
||||||
minimumVersion: "2.15.0",
|
minimumVersion: "2.15.0",
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
1
lib/fingerprints.js
generated
1
lib/fingerprints.js
generated
@@ -238,6 +238,7 @@ exports.resolveUriToFile = resolveUriToFile;
|
|||||||
// Compute fingerprints for results in the given sarif file
|
// Compute fingerprints for results in the given sarif file
|
||||||
// and return an updated sarif file contents.
|
// and return an updated sarif file contents.
|
||||||
async function addFingerprints(sarif, sourceRoot, logger) {
|
async function addFingerprints(sarif, sourceRoot, logger) {
|
||||||
|
logger.info("Adding fingerprints to SARIF file. For more information, see https://docs.github.com/en/enterprise-cloud@latest/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning#providing-data-to-track-code-scanning-alerts-across-runs");
|
||||||
// Gather together results for the same file and construct
|
// Gather together results for the same file and construct
|
||||||
// callbacks to accept hashes for that file and update the location
|
// callbacks to accept hashes for that file and update the location
|
||||||
const callbacksByFile = {};
|
const callbacksByFile = {};
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
9
lib/init-action-post.js
generated
9
lib/init-action-post.js
generated
@@ -59,16 +59,23 @@ async function runWrapper() {
|
|||||||
catch (unwrappedError) {
|
catch (unwrappedError) {
|
||||||
const error = (0, util_1.wrapError)(unwrappedError);
|
const error = (0, util_1.wrapError)(unwrappedError);
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
await (0, status_report_1.sendStatusReport)(await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.InitPost, (0, status_report_1.getActionsStatus)(error), startedAt, config, await (0, util_1.checkDiskUsage)(), logger, error.message, error.stack));
|
const statusReportBase = await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.InitPost, (0, status_report_1.getActionsStatus)(error), startedAt, config, await (0, util_1.checkDiskUsage)(), logger, error.message, error.stack);
|
||||||
|
if (statusReportBase !== undefined) {
|
||||||
|
await (0, status_report_1.sendStatusReport)(statusReportBase);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const jobStatus = initActionPostHelper.getFinalJobStatus();
|
||||||
|
logger.info(`CodeQL job status was ${(0, status_report_1.getJobStatusDisplayName)(jobStatus)}.`);
|
||||||
const statusReportBase = await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.InitPost, "success", startedAt, config, await (0, util_1.checkDiskUsage)(), logger);
|
const statusReportBase = await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.InitPost, "success", startedAt, config, await (0, util_1.checkDiskUsage)(), logger);
|
||||||
|
if (statusReportBase !== undefined) {
|
||||||
const statusReport = {
|
const statusReport = {
|
||||||
...statusReportBase,
|
...statusReportBase,
|
||||||
...uploadFailedSarifResult,
|
...uploadFailedSarifResult,
|
||||||
job_status: initActionPostHelper.getFinalJobStatus(),
|
job_status: initActionPostHelper.getFinalJobStatus(),
|
||||||
};
|
};
|
||||||
await (0, status_report_1.sendStatusReport)(statusReport);
|
await (0, status_report_1.sendStatusReport)(statusReport);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
void runWrapper();
|
void runWrapper();
|
||||||
//# sourceMappingURL=init-action-post.js.map
|
//# sourceMappingURL=init-action-post.js.map
|
||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"init-action-post.js","sourceRoot":"","sources":["../src/init-action-post.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,oDAAsC;AAEtC,iDAAuE;AACvE,6CAAgD;AAChD,iDAAmD;AACnD,kEAAoD;AACpD,mDAA2C;AAC3C,gFAAkE;AAClE,uCAA6C;AAC7C,6CAAkD;AAClD,mDAMyB;AACzB,iCAKgB;AAOhB,KAAK,UAAU,UAAU;IACvB,MAAM,MAAM,GAAG,IAAA,0BAAgB,GAAE,CAAC;IAClC,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC;IAC7B,IAAI,MAA0B,CAAC;IAC/B,IAAI,uBAES,CAAC;IACd,IAAI,CAAC;QACH,MAAM,aAAa,GAAG,MAAM,IAAA,6BAAgB,GAAE,CAAC;QAC/C,IAAA,gCAAyB,EAAC,aAAa,EAAE,MAAM,CAAC,CAAC;QAEjD,MAAM,aAAa,GAAG,IAAA,+BAAkB,EACtC,IAAA,0BAAmB,EAAC,mBAAmB,CAAC,CACzC,CAAC;QACF,MAAM,QAAQ,GAAG,IAAI,wBAAQ,CAC3B,aAAa,EACb,aAAa,EACb,IAAA,oCAAqB,GAAE,EACvB,MAAM,CACP,CAAC;QAEF,MAAM,GAAG,MAAM,IAAA,wBAAS,EAAC,IAAA,oCAAqB,GAAE,EAAE,MAAM,CAAC,CAAC;QAC1D,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,MAAM,CAAC,OAAO,CACZ,iGAAiG,CAClG,CAAC;YACF,OAAO;QACT,CAAC;QAED,uBAAuB,GAAG,MAAM,oBAAoB,CAAC,GAAG,CACtD,cAAc,CAAC,iCAAiC,EAChD,cAAc,CAAC,uBAAuB,EACtC,6BAAc,EACd,MAAM,EACN,aAAa,EACb,QAAQ,EACR,MAAM,CACP,CAAC;IACJ,CAAC;IAAC,OAAO,cAAc,EAAE,CAAC;QACxB,MAAM,KAAK,GAAG,IAAA,gBAAS,EAAC,cAAc,CAAC,CAAC;QACxC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAE9B,MAAM,IAAA,gCAAgB,EACpB,MAAM,IAAA,sCAAsB,EAC1B,0BAAU,CAAC,QAAQ,EACnB,IAAA,gCAAgB,EAAC,KAAK,CAAC,EACvB,SAAS,EACT,MAAM,EACN,MAAM,IAAA,qBAAc,GAAE,EACtB,MAAM,EACN,KAAK,CAAC,OAAO,EACb,KAAK,CAAC,KAAK,CACZ,CACF,CAAC;QACF,OAAO;IACT,CAAC;IACD,MAAM,gBAAgB,GAAG,MAAM,IAAA,sCAAsB,EACnD,0BAAU,CAAC,QAAQ,EACnB,SAAS,EACT,SAAS,EACT,MAAM,EACN,MAAM,IAAA,qBAAc,GAAE,EACtB,MAAM,CACP,CAAC;IACF,MAAM,YAAY,GAAyB;QACzC,GAAG,gBAAgB;QACnB,GAAG,uBAAuB;QAC1B,UAAU,EAAE,oBAAoB,CAAC,iBAAiB,EAAE;KACrD,CAAC;IACF,MAAM,IAAA,gCAAgB,EAAC,YAAY,CAAC,CAAC;AACvC,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}
|
{"version":3,"file":"init-action-post.js","sourceRoot":"","sources":["../src/init-action-post.ts"],"names":[],"mappings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C,OAAO,CAAC,CAAC;QAE9B,MAAM,gBAAgB,GAAG,MAAM,IAAA,sCAAsB,EACnD,0BAAU,CAAC,QAAQ,EACnB,IAAA,gCAAgB,EAAC,KAAK,CAAC,EACvB,SAAS,EACT,MAAM,EACN,MAAM,IAAA,qBAAc,GAAE,EACtB,MAAM,EACN,KAAK,CAAC,OAAO,EACb,KAAK,CAAC,KAAK,CACZ,CAAC;QACF,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;YACnC,MAAM,IAAA,gCAAgB,EAAC,gBAAgB,CAAC,CAAC;QAC3C,CAAC;QACD,OAAO;IACT,CAAC;IACD,MAAM,SAAS,GAAG,oBAAoB,CAAC,iBAAiB,EAAE,CAAC;IAC3D,MAAM,CAAC,IAAI,CAAC,yBAAyB,IAAA,uCAAuB,EAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAE5E,MAAM,gBAAgB,GAAG,MAAM,IAAA,sCAAsB,EACnD,0BAAU,CAAC,QAAQ,EACnB,SAAS,EACT,SAAS,EACT,MAAM,EACN,MAAM,IAAA,qBAAc,GAAE,EACtB,MAAM,CACP,CAAC;IACF,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;QACnC,MAAM,YAAY,GAAyB;YACzC,GAAG,gBAAgB;YACnB,GAAG,uBAAuB;YAC1B,UAAU,EAAE,oBAAoB,CAAC,iBAAiB,EAAE;SACrD,CAAC;QACF,MAAM,IAAA,gCAAgB,EAAC,YAAY,CAAC,CAAC;IACvC,CAAC;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}
|
||||||
13
lib/init-action.js
generated
13
lib/init-action.js
generated
@@ -44,6 +44,9 @@ const util_1 = require("./util");
|
|||||||
const workflow_1 = require("./workflow");
|
const workflow_1 = require("./workflow");
|
||||||
async function sendCompletedStatusReport(startedAt, config, toolsDownloadDurationMs, toolsFeatureFlagsValid, toolsSource, toolsVersion, logger, error) {
|
async function sendCompletedStatusReport(startedAt, config, toolsDownloadDurationMs, toolsFeatureFlagsValid, toolsSource, toolsVersion, logger, error) {
|
||||||
const statusReportBase = await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.Init, (0, status_report_1.getActionsStatus)(error), startedAt, config, await (0, util_1.checkDiskUsage)(logger), logger, error?.message, error?.stack);
|
const statusReportBase = await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.Init, (0, status_report_1.getActionsStatus)(error), startedAt, config, await (0, util_1.checkDiskUsage)(logger), logger, error?.message, error?.stack);
|
||||||
|
if (statusReportBase === undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const workflowLanguages = (0, actions_util_1.getOptionalInput)("languages");
|
const workflowLanguages = (0, actions_util_1.getOptionalInput)("languages");
|
||||||
const initStatusReport = {
|
const initStatusReport = {
|
||||||
...statusReportBase,
|
...statusReportBase,
|
||||||
@@ -122,7 +125,10 @@ async function run() {
|
|||||||
core.exportVariable(environment_1.EnvVar.JOB_RUN_UUID, (0, uuid_1.v4)());
|
core.exportVariable(environment_1.EnvVar.JOB_RUN_UUID, (0, uuid_1.v4)());
|
||||||
core.exportVariable(environment_1.EnvVar.INIT_ACTION_HAS_RUN, "true");
|
core.exportVariable(environment_1.EnvVar.INIT_ACTION_HAS_RUN, "true");
|
||||||
try {
|
try {
|
||||||
await (0, status_report_1.sendStatusReport)(await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.Init, "starting", startedAt, config, await (0, util_1.checkDiskUsage)(logger), logger));
|
const statusReportBase = await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.Init, "starting", startedAt, config, await (0, util_1.checkDiskUsage)(logger), logger);
|
||||||
|
if (statusReportBase !== undefined) {
|
||||||
|
await (0, status_report_1.sendStatusReport)(statusReportBase);
|
||||||
|
}
|
||||||
const codeQLDefaultVersionInfo = await features.getDefaultCliVersion(gitHubVersion.type);
|
const codeQLDefaultVersionInfo = await features.getDefaultCliVersion(gitHubVersion.type);
|
||||||
toolsFeatureFlagsValid = codeQLDefaultVersionInfo.toolsFeatureFlagsValid;
|
toolsFeatureFlagsValid = codeQLDefaultVersionInfo.toolsFeatureFlagsValid;
|
||||||
const initCodeQLResult = await (0, init_1.initCodeQL)((0, actions_util_1.getOptionalInput)("tools"), apiDetails, (0, actions_util_1.getTemporaryDirectory)(), gitHubVersion.type, codeQLDefaultVersionInfo, logger);
|
const initCodeQLResult = await (0, init_1.initCodeQL)((0, actions_util_1.getOptionalInput)("tools"), apiDetails, (0, actions_util_1.getTemporaryDirectory)(), gitHubVersion.type, codeQLDefaultVersionInfo, logger);
|
||||||
@@ -182,7 +188,10 @@ async function run() {
|
|||||||
catch (unwrappedError) {
|
catch (unwrappedError) {
|
||||||
const error = (0, util_1.wrapError)(unwrappedError);
|
const error = (0, util_1.wrapError)(unwrappedError);
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
await (0, status_report_1.sendStatusReport)(await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.Init, error instanceof util_1.ConfigurationError ? "user-error" : "aborted", startedAt, config, await (0, util_1.checkDiskUsage)(), logger, error.message, error.stack));
|
const statusReportBase = await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.Init, error instanceof util_1.ConfigurationError ? "user-error" : "aborted", startedAt, config, await (0, util_1.checkDiskUsage)(), logger, error.message, error.stack);
|
||||||
|
if (statusReportBase !== undefined) {
|
||||||
|
await (0, status_report_1.sendStatusReport)(statusReportBase);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
15
lib/resolve-environment-action.js
generated
15
lib/resolve-environment-action.js
generated
@@ -38,7 +38,10 @@ async function run() {
|
|||||||
const logger = (0, logging_1.getActionsLogger)();
|
const logger = (0, logging_1.getActionsLogger)();
|
||||||
let config;
|
let config;
|
||||||
try {
|
try {
|
||||||
await (0, status_report_1.sendStatusReport)(await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.ResolveEnvironment, "starting", startedAt, config, await (0, util_1.checkDiskUsage)(), logger));
|
const statusReportBase = await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.ResolveEnvironment, "starting", startedAt, config, await (0, util_1.checkDiskUsage)(), logger);
|
||||||
|
if (statusReportBase !== undefined) {
|
||||||
|
await (0, status_report_1.sendStatusReport)(statusReportBase);
|
||||||
|
}
|
||||||
const gitHubVersion = await (0, api_client_1.getGitHubVersion)();
|
const gitHubVersion = await (0, api_client_1.getGitHubVersion)();
|
||||||
(0, util_1.checkGitHubVersionInRange)(gitHubVersion, logger);
|
(0, util_1.checkGitHubVersionInRange)(gitHubVersion, logger);
|
||||||
(0, util_1.checkActionVersion)((0, actions_util_1.getActionVersion)(), gitHubVersion);
|
(0, util_1.checkActionVersion)((0, actions_util_1.getActionVersion)(), gitHubVersion);
|
||||||
@@ -61,11 +64,17 @@ async function run() {
|
|||||||
else {
|
else {
|
||||||
// For any other error types, something has more seriously gone wrong and we fail.
|
// For any other error types, something has more seriously gone wrong and we fail.
|
||||||
core.setFailed(`Failed to resolve a build environment suitable for automatically building your code. ${error.message}`);
|
core.setFailed(`Failed to resolve a build environment suitable for automatically building your code. ${error.message}`);
|
||||||
await (0, status_report_1.sendStatusReport)(await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.ResolveEnvironment, (0, status_report_1.getActionsStatus)(error), startedAt, config, await (0, util_1.checkDiskUsage)(), logger, error.message, error.stack));
|
const statusReportBase = await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.ResolveEnvironment, (0, status_report_1.getActionsStatus)(error), startedAt, config, await (0, util_1.checkDiskUsage)(), logger, error.message, error.stack);
|
||||||
|
if (statusReportBase !== undefined) {
|
||||||
|
await (0, status_report_1.sendStatusReport)(statusReportBase);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await (0, status_report_1.sendStatusReport)(await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.ResolveEnvironment, "success", startedAt, config, await (0, util_1.checkDiskUsage)(), logger));
|
const statusReportBase = await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.ResolveEnvironment, "success", startedAt, config, await (0, util_1.checkDiskUsage)(), logger);
|
||||||
|
if (statusReportBase !== undefined) {
|
||||||
|
await (0, status_report_1.sendStatusReport)(statusReportBase);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
async function runWrapper() {
|
async function runWrapper() {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"resolve-environment-action.js","sourceRoot":"","sources":["../src/resolve-environment-action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AAEtC,iDAKwB;AACxB,6CAAgD;AAChD,6CAAsD;AACtD,iDAAmD;AACnD,uCAA6C;AAC7C,+DAAmE;AACnE,mDAKyB;AACzB,iCAMgB;AAEhB,MAAM,uBAAuB,GAAG,aAAa,CAAC;AAE9C,KAAK,UAAU,GAAG;IAChB,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC;IAC7B,MAAM,MAAM,GAAG,IAAA,0BAAgB,GAAE,CAAC;IAElC,IAAI,MAA0B,CAAC;IAE/B,IAAI,CAAC;QACH,MAAM,IAAA,gCAAgB,EACpB,MAAM,IAAA,sCAAsB,EAC1B,0BAAU,CAAC,kBAAkB,EAC7B,UAAU,EACV,SAAS,EACT,MAAM,EACN,MAAM,IAAA,qBAAc,GAAE,EACtB,MAAM,CACP,CACF,CAAC;QAEF,MAAM,aAAa,GAAG,MAAM,IAAA,6BAAgB,GAAE,CAAC;QAC/C,IAAA,gCAAyB,EAAC,aAAa,EAAE,MAAM,CAAC,CAAC;QACjD,IAAA,yBAAkB,EAAC,IAAA,+BAAgB,GAAE,EAAE,aAAa,CAAC,CAAC;QAEtD,MAAM,GAAG,MAAM,IAAA,wBAAS,EAAC,IAAA,oCAAqB,GAAE,EAAE,MAAM,CAAC,CAAC;QAC1D,IAAI,MAAM,KAAK,SAAS,EAAE,CAA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CAAC;AAED,KAAK,UAAU,UAAU;IACvB,IAAI,CAAC;QACH,MAAM,GAAG,EAAE,CAAC;IACd,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,SAAS,CACZ,GAAG,0BAAU,CAAC,kBAAkB,mBAC9B,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC,OACnB,EAAE,CACH,CAAC;IACJ,CAAC;IACD,MAAM,IAAA,sBAAe,GAAE,CAAC;AAC1B,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}
|
{"version":3,"file":"resolve-environment-action.js","sourceRoot":"","sources":["../src/resolve-environment-action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AAEtC,iDAKwB;AACxB,6CAAgD;AAChD,6CAAsD;AACtD,iDAAmD;AACnD,uCAA6C;AAC7C,+DAAmE;AACnE,mDAKyB;AACzB,iCAMgB;AAEhB,MAAM,uBAAuB,GAAG,aAAa,CAAC;AAE9C,KAAK,UAAU,GAAG;IAChB,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC;IAC7B,MAAM,MAAM,GAAG,IAAA,0BAAgB,GAAE,CAAC;IAElC,IAAI,MAA0B,CAAC;IAE/B,IAAI,CAAC;QACH,MAAM,gBAAgB,GAAG,MAAM,IAAA,sCAAsB,EACnD,0BAAU,CAAC,kBAAkB,EAC7B,UAAU,EACV,SAAS,EACT,MAAM,EACN,MAAM,IAAA,qBAAc,GAAE,EACtB,MAAM,CACP,CAAC;QACF,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;YACnC,MAAM,IAAA,gCAAgB,EAAC,gBAAgB,CAAC,CAAC;QAC3C,CAAC;QAED,MAAM,aAAa,GAAG,MAAM,IAAA,6BAAgB,GAAE,CAAC;QAC/C,IAAA,gCAAyB,EAAC,aAAa,EAAE,MAAM,CAAC,CAAC;QACjD,IAAA,yBAAkB,EAAC,IAAA,+BAAgB,GAAE,EAAE,aAAa,CAAC,CA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CAAC;YAC3C,CAAC;QACH,CAAC;QAED,OAAO;IACT,CAAC;IAED,MAAM,gBAAgB,GAAG,MAAM,IAAA,sCAAsB,EACnD,0BAAU,CAAC,kBAAkB,EAC7B,SAAS,EACT,SAAS,EACT,MAAM,EACN,MAAM,IAAA,qBAAc,GAAE,EACtB,MAAM,CACP,CAAC;IACF,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;QACnC,MAAM,IAAA,gCAAgB,EAAC,gBAAgB,CAAC,CAAC;IAC3C,CAAC;AACH,CAAC;AAED,KAAK,UAAU,UAAU;IACvB,IAAI,CAAC;QACH,MAAM,GAAG,EAAE,CAAC;IACd,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,SAAS,CACZ,GAAG,0BAAU,CAAC,kBAAkB,mBAC9B,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC,OACnB,EAAE,CACH,CAAC;IACJ,CAAC;IACD,MAAM,IAAA,sBAAe,GAAE,CAAC;AAC1B,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}
|
||||||
29
lib/status-report.js
generated
29
lib/status-report.js
generated
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.sendStatusReport = exports.createStatusReportBase = exports.getActionsStatus = exports.JobStatus = exports.isFirstPartyAnalysis = exports.ActionName = void 0;
|
exports.sendStatusReport = exports.createStatusReportBase = exports.getJobStatusDisplayName = exports.getActionsStatus = exports.JobStatus = exports.isFirstPartyAnalysis = exports.ActionName = void 0;
|
||||||
const os = __importStar(require("os"));
|
const os = __importStar(require("os"));
|
||||||
const core = __importStar(require("@actions/core"));
|
const core = __importStar(require("@actions/core"));
|
||||||
const actions_util_1 = require("./actions-util");
|
const actions_util_1 = require("./actions-util");
|
||||||
@@ -71,6 +71,21 @@ function getActionsStatus(error, otherFailureCause) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports.getActionsStatus = getActionsStatus;
|
exports.getActionsStatus = getActionsStatus;
|
||||||
|
function getJobStatusDisplayName(status) {
|
||||||
|
switch (status) {
|
||||||
|
case JobStatus.SuccessStatus:
|
||||||
|
return "success";
|
||||||
|
case JobStatus.FailureStatus:
|
||||||
|
return "failure";
|
||||||
|
case JobStatus.ConfigErrorStatus:
|
||||||
|
return "configuration error";
|
||||||
|
case JobStatus.UnknownStatus:
|
||||||
|
return "unknown";
|
||||||
|
default:
|
||||||
|
(0, util_1.assertNever)(status);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.getJobStatusDisplayName = getJobStatusDisplayName;
|
||||||
/**
|
/**
|
||||||
* Sets the overall job status environment variable to configuration error
|
* Sets the overall job status environment variable to configuration error
|
||||||
* or failure, unless it's already been set to one of these values in a
|
* or failure, unless it's already been set to one of these values in a
|
||||||
@@ -92,8 +107,10 @@ function setJobStatusIfUnsuccessful(actionStatus) {
|
|||||||
* @param startedAt The time this action started executing.
|
* @param startedAt The time this action started executing.
|
||||||
* @param cause Cause of failure (only supply if status is 'failure')
|
* @param cause Cause of failure (only supply if status is 'failure')
|
||||||
* @param exception Exception (only supply if status is 'failure')
|
* @param exception Exception (only supply if status is 'failure')
|
||||||
|
* @returns undefined if an exception was thrown.
|
||||||
*/
|
*/
|
||||||
async function createStatusReportBase(actionName, status, actionStartedAt, config, diskInfo, logger, cause, exception) {
|
async function createStatusReportBase(actionName, status, actionStartedAt, config, diskInfo, logger, cause, exception) {
|
||||||
|
try {
|
||||||
const commitOid = (0, actions_util_1.getOptionalInput)("sha") || process.env["GITHUB_SHA"] || "";
|
const commitOid = (0, actions_util_1.getOptionalInput)("sha") || process.env["GITHUB_SHA"] || "";
|
||||||
const ref = await (0, actions_util_1.getRef)();
|
const ref = await (0, actions_util_1.getRef)();
|
||||||
const jobRunUUID = process.env[environment_1.EnvVar.JOB_RUN_UUID] || "";
|
const jobRunUUID = process.env[environment_1.EnvVar.JOB_RUN_UUID] || "";
|
||||||
@@ -109,7 +126,7 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi
|
|||||||
}
|
}
|
||||||
const runnerOs = (0, util_1.getRequiredEnvParam)("RUNNER_OS");
|
const runnerOs = (0, util_1.getRequiredEnvParam)("RUNNER_OS");
|
||||||
const codeQlCliVersion = (0, util_1.getCachedCodeQlVersion)();
|
const codeQlCliVersion = (0, util_1.getCachedCodeQlVersion)();
|
||||||
const actionRef = process.env["GITHUB_ACTION_REF"];
|
const actionRef = process.env["GITHUB_ACTION_REF"] || "";
|
||||||
const testingEnvironment = process.env[environment_1.EnvVar.TESTING_ENVIRONMENT] || "";
|
const testingEnvironment = process.env[environment_1.EnvVar.TESTING_ENVIRONMENT] || "";
|
||||||
// re-export the testing environment variable so that it is available to subsequent steps,
|
// re-export the testing environment variable so that it is available to subsequent steps,
|
||||||
// even if it was only set for this step
|
// even if it was only set for this step
|
||||||
@@ -147,7 +164,8 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi
|
|||||||
statusReport.languages = config.languages.join(",");
|
statusReport.languages = config.languages.join(",");
|
||||||
}
|
}
|
||||||
if (diskInfo) {
|
if (diskInfo) {
|
||||||
statusReport.runner_available_disk_space_bytes = diskInfo.numAvailableBytes;
|
statusReport.runner_available_disk_space_bytes =
|
||||||
|
diskInfo.numAvailableBytes;
|
||||||
statusReport.runner_total_disk_space_bytes = diskInfo.numTotalBytes;
|
statusReport.runner_total_disk_space_bytes = diskInfo.numTotalBytes;
|
||||||
}
|
}
|
||||||
// Add optional parameters
|
// Add optional parameters
|
||||||
@@ -183,6 +201,11 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi
|
|||||||
statusReport.runner_image_version = imageVersion;
|
statusReport.runner_image_version = imageVersion;
|
||||||
}
|
}
|
||||||
return statusReport;
|
return statusReport;
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
logger.warning(`Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.`);
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
exports.createStatusReportBase = createStatusReportBase;
|
exports.createStatusReportBase = createStatusReportBase;
|
||||||
const OUT_OF_DATE_MSG = "CodeQL Action is out-of-date. Please upgrade to the latest version of codeql-action.";
|
const OUT_OF_DATE_MSG = "CodeQL Action is out-of-date. Please upgrade to the latest version of codeql-action.";
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
15
lib/status-report.test.js
generated
15
lib/status-report.test.js
generated
@@ -59,6 +59,8 @@ function setupEnvironmentAndStub(tmpDir) {
|
|||||||
buildMode: config_utils_1.BuildMode.None,
|
buildMode: config_utils_1.BuildMode.None,
|
||||||
languages: [languages_1.Language.java, languages_1.Language.swift],
|
languages: [languages_1.Language.java, languages_1.Language.swift],
|
||||||
}), { numAvailableBytes: 100, numTotalBytes: 500 }, (0, logging_1.getRunnerLogger)(false), "failure cause", "exception stack trace");
|
}), { numAvailableBytes: 100, numTotalBytes: 500 }, (0, logging_1.getRunnerLogger)(false), "failure cause", "exception stack trace");
|
||||||
|
t.truthy(statusReport);
|
||||||
|
if (statusReport !== undefined) {
|
||||||
t.is(statusReport.action_name, status_report_1.ActionName.Init);
|
t.is(statusReport.action_name, status_report_1.ActionName.Init);
|
||||||
t.is(statusReport.action_oid, "unknown");
|
t.is(statusReport.action_oid, "unknown");
|
||||||
t.is(typeof statusReport.action_version, "string");
|
t.is(typeof statusReport.action_version, "string");
|
||||||
@@ -81,19 +83,20 @@ function setupEnvironmentAndStub(tmpDir) {
|
|||||||
t.is(statusReport.workflow_name, process.env["GITHUB_WORKFLOW"] || "");
|
t.is(statusReport.workflow_name, process.env["GITHUB_WORKFLOW"] || "");
|
||||||
t.is(statusReport.workflow_run_attempt, 2);
|
t.is(statusReport.workflow_run_attempt, 2);
|
||||||
t.is(statusReport.workflow_run_id, 100);
|
t.is(statusReport.workflow_run_id, 100);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
(0, ava_1.default)("createStatusReportBase_firstParty", async (t) => {
|
(0, ava_1.default)("createStatusReportBase_firstParty", async (t) => {
|
||||||
await (0, util_1.withTmpDir)(async (tmpDir) => {
|
await (0, util_1.withTmpDir)(async (tmpDir) => {
|
||||||
setupEnvironmentAndStub(tmpDir);
|
setupEnvironmentAndStub(tmpDir);
|
||||||
t.is((await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.UploadSarif, "failure", new Date("May 19, 2023 05:19:00"), (0, testing_utils_1.createTestConfig)({}), { numAvailableBytes: 100, numTotalBytes: 500 }, (0, logging_1.getRunnerLogger)(false), "failure cause", "exception stack trace")).first_party_analysis, false);
|
t.is((await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.UploadSarif, "failure", new Date("May 19, 2023 05:19:00"), (0, testing_utils_1.createTestConfig)({}), { numAvailableBytes: 100, numTotalBytes: 500 }, (0, logging_1.getRunnerLogger)(false), "failure cause", "exception stack trace"))?.first_party_analysis, false);
|
||||||
t.is((await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.Autobuild, "failure", new Date("May 19, 2023 05:19:00"), (0, testing_utils_1.createTestConfig)({}), { numAvailableBytes: 100, numTotalBytes: 500 }, (0, logging_1.getRunnerLogger)(false), "failure cause", "exception stack trace")).first_party_analysis, true);
|
t.is((await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.Autobuild, "failure", new Date("May 19, 2023 05:19:00"), (0, testing_utils_1.createTestConfig)({}), { numAvailableBytes: 100, numTotalBytes: 500 }, (0, logging_1.getRunnerLogger)(false), "failure cause", "exception stack trace"))?.first_party_analysis, true);
|
||||||
process.env["CODEQL_ACTION_INIT_HAS_RUN"] = "foobar";
|
process.env["CODEQL_ACTION_INIT_HAS_RUN"] = "foobar";
|
||||||
t.is((await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.UploadSarif, "failure", new Date("May 19, 2023 05:19:00"), (0, testing_utils_1.createTestConfig)({}), { numAvailableBytes: 100, numTotalBytes: 500 }, (0, logging_1.getRunnerLogger)(false), "failure cause", "exception stack trace")).first_party_analysis, false);
|
t.is((await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.UploadSarif, "failure", new Date("May 19, 2023 05:19:00"), (0, testing_utils_1.createTestConfig)({}), { numAvailableBytes: 100, numTotalBytes: 500 }, (0, logging_1.getRunnerLogger)(false), "failure cause", "exception stack trace"))?.first_party_analysis, false);
|
||||||
t.is((await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.Init, "failure", new Date("May 19, 2023 05:19:00"), (0, testing_utils_1.createTestConfig)({}), { numAvailableBytes: 100, numTotalBytes: 500 }, (0, logging_1.getRunnerLogger)(false), "failure cause", "exception stack trace")).first_party_analysis, true);
|
t.is((await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.Init, "failure", new Date("May 19, 2023 05:19:00"), (0, testing_utils_1.createTestConfig)({}), { numAvailableBytes: 100, numTotalBytes: 500 }, (0, logging_1.getRunnerLogger)(false), "failure cause", "exception stack trace"))?.first_party_analysis, true);
|
||||||
process.env["CODEQL_ACTION_INIT_HAS_RUN"] = "true";
|
process.env["CODEQL_ACTION_INIT_HAS_RUN"] = "true";
|
||||||
t.is((await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.UploadSarif, "failure", new Date("May 19, 2023 05:19:00"), (0, testing_utils_1.createTestConfig)({}), { numAvailableBytes: 100, numTotalBytes: 500 }, (0, logging_1.getRunnerLogger)(false), "failure cause", "exception stack trace")).first_party_analysis, true);
|
t.is((await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.UploadSarif, "failure", new Date("May 19, 2023 05:19:00"), (0, testing_utils_1.createTestConfig)({}), { numAvailableBytes: 100, numTotalBytes: 500 }, (0, logging_1.getRunnerLogger)(false), "failure cause", "exception stack trace"))?.first_party_analysis, true);
|
||||||
t.is((await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.Analyze, "failure", new Date("May 19, 2023 05:19:00"), (0, testing_utils_1.createTestConfig)({}), { numAvailableBytes: 100, numTotalBytes: 500 }, (0, logging_1.getRunnerLogger)(false), "failure cause", "exception stack trace")).first_party_analysis, true);
|
t.is((await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.Analyze, "failure", new Date("May 19, 2023 05:19:00"), (0, testing_utils_1.createTestConfig)({}), { numAvailableBytes: 100, numTotalBytes: 500 }, (0, logging_1.getRunnerLogger)(false), "failure cause", "exception stack trace"))?.first_party_analysis, true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
//# sourceMappingURL=status-report.test.js.map
|
//# sourceMappingURL=status-report.test.js.map
|
||||||
File diff suppressed because one or more lines are too long
2
lib/tools-features.js
generated
2
lib/tools-features.js
generated
@@ -3,11 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||||||
exports.isSupportedToolsFeature = exports.ToolsFeature = void 0;
|
exports.isSupportedToolsFeature = exports.ToolsFeature = void 0;
|
||||||
var ToolsFeature;
|
var ToolsFeature;
|
||||||
(function (ToolsFeature) {
|
(function (ToolsFeature) {
|
||||||
|
ToolsFeature["AnalysisSummaryV2IsDefault"] = "analysisSummaryV2Default";
|
||||||
ToolsFeature["BuildModeOption"] = "buildModeOption";
|
ToolsFeature["BuildModeOption"] = "buildModeOption";
|
||||||
ToolsFeature["IndirectTracingSupportsStaticBinaries"] = "indirectTracingSupportsStaticBinaries";
|
ToolsFeature["IndirectTracingSupportsStaticBinaries"] = "indirectTracingSupportsStaticBinaries";
|
||||||
ToolsFeature["InformsAboutUnsupportedPathFilters"] = "informsAboutUnsupportedPathFilters";
|
ToolsFeature["InformsAboutUnsupportedPathFilters"] = "informsAboutUnsupportedPathFilters";
|
||||||
ToolsFeature["SetsCodeqlRunnerEnvVar"] = "setsCodeqlRunnerEnvVar";
|
ToolsFeature["SetsCodeqlRunnerEnvVar"] = "setsCodeqlRunnerEnvVar";
|
||||||
ToolsFeature["TraceCommandUseBuildMode"] = "traceCommandUseBuildMode";
|
ToolsFeature["TraceCommandUseBuildMode"] = "traceCommandUseBuildMode";
|
||||||
|
ToolsFeature["SarifMergeRunsFromEqualCategory"] = "sarifMergeRunsFromEqualCategory";
|
||||||
})(ToolsFeature || (exports.ToolsFeature = ToolsFeature = {}));
|
})(ToolsFeature || (exports.ToolsFeature = ToolsFeature = {}));
|
||||||
/**
|
/**
|
||||||
* Determines if the given feature is supported by the CLI.
|
* Determines if the given feature is supported by the CLI.
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"tools-features.js","sourceRoot":"","sources":["../src/tools-features.ts"],"names":[],"mappings":";;;AAEA,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,mDAAmC,CAAA;IACnC,+FAA+E,CAAA;IAC/E,yFAAyE,CAAA;IACzE,iEAAiD,CAAA;IACjD,qEAAqD,CAAA;AACvD,CAAC,EANW,YAAY,4BAAZ,YAAY,QAMvB;AAED;;;;;;GAMG;AACH,SAAgB,uBAAuB,CACrC,WAAwB,EACxB,OAAqB;IAErB,OAAO,CAAC,CAAC,WAAW,CAAC,QAAQ,IAAI,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AACjE,CAAC;AALD,0DAKC"}
|
{"version":3,"file":"tools-features.js","sourceRoot":"","sources":["../src/tools-features.ts"],"names":[],"mappings":";;;AAEA,IAAY,YAQX;AARD,WAAY,YAAY;IACtB,uEAAuD,CAAA;IACvD,mDAAmC,CAAA;IACnC,+FAA+E,CAAA;IAC/E,yFAAyE,CAAA;IACzE,iEAAiD,CAAA;IACjD,qEAAqD,CAAA;IACrD,mFAAmE,CAAA;AACrE,CAAC,EARW,YAAY,4BAAZ,YAAY,QAQvB;AAED;;;;;;GAMG;AACH,SAAgB,uBAAuB,CACrC,WAAwB,EACxB,OAAqB;IAErB,OAAO,CAAC,CAAC,WAAW,CAAC,QAAQ,IAAI,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AACjE,CAAC;AALD,0DAKC"}
|
||||||
4
lib/trap-caching.js
generated
4
lib/trap-caching.js
generated
@@ -42,7 +42,7 @@ const MINIMUM_CACHE_MB_TO_UPLOAD = 10;
|
|||||||
// uploads or downloads to complete before continuing. Note
|
// uploads or downloads to complete before continuing. Note
|
||||||
// this timeout is per operation, so will be run as many
|
// this timeout is per operation, so will be run as many
|
||||||
// times as there are languages with TRAP caching enabled.
|
// times as there are languages with TRAP caching enabled.
|
||||||
const MAX_CACHE_OPERATION_MS = 120000; // Two minutes
|
const MAX_CACHE_OPERATION_MS = 120_000; // Two minutes
|
||||||
/**
|
/**
|
||||||
* Download TRAP caches from the Actions cache.
|
* Download TRAP caches from the Actions cache.
|
||||||
* @param codeql The CodeQL instance to use.
|
* @param codeql The CodeQL instance to use.
|
||||||
@@ -117,7 +117,7 @@ async function uploadTrapCaches(codeql, config, logger) {
|
|||||||
logger.info(`Skipping upload of TRAP cache for ${language} as we couldn't determine its size`);
|
logger.info(`Skipping upload of TRAP cache for ${language} as we couldn't determine its size`);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (trapFolderSize < MINIMUM_CACHE_MB_TO_UPLOAD * 1048576) {
|
if (trapFolderSize < MINIMUM_CACHE_MB_TO_UPLOAD * 1_048_576) {
|
||||||
logger.info(`Skipping upload of TRAP cache for ${language} as it is too small`);
|
logger.info(`Skipping upload of TRAP cache for ${language} as it is too small`);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
2
lib/trap-caching.test.js
generated
2
lib/trap-caching.test.js
generated
@@ -132,7 +132,7 @@ function getTestConfigWithTempDir(tempDir) {
|
|||||||
const loggedMessages = [];
|
const loggedMessages = [];
|
||||||
const logger = (0, testing_utils_1.getRecordingLogger)(loggedMessages);
|
const logger = (0, testing_utils_1.getRecordingLogger)(loggedMessages);
|
||||||
sinon.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(true);
|
sinon.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(true);
|
||||||
sinon.stub(util, "tryGetFolderBytes").resolves(999999999);
|
sinon.stub(util, "tryGetFolderBytes").resolves(999_999_999);
|
||||||
const stubSave = sinon.stub(cache, "saveCache");
|
const stubSave = sinon.stub(cache, "saveCache");
|
||||||
process.env.GITHUB_SHA = "somesha";
|
process.env.GITHUB_SHA = "somesha";
|
||||||
await (0, trap_caching_1.uploadTrapCaches)(stubCodeql, testConfigWithoutTmpDir, logger);
|
await (0, trap_caching_1.uploadTrapCaches)(stubCodeql, testConfigWithoutTmpDir, logger);
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"trap-caching.test.js","sourceRoot":"","sources":["../src/trap-caching.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,sDAAwC;AACxC,8CAAuB;AACvB,6CAA+B;AAE/B,4DAA8C;AAC9C,qCAIkB;AAElB,2CAAuC;AACvC,mDAKyB;AACzB,iDAIwB;AACxB,6CAA+B;AAE/B,IAAA,0BAAU,EAAC,aAAI,CAAC,CAAC;AAEjB,MAAM,UAAU,GAAG,IAAA,kBAAS,EAAC;IAC3B,KAAK,CAAC,UAAU;QACd,OAAO,IAAA,+BAAe,EAAC,QAAQ,CAAC,CAAC;IACnC,CAAC;IACD,KAAK,CAAC,sBAAsB;QAC1B,OAAO;YACL,UAAU,EAAE;gBACV,CAAC,oBAAQ,CAAC,UAAU,CAAC,EAAE;oBACrB;wBACE,cAAc,EAAE,WAAW;wBAC3B,iBAAiB,EAAE;4BACjB,IAAI,EAAE;gCACJ,UAAU,EAAE;oCACV,KAAK,EAAE;wCACL,UAAU,EAAE;4CACV,GAAG,EAAE;gDACH,KAAK,EAAE,iBAAiB;6CACzB;4CACD,KAAK,EAAE;gDACL,KAAK,EAAE,aAAa;6CACrB;4CACD,KAAK,EAAE;gDACL,KAAK,EAAE,aAAa;6CACrB;yCACF;qCACF;iCACF;6BACF;yBACF;qBACF;iBACF;gBACD,CAAC,oBAAQ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ACf;aACF;SACF,CAAC,CACH,CAAC;QACF,MAAM,IAAA,iCAAkB,EACtB,UAAU,EACV,CAAC,oBAAQ,CAAC,UAAU,EAAE,oBAAQ,CAAC,GAAG,CAAC,EACnC,MAAM,CACP,CAAC;QACF,CAAC,CAAC,MAAM,CACN,WAAW,CAAC,cAAc,CACxB,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC;YACzB,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,YAAY,EAAE,YAAY,CAAC;SACjD,CAAC,EACF,KAAK;aACF,KAAK,CAAC,SAAS,CAAC;aAChB,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;aAC1B,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAClC,CACF,CAAC;QACF,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IAC5E,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
||||||
90
lib/upload-lib.js
generated
90
lib/upload-lib.js
generated
@@ -34,22 +34,31 @@ const core = __importStar(require("@actions/core"));
|
|||||||
const file_url_1 = __importDefault(require("file-url"));
|
const file_url_1 = __importDefault(require("file-url"));
|
||||||
const jsonschema = __importStar(require("jsonschema"));
|
const jsonschema = __importStar(require("jsonschema"));
|
||||||
const actionsUtil = __importStar(require("./actions-util"));
|
const actionsUtil = __importStar(require("./actions-util"));
|
||||||
|
const actions_util_1 = require("./actions-util");
|
||||||
const api = __importStar(require("./api-client"));
|
const api = __importStar(require("./api-client"));
|
||||||
|
const api_client_1 = require("./api-client");
|
||||||
|
const codeql_1 = require("./codeql");
|
||||||
|
const config_utils_1 = require("./config-utils");
|
||||||
const environment_1 = require("./environment");
|
const environment_1 = require("./environment");
|
||||||
|
const feature_flags_1 = require("./feature-flags");
|
||||||
const fingerprints = __importStar(require("./fingerprints"));
|
const fingerprints = __importStar(require("./fingerprints"));
|
||||||
|
const init_1 = require("./init");
|
||||||
const repository_1 = require("./repository");
|
const repository_1 = require("./repository");
|
||||||
|
const tools_features_1 = require("./tools-features");
|
||||||
const util = __importStar(require("./util"));
|
const util = __importStar(require("./util"));
|
||||||
const util_1 = require("./util");
|
const util_1 = require("./util");
|
||||||
const GENERIC_403_MSG = "The repo on which this action is running has not opted-in to CodeQL code scanning.";
|
const GENERIC_403_MSG = "The repo on which this action is running has not opted-in to CodeQL code scanning.";
|
||||||
const GENERIC_404_MSG = "The CodeQL code scanning feature is forbidden on this repository.";
|
const GENERIC_404_MSG = "The CodeQL code scanning feature is forbidden on this repository.";
|
||||||
// Takes a list of paths to sarif files and combines them together,
|
// Takes a list of paths to sarif files and combines them together,
|
||||||
// returning the contents of the combined sarif file.
|
// returning the contents of the combined sarif file.
|
||||||
function combineSarifFiles(sarifFiles) {
|
function combineSarifFiles(sarifFiles, logger) {
|
||||||
|
logger.info(`Loading SARIF file(s)`);
|
||||||
const combinedSarif = {
|
const combinedSarif = {
|
||||||
version: null,
|
version: null,
|
||||||
runs: [],
|
runs: [],
|
||||||
};
|
};
|
||||||
for (const sarifFile of sarifFiles) {
|
for (const sarifFile of sarifFiles) {
|
||||||
|
logger.debug(`Loading SARIF file: ${sarifFile}`);
|
||||||
const sarifObject = JSON.parse(fs.readFileSync(sarifFile, "utf8"));
|
const sarifObject = JSON.parse(fs.readFileSync(sarifFile, "utf8"));
|
||||||
// Check SARIF version
|
// Check SARIF version
|
||||||
if (combinedSarif.version === null) {
|
if (combinedSarif.version === null) {
|
||||||
@@ -62,6 +71,65 @@ function combineSarifFiles(sarifFiles) {
|
|||||||
}
|
}
|
||||||
return combinedSarif;
|
return combinedSarif;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Checks whether all the runs in the given SARIF files were produced by CodeQL.
|
||||||
|
* @param sarifFiles The list of SARIF files to check.
|
||||||
|
*/
|
||||||
|
function areAllRunsProducedByCodeQL(sarifFiles) {
|
||||||
|
return sarifFiles.every((sarifFile) => {
|
||||||
|
const sarifObject = JSON.parse(fs.readFileSync(sarifFile, "utf8"));
|
||||||
|
return sarifObject.runs?.every((run) => run.tool?.driver?.name === "CodeQL");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// Takes a list of paths to sarif files and combines them together using the
|
||||||
|
// CLI `github merge-results` command when all SARIF files are produced by
|
||||||
|
// CodeQL. Otherwise, it will fall back to combining the files in the action.
|
||||||
|
// Returns the contents of the combined sarif file.
|
||||||
|
async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, logger) {
|
||||||
|
logger.info("Combining SARIF files using the CodeQL CLI");
|
||||||
|
if (sarifFiles.length === 1) {
|
||||||
|
return JSON.parse(fs.readFileSync(sarifFiles[0], "utf8"));
|
||||||
|
}
|
||||||
|
if (!areAllRunsProducedByCodeQL(sarifFiles)) {
|
||||||
|
logger.debug("Not all SARIF files were produced by CodeQL. Merging files in the action.");
|
||||||
|
// If not, use the naive method of combining the files.
|
||||||
|
return combineSarifFiles(sarifFiles, logger);
|
||||||
|
}
|
||||||
|
// Initialize CodeQL, either by using the config file from the 'init' step,
|
||||||
|
// or by initializing it here.
|
||||||
|
let codeQL;
|
||||||
|
let tempDir = actionsUtil.getTemporaryDirectory();
|
||||||
|
const config = await (0, config_utils_1.getConfig)(tempDir, logger);
|
||||||
|
if (config !== undefined) {
|
||||||
|
codeQL = await (0, codeql_1.getCodeQL)(config.codeQLCmd);
|
||||||
|
tempDir = config.tempDir;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
logger.info("Initializing CodeQL since the 'init' Action was not called before this step.");
|
||||||
|
const apiDetails = {
|
||||||
|
auth: (0, actions_util_1.getRequiredInput)("token"),
|
||||||
|
externalRepoAuth: (0, actions_util_1.getOptionalInput)("external-repository-token"),
|
||||||
|
url: (0, util_1.getRequiredEnvParam)("GITHUB_SERVER_URL"),
|
||||||
|
apiURL: (0, util_1.getRequiredEnvParam)("GITHUB_API_URL"),
|
||||||
|
};
|
||||||
|
const codeQLDefaultVersionInfo = await features.getDefaultCliVersion(gitHubVersion.type);
|
||||||
|
const initCodeQLResult = await (0, init_1.initCodeQL)(undefined, // There is no tools input on the upload action
|
||||||
|
apiDetails, tempDir, gitHubVersion.type, codeQLDefaultVersionInfo, logger);
|
||||||
|
codeQL = initCodeQLResult.codeql;
|
||||||
|
}
|
||||||
|
if (!(await codeQL.supportsFeature(tools_features_1.ToolsFeature.SarifMergeRunsFromEqualCategory))) {
|
||||||
|
logger.warning("The CodeQL CLI does not support merging SARIF files. Merging files in the action.");
|
||||||
|
return combineSarifFiles(sarifFiles, logger);
|
||||||
|
}
|
||||||
|
const baseTempDir = path.resolve(tempDir, "combined-sarif");
|
||||||
|
fs.mkdirSync(baseTempDir, { recursive: true });
|
||||||
|
const outputDirectory = fs.mkdtempSync(path.resolve(baseTempDir, "output-"));
|
||||||
|
const outputFile = path.resolve(outputDirectory, "combined-sarif.sarif");
|
||||||
|
await codeQL.mergeResults(sarifFiles, outputFile, {
|
||||||
|
mergeRunsFromEqualCategory: true,
|
||||||
|
});
|
||||||
|
return JSON.parse(fs.readFileSync(outputFile, "utf8"));
|
||||||
|
}
|
||||||
// Populates the run.automationDetails.id field using the analysis_key and environment
|
// Populates the run.automationDetails.id field using the analysis_key and environment
|
||||||
// and return an updated sarif file contents.
|
// and return an updated sarif file contents.
|
||||||
function populateRunAutomationDetails(sarif, category, analysis_key, environment) {
|
function populateRunAutomationDetails(sarif, category, analysis_key, environment) {
|
||||||
@@ -190,6 +258,7 @@ function countResultsInSarif(sarif) {
|
|||||||
// Validates that the given file path refers to a valid SARIF file.
|
// Validates that the given file path refers to a valid SARIF file.
|
||||||
// Throws an error if the file is invalid.
|
// Throws an error if the file is invalid.
|
||||||
function validateSarifFileSchema(sarifFilePath, logger) {
|
function validateSarifFileSchema(sarifFilePath, logger) {
|
||||||
|
logger.info(`Validating ${sarifFilePath}`);
|
||||||
let sarif;
|
let sarif;
|
||||||
try {
|
try {
|
||||||
sarif = JSON.parse(fs.readFileSync(sarifFilePath, "utf8"));
|
sarif = JSON.parse(fs.readFileSync(sarifFilePath, "utf8"));
|
||||||
@@ -222,7 +291,8 @@ function validateSarifFileSchema(sarifFilePath, logger) {
|
|||||||
exports.validateSarifFileSchema = validateSarifFileSchema;
|
exports.validateSarifFileSchema = validateSarifFileSchema;
|
||||||
// buildPayload constructs a map ready to be uploaded to the API from the given
|
// buildPayload constructs a map ready to be uploaded to the API from the given
|
||||||
// parameters, respecting the current mode and target GitHub instance version.
|
// parameters, respecting the current mode and target GitHub instance version.
|
||||||
function buildPayload(commitOid, ref, analysisKey, analysisName, zippedSarif, workflowRunID, workflowRunAttempt, checkoutURI, environment, toolNames, mergeBaseCommitOid) {
|
function buildPayload(commitOid, ref, analysisKey, analysisName, zippedSarif, workflowRunID, workflowRunAttempt, checkoutURI, environment, toolNames, mergeBaseCommitOid, logger) {
|
||||||
|
logger.info(`Combining SARIF files using CLI`);
|
||||||
const payloadObj = {
|
const payloadObj = {
|
||||||
commit_oid: commitOid,
|
commit_oid: commitOid,
|
||||||
ref,
|
ref,
|
||||||
@@ -264,19 +334,26 @@ exports.buildPayload = buildPayload;
|
|||||||
async function uploadFiles(sarifFiles, repositoryNwo, commitOid, ref, analysisKey, category, analysisName, workflowRunID, workflowRunAttempt, sourceRoot, environment, logger) {
|
async function uploadFiles(sarifFiles, repositoryNwo, commitOid, ref, analysisKey, category, analysisName, workflowRunID, workflowRunAttempt, sourceRoot, environment, logger) {
|
||||||
logger.startGroup("Uploading results");
|
logger.startGroup("Uploading results");
|
||||||
logger.info(`Processing sarif files: ${JSON.stringify(sarifFiles)}`);
|
logger.info(`Processing sarif files: ${JSON.stringify(sarifFiles)}`);
|
||||||
|
const gitHubVersion = await (0, api_client_1.getGitHubVersion)();
|
||||||
|
const features = new feature_flags_1.Features(gitHubVersion, repositoryNwo, actionsUtil.getTemporaryDirectory(), logger);
|
||||||
// Validate that the files we were asked to upload are all valid SARIF files
|
// Validate that the files we were asked to upload are all valid SARIF files
|
||||||
for (const file of sarifFiles) {
|
for (const file of sarifFiles) {
|
||||||
validateSarifFileSchema(file, logger);
|
validateSarifFileSchema(file, logger);
|
||||||
}
|
}
|
||||||
let sarif = combineSarifFiles(sarifFiles);
|
let sarif = (await features.getValue(feature_flags_1.Feature.CliSarifMerge))
|
||||||
|
? await combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, logger)
|
||||||
|
: combineSarifFiles(sarifFiles, logger);
|
||||||
sarif = await fingerprints.addFingerprints(sarif, sourceRoot, logger);
|
sarif = await fingerprints.addFingerprints(sarif, sourceRoot, logger);
|
||||||
sarif = populateRunAutomationDetails(sarif, category, analysisKey, environment);
|
sarif = populateRunAutomationDetails(sarif, category, analysisKey, environment);
|
||||||
const toolNames = util.getToolNames(sarif);
|
const toolNames = util.getToolNames(sarif);
|
||||||
|
logger.debug(`Validating that each SARIF run has a unique category`);
|
||||||
validateUniqueCategory(sarif);
|
validateUniqueCategory(sarif);
|
||||||
|
logger.debug(`Serializing SARIF for upload`);
|
||||||
const sarifPayload = JSON.stringify(sarif);
|
const sarifPayload = JSON.stringify(sarif);
|
||||||
|
logger.debug(`Compressing serialized SARIF`);
|
||||||
const zippedSarif = zlib_1.default.gzipSync(sarifPayload).toString("base64");
|
const zippedSarif = zlib_1.default.gzipSync(sarifPayload).toString("base64");
|
||||||
const checkoutURI = (0, file_url_1.default)(sourceRoot);
|
const checkoutURI = (0, file_url_1.default)(sourceRoot);
|
||||||
const payload = buildPayload(commitOid, ref, analysisKey, analysisName, zippedSarif, workflowRunID, workflowRunAttempt, checkoutURI, environment, toolNames, await actionsUtil.determineMergeBaseCommitOid());
|
const payload = buildPayload(commitOid, ref, analysisKey, analysisName, zippedSarif, workflowRunID, workflowRunAttempt, checkoutURI, environment, toolNames, await actionsUtil.determineMergeBaseCommitOid(), logger);
|
||||||
// Log some useful debug info about the info
|
// Log some useful debug info about the info
|
||||||
const rawUploadSizeBytes = sarifPayload.length;
|
const rawUploadSizeBytes = sarifPayload.length;
|
||||||
logger.debug(`Raw upload size: ${rawUploadSizeBytes} bytes`);
|
logger.debug(`Raw upload size: ${rawUploadSizeBytes} bytes`);
|
||||||
@@ -383,8 +460,9 @@ function shouldConsiderConfigurationError(processingErrors) {
|
|||||||
* Returns whether the provided processing errors are the result of an invalid SARIF upload request.
|
* Returns whether the provided processing errors are the result of an invalid SARIF upload request.
|
||||||
*/
|
*/
|
||||||
function shouldConsiderInvalidRequest(processingErrors) {
|
function shouldConsiderInvalidRequest(processingErrors) {
|
||||||
return (processingErrors.length === 1 &&
|
return processingErrors.every((error) => error.startsWith("rejecting SARIF") ||
|
||||||
processingErrors[0].startsWith("rejecting SARIF,"));
|
error.startsWith("could not convert rules: invalid security severity value, is not a number") ||
|
||||||
|
/^SARIF URI scheme [^\s]* did not match the checkout URI scheme [^\s]*/.test(error));
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Checks the processing result for an unsuccessful execution. Throws if the
|
* Checks the processing result for an unsuccessful execution. Throws if the
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
10
lib/upload-lib.test.js
generated
10
lib/upload-lib.test.js
generated
@@ -47,7 +47,7 @@ ava_1.default.beforeEach(() => {
|
|||||||
});
|
});
|
||||||
(0, ava_1.default)("validate correct payload used for push, PR merge commit, and PR head", async (t) => {
|
(0, ava_1.default)("validate correct payload used for push, PR merge commit, and PR head", async (t) => {
|
||||||
process.env["GITHUB_EVENT_NAME"] = "push";
|
process.env["GITHUB_EVENT_NAME"] = "push";
|
||||||
const pushPayload = uploadLib.buildPayload("commit", "refs/heads/master", "key", undefined, "", 1234, 1, "/opt/src", undefined, ["CodeQL", "eslint"], "mergeBaseCommit");
|
const pushPayload = uploadLib.buildPayload("commit", "refs/heads/master", "key", undefined, "", 1234, 1, "/opt/src", undefined, ["CodeQL", "eslint"], "mergeBaseCommit", (0, logging_1.getRunnerLogger)(true));
|
||||||
// Not triggered by a pull request
|
// Not triggered by a pull request
|
||||||
t.falsy(pushPayload.base_ref);
|
t.falsy(pushPayload.base_ref);
|
||||||
t.falsy(pushPayload.base_sha);
|
t.falsy(pushPayload.base_sha);
|
||||||
@@ -55,11 +55,11 @@ ava_1.default.beforeEach(() => {
|
|||||||
process.env["GITHUB_SHA"] = "commit";
|
process.env["GITHUB_SHA"] = "commit";
|
||||||
process.env["GITHUB_BASE_REF"] = "master";
|
process.env["GITHUB_BASE_REF"] = "master";
|
||||||
process.env["GITHUB_EVENT_PATH"] = `${__dirname}/../src/testdata/pull_request.json`;
|
process.env["GITHUB_EVENT_PATH"] = `${__dirname}/../src/testdata/pull_request.json`;
|
||||||
const prMergePayload = uploadLib.buildPayload("commit", "refs/pull/123/merge", "key", undefined, "", 1234, 1, "/opt/src", undefined, ["CodeQL", "eslint"], "mergeBaseCommit");
|
const prMergePayload = uploadLib.buildPayload("commit", "refs/pull/123/merge", "key", undefined, "", 1234, 1, "/opt/src", undefined, ["CodeQL", "eslint"], "mergeBaseCommit", (0, logging_1.getRunnerLogger)(true));
|
||||||
// Uploads for a merge commit use the merge base
|
// Uploads for a merge commit use the merge base
|
||||||
t.deepEqual(prMergePayload.base_ref, "refs/heads/master");
|
t.deepEqual(prMergePayload.base_ref, "refs/heads/master");
|
||||||
t.deepEqual(prMergePayload.base_sha, "mergeBaseCommit");
|
t.deepEqual(prMergePayload.base_sha, "mergeBaseCommit");
|
||||||
const prHeadPayload = uploadLib.buildPayload("headCommit", "refs/pull/123/head", "key", undefined, "", 1234, 1, "/opt/src", undefined, ["CodeQL", "eslint"], "mergeBaseCommit");
|
const prHeadPayload = uploadLib.buildPayload("headCommit", "refs/pull/123/head", "key", undefined, "", 1234, 1, "/opt/src", undefined, ["CodeQL", "eslint"], "mergeBaseCommit", (0, logging_1.getRunnerLogger)(true));
|
||||||
// Uploads for the head use the PR base
|
// Uploads for the head use the PR base
|
||||||
t.deepEqual(prHeadPayload.base_ref, "refs/heads/master");
|
t.deepEqual(prHeadPayload.base_ref, "refs/heads/master");
|
||||||
t.deepEqual(prHeadPayload.base_sha, "f95f852bd8fca8fcc58a9a2d6c842781e32a215e");
|
t.deepEqual(prHeadPayload.base_sha, "f95f852bd8fca8fcc58a9a2d6c842781e32a215e");
|
||||||
@@ -192,8 +192,8 @@ ava_1.default.beforeEach(() => {
|
|||||||
};
|
};
|
||||||
const sarifFile = `${__dirname}/../src/testdata/with-invalid-uri.sarif`;
|
const sarifFile = `${__dirname}/../src/testdata/with-invalid-uri.sarif`;
|
||||||
uploadLib.validateSarifFileSchema(sarifFile, mockLogger);
|
uploadLib.validateSarifFileSchema(sarifFile, mockLogger);
|
||||||
t.deepEqual(loggedMessages.length, 1);
|
t.deepEqual(loggedMessages.length, 2);
|
||||||
t.deepEqual(loggedMessages[0], "Warning: 'not a valid URI' is not a valid URI in 'instance.runs[0].results[0].locations[0].physicalLocation.artifactLocation.uri'.");
|
t.deepEqual(loggedMessages[1], "Warning: 'not a valid URI' is not a valid URI in 'instance.runs[0].results[0].locations[0].physicalLocation.artifactLocation.uri'.");
|
||||||
});
|
});
|
||||||
function createMockSarif(id, tool) {
|
function createMockSarif(id, tool) {
|
||||||
return {
|
return {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
55
lib/upload-sarif-action-post-helper.js
generated
Normal file
55
lib/upload-sarif-action-post-helper.js
generated
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
"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;
|
||||||
|
};
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.uploadArtifacts = void 0;
|
||||||
|
const fs = __importStar(require("fs"));
|
||||||
|
const path = __importStar(require("path"));
|
||||||
|
const core = __importStar(require("@actions/core"));
|
||||||
|
const actionsUtil = __importStar(require("./actions-util"));
|
||||||
|
async function uploadArtifacts(uploadDebugArtifacts) {
|
||||||
|
const tempDir = actionsUtil.getTemporaryDirectory();
|
||||||
|
// Upload Actions SARIF artifacts for debugging when environment variable is set
|
||||||
|
if (process.env["CODEQL_ACTION_DEBUG_COMBINED_SARIF"] === "true") {
|
||||||
|
core.info("Uploading available combined SARIF files as Actions debugging artifact...");
|
||||||
|
const baseTempDir = path.resolve(tempDir, "combined-sarif");
|
||||||
|
const toUpload = [];
|
||||||
|
if (fs.existsSync(baseTempDir)) {
|
||||||
|
const outputDirs = fs.readdirSync(baseTempDir);
|
||||||
|
for (const outputDir of outputDirs) {
|
||||||
|
const sarifFiles = fs
|
||||||
|
.readdirSync(path.resolve(baseTempDir, outputDir))
|
||||||
|
.filter((f) => f.endsWith(".sarif"));
|
||||||
|
for (const sarifFile of sarifFiles) {
|
||||||
|
toUpload.push(path.resolve(baseTempDir, outputDir, sarifFile));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (toUpload.length > 0) {
|
||||||
|
await uploadDebugArtifacts(toUpload, baseTempDir, "upload-debug-artifacts");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.uploadArtifacts = uploadArtifacts;
|
||||||
|
//# sourceMappingURL=upload-sarif-action-post-helper.js.map
|
||||||
1
lib/upload-sarif-action-post-helper.js.map
Normal file
1
lib/upload-sarif-action-post-helper.js.map
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"upload-sarif-action-post-helper.js","sourceRoot":"","sources":["../src/upload-sarif-action-post-helper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,oDAAsC;AAEtC,4DAA8C;AAEvC,KAAK,UAAU,eAAe,CACnC,oBAIkB;IAElB,MAAM,OAAO,GAAG,WAAW,CAAC,qBAAqB,EAAE,CAAC;IAEpD,gFAAgF;IAChF,IAAI,OAAO,CAAC,GAAG,CAAC,oCAAoC,CAAC,KAAK,MAAM,EAAE,CAAC;QACjE,IAAI,CAAC,IAAI,CACP,2EAA2E,CAC5E,CAAC;QAEF,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;QAE5D,MAAM,QAAQ,GAAa,EAAE,CAAC;QAE9B,IAAI,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;YAC/B,MAAM,UAAU,GAAG,EAAE,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;YAE/C,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;gBACnC,MAAM,UAAU,GAAG,EAAE;qBAClB,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;qBACjD,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAEvC,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;oBACnC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;gBACjE,CAAC;YACH,CAAC;QACH,CAAC;QAED,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACxB,MAAM,oBAAoB,CACxB,QAAQ,EACR,WAAW,EACX,wBAAwB,CACzB,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC;AAzCD,0CAyCC"}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user