From 8f9b20ba502b06426b1612c9633a5514b16652de Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Wed, 24 May 2023 18:13:39 -0400 Subject: [PATCH 1/5] Clarify how to update workflows --- .github/workflows/__analyze-ref-input.yml | 2 +- .github/workflows/__autobuild-action.yml | 2 +- .github/workflows/__config-export.yml | 2 +- .github/workflows/__diagnostics-export.yml | 2 +- .github/workflows/__export-file-baseline-information.yml | 2 +- .github/workflows/__extractor-ram-threads.yml | 2 +- .github/workflows/__go-custom-queries.yml | 2 +- .github/workflows/__go-tracing-autobuilder.yml | 2 +- .github/workflows/__go-tracing-custom-build-steps.yml | 2 +- .github/workflows/__go-tracing-legacy-workflow.yml | 2 +- .github/workflows/__init-with-registries.yml | 2 +- .github/workflows/__javascript-source-root.yml | 2 +- .github/workflows/__ml-powered-queries.yml | 2 +- .github/workflows/__multi-language-autodetect.yml | 2 +- .github/workflows/__packaging-codescanning-config-inputs-js.yml | 2 +- .github/workflows/__packaging-config-inputs-js.yml | 2 +- .github/workflows/__packaging-config-js.yml | 2 +- .github/workflows/__packaging-inputs-js.yml | 2 +- .github/workflows/__remote-config.yml | 2 +- .github/workflows/__rubocop-multi-language.yml | 2 +- .github/workflows/__ruby.yml | 2 +- .github/workflows/__split-workflow.yml | 2 +- .github/workflows/__submit-sarif-failure.yml | 2 +- .github/workflows/__swift-custom-build.yml | 2 +- .github/workflows/__test-autobuild-working-dir.yml | 2 +- .github/workflows/__test-local-codeql.yml | 2 +- .github/workflows/__test-proxy.yml | 2 +- .github/workflows/__unset-environment.yml | 2 +- .github/workflows/__upload-ref-sha-input.yml | 2 +- .github/workflows/__with-checkout-path.yml | 2 +- pr-checks/sync.py | 2 +- 31 files changed, 31 insertions(+), 31 deletions(-) diff --git a/.github/workflows/__analyze-ref-input.yml b/.github/workflows/__analyze-ref-input.yml index eaa4311423..36564db1c3 100644 --- a/.github/workflows/__analyze-ref-input.yml +++ b/.github/workflows/__analyze-ref-input.yml @@ -1,6 +1,6 @@ # Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. name: "PR Check - Analyze: 'ref' and 'sha' from inputs" diff --git a/.github/workflows/__autobuild-action.yml b/.github/workflows/__autobuild-action.yml index 8f9c0c3aba..96e8b33bc6 100644 --- a/.github/workflows/__autobuild-action.yml +++ b/.github/workflows/__autobuild-action.yml @@ -1,6 +1,6 @@ # Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. name: PR Check - autobuild-action diff --git a/.github/workflows/__config-export.yml b/.github/workflows/__config-export.yml index 4fbc4e51e6..dc47f2e190 100644 --- a/.github/workflows/__config-export.yml +++ b/.github/workflows/__config-export.yml @@ -1,6 +1,6 @@ # Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. name: PR Check - Config export diff --git a/.github/workflows/__diagnostics-export.yml b/.github/workflows/__diagnostics-export.yml index 96a6dc12ed..58ea2128a0 100644 --- a/.github/workflows/__diagnostics-export.yml +++ b/.github/workflows/__diagnostics-export.yml @@ -1,6 +1,6 @@ # Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. name: PR Check - Diagnostic export diff --git a/.github/workflows/__export-file-baseline-information.yml b/.github/workflows/__export-file-baseline-information.yml index e7c11fc1d3..4ad63d2693 100644 --- a/.github/workflows/__export-file-baseline-information.yml +++ b/.github/workflows/__export-file-baseline-information.yml @@ -1,6 +1,6 @@ # Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. name: PR Check - Export file baseline information diff --git a/.github/workflows/__extractor-ram-threads.yml b/.github/workflows/__extractor-ram-threads.yml index f0f7c4b436..69dbaf248d 100644 --- a/.github/workflows/__extractor-ram-threads.yml +++ b/.github/workflows/__extractor-ram-threads.yml @@ -1,6 +1,6 @@ # Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. name: PR Check - Extractor ram and threads options test diff --git a/.github/workflows/__go-custom-queries.yml b/.github/workflows/__go-custom-queries.yml index 983bc759ea..8c662f61f6 100644 --- a/.github/workflows/__go-custom-queries.yml +++ b/.github/workflows/__go-custom-queries.yml @@ -1,6 +1,6 @@ # Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. name: 'PR Check - Go: Custom queries' diff --git a/.github/workflows/__go-tracing-autobuilder.yml b/.github/workflows/__go-tracing-autobuilder.yml index ebc72a106b..4a4e631d8b 100644 --- a/.github/workflows/__go-tracing-autobuilder.yml +++ b/.github/workflows/__go-tracing-autobuilder.yml @@ -1,6 +1,6 @@ # Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. name: 'PR Check - Go: tracing with autobuilder step' diff --git a/.github/workflows/__go-tracing-custom-build-steps.yml b/.github/workflows/__go-tracing-custom-build-steps.yml index 89d6a1b470..ae6db55716 100644 --- a/.github/workflows/__go-tracing-custom-build-steps.yml +++ b/.github/workflows/__go-tracing-custom-build-steps.yml @@ -1,6 +1,6 @@ # Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. name: 'PR Check - Go: tracing with custom build steps' diff --git a/.github/workflows/__go-tracing-legacy-workflow.yml b/.github/workflows/__go-tracing-legacy-workflow.yml index f24322b9e6..3a479b554c 100644 --- a/.github/workflows/__go-tracing-legacy-workflow.yml +++ b/.github/workflows/__go-tracing-legacy-workflow.yml @@ -1,6 +1,6 @@ # Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. name: 'PR Check - Go: tracing with legacy workflow' diff --git a/.github/workflows/__init-with-registries.yml b/.github/workflows/__init-with-registries.yml index 05fecab7d2..c6e07522cb 100644 --- a/.github/workflows/__init-with-registries.yml +++ b/.github/workflows/__init-with-registries.yml @@ -1,6 +1,6 @@ # Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. name: 'PR Check - Packaging: Download using registries' diff --git a/.github/workflows/__javascript-source-root.yml b/.github/workflows/__javascript-source-root.yml index 20d80c2c89..d2372f2dba 100644 --- a/.github/workflows/__javascript-source-root.yml +++ b/.github/workflows/__javascript-source-root.yml @@ -1,6 +1,6 @@ # Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. name: PR Check - Custom source root diff --git a/.github/workflows/__ml-powered-queries.yml b/.github/workflows/__ml-powered-queries.yml index fc11c53bc3..a4d580ca76 100644 --- a/.github/workflows/__ml-powered-queries.yml +++ b/.github/workflows/__ml-powered-queries.yml @@ -1,6 +1,6 @@ # Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. name: PR Check - ML-powered queries diff --git a/.github/workflows/__multi-language-autodetect.yml b/.github/workflows/__multi-language-autodetect.yml index ea4f00c6ee..d64655cd0c 100644 --- a/.github/workflows/__multi-language-autodetect.yml +++ b/.github/workflows/__multi-language-autodetect.yml @@ -1,6 +1,6 @@ # Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. name: PR Check - Multi-language repository diff --git a/.github/workflows/__packaging-codescanning-config-inputs-js.yml b/.github/workflows/__packaging-codescanning-config-inputs-js.yml index adc418ea04..8895852d54 100644 --- a/.github/workflows/__packaging-codescanning-config-inputs-js.yml +++ b/.github/workflows/__packaging-codescanning-config-inputs-js.yml @@ -1,6 +1,6 @@ # Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. name: 'PR Check - Packaging: Config and input passed to the CLI' diff --git a/.github/workflows/__packaging-config-inputs-js.yml b/.github/workflows/__packaging-config-inputs-js.yml index 879fecccd3..8471bc6302 100644 --- a/.github/workflows/__packaging-config-inputs-js.yml +++ b/.github/workflows/__packaging-config-inputs-js.yml @@ -1,6 +1,6 @@ # Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. name: 'PR Check - Packaging: Config and input' diff --git a/.github/workflows/__packaging-config-js.yml b/.github/workflows/__packaging-config-js.yml index 18a03452f6..d1513ab758 100644 --- a/.github/workflows/__packaging-config-js.yml +++ b/.github/workflows/__packaging-config-js.yml @@ -1,6 +1,6 @@ # Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. name: 'PR Check - Packaging: Config file' diff --git a/.github/workflows/__packaging-inputs-js.yml b/.github/workflows/__packaging-inputs-js.yml index 700a790079..a39ea9bff9 100644 --- a/.github/workflows/__packaging-inputs-js.yml +++ b/.github/workflows/__packaging-inputs-js.yml @@ -1,6 +1,6 @@ # Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. name: 'PR Check - Packaging: Action input' diff --git a/.github/workflows/__remote-config.yml b/.github/workflows/__remote-config.yml index f0b4dcb1e4..831d2b328a 100644 --- a/.github/workflows/__remote-config.yml +++ b/.github/workflows/__remote-config.yml @@ -1,6 +1,6 @@ # Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. name: PR Check - Remote config file diff --git a/.github/workflows/__rubocop-multi-language.yml b/.github/workflows/__rubocop-multi-language.yml index a5e9626292..7a91a5ca8d 100644 --- a/.github/workflows/__rubocop-multi-language.yml +++ b/.github/workflows/__rubocop-multi-language.yml @@ -1,6 +1,6 @@ # Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. name: PR Check - RuboCop multi-language diff --git a/.github/workflows/__ruby.yml b/.github/workflows/__ruby.yml index eb768b343f..3d1dcd5418 100644 --- a/.github/workflows/__ruby.yml +++ b/.github/workflows/__ruby.yml @@ -1,6 +1,6 @@ # Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. name: PR Check - Ruby analysis diff --git a/.github/workflows/__split-workflow.yml b/.github/workflows/__split-workflow.yml index 4f2d69a6ac..e332ef7115 100644 --- a/.github/workflows/__split-workflow.yml +++ b/.github/workflows/__split-workflow.yml @@ -1,6 +1,6 @@ # Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. name: PR Check - Split workflow diff --git a/.github/workflows/__submit-sarif-failure.yml b/.github/workflows/__submit-sarif-failure.yml index 02cd876eab..88f6473f25 100644 --- a/.github/workflows/__submit-sarif-failure.yml +++ b/.github/workflows/__submit-sarif-failure.yml @@ -1,6 +1,6 @@ # Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. name: PR Check - Submit SARIF after failure diff --git a/.github/workflows/__swift-custom-build.yml b/.github/workflows/__swift-custom-build.yml index b309b4abd7..b5a1cc8b3b 100644 --- a/.github/workflows/__swift-custom-build.yml +++ b/.github/workflows/__swift-custom-build.yml @@ -1,6 +1,6 @@ # Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. name: PR Check - Swift analysis using a custom build command diff --git a/.github/workflows/__test-autobuild-working-dir.yml b/.github/workflows/__test-autobuild-working-dir.yml index e0b039bacf..619d3265dc 100644 --- a/.github/workflows/__test-autobuild-working-dir.yml +++ b/.github/workflows/__test-autobuild-working-dir.yml @@ -1,6 +1,6 @@ # Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. name: PR Check - Autobuild working directory diff --git a/.github/workflows/__test-local-codeql.yml b/.github/workflows/__test-local-codeql.yml index 3a5470ed74..c3cff93ac4 100644 --- a/.github/workflows/__test-local-codeql.yml +++ b/.github/workflows/__test-local-codeql.yml @@ -1,6 +1,6 @@ # Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. name: PR Check - Local CodeQL bundle diff --git a/.github/workflows/__test-proxy.yml b/.github/workflows/__test-proxy.yml index 8666073bec..394824a31b 100644 --- a/.github/workflows/__test-proxy.yml +++ b/.github/workflows/__test-proxy.yml @@ -1,6 +1,6 @@ # Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. name: PR Check - Proxy test diff --git a/.github/workflows/__unset-environment.yml b/.github/workflows/__unset-environment.yml index 54085d2dad..3678de9f91 100644 --- a/.github/workflows/__unset-environment.yml +++ b/.github/workflows/__unset-environment.yml @@ -1,6 +1,6 @@ # Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. name: PR Check - Test unsetting environment variables diff --git a/.github/workflows/__upload-ref-sha-input.yml b/.github/workflows/__upload-ref-sha-input.yml index ebda509007..d062c0340d 100644 --- a/.github/workflows/__upload-ref-sha-input.yml +++ b/.github/workflows/__upload-ref-sha-input.yml @@ -1,6 +1,6 @@ # Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. name: "PR Check - Upload-sarif: 'ref' and 'sha' from inputs" diff --git a/.github/workflows/__with-checkout-path.yml b/.github/workflows/__with-checkout-path.yml index 5be33e0a66..cfb7445a63 100644 --- a/.github/workflows/__with-checkout-path.yml +++ b/.github/workflows/__with-checkout-path.yml @@ -1,6 +1,6 @@ # Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. name: PR Check - Use a custom `checkout_path` diff --git a/pr-checks/sync.py b/pr-checks/sync.py index 36cb3980bb..3cd968abb8 100644 --- a/pr-checks/sync.py +++ b/pr-checks/sync.py @@ -24,7 +24,7 @@ header = """# Warning: This file is generated automatically, and should not be modified. # Instead, please modify the template in the pr-checks directory and run: -# pip install ruamel.yaml && python3 sync.py +# (cd pr-checks; pip install ruamel.yaml && python3 sync.py) # to regenerate this file. """ From dba4f666823f40d6a91c86e16b7db6e0435318f5 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Mon, 22 May 2023 23:01:26 -0400 Subject: [PATCH 2/5] Grant security-events: write permissions --- .github/workflows/__analyze-ref-input.yml | 3 +++ .github/workflows/__autobuild-action.yml | 3 +++ .github/workflows/__config-export.yml | 3 +++ .github/workflows/__diagnostics-export.yml | 3 +++ .github/workflows/__export-file-baseline-information.yml | 3 +++ .github/workflows/__extractor-ram-threads.yml | 3 +++ .github/workflows/__go-custom-queries.yml | 3 +++ .github/workflows/__go-tracing-autobuilder.yml | 3 +++ .github/workflows/__go-tracing-custom-build-steps.yml | 3 +++ .github/workflows/__go-tracing-legacy-workflow.yml | 3 +++ .github/workflows/__init-with-registries.yml | 8 ++++---- .github/workflows/__javascript-source-root.yml | 3 +++ .github/workflows/__ml-powered-queries.yml | 3 +++ .github/workflows/__multi-language-autodetect.yml | 3 +++ .../__packaging-codescanning-config-inputs-js.yml | 3 +++ .github/workflows/__packaging-config-inputs-js.yml | 3 +++ .github/workflows/__packaging-config-js.yml | 3 +++ .github/workflows/__packaging-inputs-js.yml | 3 +++ .github/workflows/__remote-config.yml | 3 +++ .github/workflows/__rubocop-multi-language.yml | 3 +++ .github/workflows/__ruby.yml | 3 +++ .github/workflows/__split-workflow.yml | 3 +++ .github/workflows/__submit-sarif-failure.yml | 3 +++ .github/workflows/__swift-custom-build.yml | 3 +++ .github/workflows/__test-autobuild-working-dir.yml | 3 +++ .github/workflows/__test-local-codeql.yml | 3 +++ .github/workflows/__test-proxy.yml | 3 +++ .github/workflows/__unset-environment.yml | 3 +++ .github/workflows/__upload-ref-sha-input.yml | 3 +++ .github/workflows/__with-checkout-path.yml | 3 +++ pr-checks/sync.py | 4 ++++ 31 files changed, 95 insertions(+), 4 deletions(-) diff --git a/.github/workflows/__analyze-ref-input.yml b/.github/workflows/__analyze-ref-input.yml index 36564db1c3..a185cead93 100644 --- a/.github/workflows/__analyze-ref-input.yml +++ b/.github/workflows/__analyze-ref-input.yml @@ -68,6 +68,9 @@ jobs: - os: windows-latest version: nightly-latest name: "Analyze: 'ref' and 'sha' from inputs" + permissions: + contents: read + security-events: write timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/__autobuild-action.yml b/.github/workflows/__autobuild-action.yml index 96e8b33bc6..9079dce81a 100644 --- a/.github/workflows/__autobuild-action.yml +++ b/.github/workflows/__autobuild-action.yml @@ -32,6 +32,9 @@ jobs: - os: windows-latest version: latest name: autobuild-action + permissions: + contents: read + security-events: write timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/__config-export.yml b/.github/workflows/__config-export.yml index dc47f2e190..481107e2a9 100644 --- a/.github/workflows/__config-export.yml +++ b/.github/workflows/__config-export.yml @@ -38,6 +38,9 @@ jobs: - os: windows-latest version: nightly-latest name: Config export + permissions: + contents: read + security-events: write timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/__diagnostics-export.yml b/.github/workflows/__diagnostics-export.yml index 58ea2128a0..222c6c481e 100644 --- a/.github/workflows/__diagnostics-export.yml +++ b/.github/workflows/__diagnostics-export.yml @@ -44,6 +44,9 @@ jobs: - os: windows-latest version: nightly-latest name: Diagnostic export + permissions: + contents: read + security-events: write timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/__export-file-baseline-information.yml b/.github/workflows/__export-file-baseline-information.yml index 4ad63d2693..efb18bc3c6 100644 --- a/.github/workflows/__export-file-baseline-information.yml +++ b/.github/workflows/__export-file-baseline-information.yml @@ -32,6 +32,9 @@ jobs: - os: windows-latest version: nightly-latest name: Export file baseline information + permissions: + contents: read + security-events: write timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/__extractor-ram-threads.yml b/.github/workflows/__extractor-ram-threads.yml index 69dbaf248d..5de197d7d3 100644 --- a/.github/workflows/__extractor-ram-threads.yml +++ b/.github/workflows/__extractor-ram-threads.yml @@ -28,6 +28,9 @@ jobs: - os: ubuntu-latest version: latest name: Extractor ram and threads options test + permissions: + contents: read + security-events: write timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/__go-custom-queries.yml b/.github/workflows/__go-custom-queries.yml index 8c662f61f6..8212bd271d 100644 --- a/.github/workflows/__go-custom-queries.yml +++ b/.github/workflows/__go-custom-queries.yml @@ -68,6 +68,9 @@ jobs: - os: windows-latest version: nightly-latest name: 'Go: Custom queries' + permissions: + contents: read + security-events: write timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/__go-tracing-autobuilder.yml b/.github/workflows/__go-tracing-autobuilder.yml index 4a4e631d8b..50ff9696ba 100644 --- a/.github/workflows/__go-tracing-autobuilder.yml +++ b/.github/workflows/__go-tracing-autobuilder.yml @@ -54,6 +54,9 @@ jobs: - os: macos-latest version: nightly-latest name: 'Go: tracing with autobuilder step' + permissions: + contents: read + security-events: write timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/__go-tracing-custom-build-steps.yml b/.github/workflows/__go-tracing-custom-build-steps.yml index ae6db55716..29e309c1ff 100644 --- a/.github/workflows/__go-tracing-custom-build-steps.yml +++ b/.github/workflows/__go-tracing-custom-build-steps.yml @@ -54,6 +54,9 @@ jobs: - os: macos-latest version: nightly-latest name: 'Go: tracing with custom build steps' + permissions: + contents: read + security-events: write timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/__go-tracing-legacy-workflow.yml b/.github/workflows/__go-tracing-legacy-workflow.yml index 3a479b554c..295e4d1b80 100644 --- a/.github/workflows/__go-tracing-legacy-workflow.yml +++ b/.github/workflows/__go-tracing-legacy-workflow.yml @@ -54,6 +54,9 @@ jobs: - os: macos-latest version: nightly-latest name: 'Go: tracing with legacy workflow' + permissions: + contents: read + security-events: write timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/__init-with-registries.yml b/.github/workflows/__init-with-registries.yml index c6e07522cb..0a080974cf 100644 --- a/.github/workflows/__init-with-registries.yml +++ b/.github/workflows/__init-with-registries.yml @@ -44,6 +44,10 @@ jobs: - os: windows-latest version: nightly-latest name: 'Packaging: Download using registries' + permissions: + contents: read + packages: read + timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: @@ -128,9 +132,5 @@ jobs: cat $QLCONFIG_PATH exit 1 fi - permissions: - contents: read - packages: read - env: CODEQL_ACTION_TEST_MODE: true diff --git a/.github/workflows/__javascript-source-root.yml b/.github/workflows/__javascript-source-root.yml index d2372f2dba..7b4093508d 100644 --- a/.github/workflows/__javascript-source-root.yml +++ b/.github/workflows/__javascript-source-root.yml @@ -32,6 +32,9 @@ jobs: - os: ubuntu-latest version: nightly-latest name: Custom source root + permissions: + contents: read + security-events: write timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/__ml-powered-queries.yml b/.github/workflows/__ml-powered-queries.yml index a4d580ca76..c21bac0f85 100644 --- a/.github/workflows/__ml-powered-queries.yml +++ b/.github/workflows/__ml-powered-queries.yml @@ -68,6 +68,9 @@ jobs: - os: windows-latest version: nightly-latest name: ML-powered queries + permissions: + contents: read + security-events: write timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/__multi-language-autodetect.yml b/.github/workflows/__multi-language-autodetect.yml index d64655cd0c..39d65bcc03 100644 --- a/.github/workflows/__multi-language-autodetect.yml +++ b/.github/workflows/__multi-language-autodetect.yml @@ -54,6 +54,9 @@ jobs: - os: macos-latest version: nightly-latest name: Multi-language repository + permissions: + contents: read + security-events: write timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/__packaging-codescanning-config-inputs-js.yml b/.github/workflows/__packaging-codescanning-config-inputs-js.yml index 8895852d54..7ca279cef6 100644 --- a/.github/workflows/__packaging-codescanning-config-inputs-js.yml +++ b/.github/workflows/__packaging-codescanning-config-inputs-js.yml @@ -44,6 +44,9 @@ jobs: - os: windows-latest version: nightly-latest name: 'Packaging: Config and input passed to the CLI' + permissions: + contents: read + security-events: write timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/__packaging-config-inputs-js.yml b/.github/workflows/__packaging-config-inputs-js.yml index 8471bc6302..8958937120 100644 --- a/.github/workflows/__packaging-config-inputs-js.yml +++ b/.github/workflows/__packaging-config-inputs-js.yml @@ -44,6 +44,9 @@ jobs: - os: windows-latest version: nightly-latest name: 'Packaging: Config and input' + permissions: + contents: read + security-events: write timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/__packaging-config-js.yml b/.github/workflows/__packaging-config-js.yml index d1513ab758..50922980d5 100644 --- a/.github/workflows/__packaging-config-js.yml +++ b/.github/workflows/__packaging-config-js.yml @@ -44,6 +44,9 @@ jobs: - os: windows-latest version: nightly-latest name: 'Packaging: Config file' + permissions: + contents: read + security-events: write timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/__packaging-inputs-js.yml b/.github/workflows/__packaging-inputs-js.yml index a39ea9bff9..eef70effc0 100644 --- a/.github/workflows/__packaging-inputs-js.yml +++ b/.github/workflows/__packaging-inputs-js.yml @@ -44,6 +44,9 @@ jobs: - os: windows-latest version: nightly-latest name: 'Packaging: Action input' + permissions: + contents: read + security-events: write timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/__remote-config.yml b/.github/workflows/__remote-config.yml index 831d2b328a..5c27cef72f 100644 --- a/.github/workflows/__remote-config.yml +++ b/.github/workflows/__remote-config.yml @@ -68,6 +68,9 @@ jobs: - os: windows-latest version: nightly-latest name: Remote config file + permissions: + contents: read + security-events: write timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/__rubocop-multi-language.yml b/.github/workflows/__rubocop-multi-language.yml index 7a91a5ca8d..15d60a4cd4 100644 --- a/.github/workflows/__rubocop-multi-language.yml +++ b/.github/workflows/__rubocop-multi-language.yml @@ -28,6 +28,9 @@ jobs: - os: ubuntu-latest version: cached name: RuboCop multi-language + permissions: + contents: read + security-events: write timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/__ruby.yml b/.github/workflows/__ruby.yml index 3d1dcd5418..9fada78b3a 100644 --- a/.github/workflows/__ruby.yml +++ b/.github/workflows/__ruby.yml @@ -38,6 +38,9 @@ jobs: - os: macos-latest version: nightly-latest name: Ruby analysis + permissions: + contents: read + security-events: write timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/__split-workflow.yml b/.github/workflows/__split-workflow.yml index e332ef7115..35941185df 100644 --- a/.github/workflows/__split-workflow.yml +++ b/.github/workflows/__split-workflow.yml @@ -38,6 +38,9 @@ jobs: - os: macos-latest version: nightly-latest name: Split workflow + permissions: + contents: read + security-events: write timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/__submit-sarif-failure.yml b/.github/workflows/__submit-sarif-failure.yml index 88f6473f25..662e752c83 100644 --- a/.github/workflows/__submit-sarif-failure.yml +++ b/.github/workflows/__submit-sarif-failure.yml @@ -32,6 +32,9 @@ jobs: - os: ubuntu-latest version: nightly-latest name: Submit SARIF after failure + permissions: + contents: read + security-events: write timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/__swift-custom-build.yml b/.github/workflows/__swift-custom-build.yml index b5a1cc8b3b..5b4be35d53 100644 --- a/.github/workflows/__swift-custom-build.yml +++ b/.github/workflows/__swift-custom-build.yml @@ -38,6 +38,9 @@ jobs: - os: macos-latest version: nightly-latest name: Swift analysis using a custom build command + permissions: + contents: read + security-events: write timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/__test-autobuild-working-dir.yml b/.github/workflows/__test-autobuild-working-dir.yml index 619d3265dc..29ec1c918d 100644 --- a/.github/workflows/__test-autobuild-working-dir.yml +++ b/.github/workflows/__test-autobuild-working-dir.yml @@ -28,6 +28,9 @@ jobs: - os: ubuntu-latest version: latest name: Autobuild working directory + permissions: + contents: read + security-events: write timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/__test-local-codeql.yml b/.github/workflows/__test-local-codeql.yml index c3cff93ac4..4803a86ce4 100644 --- a/.github/workflows/__test-local-codeql.yml +++ b/.github/workflows/__test-local-codeql.yml @@ -28,6 +28,9 @@ jobs: - os: ubuntu-latest version: nightly-latest name: Local CodeQL bundle + permissions: + contents: read + security-events: write timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/__test-proxy.yml b/.github/workflows/__test-proxy.yml index 394824a31b..2d62346573 100644 --- a/.github/workflows/__test-proxy.yml +++ b/.github/workflows/__test-proxy.yml @@ -28,6 +28,9 @@ jobs: - os: ubuntu-latest version: latest name: Proxy test + permissions: + contents: read + security-events: write timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/__unset-environment.yml b/.github/workflows/__unset-environment.yml index 3678de9f91..86d2070aab 100644 --- a/.github/workflows/__unset-environment.yml +++ b/.github/workflows/__unset-environment.yml @@ -40,6 +40,9 @@ jobs: - os: ubuntu-latest version: nightly-latest name: Test unsetting environment variables + permissions: + contents: read + security-events: write timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/__upload-ref-sha-input.yml b/.github/workflows/__upload-ref-sha-input.yml index d062c0340d..3dd296a3fe 100644 --- a/.github/workflows/__upload-ref-sha-input.yml +++ b/.github/workflows/__upload-ref-sha-input.yml @@ -68,6 +68,9 @@ jobs: - os: windows-latest version: nightly-latest name: "Upload-sarif: 'ref' and 'sha' from inputs" + permissions: + contents: read + security-events: write timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/__with-checkout-path.yml b/.github/workflows/__with-checkout-path.yml index cfb7445a63..d55ddc4f5e 100644 --- a/.github/workflows/__with-checkout-path.yml +++ b/.github/workflows/__with-checkout-path.yml @@ -68,6 +68,9 @@ jobs: - os: windows-latest version: nightly-latest name: Use a custom `checkout_path` + permissions: + contents: read + security-events: write timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: diff --git a/pr-checks/sync.py b/pr-checks/sync.py index 3cd968abb8..53604b6166 100644 --- a/pr-checks/sync.py +++ b/pr-checks/sync.py @@ -101,6 +101,10 @@ def writeHeader(checkStream): } }, 'name': checkSpecification['name'], + 'permissions': { + 'contents': 'read', + 'security-events': 'write' + }, 'timeout-minutes': 45, 'runs-on': '${{ matrix.os }}', 'steps': steps, From a5879b7b6ed801f2c9946fea8aa377f8a6e68d21 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Mon, 22 May 2023 23:58:26 -0400 Subject: [PATCH 3/5] Tolerate forks of github/codeql-action --- lib/workflow.js | 4 +++- lib/workflow.js.map | 2 +- src/workflow.ts | 8 ++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/workflow.js b/lib/workflow.js index 7645b93e19..7797e90980 100644 --- a/lib/workflow.js +++ b/lib/workflow.js @@ -298,7 +298,9 @@ function getInputOrThrow(workflow, jobName, actionName, inputName, matrixVars) { * This allows us to test workflow parsing functionality as a CodeQL Action PR check. */ function getAnalyzeActionName() { - if ((0, util_1.getRequiredEnvParam)("GITHUB_REPOSITORY") === "github/codeql-action") { + if ((0, util_1.isInTestMode)() || + process.env["CODEQL_ACTION_TESTING_ENVIRONMENT"] === + "codeql-action-pr-checks") { return "./analyze"; } else { diff --git a/lib/workflow.js.map b/lib/workflow.js.map index 3c8287ade0..9268955168 100644 --- a/lib/workflow.js.map +++ b/lib/workflow.js.map @@ -1 +1 @@ -{"version":3,"file":"workflow.js","sourceRoot":"","sources":["../src/workflow.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAC7B,gDAAwB;AAExB,oDAAsC;AACtC,8CAAgC;AAEhC,kDAAoC;AAEpC,iCAA6C;AAqC7C,SAAS,QAAQ,CAAC,CAAU;IAC1B,OAAO,CAAC,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,QAAQ,CAAC;AAC7C,CAAC;AAED,MAAM,YAAY,GAAG,IAAI,MAAM,CAAC,WAAW,CAAC,CAAC;AAE7C,SAAS,YAAY,CAAC,MAAM;IAC1B,OAAO,MAAM,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC,CAAC,oCAAoC;AAC5F,CAAC;AAED,SAAS,eAAe,CAAC,KAAK;IAC5B,OAAO,IAAI,MAAM,CACf,IAAI,KAAK;SACN,QAAQ,EAAE;SACV,KAAK,CAAC,YAAY,CAAC;SACnB,MAAM,CAAC,UAAU,GAAG,EAAE,GAAG;QACxB,IAAI,GAAG,KAAK,IAAI,EAAE;YAChB,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACjB;aAAM,IAAI,GAAG,KAAK,GAAG,EAAE;YACtB,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACpB;aAAM,IAAI,GAAG,EAAE;YACd,GAA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B;SAAM;QACL,OAAO,8BAA8B,CAAC;KACvC;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,uBAAuB,CACrC,QAAkB,EAClB,OAAe,EACf,UAAiD;IAEjD,OAAO,eAAe,CACpB,QAAQ,EACR,OAAO,EACP,oBAAoB,EAAE,EACtB,UAAU,EACV,UAAU,CACX,CAAC;AACJ,CAAC;AAZD,0DAYC;AAED;;;;;;;;GAQG;AACH,SAAgB,qBAAqB,CACnC,QAAkB,EAClB,OAAe,EACf,UAAiD;IAEjD,OAAO,eAAe,CACpB,QAAQ,EACR,OAAO,EACP,oBAAoB,EAAE,EACtB,QAAQ,EACR,UAAU,CACX,CAAC;AACJ,CAAC;AAZD,sDAYC;AAED;;;;;;;;GAQG;AACH,SAAgB,2BAA2B,CACzC,QAAkB,EAClB,OAAe,EACf,UAAiD;IAEjD,OAAO,CACL,eAAe,CACb,QAAQ,EACR,OAAO,EACP,oBAAoB,EAAE,EACtB,eAAe,EACf,UAAU,CACX,IAAI,IAAA,0BAAmB,EAAC,kBAAkB,CAAC,CAAC,oEAAoE;KAClH,CAAC;AACJ,CAAC;AAdD,kEAcC"} \ No newline at end of file +{"version":3,"file":"workflow.js","sourceRoot":"","sources":["../src/workflow.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAC7B,gDAAwB;AAExB,oDAAsC;AACtC,8CAAgC;AAEhC,kDAAoC;AAEpC,iCAA2D;AAqC3D,SAAS,QAAQ,CAAC,CAAU;IAC1B,OAAO,CAAC,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,QAAQ,CAAC;AAC7C,CAAC;AAED,MAAM,YAAY,GAAG,IAAI,MAAM,CAAC,WAAW,CAAC,CAAC;AAE7C,SAAS,YAAY,CAAC,MAAM;IAC1B,OAAO,MAAM,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC,CAAC,oCAAoC;AAC5F,CAAC;AAED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,GAAG,IAAI,EAAE,KAAK,CAAC,CAAC;SACrD;KACF;IACD,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;QAChD,MAAM,IAAI,KAAK,CACb,iBAAiB,SAAS,aAAa,UAAU,oDAAoD,CACtG,CAAC;KACH;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;GAIG;AACH,SAAS,oBAAoB;IAC3B,IACE,IAAA,mBAAY,GAAE;QACd,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC;YAC9C,yBAAyB,EAC3B;QACA,OAAO,WAAW,CAAC;KACpB;SAAM;QACL,OAAO,8BAA8B,CAAC;KACvC;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,uBAAuB,CACrC,QAAkB,EAClB,OAAe,EACf,UAAiD;IAEjD,OAAO,eAAe,CACpB,QAAQ,EACR,OAAO,EACP,oBAAoB,EAAE,EACtB,UAAU,EACV,UAAU,CACX,CAAC;AACJ,CAAC;AAZD,0DAYC;AAED;;;;;;;;GAQG;AACH,SAAgB,qBAAqB,CACnC,QAAkB,EAClB,OAAe,EACf,UAAiD;IAEjD,OAAO,eAAe,CACpB,QAAQ,EACR,OAAO,EACP,oBAAoB,EAAE,EACtB,QAAQ,EACR,UAAU,CACX,CAAC;AACJ,CAAC;AAZD,sDAYC;AAED;;;;;;;;GAQG;AACH,SAAgB,2BAA2B,CACzC,QAAkB,EAClB,OAAe,EACf,UAAiD;IAEjD,OAAO,CACL,eAAe,CACb,QAAQ,EACR,OAAO,EACP,oBAAoB,EAAE,EACtB,eAAe,EACf,UAAU,CACX,IAAI,IAAA,0BAAmB,EAAC,kBAAkB,CAAC,CAAC,oEAAoE;KAClH,CAAC;AACJ,CAAC;AAdD,kEAcC"} \ No newline at end of file diff --git a/src/workflow.ts b/src/workflow.ts index 0d932cbb05..0b60ffa7a0 100644 --- a/src/workflow.ts +++ b/src/workflow.ts @@ -7,7 +7,7 @@ import * as yaml from "js-yaml"; import * as api from "./api-client"; import { Logger } from "./logging"; -import { getRequiredEnvParam } from "./util"; +import { getRequiredEnvParam, isInTestMode } from "./util"; export interface WorkflowJobStep { name?: string; @@ -389,7 +389,11 @@ function getInputOrThrow( * This allows us to test workflow parsing functionality as a CodeQL Action PR check. */ function getAnalyzeActionName() { - if (getRequiredEnvParam("GITHUB_REPOSITORY") === "github/codeql-action") { + if ( + isInTestMode() || + process.env["CODEQL_ACTION_TESTING_ENVIRONMENT"] === + "codeql-action-pr-checks" + ) { return "./analyze"; } else { return "github/codeql-action/analyze"; From 789f65c9ee9b97a81cdc6d1a015f7bd7bbb6980d Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Mon, 22 May 2023 23:02:01 -0400 Subject: [PATCH 4/5] Improving handling of uploadFailedSarifResult -> [Object object] --- lib/init-action-post-helper.js | 3 ++- lib/init-action-post-helper.js.map | 2 +- src/init-action-post-helper.ts | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/init-action-post-helper.js b/lib/init-action-post-helper.js index f07a9dab79..3aade86446 100644 --- a/lib/init-action-post-helper.js +++ b/lib/init-action-post-helper.js @@ -110,8 +110,9 @@ async function run(uploadDatabaseBundleDebugArtifact, uploadLogsDebugArtifact, p // but we didn't upload anything. if (process.env["CODEQL_ACTION_EXPECT_UPLOAD_FAILED_SARIF"] === "true" && !uploadFailedSarifResult.raw_upload_size_bytes) { + const error = JSON.stringify(uploadFailedSarifResult); throw new Error("Expected to upload a failed SARIF file for this CodeQL code scanning run, " + - `but the result was instead ${uploadFailedSarifResult}.`); + `but the result was instead ${error}.`); } // Upload appropriate Actions artifacts for debugging if (config.debugMode) { diff --git a/lib/init-action-post-helper.js.map b/lib/init-action-post-helper.js.map index 8e17dc5a81..07793ee0d7 100644 --- a/lib/init-action-post-helper.js.map +++ b/lib/init-action-post-helper.js.map @@ -1 +1 @@ -{"version":3,"file":"init-action-post-helper.js","sourceRoot":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GAAmG,CACpG,CAAC;QACF,MAAM,iCAAiC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACxD,MAAM,uBAAuB,CAAC,MAAM,CAAC,CAAC;QAEtC,MAAM,cAAc,CAAC,MAAM,CAAC,CAAC;KAC9B;IAED,OAAO,uBAAuB,CAAC;AACjC,CAAC;AArDD,kBAqDC"} \ No newline at end of file +{"version":3,"file":"init-action-post-helper.js","sourceRoot":"","sources":["../src/init-action-post-helper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AAEtC,4DAA8C;AAC9C,qCAAqC;AACrC,iDAAmD;AACnD,mDAA6D;AAG7D,6DAAuF;AACvF,wDAA0C;AAC1C,iCAKgB;AAChB,yCAKoB;AAWpB,SAAS,mCAAmC,CAC1C,KAAc;IAEd,MAAM,YAAY,GAAG,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC;IACtC,OAAO;QACL,uBAAuB,EAAE,YAAY,CAAC,OAAO;QAC7C,6BAA6B,EAAE,YAAY,CAAC,KAAK;KAClD,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,KAAK,UAAU,sBAAsB,CACnC,MAAc,EACd,aAA4B,EAC5B,QAA2B,EAC3B,MAAc;IAEd,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;QACrB,OAAO,EAAE,iCAAiC,EAAE,0BAA0B,EAAE,CAAC;KAC1E;IACD,MAAM,MAAM,GAAG,MAAM,IAAA,kBAAS,EAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACjD,IAAI,CAAC,CAAC,MAAM,QAAQ,CAAC,QAAQ,CAAC,uBAAO,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC,EAAE;QACxE,OAAO,EAAE,iCAAiC,EAAE,kBAAkB,EAAE,CAAC;KAClE;IACD,MAAM,QAAQ,GAAG,MAAM,IAAA,sBAAW,EAAC,MAAM,CAAC,CAAC;IAC3C,MAAM,OAAO,GAAG,IAAA,0BAAmB,EAAC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;IACjC,IACE,OAAO,CAAC,GAAG,CAAC,0CAA0C,CAAC,KAAK,MAAM;QAClE,CAAC,uBAAuB,CAAC,qBAAqB,EAC9C;QACA,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,uBAAuB,CAAC,CAAC;QACtD,MAAM,IAAI,KAAK,CACb,4EAA4E;YAC1E,8BAA8B,KAAK,GAAG,CACzC,CAAC;KACH;IAED,qDAAqD;IACrD,IAAI,MAAM,CAAC,SAAS,EAAE;QACpB,IAAI,CAAC,IAAI,CACP,mGAAmG,CACpG,CAAC;QACF,MAAM,iCAAiC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACxD,MAAM,uBAAuB,CAAC,MAAM,CAAC,CAAC;QAEtC,MAAM,cAAc,CAAC,MAAM,CAAC,CAAC;KAC9B;IAED,OAAO,uBAAuB,CAAC;AACjC,CAAC;AAtDD,kBAsDC"} \ No newline at end of file diff --git a/src/init-action-post-helper.ts b/src/init-action-post-helper.ts index 4835345c62..a8a7eacd4d 100644 --- a/src/init-action-post-helper.ts +++ b/src/init-action-post-helper.ts @@ -171,9 +171,10 @@ export async function run( process.env["CODEQL_ACTION_EXPECT_UPLOAD_FAILED_SARIF"] === "true" && !uploadFailedSarifResult.raw_upload_size_bytes ) { + const error = JSON.stringify(uploadFailedSarifResult); throw new Error( "Expected to upload a failed SARIF file for this CodeQL code scanning run, " + - `but the result was instead ${uploadFailedSarifResult}.` + `but the result was instead ${error}.` ); } From cc5f2fb43990133b8557d976093f67bbb9008d40 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Mon, 22 May 2023 22:19:51 -0400 Subject: [PATCH 5/5] Gracefully handle decodeURIComponent failure --- lib/fingerprints.js | 9 ++++++++- lib/fingerprints.js.map | 2 +- src/fingerprints.ts | 9 ++++++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/lib/fingerprints.js b/lib/fingerprints.js index a24805b3fb..6bbdb45e74 100644 --- a/lib/fingerprints.js +++ b/lib/fingerprints.js @@ -194,7 +194,14 @@ function resolveUriToFile(location, artifacts, sourceRoot, logger) { logger.debug(`Ignoring location as URI "${location.uri}" is invalid`); return undefined; } - let uri = decodeURIComponent(location.uri); + let uri; + try { + uri = decodeURIComponent(location.uri); + } + catch (e) { + logger.debug(`Ignoring location as URI "${location.uri}" is invalid`); + return undefined; + } // Remove a file scheme, and abort if the scheme is anything else const fileUriPrefix = "file://"; if (uri.startsWith(fileUriPrefix)) { diff --git a/lib/fingerprints.js.map b/lib/fingerprints.js.map index d0b8a11b86..70a61f179e 100644 --- a/lib/fingerprints.js.map +++ b/lib/fingerprints.js.map @@ -1 +1 @@ -{"version":3,"file":"fingerprints.js","sourceRoot":"","sources":["../src/fingerprints.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,gDAAwB;AAExB,gDAAwB;AAKxB,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAC/B,MAAM,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAChC,MAAM,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAC9B,MAAM,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAC9B,MAAM,GAAG,GAAG,KAAK,CAAC;AAClB,MAAM,UAAU,GAAG,GAAG,CAAC;AACvB,MAAM,GAAG,GAAG,cAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI;AAElC,8CAA8C;AAC9C,SAAS,eAAe;IACtB,IAAI,QAAQ,GAAG,cAAI,CAAC,GAAG,CAAC,CAAC,IAAI;IAC7B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,EAAE,CAAC,EAAE,EAAE;QACnC,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;K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/src/fingerprints.ts index 4d4801fa4e..ff6b16e34e 100644 --- a/src/fingerprints.ts +++ b/src/fingerprints.ts @@ -201,7 +201,14 @@ export function resolveUriToFile( logger.debug(`Ignoring location as URI "${location.uri}" is invalid`); return undefined; } - let uri = decodeURIComponent(location.uri as string); + + let uri: string; + try { + uri = decodeURIComponent(location.uri as string); + } catch (e: any) { + logger.debug(`Ignoring location as URI "${location.uri}" is invalid`); + return undefined; + } // Remove a file scheme, and abort if the scheme is anything else const fileUriPrefix = "file://";