Merge pull request #2561 from github/update-v3.27.0-b35b023d9
Merge main into releases/v3
This commit is contained in:
commit
662472033e
1064 changed files with 10861 additions and 8896 deletions
16
.github/actions/prepare-test/action.yml
vendored
16
.github/actions/prepare-test/action.yml
vendored
|
|
@ -2,7 +2,7 @@ name: "Prepare test"
|
||||||
description: Performs some preparation to run tests
|
description: Performs some preparation to run tests
|
||||||
inputs:
|
inputs:
|
||||||
version:
|
version:
|
||||||
description: "The version of the CodeQL CLI to use. Can be 'linked', 'default', 'nightly-latest', 'nightly-YYYY-MM-DD', or 'stable-YYYY-MM-DD'."
|
description: "The version of the CodeQL CLI to use. Can be 'linked', 'default', 'nightly-latest', 'nightly-YYYYMMDD', or 'stable-vX.Y.Z"
|
||||||
required: true
|
required: true
|
||||||
use-all-platform-bundle:
|
use-all-platform-bundle:
|
||||||
description: "If true, we output a tools URL with codeql-bundle.tar.gz file rather than platform-specific URL"
|
description: "If true, we output a tools URL with codeql-bundle.tar.gz file rather than platform-specific URL"
|
||||||
|
|
@ -32,6 +32,14 @@ runs:
|
||||||
run: |
|
run: |
|
||||||
set -e # Fail this Action if `gh release list` fails.
|
set -e # Fail this Action if `gh release list` fails.
|
||||||
|
|
||||||
|
if [[ ${{ inputs.version }} == "linked" ]]; then
|
||||||
|
echo "tools-url=linked" >> "$GITHUB_OUTPUT"
|
||||||
|
exit 0
|
||||||
|
elif [[ ${{ inputs.version }} == "default" ]]; then
|
||||||
|
echo "tools-url=" >> "$GITHUB_OUTPUT"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ ${{ inputs.version }} == "nightly-latest" ]]; then
|
if [[ ${{ inputs.version }} == "nightly-latest" ]]; then
|
||||||
extension="tar.zst"
|
extension="tar.zst"
|
||||||
else
|
else
|
||||||
|
|
@ -56,14 +64,10 @@ runs:
|
||||||
echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/$tag/$artifact_name" >> $GITHUB_OUTPUT
|
echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/$tag/$artifact_name" >> $GITHUB_OUTPUT
|
||||||
elif [[ ${{ inputs.version }} == *"nightly"* ]]; then
|
elif [[ ${{ inputs.version }} == *"nightly"* ]]; then
|
||||||
version=`echo ${{ inputs.version }} | sed -e 's/^.*\-//'`
|
version=`echo ${{ inputs.version }} | sed -e 's/^.*\-//'`
|
||||||
echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/codeql-bundle-$version-manual/$artifact_name" >> $GITHUB_OUTPUT
|
echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/codeql-bundle-$version/$artifact_name" >> $GITHUB_OUTPUT
|
||||||
elif [[ ${{ inputs.version }} == *"stable"* ]]; then
|
elif [[ ${{ inputs.version }} == *"stable"* ]]; then
|
||||||
version=`echo ${{ inputs.version }} | sed -e 's/^.*\-//'`
|
version=`echo ${{ inputs.version }} | sed -e 's/^.*\-//'`
|
||||||
echo "tools-url=https://github.com/github/codeql-action/releases/download/codeql-bundle-$version/$artifact_name" >> $GITHUB_OUTPUT
|
echo "tools-url=https://github.com/github/codeql-action/releases/download/codeql-bundle-$version/$artifact_name" >> $GITHUB_OUTPUT
|
||||||
elif [[ ${{ inputs.version }} == "linked" ]]; then
|
|
||||||
echo "tools-url=linked" >> $GITHUB_OUTPUT
|
|
||||||
elif [[ ${{ inputs.version }} == "default" ]]; then
|
|
||||||
echo "tools-url=" >> $GITHUB_OUTPUT
|
|
||||||
else
|
else
|
||||||
echo "::error::Unrecognized version specified!"
|
echo "::error::Unrecognized version specified!"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
||||||
7
.github/workflows/__all-platform-bundle.yml
generated
vendored
7
.github/workflows/__all-platform-bundle.yml
generated
vendored
|
|
@ -38,12 +38,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__analyze-ref-input.yml
generated
vendored
7
.github/workflows/__analyze-ref-input.yml
generated
vendored
|
|
@ -42,12 +42,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__autobuild-action.yml
generated
vendored
7
.github/workflows/__autobuild-action.yml
generated
vendored
|
|
@ -42,12 +42,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__autobuild-direct-tracing-with-working-dir.yml
generated
vendored
7
.github/workflows/__autobuild-direct-tracing-with-working-dir.yml
generated
vendored
|
|
@ -44,12 +44,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__autobuild-direct-tracing.yml
generated
vendored
7
.github/workflows/__autobuild-direct-tracing.yml
generated
vendored
|
|
@ -44,12 +44,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__build-mode-autobuild.yml
generated
vendored
7
.github/workflows/__build-mode-autobuild.yml
generated
vendored
|
|
@ -38,12 +38,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__build-mode-manual.yml
generated
vendored
7
.github/workflows/__build-mode-manual.yml
generated
vendored
|
|
@ -38,12 +38,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__build-mode-none.yml
generated
vendored
7
.github/workflows/__build-mode-none.yml
generated
vendored
|
|
@ -40,12 +40,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__build-mode-rollback.yml
generated
vendored
7
.github/workflows/__build-mode-rollback.yml
generated
vendored
|
|
@ -38,12 +38,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__cleanup-db-cluster-dir.yml
generated
vendored
7
.github/workflows/__cleanup-db-cluster-dir.yml
generated
vendored
|
|
@ -38,12 +38,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__config-export.yml
generated
vendored
7
.github/workflows/__config-export.yml
generated
vendored
|
|
@ -48,12 +48,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__config-input.yml
generated
vendored
7
.github/workflows/__config-input.yml
generated
vendored
|
|
@ -38,12 +38,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__cpp-deptrace-disabled.yml
generated
vendored
7
.github/workflows/__cpp-deptrace-disabled.yml
generated
vendored
|
|
@ -42,12 +42,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__cpp-deptrace-enabled-on-macos.yml
generated
vendored
7
.github/workflows/__cpp-deptrace-enabled-on-macos.yml
generated
vendored
|
|
@ -38,12 +38,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__cpp-deptrace-enabled.yml
generated
vendored
7
.github/workflows/__cpp-deptrace-enabled.yml
generated
vendored
|
|
@ -42,12 +42,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__diagnostics-export.yml
generated
vendored
7
.github/workflows/__diagnostics-export.yml
generated
vendored
|
|
@ -48,12 +48,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__export-file-baseline-information.yml
generated
vendored
7
.github/workflows/__export-file-baseline-information.yml
generated
vendored
|
|
@ -42,12 +42,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__extractor-ram-threads.yml
generated
vendored
7
.github/workflows/__extractor-ram-threads.yml
generated
vendored
|
|
@ -38,12 +38,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__go-custom-queries.yml
generated
vendored
7
.github/workflows/__go-custom-queries.yml
generated
vendored
|
|
@ -40,12 +40,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml
generated
vendored
7
.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml
generated
vendored
|
|
@ -38,12 +38,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml
generated
vendored
7
.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml
generated
vendored
|
|
@ -38,12 +38,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__go-indirect-tracing-workaround.yml
generated
vendored
7
.github/workflows/__go-indirect-tracing-workaround.yml
generated
vendored
|
|
@ -38,12 +38,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
15
.github/workflows/__go-tracing-autobuilder.yml
generated
vendored
15
.github/workflows/__go-tracing-autobuilder.yml
generated
vendored
|
|
@ -27,10 +27,6 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.13.5
|
|
||||||
- os: macos-12
|
|
||||||
version: stable-v2.13.5
|
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-v2.14.6
|
version: stable-v2.14.6
|
||||||
- os: macos-12
|
- os: macos-12
|
||||||
|
|
@ -47,6 +43,10 @@ jobs:
|
||||||
version: stable-v2.17.6
|
version: stable-v2.17.6
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: stable-v2.17.6
|
version: stable-v2.17.6
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.18.4
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.18.4
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
|
|
@ -68,12 +68,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
15
.github/workflows/__go-tracing-custom-build-steps.yml
generated
vendored
15
.github/workflows/__go-tracing-custom-build-steps.yml
generated
vendored
|
|
@ -27,10 +27,6 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.13.5
|
|
||||||
- os: macos-12
|
|
||||||
version: stable-v2.13.5
|
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-v2.14.6
|
version: stable-v2.14.6
|
||||||
- os: macos-12
|
- os: macos-12
|
||||||
|
|
@ -47,6 +43,10 @@ jobs:
|
||||||
version: stable-v2.17.6
|
version: stable-v2.17.6
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: stable-v2.17.6
|
version: stable-v2.17.6
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.18.4
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.18.4
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
|
|
@ -68,12 +68,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
15
.github/workflows/__go-tracing-legacy-workflow.yml
generated
vendored
15
.github/workflows/__go-tracing-legacy-workflow.yml
generated
vendored
|
|
@ -27,10 +27,6 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.13.5
|
|
||||||
- os: macos-12
|
|
||||||
version: stable-v2.13.5
|
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-v2.14.6
|
version: stable-v2.14.6
|
||||||
- os: macos-12
|
- os: macos-12
|
||||||
|
|
@ -47,6 +43,10 @@ jobs:
|
||||||
version: stable-v2.17.6
|
version: stable-v2.17.6
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: stable-v2.17.6
|
version: stable-v2.17.6
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.18.4
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.18.4
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
|
|
@ -68,12 +68,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__init-with-registries.yml
generated
vendored
7
.github/workflows/__init-with-registries.yml
generated
vendored
|
|
@ -55,12 +55,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__javascript-source-root.yml
generated
vendored
7
.github/workflows/__javascript-source-root.yml
generated
vendored
|
|
@ -42,12 +42,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__job-run-uuid-sarif.yml
generated
vendored
7
.github/workflows/__job-run-uuid-sarif.yml
generated
vendored
|
|
@ -38,12 +38,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__language-aliases.yml
generated
vendored
7
.github/workflows/__language-aliases.yml
generated
vendored
|
|
@ -38,12 +38,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
15
.github/workflows/__multi-language-autodetect.yml
generated
vendored
15
.github/workflows/__multi-language-autodetect.yml
generated
vendored
|
|
@ -27,10 +27,6 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: macos-12
|
|
||||||
version: stable-v2.13.5
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.13.5
|
|
||||||
- os: macos-12
|
- os: macos-12
|
||||||
version: stable-v2.14.6
|
version: stable-v2.14.6
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
|
|
@ -47,6 +43,10 @@ jobs:
|
||||||
version: stable-v2.17.6
|
version: stable-v2.17.6
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-v2.17.6
|
version: stable-v2.17.6
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.18.4
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.18.4
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: default
|
version: default
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
|
|
@ -68,12 +68,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__packaging-codescanning-config-inputs-js.yml
generated
vendored
7
.github/workflows/__packaging-codescanning-config-inputs-js.yml
generated
vendored
|
|
@ -54,12 +54,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__packaging-config-inputs-js.yml
generated
vendored
7
.github/workflows/__packaging-config-inputs-js.yml
generated
vendored
|
|
@ -54,12 +54,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__packaging-config-js.yml
generated
vendored
7
.github/workflows/__packaging-config-js.yml
generated
vendored
|
|
@ -54,12 +54,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__packaging-inputs-js.yml
generated
vendored
7
.github/workflows/__packaging-inputs-js.yml
generated
vendored
|
|
@ -54,12 +54,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__remote-config.yml
generated
vendored
7
.github/workflows/__remote-config.yml
generated
vendored
|
|
@ -40,12 +40,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
19
.github/workflows/__resolve-environment-action.yml
generated
vendored
19
.github/workflows/__resolve-environment-action.yml
generated
vendored
|
|
@ -27,12 +27,6 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.13.5
|
|
||||||
- os: macos-12
|
|
||||||
version: stable-v2.13.5
|
|
||||||
- os: windows-latest
|
|
||||||
version: stable-v2.13.5
|
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
|
|
@ -60,12 +54,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
@ -79,8 +68,7 @@ jobs:
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.version == 'stable-v2.13.5' && 'go' || 'go,javascript-typescript'
|
languages: go,javascript-typescript
|
||||||
}}
|
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
|
||||||
- name: Resolve environment for Go
|
- name: Resolve environment for Go
|
||||||
|
|
@ -94,14 +82,13 @@ jobs:
|
||||||
run: exit 1
|
run: exit 1
|
||||||
|
|
||||||
- name: Resolve environment for JavaScript/TypeScript
|
- name: Resolve environment for JavaScript/TypeScript
|
||||||
if: matrix.version != 'stable-v2.13.5'
|
|
||||||
uses: ./../action/resolve-environment
|
uses: ./../action/resolve-environment
|
||||||
id: resolve-environment-js
|
id: resolve-environment-js
|
||||||
with:
|
with:
|
||||||
language: javascript-typescript
|
language: javascript-typescript
|
||||||
|
|
||||||
- name: Fail if JavaScript/TypeScript configuration present
|
- name: Fail if JavaScript/TypeScript configuration present
|
||||||
if: matrix.version != 'stable-v2.13.5' &&
|
if:
|
||||||
fromJSON(steps.resolve-environment-js.outputs.environment).configuration.javascript
|
fromJSON(steps.resolve-environment-js.outputs.environment).configuration.javascript
|
||||||
run: exit 1
|
run: exit 1
|
||||||
env:
|
env:
|
||||||
|
|
|
||||||
7
.github/workflows/__rubocop-multi-language.yml
generated
vendored
7
.github/workflows/__rubocop-multi-language.yml
generated
vendored
|
|
@ -38,12 +38,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__ruby.yml
generated
vendored
7
.github/workflows/__ruby.yml
generated
vendored
|
|
@ -48,12 +48,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__split-workflow.yml
generated
vendored
7
.github/workflows/__split-workflow.yml
generated
vendored
|
|
@ -48,12 +48,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__submit-sarif-failure.yml
generated
vendored
7
.github/workflows/__submit-sarif-failure.yml
generated
vendored
|
|
@ -42,12 +42,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__swift-autobuild.yml
generated
vendored
7
.github/workflows/__swift-autobuild.yml
generated
vendored
|
|
@ -38,12 +38,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__swift-custom-build.yml
generated
vendored
7
.github/workflows/__swift-custom-build.yml
generated
vendored
|
|
@ -42,12 +42,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__test-autobuild-working-dir.yml
generated
vendored
7
.github/workflows/__test-autobuild-working-dir.yml
generated
vendored
|
|
@ -38,12 +38,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__test-local-codeql.yml
generated
vendored
7
.github/workflows/__test-local-codeql.yml
generated
vendored
|
|
@ -38,12 +38,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__test-proxy.yml
generated
vendored
7
.github/workflows/__test-proxy.yml
generated
vendored
|
|
@ -38,12 +38,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__unset-environment.yml
generated
vendored
7
.github/workflows/__unset-environment.yml
generated
vendored
|
|
@ -40,12 +40,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__upload-ref-sha-input.yml
generated
vendored
7
.github/workflows/__upload-ref-sha-input.yml
generated
vendored
|
|
@ -42,12 +42,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__with-checkout-path.yml
generated
vendored
7
.github/workflows/__with-checkout-path.yml
generated
vendored
|
|
@ -42,12 +42,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
7
.github/workflows/__zstd-bundle-fallback.yml
generated
vendored
7
.github/workflows/__zstd-bundle-fallback.yml
generated
vendored
|
|
@ -40,12 +40,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
113
.github/workflows/__zstd-bundle-streaming.yml
generated
vendored
Normal file
113
.github/workflows/__zstd-bundle-streaming.yml
generated
vendored
Normal file
|
|
@ -0,0 +1,113 @@
|
||||||
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
|
# to regenerate this file.
|
||||||
|
|
||||||
|
name: PR Check - Zstandard bundle (streaming)
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GO111MODULE: auto
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/v*
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
|
workflow_dispatch: {}
|
||||||
|
jobs:
|
||||||
|
zstd-bundle-streaming:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: macos-latest
|
||||||
|
version: linked
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: linked
|
||||||
|
name: Zstandard bundle (streaming)
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
timeout-minutes: 45
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Setup Python on MacOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Prepare test
|
||||||
|
id: prepare-test
|
||||||
|
uses: ./.github/actions/prepare-test
|
||||||
|
with:
|
||||||
|
version: ${{ matrix.version }}
|
||||||
|
use-all-platform-bundle: 'false'
|
||||||
|
setup-kotlin: 'true'
|
||||||
|
- name: Remove CodeQL from toolcache
|
||||||
|
uses: actions/github-script@v7
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const fs = require('fs');
|
||||||
|
const path = require('path');
|
||||||
|
const codeqlPath = path.join(process.env['RUNNER_TOOL_CACHE'], 'CodeQL');
|
||||||
|
fs.rmdirSync(codeqlPath, { recursive: true });
|
||||||
|
- id: init
|
||||||
|
uses: ./../action/init
|
||||||
|
with:
|
||||||
|
languages: javascript
|
||||||
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
- uses: ./../action/analyze
|
||||||
|
with:
|
||||||
|
output: ${{ runner.temp }}/results
|
||||||
|
upload-database: false
|
||||||
|
- name: Upload SARIF
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: zstd-bundle.sarif
|
||||||
|
path: ${{ runner.temp }}/results/javascript.sarif
|
||||||
|
retention-days: 7
|
||||||
|
- name: Check diagnostic with expected tools URL appears in SARIF
|
||||||
|
uses: actions/github-script@v7
|
||||||
|
env:
|
||||||
|
SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const fs = require('fs');
|
||||||
|
|
||||||
|
const sarif = JSON.parse(fs.readFileSync(process.env['SARIF_PATH'], 'utf8'));
|
||||||
|
const run = sarif.runs[0];
|
||||||
|
|
||||||
|
const toolExecutionNotifications = run.invocations[0].toolExecutionNotifications;
|
||||||
|
const downloadTelemetryNotifications = toolExecutionNotifications.filter(n =>
|
||||||
|
n.descriptor.id === 'codeql-action/bundle-download-telemetry'
|
||||||
|
);
|
||||||
|
if (downloadTelemetryNotifications.length !== 1) {
|
||||||
|
core.setFailed(
|
||||||
|
'Expected exactly one reporting descriptor in the ' +
|
||||||
|
`'runs[].invocations[].toolExecutionNotifications[]' SARIF property, but found ` +
|
||||||
|
`${downloadTelemetryNotifications.length}. All notification reporting descriptors: ` +
|
||||||
|
`${JSON.stringify(toolExecutionNotifications)}.`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const toolsUrl = downloadTelemetryNotifications[0].properties.attributes.toolsUrl;
|
||||||
|
console.log(`Found tools URL: ${toolsUrl}`);
|
||||||
|
|
||||||
|
if (!toolsUrl.endsWith('.tar.zst')) {
|
||||||
|
core.setFailed(
|
||||||
|
`Expected the tools URL to be a .tar.zst file, but found ${toolsUrl}.`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
env:
|
||||||
|
CODEQL_ACTION_ZSTD_BUNDLE: true
|
||||||
|
CODEQL_ACTION_ZSTD_BUNDLE_STREAMING_EXTRACTION: true
|
||||||
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
7
.github/workflows/__zstd-bundle.yml
generated
vendored
7
.github/workflows/__zstd-bundle.yml
generated
vendored
|
|
@ -42,12 +42,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on MacOS
|
- name: Setup Python on MacOS
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
if: >-
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
runner.os == 'macOS' && (
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.13.5' ||
|
|
||||||
|
|
||||||
matrix.version == 'stable-v2.14.6')
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
|
||||||
4
.github/workflows/debug-artifacts-legacy.yml
vendored
4
.github/workflows/debug-artifacts-legacy.yml
vendored
|
|
@ -24,11 +24,11 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
version:
|
version:
|
||||||
- stable-v2.13.5
|
|
||||||
- stable-v2.14.6
|
- stable-v2.14.6
|
||||||
- stable-v2.15.5
|
- stable-v2.15.5
|
||||||
- stable-v2.16.6
|
- stable-v2.16.6
|
||||||
- stable-v2.17.6
|
- stable-v2.17.6
|
||||||
|
- stable-v2.18.4
|
||||||
- default
|
- default
|
||||||
- linked
|
- linked
|
||||||
- nightly-latest
|
- nightly-latest
|
||||||
|
|
@ -73,7 +73,7 @@ jobs:
|
||||||
- name: Check expected artifacts exist
|
- name: Check expected artifacts exist
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
VERSIONS="stable-v2.13.5 stable-v2.14.6 stable-v2.15.5 stable-v2.16.6 stable-v2.17.6 default linked nightly-latest"
|
VERSIONS="stable-v2.14.6 stable-v2.15.5 stable-v2.16.6 stable-v2.17.6 stable-v2.18.4 default linked nightly-latest"
|
||||||
LANGUAGES="cpp csharp go java javascript python"
|
LANGUAGES="cpp csharp go java javascript python"
|
||||||
for version in $VERSIONS; do
|
for version in $VERSIONS; do
|
||||||
pushd "./my-debug-artifacts-${version//./}"
|
pushd "./my-debug-artifacts-${version//./}"
|
||||||
|
|
|
||||||
4
.github/workflows/debug-artifacts.yml
vendored
4
.github/workflows/debug-artifacts.yml
vendored
|
|
@ -23,11 +23,11 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
version:
|
version:
|
||||||
- stable-v2.13.5
|
|
||||||
- stable-v2.14.6
|
- stable-v2.14.6
|
||||||
- stable-v2.15.5
|
- stable-v2.15.5
|
||||||
- stable-v2.16.6
|
- stable-v2.16.6
|
||||||
- stable-v2.17.6
|
- stable-v2.17.6
|
||||||
|
- stable-v2.18.4
|
||||||
- default
|
- default
|
||||||
- linked
|
- linked
|
||||||
- nightly-latest
|
- nightly-latest
|
||||||
|
|
@ -72,7 +72,7 @@ jobs:
|
||||||
- name: Check expected artifacts exist
|
- name: Check expected artifacts exist
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
VERSIONS="stable-v2.13.5 stable-v2.14.6 stable-v2.15.5 stable-v2.16.6 stable-v2.17.6 default linked nightly-latest"
|
VERSIONS="stable-v2.14.6 stable-v2.15.5 stable-v2.16.6 stable-v2.17.6 stable-v2.18.4 default linked nightly-latest"
|
||||||
LANGUAGES="cpp csharp go java javascript python"
|
LANGUAGES="cpp csharp go java javascript python"
|
||||||
for version in $VERSIONS; do
|
for version in $VERSIONS; do
|
||||||
pushd "./my-debug-artifacts-${version//./}"
|
pushd "./my-debug-artifacts-${version//./}"
|
||||||
|
|
|
||||||
24
.github/workflows/post-release-mergeback.yml
vendored
24
.github/workflows/post-release-mergeback.yml
vendored
|
|
@ -108,6 +108,17 @@ jobs:
|
||||||
# - `--force` since we're overwriting the `vN` tag
|
# - `--force` since we're overwriting the `vN` tag
|
||||||
git push origin --atomic --force refs/tags/"${VERSION}" refs/tags/"${major_version_tag}"
|
git push origin --atomic --force refs/tags/"${VERSION}" refs/tags/"${major_version_tag}"
|
||||||
|
|
||||||
|
- name: Prepare partial Changelog
|
||||||
|
env:
|
||||||
|
PARTIAL_CHANGELOG: "${{ runner.temp }}/partial_changelog.md"
|
||||||
|
VERSION: "${{ steps.getVersion.outputs.version }}"
|
||||||
|
run: |
|
||||||
|
python .github/workflows/script/prepare_changelog.py CHANGELOG.md "$VERSION" > $PARTIAL_CHANGELOG
|
||||||
|
|
||||||
|
echo "::group::Partial CHANGELOG"
|
||||||
|
cat $PARTIAL_CHANGELOG
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
- name: Create mergeback branch
|
- name: Create mergeback branch
|
||||||
if: ${{ steps.check.outputs.exists != 'true' && endsWith(github.ref_name, steps.getVersion.outputs.latest_release_branch) }}
|
if: ${{ steps.check.outputs.exists != 'true' && endsWith(github.ref_name, steps.getVersion.outputs.latest_release_branch) }}
|
||||||
env:
|
env:
|
||||||
|
|
@ -150,3 +161,16 @@ jobs:
|
||||||
--body "${pr_body}" \
|
--body "${pr_body}" \
|
||||||
--assignee "${GITHUB_ACTOR}" \
|
--assignee "${GITHUB_ACTOR}" \
|
||||||
--draft
|
--draft
|
||||||
|
|
||||||
|
- name: Create the GitHub release
|
||||||
|
env:
|
||||||
|
PARTIAL_CHANGELOG: "${{ runner.temp }}/partial_changelog.md"
|
||||||
|
VERSION: "${{ steps.getVersion.outputs.version }}"
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
# Do not mark this release as latest. The most recent CLI release must be marked as latest.
|
||||||
|
gh release create \
|
||||||
|
"$VERSION" \
|
||||||
|
--latest=false \
|
||||||
|
--title "$VERSION" \
|
||||||
|
--notes-file "$PARTIAL_CHANGELOG"
|
||||||
|
|
|
||||||
3
.github/workflows/pr-checks.yml
vendored
3
.github/workflows/pr-checks.yml
vendored
|
|
@ -13,6 +13,9 @@ jobs:
|
||||||
name: Check JS
|
name: Check JS
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
|
|
||||||
37
.github/workflows/script/prepare_changelog.py
vendored
Normal file
37
.github/workflows/script/prepare_changelog.py
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
EMPTY_CHANGELOG = 'No changes.\n\n'
|
||||||
|
|
||||||
|
# Prepare the changelog for the new release
|
||||||
|
# This function will extract the part of the changelog that
|
||||||
|
# we want to include in the new release.
|
||||||
|
def extract_changelog_snippet(changelog_file, version_tag):
|
||||||
|
output = ''
|
||||||
|
if (not os.path.exists(changelog_file)):
|
||||||
|
output = EMPTY_CHANGELOG
|
||||||
|
|
||||||
|
else:
|
||||||
|
with open('CHANGELOG.md', 'r') as f:
|
||||||
|
lines = f.readlines()
|
||||||
|
|
||||||
|
# Include everything up to, but excluding the second heading
|
||||||
|
found_first_section = False
|
||||||
|
for i, line in enumerate(lines):
|
||||||
|
if line.startswith('## '):
|
||||||
|
if found_first_section:
|
||||||
|
break
|
||||||
|
found_first_section = True
|
||||||
|
output += line
|
||||||
|
|
||||||
|
output += f"See the full [CHANGELOG.md](https://github.com/github/codeql-action/blob/{version_tag}/CHANGELOG.md) for more information."
|
||||||
|
|
||||||
|
return output
|
||||||
|
|
||||||
|
|
||||||
|
if len(sys.argv) < 3:
|
||||||
|
raise Exception('Expecting argument: changelog_file version_tag')
|
||||||
|
changelog_file = sys.argv[1]
|
||||||
|
version_tag = sys.argv[2]
|
||||||
|
|
||||||
|
print(extract_changelog_snippet(changelog_file, version_tag))
|
||||||
|
|
@ -27,8 +27,8 @@ fi
|
||||||
|
|
||||||
echo "Getting checks for $GITHUB_SHA"
|
echo "Getting checks for $GITHUB_SHA"
|
||||||
|
|
||||||
# Ignore any checks with "https://", CodeQL, LGTM, and Update checks.
|
# Ignore any checks with "https://", CodeQL, LGTM, Update, and ESLint checks.
|
||||||
CHECKS="$(gh api repos/github/codeql-action/commits/"${GITHUB_SHA}"/check-runs --paginate | jq --slurp --compact-output --raw-output '[.[].check_runs.[] | select(.conclusion != "skipped") | .name | select(contains("https://") or . == "CodeQL" or . == "Dependabot" or . == "check-expected-release-files" or contains("Update") or contains("update") or contains("test-setup-python-scripts") | not)] | unique | sort')"
|
CHECKS="$(gh api repos/github/codeql-action/commits/"${GITHUB_SHA}"/check-runs --paginate | jq --slurp --compact-output --raw-output '[.[].check_runs.[] | select(.conclusion != "skipped") | .name | select(contains("https://") or . == "CodeQL" or . == "Dependabot" or . == "check-expected-release-files" or contains("Update") or contains("ESLint") or contains("update") or contains("test-setup-python-scripts") | not)] | unique | sort')"
|
||||||
|
|
||||||
echo "$CHECKS" | jq
|
echo "$CHECKS" | jq
|
||||||
|
|
||||||
|
|
|
||||||
12
CHANGELOG.md
12
CHANGELOG.md
|
|
@ -4,6 +4,12 @@ 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.
|
||||||
|
|
||||||
|
## 3.27.0 - 22 Oct 2024
|
||||||
|
|
||||||
|
- Bump the minimum CodeQL bundle version to 2.14.6. [#2549](https://github.com/github/codeql-action/pull/2549)
|
||||||
|
- Fix an issue where the `upload-sarif` Action would fail with "upload-sarif post-action step failed: Input required and not supplied: token" when called in a composite Action that had a different set of inputs to the ones expected by the `upload-sarif` Action. [#2557](https://github.com/github/codeql-action/pull/2557)
|
||||||
|
- Update default CodeQL bundle version to 2.19.2. [#2552](https://github.com/github/codeql-action/pull/2552)
|
||||||
|
|
||||||
## 3.26.13 - 14 Oct 2024
|
## 3.26.13 - 14 Oct 2024
|
||||||
|
|
||||||
No user facing changes.
|
No user facing changes.
|
||||||
|
|
@ -18,11 +24,11 @@ No user facing changes.
|
||||||
|
|
||||||
## 3.26.11 - 03 Oct 2024
|
## 3.26.11 - 03 Oct 2024
|
||||||
|
|
||||||
- _Upcoming breaking change_: Add support for using `actions/download-artifact@v4` to programmatically consume CodeQL Action debug artifacts.
|
- _Upcoming breaking change_: Add support for using `actions/download-artifact@v4` to programmatically consume CodeQL Action debug artifacts.
|
||||||
|
|
||||||
Starting November 30, 2024, GitHub.com customers will [no longer be able to use `actions/download-artifact@v3`](https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/). Therefore, to avoid breakage, customers who programmatically download the CodeQL Action debug artifacts should set the `CODEQL_ACTION_ARTIFACT_V4_UPGRADE` environment variable to `true` and bump `actions/download-artifact@v3` to `actions/download-artifact@v4` in their workflows. The CodeQL Action will enable this behavior by default in early November and workflows that have not yet bumped to `actions/download-artifact@v3` to `actions/download-artifact@v4` will begin failing then.
|
Starting November 30, 2024, GitHub.com customers will [no longer be able to use `actions/download-artifact@v3`](https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/). Therefore, to avoid breakage, customers who programmatically download the CodeQL Action debug artifacts should set the `CODEQL_ACTION_ARTIFACT_V4_UPGRADE` environment variable to `true` and bump `actions/download-artifact@v3` to `actions/download-artifact@v4` in their workflows. The CodeQL Action will enable this behavior by default in early November and workflows that have not yet bumped to `actions/download-artifact@v3` to `actions/download-artifact@v4` will begin failing then.
|
||||||
|
|
||||||
This change is currently unavailable for GitHub Enterprise Server customers, as `actions/upload-artifact@v4` and `actions/download-artifact@v4` are not yet compatible with GHES.
|
This change is currently unavailable for GitHub Enterprise Server customers, as `actions/upload-artifact@v4` and `actions/download-artifact@v4` are not yet compatible with GHES.
|
||||||
- Update default CodeQL bundle version to 2.19.1. [#2519](https://github.com/github/codeql-action/pull/2519)
|
- Update default CodeQL bundle version to 2.19.1. [#2519](https://github.com/github/codeql-action/pull/2519)
|
||||||
|
|
||||||
## 3.26.10 - 30 Sep 2024
|
## 3.26.10 - 30 Sep 2024
|
||||||
|
|
|
||||||
|
|
@ -77,11 +77,11 @@ We typically release new minor versions of the CodeQL Action and Bundle when a n
|
||||||
|
|
||||||
| Minimum CodeQL Action | Minimum CodeQL Bundle Version | GitHub Environment | Notes |
|
| Minimum CodeQL Action | Minimum CodeQL Bundle Version | GitHub Environment | Notes |
|
||||||
|-----------------------|-------------------------------|--------------------|-------|
|
|-----------------------|-------------------------------|--------------------|-------|
|
||||||
|
| `v3.26.6` | `2.18.4` | Enterprise Server 3.15 | |
|
||||||
| `v3.25.11` | `2.17.6` | Enterprise Server 3.14 | |
|
| `v3.25.11` | `2.17.6` | Enterprise Server 3.14 | |
|
||||||
| `v3.24.11` | `2.16.6` | Enterprise Server 3.13 | |
|
| `v3.24.11` | `2.16.6` | Enterprise Server 3.13 | |
|
||||||
| `v3.22.12` | `2.15.5` | Enterprise Server 3.12 | |
|
| `v3.22.12` | `2.15.5` | Enterprise Server 3.12 | |
|
||||||
| `v2.22.1` | `2.14.6` | Enterprise Server 3.11 | Supports CodeQL Action v3, but did not ship with CodeQL Action v3. For more information, see "[Code scanning: deprecation of CodeQL Action v2](https://github.blog/changelog/2024-01-12-code-scanning-deprecation-of-codeql-action-v2/#users-of-github-enterprise-server-311)." |
|
| `v2.22.1` | `2.14.6` | Enterprise Server 3.11 | Supports CodeQL Action v3, but did not ship with CodeQL Action v3. For more information, see "[Code scanning: deprecation of CodeQL Action v2](https://github.blog/changelog/2024-01-12-code-scanning-deprecation-of-codeql-action-v2/#users-of-github-enterprise-server-311)." |
|
||||||
| `v2.20.3` | `2.13.5` | Enterprise Server 3.10 | Does not support CodeQL Action v3. |
|
|
||||||
|
|
||||||
CodeQL Action v2 will stop receiving updates when GHES 3.11 is deprecated.
|
CodeQL Action v2 will stop receiving updates when GHES 3.11 is deprecated.
|
||||||
|
|
||||||
|
|
|
||||||
29
lib/actions-util.js
generated
29
lib/actions-util.js
generated
|
|
@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.CommandInvocationError = exports.getFileType = exports.FileCmdNotFoundError = exports.determineBaseBranchHeadCommitOid = exports.getCommitOid = exports.getOptionalInput = exports.getRequiredInput = void 0;
|
exports.restoreInputs = exports.persistInputs = exports.CommandInvocationError = exports.getFileType = exports.FileCmdNotFoundError = exports.determineBaseBranchHeadCommitOid = exports.getCommitOid = exports.getOptionalInput = exports.getRequiredInput = void 0;
|
||||||
exports.getTemporaryDirectory = getTemporaryDirectory;
|
exports.getTemporaryDirectory = getTemporaryDirectory;
|
||||||
exports.getRef = getRef;
|
exports.getRef = getRef;
|
||||||
exports.getActionVersion = getActionVersion;
|
exports.getActionVersion = getActionVersion;
|
||||||
|
|
@ -468,7 +468,9 @@ const MAX_STDERR_BUFFER_SIZE = 20000;
|
||||||
async function runTool(cmd, args = [], opts = {}) {
|
async function runTool(cmd, args = [], opts = {}) {
|
||||||
let stdout = "";
|
let stdout = "";
|
||||||
let stderr = "";
|
let stderr = "";
|
||||||
process.stdout.write(`[command]${cmd} ${args.join(" ")}\n`);
|
if (!opts.noStreamStdout) {
|
||||||
|
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: {
|
||||||
|
|
@ -498,4 +500,27 @@ async function runTool(cmd, args = [], opts = {}) {
|
||||||
}
|
}
|
||||||
return stdout;
|
return stdout;
|
||||||
}
|
}
|
||||||
|
const persistedInputsKey = "persisted_inputs";
|
||||||
|
/**
|
||||||
|
* Persists all inputs to the action as state that can be retrieved later in the post-action.
|
||||||
|
* This would be simplified if actions/runner#3514 is addressed.
|
||||||
|
* https://github.com/actions/runner/issues/3514
|
||||||
|
*/
|
||||||
|
const persistInputs = function () {
|
||||||
|
const inputEnvironmentVariables = Object.entries(process.env).filter(([name]) => name.startsWith("INPUT_"));
|
||||||
|
core.saveState(persistedInputsKey, JSON.stringify(inputEnvironmentVariables));
|
||||||
|
};
|
||||||
|
exports.persistInputs = persistInputs;
|
||||||
|
/**
|
||||||
|
* Restores all inputs to the action from the persisted state.
|
||||||
|
*/
|
||||||
|
const restoreInputs = function () {
|
||||||
|
const persistedInputs = core.getState(persistedInputsKey);
|
||||||
|
if (persistedInputs) {
|
||||||
|
for (const [name, value] of JSON.parse(persistedInputs)) {
|
||||||
|
process.env[name] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
exports.restoreInputs = restoreInputs;
|
||||||
//# sourceMappingURL=actions-util.js.map
|
//# sourceMappingURL=actions-util.js.map
|
||||||
File diff suppressed because one or more lines are too long
7
lib/analyze-action-post.js
generated
7
lib/analyze-action-post.js
generated
|
|
@ -29,7 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
* other `post:` hooks.
|
* other `post:` hooks.
|
||||||
*/
|
*/
|
||||||
const core = __importStar(require("@actions/core"));
|
const core = __importStar(require("@actions/core"));
|
||||||
const actions_util_1 = require("./actions-util");
|
const actionsUtil = __importStar(require("./actions-util"));
|
||||||
const api_client_1 = require("./api-client");
|
const api_client_1 = require("./api-client");
|
||||||
const config_utils_1 = require("./config-utils");
|
const config_utils_1 = require("./config-utils");
|
||||||
const debugArtifacts = __importStar(require("./debug-artifacts"));
|
const debugArtifacts = __importStar(require("./debug-artifacts"));
|
||||||
|
|
@ -40,15 +40,16 @@ const repository_1 = require("./repository");
|
||||||
const util_1 = require("./util");
|
const util_1 = require("./util");
|
||||||
async function runWrapper() {
|
async function runWrapper() {
|
||||||
try {
|
try {
|
||||||
|
actionsUtil.restoreInputs();
|
||||||
const logger = (0, logging_1.getActionsLogger)();
|
const logger = (0, logging_1.getActionsLogger)();
|
||||||
const gitHubVersion = await (0, api_client_1.getGitHubVersion)();
|
const gitHubVersion = await (0, api_client_1.getGitHubVersion)();
|
||||||
(0, util_1.checkGitHubVersionInRange)(gitHubVersion, logger);
|
(0, util_1.checkGitHubVersionInRange)(gitHubVersion, logger);
|
||||||
const repositoryNwo = (0, repository_1.parseRepositoryNwo)((0, util_1.getRequiredEnvParam)("GITHUB_REPOSITORY"));
|
const repositoryNwo = (0, repository_1.parseRepositoryNwo)((0, util_1.getRequiredEnvParam)("GITHUB_REPOSITORY"));
|
||||||
const features = new feature_flags_1.Features(gitHubVersion, repositoryNwo, (0, actions_util_1.getTemporaryDirectory)(), logger);
|
const features = new feature_flags_1.Features(gitHubVersion, repositoryNwo, actionsUtil.getTemporaryDirectory(), logger);
|
||||||
// Upload SARIF artifacts if we determine that this is a first-party analysis run.
|
// Upload SARIF artifacts if we determine that this is a first-party analysis run.
|
||||||
// For third-party runs, this artifact will be uploaded in the `upload-sarif-post` step.
|
// For third-party runs, this artifact will be uploaded in the `upload-sarif-post` step.
|
||||||
if (process.env[environment_1.EnvVar.INIT_ACTION_HAS_RUN] === "true") {
|
if (process.env[environment_1.EnvVar.INIT_ACTION_HAS_RUN] === "true") {
|
||||||
const config = await (0, config_utils_1.getConfig)((0, actions_util_1.getTemporaryDirectory)(), logger);
|
const config = await (0, config_utils_1.getConfig)(actionsUtil.getTemporaryDirectory(), logger);
|
||||||
if (config !== undefined) {
|
if (config !== undefined) {
|
||||||
await (0, logging_1.withGroup)("Uploading combined SARIF debug artifact", () => debugArtifacts.uploadCombinedSarifArtifacts(logger, config.gitHubVersion.type, features));
|
await (0, logging_1.withGroup)("Uploading combined SARIF debug artifact", () => debugArtifacts.uploadCombinedSarifArtifacts(logger, config.gitHubVersion.type, features));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"analyze-action-post.js","sourceRoot":"","sources":["../src/analyze-action-post.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,oDAAsC;AAEtC,iDAAuD;AACvD,6CAAgD;AAChD,iDAA2C;AAC3C,kEAAoD;AACpD,+CAAuC;AACvC,mDAA2C;AAC3C,uCAAwD;AACxD,6CAAkD;AAClD,iCAIgB;AAEhB,KAAK,UAAU,UAAU;IACvB,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAA,0BAAgB,GAAE,CAAC;QAClC,MAAM,aAAa,GAAG,MAAM,IAAA,6BAAgB,GAAE,CAAC;QAC/C,IAAA,gCAAyB,EAAC,aAAa,EAAE,MAAM,CAAC,CAAC;QACjD,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,kFAAkF;QAClF,wFAAwF;QACxF,IAAI,OAAO,CAAC,GAAG,CAAC,oBA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,qBAAqB,EAAE,EACnC,MAAM,CACP,CAAC;QAEF,kFAAkF;QAClF,wFAAwF;QACxF,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAM,CAAC,mBAAmB,CAAC,KAAK,MAAM,EAAE,CAAC;YACvD,MAAM,MAAM,GAAG,MAAM,IAAA,wBAAS,EAC5B,WAAW,CAAC,qBAAqB,EAAE,EACnC,MAAM,CACP,CAAC;YACF,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;gBACzB,MAAM,IAAA,mBAAS,EAAC,yCAAyC,EAAE,GAAG,EAAE,CAC9D,cAAc,CAAC,4BAA4B,CACzC,MAAM,EACN,MAAM,CAAC,aAAa,CAAC,IAAI,EACzB,QAAQ,CACT,CACF,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,SAAS,CACZ,oCAAoC,IAAA,sBAAe,EAAC,KAAK,CAAC,EAAE,CAC7D,CAAC;IACJ,CAAC;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}
|
||||||
3
lib/analyze-action.js
generated
3
lib/analyze-action.js
generated
|
|
@ -147,6 +147,9 @@ async function run() {
|
||||||
let dbCreationTimings = undefined;
|
let dbCreationTimings = undefined;
|
||||||
let didUploadTrapCaches = false;
|
let didUploadTrapCaches = false;
|
||||||
util.initializeEnvironment(actionsUtil.getActionVersion());
|
util.initializeEnvironment(actionsUtil.getActionVersion());
|
||||||
|
// Make inputs accessible in the `post` step, details at
|
||||||
|
// https://github.com/github/codeql-action/issues/2553
|
||||||
|
actionsUtil.persistInputs();
|
||||||
const logger = (0, logging_1.getActionsLogger)();
|
const logger = (0, logging_1.getActionsLogger)();
|
||||||
try {
|
try {
|
||||||
const statusReportBase = 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);
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
36
lib/codeql.js
generated
36
lib/codeql.js
generated
|
|
@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE = exports.CODEQL_VERSION_ANALYSIS_SUMMARY_V2 = exports.CODEQL_VERSION_LANGUAGE_ALIASING = exports.CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG = void 0;
|
exports.CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE = exports.CODEQL_VERSION_ANALYSIS_SUMMARY_V2 = void 0;
|
||||||
exports.setupCodeQL = setupCodeQL;
|
exports.setupCodeQL = setupCodeQL;
|
||||||
exports.getCodeQL = getCodeQL;
|
exports.getCodeQL = getCodeQL;
|
||||||
exports.setCodeQL = setCodeQL;
|
exports.setCodeQL = setCodeQL;
|
||||||
|
|
@ -63,7 +63,7 @@ let cachedCodeQL = undefined;
|
||||||
* The version flags below can be used to conditionally enable certain features
|
* The version flags below can be used to conditionally enable certain features
|
||||||
* on versions newer than this.
|
* on versions newer than this.
|
||||||
*/
|
*/
|
||||||
const CODEQL_MINIMUM_VERSION = "2.13.5";
|
const CODEQL_MINIMUM_VERSION = "2.14.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.
|
||||||
*/
|
*/
|
||||||
|
|
@ -85,14 +85,6 @@ const EXTRACTION_DEBUG_MODE_VERBOSITY = "progress++";
|
||||||
* For convenience, please keep these in descending order. Once a version
|
* For convenience, please keep these in descending order. Once a version
|
||||||
* flag is older than the oldest supported version above, it may be removed.
|
* flag is older than the oldest supported version above, it may be removed.
|
||||||
*/
|
*/
|
||||||
/**
|
|
||||||
* Versions 2.14.2+ of the CodeQL CLI support language-specific baseline configuration.
|
|
||||||
*/
|
|
||||||
exports.CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG = "2.14.2";
|
|
||||||
/**
|
|
||||||
* Versions 2.14.4+ of the CodeQL CLI support language aliasing.
|
|
||||||
*/
|
|
||||||
exports.CODEQL_VERSION_LANGUAGE_ALIASING = "2.14.4";
|
|
||||||
/**
|
/**
|
||||||
* Versions 2.15.0+ of the CodeQL CLI support new analysis summaries.
|
* Versions 2.15.0+ of the CodeQL CLI support new analysis summaries.
|
||||||
*/
|
*/
|
||||||
|
|
@ -188,7 +180,7 @@ function setCodeQL(partialCodeql) {
|
||||||
extractUsingBuildMode: resolveFunction(partialCodeql, "extractUsingBuildMode"),
|
extractUsingBuildMode: resolveFunction(partialCodeql, "extractUsingBuildMode"),
|
||||||
finalizeDatabase: resolveFunction(partialCodeql, "finalizeDatabase"),
|
finalizeDatabase: resolveFunction(partialCodeql, "finalizeDatabase"),
|
||||||
resolveLanguages: resolveFunction(partialCodeql, "resolveLanguages"),
|
resolveLanguages: resolveFunction(partialCodeql, "resolveLanguages"),
|
||||||
betterResolveLanguages: resolveFunction(partialCodeql, "betterResolveLanguages"),
|
betterResolveLanguages: resolveFunction(partialCodeql, "betterResolveLanguages", async () => ({ aliases: {}, extractors: {} })),
|
||||||
resolveQueries: resolveFunction(partialCodeql, "resolveQueries"),
|
resolveQueries: resolveFunction(partialCodeql, "resolveQueries"),
|
||||||
resolveBuildEnvironment: resolveFunction(partialCodeql, "resolveBuildEnvironment"),
|
resolveBuildEnvironment: resolveFunction(partialCodeql, "resolveBuildEnvironment"),
|
||||||
packDownload: resolveFunction(partialCodeql, "packDownload"),
|
packDownload: resolveFunction(partialCodeql, "packDownload"),
|
||||||
|
|
@ -241,7 +233,9 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
||||||
async getVersion() {
|
async getVersion() {
|
||||||
let result = util.getCachedCodeQlVersion();
|
let result = util.getCachedCodeQlVersion();
|
||||||
if (result === undefined) {
|
if (result === undefined) {
|
||||||
const output = await runCli(cmd, ["version", "--format=json"]);
|
const output = await runCli(cmd, ["version", "--format=json"], {
|
||||||
|
noStreamStdout: true,
|
||||||
|
});
|
||||||
try {
|
try {
|
||||||
result = JSON.parse(output);
|
result = JSON.parse(output);
|
||||||
}
|
}
|
||||||
|
|
@ -278,9 +272,7 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
||||||
if (qlconfigFile !== undefined) {
|
if (qlconfigFile !== undefined) {
|
||||||
extraArgs.push(`--qlconfig-file=${qlconfigFile}`);
|
extraArgs.push(`--qlconfig-file=${qlconfigFile}`);
|
||||||
}
|
}
|
||||||
if (await util.codeQlVersionAtLeast(this, exports.CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG)) {
|
extraArgs.push("--calculate-language-specific-baseline");
|
||||||
extraArgs.push("--calculate-language-specific-baseline");
|
|
||||||
}
|
|
||||||
if (await isSublanguageFileCoverageEnabled(config, this)) {
|
if (await isSublanguageFileCoverageEnabled(config, this)) {
|
||||||
extraArgs.push("--sublanguage-file-coverage");
|
extraArgs.push("--sublanguage-file-coverage");
|
||||||
}
|
}
|
||||||
|
|
@ -297,7 +289,7 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
||||||
"--db-cluster",
|
"--db-cluster",
|
||||||
config.dbLocation,
|
config.dbLocation,
|
||||||
`--source-root=${sourceRoot}`,
|
`--source-root=${sourceRoot}`,
|
||||||
...(await getLanguageAliasingArguments(this)),
|
"--extractor-include-aliases",
|
||||||
...extraArgs,
|
...extraArgs,
|
||||||
...getExtraOptionsFromEnv(["database", "init"], {
|
...getExtraOptionsFromEnv(["database", "init"], {
|
||||||
ignoringOptions: ["--overwrite"],
|
ignoringOptions: ["--overwrite"],
|
||||||
|
|
@ -401,7 +393,7 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
||||||
"languages",
|
"languages",
|
||||||
"--format=betterjson",
|
"--format=betterjson",
|
||||||
"--extractor-options-verbosity=4",
|
"--extractor-options-verbosity=4",
|
||||||
...(await getLanguageAliasingArguments(this)),
|
"--extractor-include-aliases",
|
||||||
...getExtraOptionsFromEnv(["resolve", "languages"]),
|
...getExtraOptionsFromEnv(["resolve", "languages"]),
|
||||||
];
|
];
|
||||||
const output = await runCli(cmd, codeqlArgs);
|
const output = await runCli(cmd, codeqlArgs);
|
||||||
|
|
@ -436,7 +428,7 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
||||||
"resolve",
|
"resolve",
|
||||||
"build-environment",
|
"build-environment",
|
||||||
`--language=${language}`,
|
`--language=${language}`,
|
||||||
...(await getLanguageAliasingArguments(this)),
|
"--extractor-include-aliases",
|
||||||
...getExtraOptionsFromEnv(["resolve", "build-environment"]),
|
...getExtraOptionsFromEnv(["resolve", "build-environment"]),
|
||||||
];
|
];
|
||||||
if (workingDir !== undefined) {
|
if (workingDir !== undefined) {
|
||||||
|
|
@ -633,7 +625,7 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
||||||
"extractor",
|
"extractor",
|
||||||
"--format=json",
|
"--format=json",
|
||||||
`--language=${language}`,
|
`--language=${language}`,
|
||||||
...(await getLanguageAliasingArguments(this)),
|
"--extractor-include-aliases",
|
||||||
...getExtraOptionsFromEnv(["resolve", "extractor"]),
|
...getExtraOptionsFromEnv(["resolve", "extractor"]),
|
||||||
], {
|
], {
|
||||||
silent: true,
|
silent: true,
|
||||||
|
|
@ -834,12 +826,6 @@ async function getTrapCachingExtractorConfigArgsForLang(config, language) {
|
||||||
function getGeneratedCodeScanningConfigPath(config) {
|
function getGeneratedCodeScanningConfigPath(config) {
|
||||||
return path.resolve(config.tempDir, "user-config.yaml");
|
return path.resolve(config.tempDir, "user-config.yaml");
|
||||||
}
|
}
|
||||||
async function getLanguageAliasingArguments(codeql) {
|
|
||||||
if (await util.codeQlVersionAtLeast(codeql, exports.CODEQL_VERSION_LANGUAGE_ALIASING)) {
|
|
||||||
return ["--extractor-include-aliases"];
|
|
||||||
}
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
async function isSublanguageFileCoverageEnabled(config, codeql) {
|
async function isSublanguageFileCoverageEnabled(config, codeql) {
|
||||||
return (
|
return (
|
||||||
// Sub-language file coverage is first supported in GHES 3.12.
|
// Sub-language file coverage is first supported in GHES 3.12.
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
40
lib/codeql.test.js
generated
40
lib/codeql.test.js
generated
|
|
@ -101,7 +101,6 @@ function mockApiDetails(apiDetails) {
|
||||||
t.assert(toolcache.find("CodeQL", `0.0.0-${version}`));
|
t.assert(toolcache.find("CodeQL", `0.0.0-${version}`));
|
||||||
t.is(result.toolsVersion, `0.0.0-${version}`);
|
t.is(result.toolsVersion, `0.0.0-${version}`);
|
||||||
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Download);
|
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Download);
|
||||||
t.assert(Number.isInteger(result.toolsDownloadStatusReport?.downloadDurationMs));
|
|
||||||
}
|
}
|
||||||
t.is(toolcache.findAllVersions("CodeQL").length, 2);
|
t.is(toolcache.findAllVersions("CodeQL").length, 2);
|
||||||
});
|
});
|
||||||
|
|
@ -110,15 +109,17 @@ function mockApiDetails(apiDetails) {
|
||||||
await util.withTmpDir(async (tmpDir) => {
|
await util.withTmpDir(async (tmpDir) => {
|
||||||
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
|
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
|
||||||
const url = (0, testing_utils_1.mockBundleDownloadApi)({
|
const url = (0, testing_utils_1.mockBundleDownloadApi)({
|
||||||
tagName: `codeql-bundle-v2.14.0`,
|
tagName: `codeql-bundle-v2.15.0`,
|
||||||
isPinned: false,
|
isPinned: false,
|
||||||
});
|
});
|
||||||
const result = await codeql.setupCodeQL(url, testing_utils_1.SAMPLE_DOTCOM_API_DETAILS, tmpDir, util.GitHubVariant.DOTCOM, testing_utils_1.SAMPLE_DEFAULT_CLI_VERSION, (0, testing_utils_1.createFeatures)([]), (0, logging_1.getRunnerLogger)(true), false);
|
const result = await codeql.setupCodeQL(url, testing_utils_1.SAMPLE_DOTCOM_API_DETAILS, tmpDir, util.GitHubVariant.DOTCOM, testing_utils_1.SAMPLE_DEFAULT_CLI_VERSION, (0, testing_utils_1.createFeatures)([]), (0, logging_1.getRunnerLogger)(true), false);
|
||||||
t.is(toolcache.findAllVersions("CodeQL").length, 1);
|
t.is(toolcache.findAllVersions("CodeQL").length, 1);
|
||||||
t.assert(toolcache.find("CodeQL", `2.14.0`));
|
t.assert(toolcache.find("CodeQL", `2.15.0`));
|
||||||
t.is(result.toolsVersion, `2.14.0`);
|
t.is(result.toolsVersion, `2.15.0`);
|
||||||
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Download);
|
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Download);
|
||||||
t.assert(Number.isInteger(result.toolsDownloadStatusReport?.downloadDurationMs));
|
if (result.toolsDownloadStatusReport) {
|
||||||
|
assertDurationsInteger(t, result.toolsDownloadStatusReport);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
(0, ava_1.default)("downloads an explicitly requested bundle even if a different version is cached", async (t) => {
|
(0, ava_1.default)("downloads an explicitly requested bundle even if a different version is cached", async (t) => {
|
||||||
|
|
@ -136,7 +137,9 @@ function mockApiDetails(apiDetails) {
|
||||||
t.assert(toolcache.find("CodeQL", "0.0.0-20200610"));
|
t.assert(toolcache.find("CodeQL", "0.0.0-20200610"));
|
||||||
t.deepEqual(result.toolsVersion, "0.0.0-20200610");
|
t.deepEqual(result.toolsVersion, "0.0.0-20200610");
|
||||||
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Download);
|
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Download);
|
||||||
t.assert(Number.isInteger(result.toolsDownloadStatusReport?.downloadDurationMs));
|
if (result.toolsDownloadStatusReport) {
|
||||||
|
assertDurationsInteger(t, result.toolsDownloadStatusReport);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
const EXPLICITLY_REQUESTED_BUNDLE_TEST_CASES = [
|
const EXPLICITLY_REQUESTED_BUNDLE_TEST_CASES = [
|
||||||
|
|
@ -184,7 +187,9 @@ for (const toolcacheVersion of [
|
||||||
const result = await codeql.setupCodeQL(undefined, testing_utils_1.SAMPLE_DOTCOM_API_DETAILS, tmpDir, util.GitHubVariant.DOTCOM, testing_utils_1.SAMPLE_DEFAULT_CLI_VERSION, (0, testing_utils_1.createFeatures)([]), (0, logging_1.getRunnerLogger)(true), false);
|
const result = await codeql.setupCodeQL(undefined, testing_utils_1.SAMPLE_DOTCOM_API_DETAILS, tmpDir, util.GitHubVariant.DOTCOM, testing_utils_1.SAMPLE_DEFAULT_CLI_VERSION, (0, testing_utils_1.createFeatures)([]), (0, logging_1.getRunnerLogger)(true), false);
|
||||||
t.is(result.toolsVersion, testing_utils_1.SAMPLE_DEFAULT_CLI_VERSION.cliVersion);
|
t.is(result.toolsVersion, testing_utils_1.SAMPLE_DEFAULT_CLI_VERSION.cliVersion);
|
||||||
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Toolcache);
|
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Toolcache);
|
||||||
|
t.is(result.toolsDownloadStatusReport?.combinedDurationMs, undefined);
|
||||||
t.is(result.toolsDownloadStatusReport?.downloadDurationMs, undefined);
|
t.is(result.toolsDownloadStatusReport?.downloadDurationMs, undefined);
|
||||||
|
t.is(result.toolsDownloadStatusReport?.extractionDurationMs, undefined);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -202,7 +207,9 @@ for (const toolcacheVersion of [
|
||||||
}, (0, testing_utils_1.createFeatures)([]), (0, logging_1.getRunnerLogger)(true), false);
|
}, (0, testing_utils_1.createFeatures)([]), (0, logging_1.getRunnerLogger)(true), false);
|
||||||
t.deepEqual(result.toolsVersion, "0.0.0-20200601");
|
t.deepEqual(result.toolsVersion, "0.0.0-20200601");
|
||||||
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Toolcache);
|
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Toolcache);
|
||||||
|
t.is(result.toolsDownloadStatusReport?.combinedDurationMs, undefined);
|
||||||
t.is(result.toolsDownloadStatusReport?.downloadDurationMs, undefined);
|
t.is(result.toolsDownloadStatusReport?.downloadDurationMs, undefined);
|
||||||
|
t.is(result.toolsDownloadStatusReport?.extractionDurationMs, undefined);
|
||||||
const cachedVersions = toolcache.findAllVersions("CodeQL");
|
const cachedVersions = toolcache.findAllVersions("CodeQL");
|
||||||
t.is(cachedVersions.length, 1);
|
t.is(cachedVersions.length, 1);
|
||||||
});
|
});
|
||||||
|
|
@ -224,7 +231,9 @@ for (const toolcacheVersion of [
|
||||||
}, (0, testing_utils_1.createFeatures)([]), (0, logging_1.getRunnerLogger)(true), false);
|
}, (0, testing_utils_1.createFeatures)([]), (0, logging_1.getRunnerLogger)(true), false);
|
||||||
t.deepEqual(result.toolsVersion, defaults.cliVersion);
|
t.deepEqual(result.toolsVersion, defaults.cliVersion);
|
||||||
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Download);
|
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Download);
|
||||||
t.assert(Number.isInteger(result.toolsDownloadStatusReport?.downloadDurationMs));
|
if (result.toolsDownloadStatusReport) {
|
||||||
|
assertDurationsInteger(t, result.toolsDownloadStatusReport);
|
||||||
|
}
|
||||||
const cachedVersions = toolcache.findAllVersions("CodeQL");
|
const cachedVersions = toolcache.findAllVersions("CodeQL");
|
||||||
t.is(cachedVersions.length, 2);
|
t.is(cachedVersions.length, 2);
|
||||||
});
|
});
|
||||||
|
|
@ -243,7 +252,9 @@ for (const toolcacheVersion of [
|
||||||
const result = await codeql.setupCodeQL("latest", testing_utils_1.SAMPLE_DOTCOM_API_DETAILS, tmpDir, util.GitHubVariant.DOTCOM, testing_utils_1.SAMPLE_DEFAULT_CLI_VERSION, (0, testing_utils_1.createFeatures)([]), (0, logging_1.getRunnerLogger)(true), false);
|
const result = await codeql.setupCodeQL("latest", testing_utils_1.SAMPLE_DOTCOM_API_DETAILS, tmpDir, util.GitHubVariant.DOTCOM, testing_utils_1.SAMPLE_DEFAULT_CLI_VERSION, (0, testing_utils_1.createFeatures)([]), (0, logging_1.getRunnerLogger)(true), false);
|
||||||
t.deepEqual(result.toolsVersion, defaults.cliVersion);
|
t.deepEqual(result.toolsVersion, defaults.cliVersion);
|
||||||
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Download);
|
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Download);
|
||||||
t.assert(Number.isInteger(result.toolsDownloadStatusReport?.downloadDurationMs));
|
if (result.toolsDownloadStatusReport) {
|
||||||
|
assertDurationsInteger(t, result.toolsDownloadStatusReport);
|
||||||
|
}
|
||||||
const cachedVersions = toolcache.findAllVersions("CodeQL");
|
const cachedVersions = toolcache.findAllVersions("CodeQL");
|
||||||
t.is(cachedVersions.length, 2);
|
t.is(cachedVersions.length, 2);
|
||||||
});
|
});
|
||||||
|
|
@ -254,7 +265,7 @@ for (const toolcacheVersion of [
|
||||||
mockApiDetails(testing_utils_1.SAMPLE_DOTCOM_API_DETAILS);
|
mockApiDetails(testing_utils_1.SAMPLE_DOTCOM_API_DETAILS);
|
||||||
sinon.stub(actionsUtil, "isRunningLocalAction").returns(true);
|
sinon.stub(actionsUtil, "isRunningLocalAction").returns(true);
|
||||||
const releasesApiMock = mockReleaseApi({
|
const releasesApiMock = mockReleaseApi({
|
||||||
assetNames: ["cli-version-2.13.5.txt"],
|
assetNames: ["cli-version-2.14.6.txt"],
|
||||||
tagName: "codeql-bundle-20230203",
|
tagName: "codeql-bundle-20230203",
|
||||||
});
|
});
|
||||||
(0, testing_utils_1.mockBundleDownloadApi)({
|
(0, testing_utils_1.mockBundleDownloadApi)({
|
||||||
|
|
@ -265,13 +276,22 @@ for (const toolcacheVersion of [
|
||||||
const result = await codeql.setupCodeQL("https://github.com/codeql-testing/codeql-cli-nightlies/releases/download/codeql-bundle-20230203/codeql-bundle.tar.gz", testing_utils_1.SAMPLE_DOTCOM_API_DETAILS, tmpDir, util.GitHubVariant.DOTCOM, testing_utils_1.SAMPLE_DEFAULT_CLI_VERSION, (0, testing_utils_1.createFeatures)([]), (0, logging_1.getRunnerLogger)(true), false);
|
const result = await codeql.setupCodeQL("https://github.com/codeql-testing/codeql-cli-nightlies/releases/download/codeql-bundle-20230203/codeql-bundle.tar.gz", testing_utils_1.SAMPLE_DOTCOM_API_DETAILS, tmpDir, util.GitHubVariant.DOTCOM, testing_utils_1.SAMPLE_DEFAULT_CLI_VERSION, (0, testing_utils_1.createFeatures)([]), (0, logging_1.getRunnerLogger)(true), false);
|
||||||
t.is(result.toolsVersion, "0.0.0-20230203");
|
t.is(result.toolsVersion, "0.0.0-20230203");
|
||||||
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Download);
|
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Download);
|
||||||
t.true(Number.isInteger(result.toolsDownloadStatusReport?.downloadDurationMs));
|
if (result.toolsDownloadStatusReport) {
|
||||||
|
assertDurationsInteger(t, result.toolsDownloadStatusReport);
|
||||||
|
}
|
||||||
const cachedVersions = toolcache.findAllVersions("CodeQL");
|
const cachedVersions = toolcache.findAllVersions("CodeQL");
|
||||||
t.is(cachedVersions.length, 1);
|
t.is(cachedVersions.length, 1);
|
||||||
t.is(cachedVersions[0], "0.0.0-20230203");
|
t.is(cachedVersions[0], "0.0.0-20230203");
|
||||||
t.false(releasesApiMock.isDone());
|
t.false(releasesApiMock.isDone());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
function assertDurationsInteger(t, statusReport) {
|
||||||
|
t.assert(Number.isInteger(statusReport?.combinedDurationMs));
|
||||||
|
if (statusReport.downloadDurationMs !== undefined) {
|
||||||
|
t.assert(Number.isInteger(statusReport?.downloadDurationMs));
|
||||||
|
t.assert(Number.isInteger(statusReport?.extractionDurationMs));
|
||||||
|
}
|
||||||
|
}
|
||||||
(0, ava_1.default)("getExtraOptions works for explicit paths", (t) => {
|
(0, ava_1.default)("getExtraOptions works for explicit paths", (t) => {
|
||||||
t.deepEqual(codeql.getExtraOptions({}, ["foo"], []), []);
|
t.deepEqual(codeql.getExtraOptions({}, ["foo"], []), []);
|
||||||
t.deepEqual(codeql.getExtraOptions({ foo: [42] }, ["foo"], []), ["42"]);
|
t.deepEqual(codeql.getExtraOptions({ foo: [42] }, ["foo"], []), ["42"]);
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
14
lib/config-utils.js
generated
14
lib/config-utils.js
generated
|
|
@ -34,7 +34,6 @@ exports.getNoLanguagesError = getNoLanguagesError;
|
||||||
exports.getUnknownLanguagesError = getUnknownLanguagesError;
|
exports.getUnknownLanguagesError = getUnknownLanguagesError;
|
||||||
exports.getLanguagesInRepo = getLanguagesInRepo;
|
exports.getLanguagesInRepo = getLanguagesInRepo;
|
||||||
exports.getLanguages = getLanguages;
|
exports.getLanguages = getLanguages;
|
||||||
exports.getLanguageAliases = getLanguageAliases;
|
|
||||||
exports.getRawLanguages = getRawLanguages;
|
exports.getRawLanguages = getRawLanguages;
|
||||||
exports.getDefaultConfig = getDefaultConfig;
|
exports.getDefaultConfig = getDefaultConfig;
|
||||||
exports.calculateAugmentation = calculateAugmentation;
|
exports.calculateAugmentation = calculateAugmentation;
|
||||||
|
|
@ -54,7 +53,6 @@ const perf_hooks_1 = require("perf_hooks");
|
||||||
const yaml = __importStar(require("js-yaml"));
|
const yaml = __importStar(require("js-yaml"));
|
||||||
const semver = __importStar(require("semver"));
|
const semver = __importStar(require("semver"));
|
||||||
const api = __importStar(require("./api-client"));
|
const api = __importStar(require("./api-client"));
|
||||||
const codeql_1 = require("./codeql");
|
|
||||||
const feature_flags_1 = require("./feature-flags");
|
const feature_flags_1 = require("./feature-flags");
|
||||||
const languages_1 = require("./languages");
|
const languages_1 = require("./languages");
|
||||||
const trap_caching_1 = require("./trap-caching");
|
const trap_caching_1 = require("./trap-caching");
|
||||||
|
|
@ -155,7 +153,7 @@ async function getLanguages(codeQL, languagesInput, repository, logger) {
|
||||||
logger.info(`Automatically detected languages: ${languages.join(", ")}`);
|
logger.info(`Automatically detected languages: ${languages.join(", ")}`);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const aliases = await getLanguageAliases(codeQL);
|
const aliases = (await codeQL.betterResolveLanguages()).aliases;
|
||||||
if (aliases) {
|
if (aliases) {
|
||||||
languages = languages.map((lang) => aliases[lang] || lang);
|
languages = languages.map((lang) => aliases[lang] || lang);
|
||||||
}
|
}
|
||||||
|
|
@ -185,16 +183,6 @@ async function getLanguages(codeQL, languagesInput, repository, logger) {
|
||||||
}
|
}
|
||||||
return parsedLanguages;
|
return parsedLanguages;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* Gets the set of languages supported by CodeQL, along with their aliases if supported by the
|
|
||||||
* version of the CLI.
|
|
||||||
*/
|
|
||||||
async function getLanguageAliases(codeql) {
|
|
||||||
if (await (0, util_1.codeQlVersionAtLeast)(codeql, codeql_1.CODEQL_VERSION_LANGUAGE_ALIASING)) {
|
|
||||||
return (await codeql.betterResolveLanguages()).aliases;
|
|
||||||
}
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* Gets the set of languages in the current repository without checking to
|
* Gets the set of languages in the current repository without checking to
|
||||||
* see if these languages are actually supported by CodeQL.
|
* see if these languages are actually supported by CodeQL.
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"bundleVersion": "codeql-bundle-v2.19.1",
|
"bundleVersion": "codeql-bundle-v2.19.2",
|
||||||
"cliVersion": "2.19.1",
|
"cliVersion": "2.19.2",
|
||||||
"priorBundleVersion": "codeql-bundle-v2.19.0",
|
"priorBundleVersion": "codeql-bundle-v2.19.1",
|
||||||
"priorCliVersion": "2.19.0"
|
"priorCliVersion": "2.19.1"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
30
lib/feature-flags.js
generated
30
lib/feature-flags.js
generated
|
|
@ -45,20 +45,25 @@ exports.CODEQL_VERSION_ZSTD_BUNDLE = "2.19.0";
|
||||||
/**
|
/**
|
||||||
* Feature enablement as returned by the GitHub API endpoint.
|
* Feature enablement as returned by the GitHub API endpoint.
|
||||||
*
|
*
|
||||||
|
* Do not include the `codeql_action_` prefix as this is stripped by the API
|
||||||
|
* endpoint.
|
||||||
|
*
|
||||||
* Legacy features should end with `_enabled`.
|
* Legacy features should end with `_enabled`.
|
||||||
*/
|
*/
|
||||||
var Feature;
|
var Feature;
|
||||||
(function (Feature) {
|
(function (Feature) {
|
||||||
Feature["ArtifactV4Upgrade"] = "artifact_v4_upgrade";
|
Feature["ArtifactV4Upgrade"] = "artifact_v4_upgrade";
|
||||||
Feature["CleanupTrapCaches"] = "cleanup_trap_caches";
|
Feature["CleanupTrapCaches"] = "cleanup_trap_caches";
|
||||||
Feature["CodeqlActionPythonDefaultIsToNotExtractStdlib"] = "codeql_action_python_default_is_to_not_extract_stdlib";
|
|
||||||
Feature["CppDependencyInstallation"] = "cpp_dependency_installation_enabled";
|
Feature["CppDependencyInstallation"] = "cpp_dependency_installation_enabled";
|
||||||
|
Feature["DiffInformedQueries"] = "diff_informed_queries";
|
||||||
Feature["DisableCsharpBuildless"] = "disable_csharp_buildless";
|
Feature["DisableCsharpBuildless"] = "disable_csharp_buildless";
|
||||||
Feature["DisableJavaBuildlessEnabled"] = "disable_java_buildless_enabled";
|
Feature["DisableJavaBuildlessEnabled"] = "disable_java_buildless_enabled";
|
||||||
Feature["DisableKotlinAnalysisEnabled"] = "disable_kotlin_analysis_enabled";
|
Feature["DisableKotlinAnalysisEnabled"] = "disable_kotlin_analysis_enabled";
|
||||||
Feature["ExportDiagnosticsEnabled"] = "export_diagnostics_enabled";
|
Feature["ExportDiagnosticsEnabled"] = "export_diagnostics_enabled";
|
||||||
|
Feature["PythonDefaultIsToNotExtractStdlib"] = "python_default_is_to_not_extract_stdlib";
|
||||||
Feature["QaTelemetryEnabled"] = "qa_telemetry_enabled";
|
Feature["QaTelemetryEnabled"] = "qa_telemetry_enabled";
|
||||||
Feature["ZstdBundle"] = "zstd_bundle";
|
Feature["ZstdBundle"] = "zstd_bundle";
|
||||||
|
Feature["ZstdBundleStreamingExtraction"] = "zstd_bundle_streaming_extraction";
|
||||||
})(Feature || (exports.Feature = Feature = {}));
|
})(Feature || (exports.Feature = Feature = {}));
|
||||||
exports.featureConfig = {
|
exports.featureConfig = {
|
||||||
[Feature.ArtifactV4Upgrade]: {
|
[Feature.ArtifactV4Upgrade]: {
|
||||||
|
|
@ -71,18 +76,18 @@ exports.featureConfig = {
|
||||||
envVar: "CODEQL_ACTION_CLEANUP_TRAP_CACHES",
|
envVar: "CODEQL_ACTION_CLEANUP_TRAP_CACHES",
|
||||||
minimumVersion: undefined,
|
minimumVersion: undefined,
|
||||||
},
|
},
|
||||||
[Feature.CodeqlActionPythonDefaultIsToNotExtractStdlib]: {
|
|
||||||
defaultValue: false,
|
|
||||||
envVar: "CODEQL_ACTION_DISABLE_PYTHON_STANDARD_LIBRARY_EXTRACTION",
|
|
||||||
minimumVersion: undefined,
|
|
||||||
toolsFeature: tools_features_1.ToolsFeature.PythonDefaultIsToNotExtractStdlib,
|
|
||||||
},
|
|
||||||
[Feature.CppDependencyInstallation]: {
|
[Feature.CppDependencyInstallation]: {
|
||||||
defaultValue: false,
|
defaultValue: false,
|
||||||
envVar: "CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES",
|
envVar: "CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES",
|
||||||
legacyApi: true,
|
legacyApi: true,
|
||||||
minimumVersion: "2.15.0",
|
minimumVersion: "2.15.0",
|
||||||
},
|
},
|
||||||
|
[Feature.DiffInformedQueries]: {
|
||||||
|
defaultValue: false,
|
||||||
|
envVar: "CODEQL_ACTION_DIFF_INFORMED_QUERIES",
|
||||||
|
minimumVersion: undefined,
|
||||||
|
toolsFeature: tools_features_1.ToolsFeature.DatabaseInterpretResultsSupportsSarifRunProperty,
|
||||||
|
},
|
||||||
[Feature.DisableCsharpBuildless]: {
|
[Feature.DisableCsharpBuildless]: {
|
||||||
defaultValue: false,
|
defaultValue: false,
|
||||||
envVar: "CODEQL_ACTION_DISABLE_CSHARP_BUILDLESS",
|
envVar: "CODEQL_ACTION_DISABLE_CSHARP_BUILDLESS",
|
||||||
|
|
@ -106,6 +111,12 @@ exports.featureConfig = {
|
||||||
legacyApi: true,
|
legacyApi: true,
|
||||||
minimumVersion: undefined,
|
minimumVersion: undefined,
|
||||||
},
|
},
|
||||||
|
[Feature.PythonDefaultIsToNotExtractStdlib]: {
|
||||||
|
defaultValue: false,
|
||||||
|
envVar: "CODEQL_ACTION_DISABLE_PYTHON_STANDARD_LIBRARY_EXTRACTION",
|
||||||
|
minimumVersion: undefined,
|
||||||
|
toolsFeature: tools_features_1.ToolsFeature.PythonDefaultIsToNotExtractStdlib,
|
||||||
|
},
|
||||||
[Feature.QaTelemetryEnabled]: {
|
[Feature.QaTelemetryEnabled]: {
|
||||||
defaultValue: false,
|
defaultValue: false,
|
||||||
envVar: "CODEQL_ACTION_QA_TELEMETRY",
|
envVar: "CODEQL_ACTION_QA_TELEMETRY",
|
||||||
|
|
@ -119,6 +130,11 @@ exports.featureConfig = {
|
||||||
// version check separately.
|
// version check separately.
|
||||||
minimumVersion: undefined,
|
minimumVersion: undefined,
|
||||||
},
|
},
|
||||||
|
[Feature.ZstdBundleStreamingExtraction]: {
|
||||||
|
defaultValue: false,
|
||||||
|
envVar: "CODEQL_ACTION_ZSTD_BUNDLE_STREAMING_EXTRACTION",
|
||||||
|
minimumVersion: undefined,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
exports.FEATURE_FLAGS_FILE_NAME = "cached-feature-flags.json";
|
exports.FEATURE_FLAGS_FILE_NAME = "cached-feature-flags.json";
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
7
lib/feature-flags.test.js
generated
7
lib/feature-flags.test.js
generated
|
|
@ -318,6 +318,13 @@ for (const feature of Object.keys(feature_flags_1.featureConfig)) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
(0, ava_1.default)("non-legacy feature flags should not start with codeql_action_", async (t) => {
|
||||||
|
for (const [feature, config] of Object.entries(feature_flags_1.featureConfig)) {
|
||||||
|
if (!config.legacyApi) {
|
||||||
|
t.false(feature.startsWith("codeql_action_"), `non-legacy feature ${feature} should not start with 'codeql_action_'`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
function assertAllFeaturesUndefinedInApi(t, loggedMessages) {
|
function assertAllFeaturesUndefinedInApi(t, loggedMessages) {
|
||||||
for (const feature of Object.keys(feature_flags_1.featureConfig)) {
|
for (const feature of Object.keys(feature_flags_1.featureConfig)) {
|
||||||
t.assert(loggedMessages.find((v) => v.type === "debug" &&
|
t.assert(loggedMessages.find((v) => v.type === "debug" &&
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
2
lib/init-action-post.js
generated
2
lib/init-action-post.js
generated
|
|
@ -45,6 +45,8 @@ async function runWrapper() {
|
||||||
let config;
|
let config;
|
||||||
let uploadFailedSarifResult;
|
let uploadFailedSarifResult;
|
||||||
try {
|
try {
|
||||||
|
// Restore inputs from `init` Action.
|
||||||
|
(0, actions_util_1.restoreInputs)();
|
||||||
const gitHubVersion = await (0, api_client_1.getGitHubVersion)();
|
const gitHubVersion = await (0, api_client_1.getGitHubVersion)();
|
||||||
(0, util_1.checkGitHubVersionInRange)(gitHubVersion, logger);
|
(0, util_1.checkGitHubVersionInRange)(gitHubVersion, logger);
|
||||||
const repositoryNwo = (0, repository_1.parseRepositoryNwo)((0, util_1.getRequiredEnvParam)("GITHUB_REPOSITORY"));
|
const repositoryNwo = (0, repository_1.parseRepositoryNwo)((0, util_1.getRequiredEnvParam)("GITHUB_REPOSITORY"));
|
||||||
|
|
|
||||||
|
|
@ -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,mDAOyB;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,mCAAmC,EAClD,6BAAc,EACd,MAAM,EACN,aAAa,EACb,QAAQ,EACR,MAAM,CACP,CAAC;IACJ,CAAC;IAAC,OAAO,cAAc,EAAE,CAAC;QACxB,MAAM,KAAK,GAAG,IA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0BAAU,CAAC,QAAQ,EACnB,IAAA,gCAAgB,EAAC,KAAK,CAAC,EACvB,SAAS,EACT,MAAM,EACN,MAAM,IAAA,qBAAc,EAAC,MAAM,CAAC,EAC5B,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,EAAC,MAAM,CAAC,EAC5B,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"}
|
||||||
29
lib/init-action.js
generated
29
lib/init-action.js
generated
|
|
@ -58,7 +58,7 @@ async function sendCompletedStatusReport(startedAt, config, configFile, toolsDow
|
||||||
workflow_languages: workflowLanguages || "",
|
workflow_languages: workflowLanguages || "",
|
||||||
};
|
};
|
||||||
const initToolsDownloadFields = {};
|
const initToolsDownloadFields = {};
|
||||||
if (toolsDownloadStatusReport !== undefined) {
|
if (toolsDownloadStatusReport?.downloadDurationMs !== undefined) {
|
||||||
initToolsDownloadFields.tools_download_duration_ms =
|
initToolsDownloadFields.tools_download_duration_ms =
|
||||||
toolsDownloadStatusReport.downloadDurationMs;
|
toolsDownloadStatusReport.downloadDurationMs;
|
||||||
}
|
}
|
||||||
|
|
@ -129,6 +129,8 @@ async function run() {
|
||||||
const startedAt = new Date();
|
const startedAt = new Date();
|
||||||
const logger = (0, logging_1.getActionsLogger)();
|
const logger = (0, logging_1.getActionsLogger)();
|
||||||
(0, util_1.initializeEnvironment)((0, actions_util_1.getActionVersion)());
|
(0, util_1.initializeEnvironment)((0, actions_util_1.getActionVersion)());
|
||||||
|
// Make inputs accessible in the `post` step.
|
||||||
|
(0, actions_util_1.persistInputs)();
|
||||||
let config;
|
let config;
|
||||||
let codeql;
|
let codeql;
|
||||||
let toolsDownloadStatusReport;
|
let toolsDownloadStatusReport;
|
||||||
|
|
@ -299,23 +301,6 @@ async function run() {
|
||||||
if (await features.getValue(feature_flags_1.Feature.DisableKotlinAnalysisEnabled)) {
|
if (await features.getValue(feature_flags_1.Feature.DisableKotlinAnalysisEnabled)) {
|
||||||
core.exportVariable("CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN", "true");
|
core.exportVariable("CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN", "true");
|
||||||
}
|
}
|
||||||
const kotlinLimitVar = "CODEQL_EXTRACTOR_KOTLIN_OVERRIDE_MAXIMUM_VERSION_LIMIT";
|
|
||||||
if (!(await (0, util_1.codeQlVersionAtLeast)(codeql, "2.14.4"))) {
|
|
||||||
core.exportVariable(kotlinLimitVar, "1.9.20");
|
|
||||||
}
|
|
||||||
if (config.languages.includes(languages_1.Language.java) &&
|
|
||||||
// Java Lombok support is enabled by default for >= 2.14.4
|
|
||||||
(await (0, util_1.codeQlVersionAtLeast)(codeql, "2.14.0")) &&
|
|
||||||
!(await (0, util_1.codeQlVersionAtLeast)(codeql, "2.14.4"))) {
|
|
||||||
const envVar = "CODEQL_EXTRACTOR_JAVA_RUN_ANNOTATION_PROCESSORS";
|
|
||||||
if (process.env[envVar]) {
|
|
||||||
logger.info(`Environment variable ${envVar} already set. Not en/disabling CodeQL Java Lombok support`);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
logger.info("Enabling CodeQL Java Lombok support");
|
|
||||||
core.exportVariable(envVar, "true");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (config.languages.includes(languages_1.Language.cpp)) {
|
if (config.languages.includes(languages_1.Language.cpp)) {
|
||||||
const envVar = "CODEQL_EXTRACTOR_CPP_TRAP_CACHING";
|
const envVar = "CODEQL_EXTRACTOR_CPP_TRAP_CACHING";
|
||||||
if (process.env[envVar]) {
|
if (process.env[envVar]) {
|
||||||
|
|
@ -360,10 +345,12 @@ async function run() {
|
||||||
logger.warning("The CODEQL_ACTION_DISABLE_PYTHON_DEPENDENCY_INSTALLATION environment variable is deprecated and no longer has any effect. We recommend removing any references from your workflows. See https://github.blog/changelog/2024-01-23-codeql-2-16-python-dependency-installation-disabled-new-queries-and-bug-fixes/ for more information.");
|
logger.warning("The CODEQL_ACTION_DISABLE_PYTHON_DEPENDENCY_INSTALLATION environment variable is deprecated and no longer has any effect. We recommend removing any references from your workflows. See https://github.blog/changelog/2024-01-23-codeql-2-16-python-dependency-installation-disabled-new-queries-and-bug-fixes/ for more information.");
|
||||||
}
|
}
|
||||||
if (await codeql.supportsFeature(tools_features_1.ToolsFeature.PythonDefaultIsToNotExtractStdlib)) {
|
if (await codeql.supportsFeature(tools_features_1.ToolsFeature.PythonDefaultIsToNotExtractStdlib)) {
|
||||||
// We are in the case where the default has switched to not extracting the stdlib.
|
if (process.env["CODEQL_EXTRACTOR_PYTHON_EXTRACT_STDLIB"]) {
|
||||||
if (!(await features.getValue(feature_flags_1.Feature.CodeqlActionPythonDefaultIsToNotExtractStdlib, codeql))) {
|
logger.debug("CODEQL_EXTRACTOR_PYTHON_EXTRACT_STDLIB is already set, so the Action will not override it.");
|
||||||
|
}
|
||||||
|
else if (!(await features.getValue(feature_flags_1.Feature.PythonDefaultIsToNotExtractStdlib, codeql))) {
|
||||||
// We are in a situation where the feature flag is not rolled out,
|
// We are in a situation where the feature flag is not rolled out,
|
||||||
// so we need to suppress the new default behavior.
|
// so we need to suppress the new default CLI behavior.
|
||||||
core.exportVariable("CODEQL_EXTRACTOR_PYTHON_EXTRACT_STDLIB", "true");
|
core.exportVariable("CODEQL_EXTRACTOR_PYTHON_EXTRACT_STDLIB", "true");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"init.js","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,gCAyCC;AAED,gCAgBC;AAED,0BAkCC;AAED,0DAeC;AAMD,sDAkBC;AAED,0EAkDC;AA/MD,uCAAyB;AACzB,2CAA6B;AAE7B,yEAA2D;AAC3D,kEAAoD;AAEpD,iDAAsE;AAEtE,qCAA+C;AAC/C,4DAA8C;AAE9C,2CAA0D;AAI1D,qDAAgD;AAChD,mDAAwE;AACxE,6CAA+B;AAExB,KAAK,UAAU,UAAU,CAC9B,UAA8B,EAC9B,UAA4B,EAC5B,OAAe,EACf,OAA2B,EAC3B,iBAA2C,EAC3C,QAA2B,EAC3B,MAAc;IAQd,MAAM,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;IACxC,MAAM,EACJ,MAAM,EACN,yBAAyB,EACzB,WAAW,EACX,YAAY,EACZ,gBAAgB,GACjB,GAAG,MAAM,IAAA,oBAAW,EACnB,UAAU,EACV,UAAU,EACV,OAAO,EACP,OAAO,EACP,iBAAiB,EACjB,QAAQ,EACR,MAAM,EACN,IAAI,CACL,CAAC;IACF,MAAM,MAAM,CAAC,YAAY,EAAE,CAAC;IAC5B,MAAM,CAAC,QAAQ,EAAE,CAAC;IAClB,OAAO;QACL,MAAM;QACN,yBAAyB;QACzB,WAAW;QACX,YAAY;QACZ,gBAAgB;K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AAE,CACrE,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC"}
|
||||||
13
lib/logging.js
generated
13
lib/logging.js
generated
|
|
@ -26,6 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.getActionsLogger = getActionsLogger;
|
exports.getActionsLogger = getActionsLogger;
|
||||||
exports.getRunnerLogger = getRunnerLogger;
|
exports.getRunnerLogger = getRunnerLogger;
|
||||||
exports.withGroup = withGroup;
|
exports.withGroup = withGroup;
|
||||||
|
exports.formatDuration = formatDuration;
|
||||||
const core = __importStar(require("@actions/core"));
|
const core = __importStar(require("@actions/core"));
|
||||||
function getActionsLogger() {
|
function getActionsLogger() {
|
||||||
return core;
|
return core;
|
||||||
|
|
@ -54,4 +55,16 @@ function withGroup(groupName, f) {
|
||||||
core.endGroup();
|
core.endGroup();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/** Format a duration for use in logs. */
|
||||||
|
function formatDuration(durationMs) {
|
||||||
|
if (durationMs < 1000) {
|
||||||
|
return `${durationMs}ms`;
|
||||||
|
}
|
||||||
|
if (durationMs < 60 * 1000) {
|
||||||
|
return `${(durationMs / 1000).toFixed(1)}s`;
|
||||||
|
}
|
||||||
|
const minutes = Math.floor(durationMs / (60 * 1000));
|
||||||
|
const seconds = Math.floor((durationMs % (60 * 1000)) / 1000);
|
||||||
|
return `${minutes}m${seconds}s`;
|
||||||
|
}
|
||||||
//# sourceMappingURL=logging.js.map
|
//# sourceMappingURL=logging.js.map
|
||||||
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"logging.js","sourceRoot":"","sources":["../src/logging.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAcA,4CAEC;AAED,0CAcC;AAED,8BAOC;AAzCD,oDAAsC;AActC,SAAgB,gBAAgB;IAC9B,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAgB,eAAe,CAAC,SAAkB;IAChD,OAAO;QACL,sCAAsC;QACtC,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;QAC3B,QAAQ,EAAE,GAAG,EAAE,CAAC,SAAS;KAC1B,CAAC;AACJ,CAAC;AAED,SAAgB,SAAS,CAAI,SAAiB,EAAE,CAAU;IACxD,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IAC3B,IAAI,CAAC;QACH,OAAO,CAAC,EAAE,CAAC;IACb,CAAC;YAAS,CAAC;QACT,IAAI,CAAC,QAAQ,EAAE,CAAC;IAClB,CAAC;AACH,CAAC;AAED,yCAAyC;AACzC,SAAgB,cAAc,CAAC,UAAkB;IAC/C,IAAI,UAAU,GAAG,IAAI,EAAE,CAAC;QACtB,OAAO,GAAG,UAAU,IAAI,CAAC;IAC3B,CAAC;IAED,IAAI,UAAU,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC;QAC3B,OAAO,GAAG,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;IAC9C,CAAC;IACD,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;IACrD,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,UAAU,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAC9D,OAAO,GAAG,OAAO,IAAI,OAAO,GAAG,CAAC;AAClC,CAAC"}
|
||||||
39
lib/resolve-environment.js
generated
39
lib/resolve-environment.js
generated
|
|
@ -1,45 +1,10 @@
|
||||||
"use strict";
|
"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 });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.runResolveBuildEnvironment = runResolveBuildEnvironment;
|
exports.runResolveBuildEnvironment = runResolveBuildEnvironment;
|
||||||
const codeql_1 = require("./codeql");
|
const codeql_1 = require("./codeql");
|
||||||
const languages_1 = require("./languages");
|
async function runResolveBuildEnvironment(cmd, logger, workingDir, language) {
|
||||||
const util = __importStar(require("./util"));
|
logger.startGroup(`Attempting to resolve build environment for ${language}`);
|
||||||
async function runResolveBuildEnvironment(cmd, logger, workingDir, languageInput) {
|
|
||||||
logger.startGroup(`Attempting to resolve build environment for ${languageInput}`);
|
|
||||||
const codeql = await (0, codeql_1.getCodeQL)(cmd);
|
const codeql = await (0, codeql_1.getCodeQL)(cmd);
|
||||||
let language = languageInput;
|
|
||||||
// If the CodeQL CLI version in use supports language aliasing, give the CLI the raw language
|
|
||||||
// input. Otherwise, parse the language input and give the CLI the parsed language.
|
|
||||||
if (!(await util.codeQlVersionAtLeast(codeql, codeql_1.CODEQL_VERSION_LANGUAGE_ALIASING))) {
|
|
||||||
const parsedLanguage = (0, languages_1.parseLanguage)(languageInput)?.toString();
|
|
||||||
if (parsedLanguage === undefined) {
|
|
||||||
throw new util.ConfigurationError(`Did not recognize the language '${languageInput}'.`);
|
|
||||||
}
|
|
||||||
language = parsedLanguage;
|
|
||||||
}
|
|
||||||
if (workingDir !== undefined) {
|
if (workingDir !== undefined) {
|
||||||
logger.info(`Using ${workingDir} as the working directory.`);
|
logger.info(`Using ${workingDir} as the working directory.`);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"resolve-environment.js","sourceRoot":"","sources":["../src/resolve-environment.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAKA,gEAmCC;AAxCD,qCAAuE;AACvE,2CAA4C;AAE5C,6CAA+B;AAExB,KAAK,UAAU,0BAA0B,CAC9C,GAAW,EACX,MAAc,EACd,UAA8B,EAC9B,aAAqB;IAErB,MAAM,CAAC,UAAU,CACf,+CAA+C,aAAa,EAAE,CAC/D,CAAC;IAEF,MAAM,MAAM,GAAG,MAAM,IAAA,kBAAS,EAAC,GAAG,CAAC,CAAC;IAEpC,IAAI,QAAQ,GAAG,aAAa,CAAC;IAC7B,6FAA6F;IAC7F,mFAAmF;IACnF,IACE,CAAC,CAAC,MAAM,IAAI,CAAC,oBAAoB,CAAC,MAAM,EAAE,yCAAgC,CAAC,CAAC,EAC5E,CAAC;QACD,MAAM,cAAc,GAAG,IAAA,yBAAa,EAAC,aAAa,CAAC,EAAE,QAAQ,EAAE,CAAC;QAChE,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,IAAI,IAAI,CAAC,kBAAkB,CAC/B,mCAAmC,aAAa,IAAI,CACrD,CAAC;QACJ,CAAC;QACD,QAAQ,GAAG,cAAc,CAAC;IAC5B,CAAC;IAED,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC7B,MAAM,CAAC,IAAI,CAAC,SAAS,UAAU,4BAA4B,CAAC,CAAC;IAC/D,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,uBAAuB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAE1E,MAAM,CAAC,QAAQ,EAAE,CAAC;IAClB,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
{"version":3,"file":"resolve-environment.js","sourceRoot":"","sources":["../src/resolve-environment.ts"],"names":[],"mappings":";;AAGA,gEAkBC;AArBD,qCAAqC;AAG9B,KAAK,UAAU,0BAA0B,CAC9C,GAAW,EACX,MAAc,EACd,UAA8B,EAC9B,QAAgB;IAEhB,MAAM,CAAC,UAAU,CAAC,+CAA+C,QAAQ,EAAE,CAAC,CAAC;IAE7E,MAAM,MAAM,GAAG,MAAM,IAAA,kBAAS,EAAC,GAAG,CAAC,CAAC;IAEpC,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC7B,MAAM,CAAC,IAAI,CAAC,SAAS,UAAU,4BAA4B,CAAC,CAAC;IAC/D,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,uBAAuB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAE1E,MAAM,CAAC,QAAQ,EAAE,CAAC;IAClB,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
||||||
56
lib/setup-codeql.js
generated
56
lib/setup-codeql.js
generated
|
|
@ -40,15 +40,13 @@ const perf_hooks_1 = require("perf_hooks");
|
||||||
const toolcache = __importStar(require("@actions/tool-cache"));
|
const toolcache = __importStar(require("@actions/tool-cache"));
|
||||||
const fast_deep_equal_1 = __importDefault(require("fast-deep-equal"));
|
const fast_deep_equal_1 = __importDefault(require("fast-deep-equal"));
|
||||||
const semver = __importStar(require("semver"));
|
const semver = __importStar(require("semver"));
|
||||||
const uuid_1 = require("uuid");
|
|
||||||
const actions_util_1 = require("./actions-util");
|
const actions_util_1 = require("./actions-util");
|
||||||
const api = __importStar(require("./api-client"));
|
const api = __importStar(require("./api-client"));
|
||||||
// Note: defaults.json is referenced from the CodeQL Action sync tool and the Actions runner image
|
|
||||||
// creation scripts. Ensure that any changes to the format of this file are compatible with both of
|
|
||||||
// these dependents.
|
|
||||||
const defaults = __importStar(require("./defaults.json"));
|
const defaults = __importStar(require("./defaults.json"));
|
||||||
const feature_flags_1 = require("./feature-flags");
|
const feature_flags_1 = require("./feature-flags");
|
||||||
|
const logging_1 = require("./logging");
|
||||||
const tar = __importStar(require("./tar"));
|
const tar = __importStar(require("./tar"));
|
||||||
|
const tools_download_1 = require("./tools-download");
|
||||||
const util = __importStar(require("./util"));
|
const util = __importStar(require("./util"));
|
||||||
const util_1 = require("./util");
|
const util_1 = require("./util");
|
||||||
var ToolsSource;
|
var ToolsSource;
|
||||||
|
|
@ -343,10 +341,10 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian
|
||||||
(await useZstdBundle(cliVersion, features, tarSupportsZstd)), logger);
|
(await useZstdBundle(cliVersion, features, tarSupportsZstd)), logger);
|
||||||
}
|
}
|
||||||
if (cliVersion) {
|
if (cliVersion) {
|
||||||
logger.info(`Using CodeQL CLI version ${cliVersion} sourced from ${url}.`);
|
logger.info(`Using CodeQL CLI version ${cliVersion} sourced from ${url} .`);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logger.info(`Using CodeQL CLI sourced from ${url}.`);
|
logger.info(`Using CodeQL CLI sourced from ${url} .`);
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
bundleVersion: tagName && tryGetBundleVersionFromTagName(tagName, logger),
|
bundleVersion: tagName && tryGetBundleVersionFromTagName(tagName, logger),
|
||||||
|
|
@ -372,7 +370,7 @@ async function tryGetFallbackToolcacheVersion(cliVersion, tagName, logger) {
|
||||||
}
|
}
|
||||||
// Exported using `export const` for testing purposes. Specifically, we want to
|
// Exported using `export const` for testing purposes. Specifically, we want to
|
||||||
// be able to stub this function and have other functions in this file use that stub.
|
// be able to stub this function and have other functions in this file use that stub.
|
||||||
const downloadCodeQL = async function (codeqlURL, maybeBundleVersion, maybeCliVersion, apiDetails, tarVersion, tempDir, logger) {
|
const downloadCodeQL = async function (codeqlURL, maybeBundleVersion, maybeCliVersion, apiDetails, tarVersion, tempDir, features, logger) {
|
||||||
const parsedCodeQLURL = new URL(codeqlURL);
|
const parsedCodeQLURL = new URL(codeqlURL);
|
||||||
const searchParams = new URLSearchParams(parsedCodeQLURL.search);
|
const searchParams = new URLSearchParams(parsedCodeQLURL.search);
|
||||||
const headers = {
|
const headers = {
|
||||||
|
|
@ -394,56 +392,29 @@ const downloadCodeQL = async function (codeqlURL, maybeBundleVersion, maybeCliVe
|
||||||
else {
|
else {
|
||||||
logger.debug("Downloading CodeQL tools without an authorization token.");
|
logger.debug("Downloading CodeQL tools without an authorization token.");
|
||||||
}
|
}
|
||||||
logger.info(`Downloading CodeQL tools from ${codeqlURL} . This may take a while.`);
|
const { extractedBundlePath, statusReport } = await (0, tools_download_1.downloadAndExtract)(codeqlURL, authorization, { "User-Agent": "CodeQL Action", ...headers }, tarVersion, tempDir, features, logger);
|
||||||
const compressionMethod = tar.inferCompressionMethod(codeqlURL);
|
|
||||||
const dest = path.join(tempDir, (0, uuid_1.v4)());
|
|
||||||
const finalHeaders = Object.assign({ "User-Agent": "CodeQL Action" }, headers);
|
|
||||||
const toolsDownloadStart = perf_hooks_1.performance.now();
|
|
||||||
const archivedBundlePath = await toolcache.downloadTool(codeqlURL, dest, authorization, finalHeaders);
|
|
||||||
const downloadDurationMs = Math.round(perf_hooks_1.performance.now() - toolsDownloadStart);
|
|
||||||
logger.debug(`Finished downloading CodeQL bundle to ${archivedBundlePath} (${downloadDurationMs} ms).`);
|
|
||||||
let extractedBundlePath;
|
|
||||||
let extractionDurationMs;
|
|
||||||
try {
|
|
||||||
logger.debug("Extracting CodeQL bundle.");
|
|
||||||
const extractionStart = perf_hooks_1.performance.now();
|
|
||||||
extractedBundlePath = await tar.extract(archivedBundlePath, compressionMethod, tarVersion, logger);
|
|
||||||
extractionDurationMs = Math.round(perf_hooks_1.performance.now() - extractionStart);
|
|
||||||
logger.debug(`Finished extracting CodeQL bundle to ${extractedBundlePath} (${extractionDurationMs} ms).`);
|
|
||||||
}
|
|
||||||
finally {
|
|
||||||
await (0, util_1.cleanUpGlob)(archivedBundlePath, "CodeQL bundle archive", logger);
|
|
||||||
}
|
|
||||||
const bundleVersion = maybeBundleVersion ?? tryGetBundleVersionFromUrl(codeqlURL, logger);
|
const bundleVersion = maybeBundleVersion ?? tryGetBundleVersionFromUrl(codeqlURL, logger);
|
||||||
if (bundleVersion === undefined) {
|
if (bundleVersion === undefined) {
|
||||||
logger.debug("Could not cache CodeQL tools because we could not determine the bundle version from the " +
|
logger.debug("Could not cache CodeQL tools because we could not determine the bundle version from the " +
|
||||||
`URL ${codeqlURL}.`);
|
`URL ${codeqlURL}.`);
|
||||||
return {
|
return {
|
||||||
codeqlFolder: extractedBundlePath,
|
codeqlFolder: extractedBundlePath,
|
||||||
statusReport: {
|
statusReport,
|
||||||
compressionMethod,
|
|
||||||
downloadDurationMs,
|
|
||||||
extractionDurationMs,
|
|
||||||
toolsUrl: sanitizeUrlForStatusReport(codeqlURL),
|
|
||||||
},
|
|
||||||
toolsVersion: maybeCliVersion ?? "unknown",
|
toolsVersion: maybeCliVersion ?? "unknown",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
logger.debug("Caching CodeQL bundle.");
|
logger.debug("Caching CodeQL bundle.");
|
||||||
const toolcacheVersion = getCanonicalToolcacheVersion(maybeCliVersion, bundleVersion, logger);
|
const toolcacheVersion = getCanonicalToolcacheVersion(maybeCliVersion, bundleVersion, logger);
|
||||||
|
const toolcacheStart = perf_hooks_1.performance.now();
|
||||||
const toolcachedBundlePath = await toolcache.cacheDir(extractedBundlePath, "CodeQL", toolcacheVersion);
|
const toolcachedBundlePath = await toolcache.cacheDir(extractedBundlePath, "CodeQL", toolcacheVersion);
|
||||||
|
logger.info(`Added CodeQL bundle to the tool cache (${(0, logging_1.formatDuration)(perf_hooks_1.performance.now() - toolcacheStart)}).`);
|
||||||
// Defensive check: we expect `cacheDir` to copy the bundle to a new location.
|
// Defensive check: we expect `cacheDir` to copy the bundle to a new location.
|
||||||
if (toolcachedBundlePath !== extractedBundlePath) {
|
if (toolcachedBundlePath !== extractedBundlePath) {
|
||||||
await (0, util_1.cleanUpGlob)(extractedBundlePath, "CodeQL bundle from temporary directory", logger);
|
await (0, util_1.cleanUpGlob)(extractedBundlePath, "CodeQL bundle from temporary directory", logger);
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
codeqlFolder: toolcachedBundlePath,
|
codeqlFolder: toolcachedBundlePath,
|
||||||
statusReport: {
|
statusReport,
|
||||||
compressionMethod,
|
|
||||||
downloadDurationMs,
|
|
||||||
extractionDurationMs,
|
|
||||||
toolsUrl: sanitizeUrlForStatusReport(codeqlURL),
|
|
||||||
},
|
|
||||||
toolsVersion: maybeCliVersion ?? toolcacheVersion,
|
toolsVersion: maybeCliVersion ?? toolcacheVersion,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -529,7 +500,7 @@ async function setupCodeQLBundleWithCompressionMethod(toolsInput, apiDetails, te
|
||||||
toolsSource = ToolsSource.Toolcache;
|
toolsSource = ToolsSource.Toolcache;
|
||||||
break;
|
break;
|
||||||
case "download": {
|
case "download": {
|
||||||
const result = await (0, exports.downloadCodeQL)(source.codeqlURL, source.bundleVersion, source.cliVersion, apiDetails, zstdAvailability.version, tempDir, logger);
|
const result = await (0, exports.downloadCodeQL)(source.codeqlURL, source.bundleVersion, source.cliVersion, apiDetails, zstdAvailability.version, tempDir, features, logger);
|
||||||
toolsVersion = result.toolsVersion;
|
toolsVersion = result.toolsVersion;
|
||||||
codeqlFolder = result.codeqlFolder;
|
codeqlFolder = result.codeqlFolder;
|
||||||
toolsDownloadStatusReport = result.statusReport;
|
toolsDownloadStatusReport = result.statusReport;
|
||||||
|
|
@ -547,11 +518,6 @@ async function setupCodeQLBundleWithCompressionMethod(toolsInput, apiDetails, te
|
||||||
zstdAvailability,
|
zstdAvailability,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
function sanitizeUrlForStatusReport(url) {
|
|
||||||
return ["github/codeql-action", "dsp-testing/codeql-cli-nightlies"].some((repo) => url.startsWith(`https://github.com/${repo}/releases/download/`))
|
|
||||||
? url
|
|
||||||
: "sanitized-value";
|
|
||||||
}
|
|
||||||
async function useZstdBundle(cliVersion, features, tarSupportsZstd) {
|
async function useZstdBundle(cliVersion, features, tarSupportsZstd) {
|
||||||
return (
|
return (
|
||||||
// In testing, gzip performs better than zstd on Windows.
|
// In testing, gzip performs better than zstd on Windows.
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
6
lib/setup-codeql.test.js
generated
6
lib/setup-codeql.test.js
generated
|
|
@ -116,9 +116,11 @@ ava_1.default.beforeEach(() => {
|
||||||
sinon.stub(setupCodeql, "downloadCodeQL").resolves({
|
sinon.stub(setupCodeql, "downloadCodeQL").resolves({
|
||||||
codeqlFolder: "codeql",
|
codeqlFolder: "codeql",
|
||||||
statusReport: {
|
statusReport: {
|
||||||
|
combinedDurationMs: 500,
|
||||||
compressionMethod: "gzip",
|
compressionMethod: "gzip",
|
||||||
downloadDurationMs: 200,
|
downloadDurationMs: 200,
|
||||||
extractionDurationMs: 300,
|
extractionDurationMs: 300,
|
||||||
|
streamExtraction: false,
|
||||||
toolsUrl: "toolsUrl",
|
toolsUrl: "toolsUrl",
|
||||||
},
|
},
|
||||||
toolsVersion: testing_utils_1.LINKED_CLI_VERSION.cliVersion,
|
toolsVersion: testing_utils_1.LINKED_CLI_VERSION.cliVersion,
|
||||||
|
|
@ -145,9 +147,11 @@ ava_1.default.beforeEach(() => {
|
||||||
sinon.stub(setupCodeql, "downloadCodeQL").resolves({
|
sinon.stub(setupCodeql, "downloadCodeQL").resolves({
|
||||||
codeqlFolder: "codeql",
|
codeqlFolder: "codeql",
|
||||||
statusReport: {
|
statusReport: {
|
||||||
|
combinedDurationMs: 500,
|
||||||
compressionMethod: "gzip",
|
compressionMethod: "gzip",
|
||||||
downloadDurationMs: 200,
|
downloadDurationMs: 200,
|
||||||
extractionDurationMs: 300,
|
extractionDurationMs: 300,
|
||||||
|
streamExtraction: false,
|
||||||
toolsUrl: bundleUrl,
|
toolsUrl: bundleUrl,
|
||||||
},
|
},
|
||||||
toolsVersion: expectedVersion,
|
toolsVersion: expectedVersion,
|
||||||
|
|
@ -159,7 +163,7 @@ ava_1.default.beforeEach(() => {
|
||||||
// bundle contains..
|
// bundle contains..
|
||||||
t.is(result.toolsVersion, expectedVersion);
|
t.is(result.toolsVersion, expectedVersion);
|
||||||
// Ensure message logging CodeQL CLI version was present in user logs.
|
// Ensure message logging CodeQL CLI version was present in user logs.
|
||||||
const expected_message = `Using CodeQL CLI version 2.16.0 sourced from ${bundleUrl}.`;
|
const expected_message = `Using CodeQL CLI version 2.16.0 sourced from ${bundleUrl} .`;
|
||||||
t.assert(loggedMessages.some((msg) => typeof msg.message === "string" &&
|
t.assert(loggedMessages.some((msg) => typeof msg.message === "string" &&
|
||||||
msg.message.includes(expected_message)));
|
msg.message.includes(expected_message)));
|
||||||
});
|
});
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
2
lib/start-proxy-action-post.js
generated
2
lib/start-proxy-action-post.js
generated
|
|
@ -39,6 +39,8 @@ const repository_1 = require("./repository");
|
||||||
const util_1 = require("./util");
|
const util_1 = require("./util");
|
||||||
async function runWrapper() {
|
async function runWrapper() {
|
||||||
try {
|
try {
|
||||||
|
// Restore inputs from `start-proxy` Action.
|
||||||
|
actionsUtil.restoreInputs();
|
||||||
const pid = core.getState("proxy-process-pid");
|
const pid = core.getState("proxy-process-pid");
|
||||||
if (pid) {
|
if (pid) {
|
||||||
process.kill(Number(pid));
|
process.kill(Number(pid));
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"start-proxy-action-post.js","sourceRoot":"","sources":["../src/start-proxy-action-post.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,oDAAsC;AAEtC,4DAA8C;AA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aAAa,EACb,WAAW,CAAC,qBAAqB,EAAE,EACnC,MAAM,CACP,CAAC;QAEF,IAAI,CAAC;YACH,MAAM,gBAAgB,GAAG,MAAM,IAAA,2CAAyB,EACtD,MAAM,EACN,aAAa,CAAC,IAAI,EAClB,QAAQ,CACT,CAAC;YAEF,MAAM,gBAAgB,CAAC,cAAc,CACnC,gBAAgB,EAChB,CAAC,WAAW,CAAC,EACb,WAAW,CAAC,qBAAqB,EAAE,EACnC;gBACE,wFAAwF;gBACxF,aAAa,EAAE,CAAC;aACjB,CACF,CAAC;QACJ,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,yEAAyE;YACzE,IAAI,CAAC,OAAO,CAAC,qCAAqC,CAAC,EAAE,CAAC,CAAC;QACzD,CAAC;IACH,CAAC;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}
|
{"version":3,"file":"start-proxy-action-post.js","sourceRoot":"","sources":["../src/start-proxy-action-post.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,oDAAsC;AAEtC,4DAA8C;AAC9C,6CAAgD;AAChD,4DAA8C;AAC9C,uDAA8D;AAC9D,mDAA2C;AAC3C,uCAA6C;AAC7C,6CAAkD;AAClD,iCAIgB;AAEhB,KAAK,UAAU,UAAU;IACvB,IAAI,CAAC;QACH,4CAA4C;QAC5C,WAAW,CAAC,aAAa,EAAE,CAAC;QAC5B,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;QAC/C,IAAI,GAAG,EAAE,CAAC;YACR,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,SAAS,CACZ,wCAAwC,IAAA,sBAAe,EAAC,KAAK,CAAC,EAAE,CACjE,CAAC;IACJ,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,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AAC;AAED,KAAK,UAAU,EAAE,CAAC"}
|
||||||
2
lib/start-proxy-action.js
generated
2
lib/start-proxy-action.js
generated
|
|
@ -80,6 +80,8 @@ function generateCertificateAuthority() {
|
||||||
return { cert: pem, key };
|
return { cert: pem, key };
|
||||||
}
|
}
|
||||||
async function runWrapper() {
|
async function runWrapper() {
|
||||||
|
// Make inputs accessible in the `post` step.
|
||||||
|
actionsUtil.persistInputs();
|
||||||
const logger = (0, logging_1.getActionsLogger)();
|
const logger = (0, logging_1.getActionsLogger)();
|
||||||
// Setup logging for the proxy
|
// Setup logging for the proxy
|
||||||
const tempDir = actionsUtil.getTemporaryDirectory();
|
const tempDir = actionsUtil.getTemporaryDirectory();
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
47
lib/tar.js
generated
47
lib/tar.js
generated
|
|
@ -30,6 +30,7 @@ exports.isZstdAvailable = isZstdAvailable;
|
||||||
exports.extract = extract;
|
exports.extract = extract;
|
||||||
exports.extractTarZst = extractTarZst;
|
exports.extractTarZst = extractTarZst;
|
||||||
exports.inferCompressionMethod = inferCompressionMethod;
|
exports.inferCompressionMethod = inferCompressionMethod;
|
||||||
|
const child_process_1 = require("child_process");
|
||||||
const fs = __importStar(require("fs"));
|
const fs = __importStar(require("fs"));
|
||||||
const path_1 = __importDefault(require("path"));
|
const path_1 = __importDefault(require("path"));
|
||||||
const toolrunner_1 = require("@actions/exec/lib/toolrunner");
|
const toolrunner_1 = require("@actions/exec/lib/toolrunner");
|
||||||
|
|
@ -122,7 +123,7 @@ async function extract(tarPath, compressionMethod, tarVersion, logger) {
|
||||||
if (!tarVersion) {
|
if (!tarVersion) {
|
||||||
throw new Error("Could not determine tar version, which is required to extract a Zstandard archive.");
|
throw new Error("Could not determine tar version, which is required to extract a Zstandard archive.");
|
||||||
}
|
}
|
||||||
return await extractTarZst(tarPath, tarVersion, logger);
|
return await extractTarZst(fs.createReadStream(tarPath), tarVersion, logger);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
@ -132,37 +133,45 @@ async function extract(tarPath, compressionMethod, tarVersion, logger) {
|
||||||
* @param dest destination directory. Optional.
|
* @param dest destination directory. Optional.
|
||||||
* @returns path to the destination directory
|
* @returns path to the destination directory
|
||||||
*/
|
*/
|
||||||
async function extractTarZst(file, tarVersion, logger) {
|
async function extractTarZst(tarStream, tarVersion, logger) {
|
||||||
if (!file) {
|
|
||||||
throw new Error("parameter 'file' is required");
|
|
||||||
}
|
|
||||||
// Create dest
|
|
||||||
const dest = await createExtractFolder();
|
const dest = await createExtractFolder();
|
||||||
try {
|
try {
|
||||||
// Initialize args
|
// Initialize args
|
||||||
const args = ["-x", "-v"];
|
const args = ["-x", "--zstd"];
|
||||||
let destArg = dest;
|
|
||||||
let fileArg = file;
|
|
||||||
if (process.platform === "win32" && tarVersion.type === "gnu") {
|
|
||||||
args.push("--force-local");
|
|
||||||
destArg = dest.replace(/\\/g, "/");
|
|
||||||
// Technically only the dest needs to have `/` but for aesthetic consistency
|
|
||||||
// convert slashes in the file arg too.
|
|
||||||
fileArg = file.replace(/\\/g, "/");
|
|
||||||
}
|
|
||||||
if (tarVersion.type === "gnu") {
|
if (tarVersion.type === "gnu") {
|
||||||
// Suppress warnings when using GNU tar to extract archives created by BSD tar
|
// Suppress warnings when using GNU tar to extract archives created by BSD tar
|
||||||
args.push("--warning=no-unknown-keyword");
|
args.push("--warning=no-unknown-keyword");
|
||||||
args.push("--overwrite");
|
args.push("--overwrite");
|
||||||
}
|
}
|
||||||
args.push("-C", destArg, "-f", fileArg);
|
args.push("-f", "-", "-C", dest);
|
||||||
await (0, actions_util_1.runTool)(`tar`, args);
|
process.stdout.write(`[command]tar ${args.join(" ")}\n`);
|
||||||
|
const tarProcess = (0, child_process_1.spawn)("tar", args, { stdio: "pipe" });
|
||||||
|
let stdout = "";
|
||||||
|
tarProcess.stdout?.on("data", (data) => {
|
||||||
|
stdout += data.toString();
|
||||||
|
process.stdout.write(data);
|
||||||
|
});
|
||||||
|
let stderr = "";
|
||||||
|
tarProcess.stderr?.on("data", (data) => {
|
||||||
|
stderr += data.toString();
|
||||||
|
// Mimic the standard behavior of the toolrunner by writing stderr to stdout
|
||||||
|
process.stdout.write(data);
|
||||||
|
});
|
||||||
|
tarStream.pipe(tarProcess.stdin);
|
||||||
|
await new Promise((resolve, reject) => {
|
||||||
|
tarProcess.on("exit", (code) => {
|
||||||
|
if (code !== 0) {
|
||||||
|
reject(new actions_util_1.CommandInvocationError("tar", args, code ?? undefined, stdout, stderr));
|
||||||
|
}
|
||||||
|
resolve();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return dest;
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
await (0, util_1.cleanUpGlob)(dest, "extraction destination directory", logger);
|
await (0, util_1.cleanUpGlob)(dest, "extraction destination directory", logger);
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return dest;
|
|
||||||
}
|
}
|
||||||
async function createExtractFolder() {
|
async function createExtractFolder() {
|
||||||
const dest = path_1.default.join((0, actions_util_1.getTemporaryDirectory)(), (0, uuid_1.v4)());
|
const dest = path_1.default.join((0, actions_util_1.getTemporaryDirectory)(), (0, uuid_1.v4)());
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"tar.js","sourceRoot":"","sources":["../src/tar.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyEA,0CA+BC;AAID,0BAmBC;AASD,sCAyCC;AAQD,wDAKC;AA9LD,uCAAyB;AACzB,gDAAwB;AAExB,6DAA0D;AAC1D,+DAAiD;AACjD,uDAAmD;AACnD,+BAAoC;AAEpC,iDAAgE;AAEhE,iCAAkD;AAElD,MAAM,4BAA4B,GAAG,OAAO,CAAC;AAC7C,MAAM,4BAA4B,GAAG,MAAM,CAAC;AAO5C,KAAK,UAAU,kBAAkB,CAC/B,MAAc,EACd,MAAc;IAEd,IAAI,CAAC;QACH,MAAM,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oCAAqB,GAAE,EAAE,IAAA,SAAM,GAAE,CAAC,CAAC;IAC1D,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACxC,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAgB,sBAAsB,CAAC,OAAe;IACpD,IAAI,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QAChC,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
||||||
110
lib/tools-download.js
generated
Normal file
110
lib/tools-download.js
generated
Normal file
|
|
@ -0,0 +1,110 @@
|
||||||
|
"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.downloadAndExtract = downloadAndExtract;
|
||||||
|
const path = __importStar(require("path"));
|
||||||
|
const perf_hooks_1 = require("perf_hooks");
|
||||||
|
const toolcache = __importStar(require("@actions/tool-cache"));
|
||||||
|
const follow_redirects_1 = require("follow-redirects");
|
||||||
|
const uuid_1 = require("uuid");
|
||||||
|
const feature_flags_1 = require("./feature-flags");
|
||||||
|
const logging_1 = require("./logging");
|
||||||
|
const tar = __importStar(require("./tar"));
|
||||||
|
const util_1 = require("./util");
|
||||||
|
function makeDownloadFirstToolsDownloadDurations(downloadDurationMs, extractionDurationMs) {
|
||||||
|
return {
|
||||||
|
combinedDurationMs: downloadDurationMs + extractionDurationMs,
|
||||||
|
downloadDurationMs,
|
||||||
|
extractionDurationMs,
|
||||||
|
streamExtraction: false,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
function makeStreamedToolsDownloadDurations(combinedDurationMs) {
|
||||||
|
return {
|
||||||
|
combinedDurationMs,
|
||||||
|
downloadDurationMs: undefined,
|
||||||
|
extractionDurationMs: undefined,
|
||||||
|
streamExtraction: true,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
async function downloadAndExtract(codeqlURL, authorization, headers, tarVersion, tempDir, features, logger) {
|
||||||
|
logger.info(`Downloading CodeQL tools from ${codeqlURL} . This may take a while.`);
|
||||||
|
const compressionMethod = tar.inferCompressionMethod(codeqlURL);
|
||||||
|
if (compressionMethod === "zstd" &&
|
||||||
|
(await features.getValue(feature_flags_1.Feature.ZstdBundleStreamingExtraction))) {
|
||||||
|
logger.info(`Streaming the extraction of the CodeQL bundle.`);
|
||||||
|
const toolsInstallStart = perf_hooks_1.performance.now();
|
||||||
|
const extractedBundlePath = await downloadAndExtractZstdWithStreaming(codeqlURL, authorization, headers, tarVersion, logger);
|
||||||
|
const combinedDurationMs = Math.round(perf_hooks_1.performance.now() - toolsInstallStart);
|
||||||
|
logger.info(`Finished downloading and extracting CodeQL bundle to ${extractedBundlePath} (${(0, logging_1.formatDuration)(combinedDurationMs)}).`);
|
||||||
|
return {
|
||||||
|
extractedBundlePath,
|
||||||
|
statusReport: {
|
||||||
|
compressionMethod,
|
||||||
|
toolsUrl: sanitizeUrlForStatusReport(codeqlURL),
|
||||||
|
...makeStreamedToolsDownloadDurations(combinedDurationMs),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
const dest = path.join(tempDir, (0, uuid_1.v4)());
|
||||||
|
const toolsDownloadStart = perf_hooks_1.performance.now();
|
||||||
|
const archivedBundlePath = await toolcache.downloadTool(codeqlURL, dest, authorization, headers);
|
||||||
|
const downloadDurationMs = Math.round(perf_hooks_1.performance.now() - toolsDownloadStart);
|
||||||
|
logger.info(`Finished downloading CodeQL bundle to ${archivedBundlePath} (${(0, logging_1.formatDuration)(downloadDurationMs)}).`);
|
||||||
|
let extractedBundlePath;
|
||||||
|
let extractionDurationMs;
|
||||||
|
try {
|
||||||
|
logger.info("Extracting CodeQL bundle.");
|
||||||
|
const extractionStart = perf_hooks_1.performance.now();
|
||||||
|
extractedBundlePath = await tar.extract(archivedBundlePath, compressionMethod, tarVersion, logger);
|
||||||
|
extractionDurationMs = Math.round(perf_hooks_1.performance.now() - extractionStart);
|
||||||
|
logger.info(`Finished extracting CodeQL bundle to ${extractedBundlePath} (${(0, logging_1.formatDuration)(extractionDurationMs)}).`);
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
await (0, util_1.cleanUpGlob)(archivedBundlePath, "CodeQL bundle archive", logger);
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
extractedBundlePath,
|
||||||
|
statusReport: {
|
||||||
|
compressionMethod,
|
||||||
|
toolsUrl: sanitizeUrlForStatusReport(codeqlURL),
|
||||||
|
...makeDownloadFirstToolsDownloadDurations(downloadDurationMs, extractionDurationMs),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
async function downloadAndExtractZstdWithStreaming(codeqlURL, authorization, headers, tarVersion, logger) {
|
||||||
|
headers = Object.assign({ "User-Agent": "CodeQL Action", authorization }, headers);
|
||||||
|
const response = await new Promise((resolve) => follow_redirects_1.https.get(codeqlURL, { headers }, (r) => resolve(r)));
|
||||||
|
if (response.statusCode !== 200) {
|
||||||
|
throw new Error(`Failed to download CodeQL bundle from ${codeqlURL}. HTTP status code: ${response.statusCode}.`);
|
||||||
|
}
|
||||||
|
return await tar.extractTarZst(response, tarVersion, logger);
|
||||||
|
}
|
||||||
|
function sanitizeUrlForStatusReport(url) {
|
||||||
|
return ["github/codeql-action", "dsp-testing/codeql-cli-nightlies"].some((repo) => url.startsWith(`https://github.com/${repo}/releases/download/`))
|
||||||
|
? url
|
||||||
|
: "sanitized-value";
|
||||||
|
}
|
||||||
|
//# sourceMappingURL=tools-download.js.map
|
||||||
1
lib/tools-download.js.map
Normal file
1
lib/tools-download.js.map
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"tools-download.js","sourceRoot":"","sources":["../src/tools-download.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAoEA,gDAsGC;AAzKD,2CAA6B;AAC7B,2CAAyC;AAEzC,+DAAiD;AACjD,uDAAyC;AACzC,+BAAoC;AAEpC,mDAA6D;AAC7D,uCAAmD;AACnD,2CAA6B;AAC7B,iCAAqC;AAarC,SAAS,uCAAuC,CAC9C,kBAA0B,EAC1B,oBAA4B;IAE5B,OAAO;QACL,kBAAkB,EAAE,kBAAkB,GAAG,oBAAoB;QAC7D,kBAAkB;QAClB,oBAAoB;QACpB,gBAAgB,EAAE,KAAK;KACxB,CAAC;AACJ,CAAC;AAaD,SAAS,kCAAkC,CACzC,kBAA0B;IAE1B,OAAO;QACL,kBAAkB;QAClB,kBAAkB,EAAE,SAAS;QAC7B,oBAAoB,EAAE,SAAS;QAC/B,gBAAgB,EAAE,IAAI;KACvB,CAAC;AACJ,CAAC;AAYM,KAAK,UAAU,kBAAkB,CACtC,SAAiB,EACjB,aAAiC,EACjC,OAA4B,EAC5B,UAAsC,EACtC,OAAe,EACf,QAA2B,EAC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,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CACrD,CAAC;IAEF,IAAI,QAAQ,CAAC,UAAU,KAAK,GAAG,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CACb,yCAAyC,SAAS,uBAAuB,QAAQ,CAAC,UAAU,GAAG,CAChG,CAAC;IACJ,CAAC;IAED,OAAO,MAAM,GAAG,CAAC,aAAa,CAAC,QAAQ,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;AAC/D,CAAC;AAED,SAAS,0BAA0B,CAAC,GAAW;IAC7C,OAAO,CAAC,sBAAsB,EAAE,kCAAkC,CAAC,CAAC,IAAI,CACtE,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,sBAAsB,IAAI,qBAAqB,CAAC,CAC1E;QACC,CAAC,CAAC,GAAG;QACL,CAAC,CAAC,iBAAiB,CAAC;AACxB,CAAC"}
|
||||||
3
lib/upload-sarif-action-post.js
generated
3
lib/upload-sarif-action-post.js
generated
|
|
@ -29,6 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
* other `post:` hooks.
|
* other `post:` hooks.
|
||||||
*/
|
*/
|
||||||
const core = __importStar(require("@actions/core"));
|
const core = __importStar(require("@actions/core"));
|
||||||
|
const actionsUtil = __importStar(require("./actions-util"));
|
||||||
const actions_util_1 = require("./actions-util");
|
const actions_util_1 = require("./actions-util");
|
||||||
const api_client_1 = require("./api-client");
|
const api_client_1 = require("./api-client");
|
||||||
const debugArtifacts = __importStar(require("./debug-artifacts"));
|
const debugArtifacts = __importStar(require("./debug-artifacts"));
|
||||||
|
|
@ -39,6 +40,8 @@ const repository_1 = require("./repository");
|
||||||
const util_1 = require("./util");
|
const util_1 = require("./util");
|
||||||
async function runWrapper() {
|
async function runWrapper() {
|
||||||
try {
|
try {
|
||||||
|
// Restore inputs from `upload-sarif` Action.
|
||||||
|
actionsUtil.restoreInputs();
|
||||||
const logger = (0, logging_1.getActionsLogger)();
|
const logger = (0, logging_1.getActionsLogger)();
|
||||||
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);
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"upload-sarif-action-post.js","sourceRoot":"","sources":["../src/upload-sarif-action-post.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,oDAAsC;AAEtC,iDAAuD;AACvD,6CAAgD;AAChD,kEAAoD;AACpD,+CAAuC;AACvC,mDAA2C;AAC3C,uCAAwD;AACxD,6CAAkD;AAClD,iCAIgB;AAEhB,KAAK,UAAU,UAAU;IACvB,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAA,0BAAgB,GAAE,CAAC;QAClC,MAAM,aAAa,GAAG,MAAM,IAAA,6BAAgB,GAAE,CAAC;QAC/C,IAAA,gCAAyB,EAAC,aAAa,EAAE,MAAM,CAAC,CAAC;QACjD,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,kFAAkF;QAClF,mFAAmF;QACnF,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAM,CAAC,mBAAmB,CAAC,KAAK,MAAM,EAAE,CAAC;YACvD,IAAI,aAAa,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;gBACrC,IAAI,CAAC,OAAO,CACV,qFAAqF,CACtF,CAAC;gBACF,OAAO;YACT,CAAC;YACD,MAAM,IAAA,mBAAS,EAAC,yCAAyC,EAAE,GAAG,EAAE,CAC9D,cAAc,CAAC,4BAA4B,CACzC,MAAM,EACN,aAAa,CAAC,IAAI,EAClB,QAAQ,CACT,CACF,CAAC;QACJ,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,SAAS,CACZ,yCAAyC,IAAA,sBAAe,EAAC,KAAK,CAAC,EAAE,CAClE,CAAC;IACJ,CAAC;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}
|
{"version":3,"file":"upload-sarif-action-post.js","sourceRoot":"","sources":["../src/upload-sarif-action-post.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,oDAAsC;AAEtC,4DAA8C;AAC9C,iDAAuD;AACvD,6CAAgD;AAChD,kEAAoD;AACpD,+CAAuC;AACvC,mDAA2C;AAC3C,uCAAwD;AACxD,6CAAkD;AAClD,iCAIgB;AAEhB,KAAK,UAAU,UAAU;IACvB,IAAI,CAAC;QACH,6CAA6C;QAC7C,WAAW,CAAC,aAAa,EAAE,CAAC;QAC5B,MAAM,MAAM,GAAG,IAAA,0BAAgB,GAAE,CAAC;QAClC,MAAM,aAAa,GAAG,MAAM,IAAA,6BAAgB,GAAE,CAAC;QAC/C,IAAA,gCAAyB,EAAC,aAAa,EAAE,MAAM,CAAC,CAAC;QACjD,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,kFAAkF;QAClF,mFAAmF;QACnF,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAM,CAAC,mBAAmB,CAAC,KAAK,MAAM,EAAE,CAAC;YACvD,IAAI,aAAa,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;gBACrC,IAAI,CAAC,OAAO,CACV,qFAAqF,CACtF,CAAC;gBACF,OAAO;YACT,CAAC;YACD,MAAM,IAAA,mBAAS,EAAC,yCAAyC,EAAE,GAAG,EAAE,CAC9D,cAAc,CAAC,4BAA4B,CACzC,MAAM,EACN,aAAa,CAAC,IAAI,EAClB,QAAQ,CACT,CACF,CAAC;QACJ,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,SAAS,CACZ,yCAAyC,IAAA,sBAAe,EAAC,KAAK,CAAC,EAAE,CAClE,CAAC;IACJ,CAAC;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue