mirror of
https://github.com/github/codeql-action.git
synced 2025-12-20 06:10:20 +08:00
Compare commits
130 Commits
codeql-bun
...
v2.21.9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ddccb87388 | ||
|
|
d8cb5a2a0f | ||
|
|
27cb1e1de5 | ||
|
|
4818fdd8ec | ||
|
|
e548601be3 | ||
|
|
cc6542087a | ||
|
|
c95737bb43 | ||
|
|
41d2ffad87 | ||
|
|
650a85ef6d | ||
|
|
0de36d4594 | ||
|
|
0dfaf4ef65 | ||
|
|
d1a917f445 | ||
|
|
431174f620 | ||
|
|
3078f51bf0 | ||
|
|
d0c18ba23e | ||
|
|
724d64319a | ||
|
|
49aaa9a420 | ||
|
|
c21e1dd0da | ||
|
|
53bed11e0b | ||
|
|
ab8159054c | ||
|
|
765807bee7 | ||
|
|
bf2187592f | ||
|
|
c4c06786f2 | ||
|
|
59aaff8718 | ||
|
|
5897cf73c4 | ||
|
|
8e0b1c74b1 | ||
|
|
01b8760f90 | ||
|
|
74e25cdac8 | ||
|
|
eac8f8cd93 | ||
|
|
6a28655e3d | ||
|
|
2ca983a793 | ||
|
|
dd1128f4f1 | ||
|
|
f3a128e0fe | ||
|
|
6846be007d | ||
|
|
0e74cd1660 | ||
|
|
379f89dc53 | ||
|
|
253d9cf358 | ||
|
|
4254f3a4c1 | ||
|
|
9bfb9ba527 | ||
|
|
d4c26876d3 | ||
|
|
d6f9faae0d | ||
|
|
c459726691 | ||
|
|
a087b01cdd | ||
|
|
f3051ed54e | ||
|
|
860e98cc4a | ||
|
|
3ffd6c071a | ||
|
|
2d646a3990 | ||
|
|
a9313c9016 | ||
|
|
5f18c9ab80 | ||
|
|
2c22b37a68 | ||
|
|
c07fd68e12 | ||
|
|
c33f0b4fc7 | ||
|
|
04daf014b5 | ||
|
|
bb3bc25861 | ||
|
|
ac4145f467 | ||
|
|
87a64c9c4c | ||
|
|
897ddf2662 | ||
|
|
74714a34ca | ||
|
|
e982de4fb4 | ||
|
|
19c02a4d16 | ||
|
|
71c7e82837 | ||
|
|
8b733e71a6 | ||
|
|
c6c77c8c2d | ||
|
|
8efd40b126 | ||
|
|
77a54b68d4 | ||
|
|
f664957aa4 | ||
|
|
70c4c0fc21 | ||
|
|
701f152f28 | ||
|
|
1b6299040a | ||
|
|
5462f69153 | ||
|
|
6a6a824702 | ||
|
|
88c7a5c4cc | ||
|
|
da65035498 | ||
|
|
43750fe4fc | ||
|
|
a7c12a5225 | ||
|
|
7218de5369 | ||
|
|
4764dce02f | ||
|
|
077672fa88 | ||
|
|
583a1019cc | ||
|
|
45d66afb31 | ||
|
|
f4683e88f3 | ||
|
|
798e74c57d | ||
|
|
37d8d03606 | ||
|
|
7bffcb42ec | ||
|
|
94293438d4 | ||
|
|
e6cb4feff9 | ||
|
|
85cd5ad8b4 | ||
|
|
d5d81f40c6 | ||
|
|
bec071acb9 | ||
|
|
5150b5c6ab | ||
|
|
270788d6fd | ||
|
|
10389f671b | ||
|
|
574dbbc517 | ||
|
|
466ed42568 | ||
|
|
321d3e057d | ||
|
|
3115e0f9c4 | ||
|
|
7aafc67ccf | ||
|
|
07d42ec34e | ||
|
|
c5acfe3b0d | ||
|
|
469786860d | ||
|
|
e603106d1a | ||
|
|
09940b4bb9 | ||
|
|
8ecc33d259 | ||
|
|
d721f69753 | ||
|
|
b88b5503aa | ||
|
|
f644ffe4b2 | ||
|
|
7cd044345e | ||
|
|
00e563ead9 | ||
|
|
7323c2ac6b | ||
|
|
100912429f | ||
|
|
a2d14d32b8 | ||
|
|
ff9cb435df | ||
|
|
2f913c1249 | ||
|
|
7dab60079b | ||
|
|
862b2cf102 | ||
|
|
070dd05edd | ||
|
|
ff95d147d6 | ||
|
|
30fe0c4907 | ||
|
|
e5813484cd | ||
|
|
9a53fd0577 | ||
|
|
dfb560cac1 | ||
|
|
5c8be669de | ||
|
|
14877a1345 | ||
|
|
bc08098689 | ||
|
|
02c45745e3 | ||
|
|
67f7ac2add | ||
|
|
fbb8195699 | ||
|
|
66572f0900 | ||
|
|
e755a052f0 | ||
|
|
37628e79a4 |
2
.github/actions/setup-swift/action.yml
vendored
2
.github/actions/setup-swift/action.yml
vendored
@@ -31,7 +31,7 @@ runs:
|
|||||||
fi
|
fi
|
||||||
echo "version=$VERSION" | tee -a $GITHUB_OUTPUT
|
echo "version=$VERSION" | tee -a $GITHUB_OUTPUT
|
||||||
|
|
||||||
- uses: swift-actions/setup-swift@65540b95f51493d65f5e59e97dcef9629ddf11bf # Please update the corresponding SHA in the CLI's CodeQL Action Integration Test.
|
- uses: swift-actions/setup-swift@cdcbe8e35d3801acd82d7109285e6ab22c9212c2 # Please update the corresponding SHA in the CLI's CodeQL Action Integration Test.
|
||||||
if: runner.os == 'Linux' && steps.get_swift_version.outputs.version != 'null'
|
if: runner.os == 'Linux' && steps.get_swift_version.outputs.version != 'null'
|
||||||
with:
|
with:
|
||||||
swift-version: "${{ steps.get_swift_version.outputs.version }}"
|
swift-version: "${{ steps.get_swift_version.outputs.version }}"
|
||||||
|
|||||||
2
.github/workflows/__all-platform-bundle.yml
generated
vendored
2
.github/workflows/__all-platform-bundle.yml
generated
vendored
@@ -35,7 +35,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/__analyze-ref-input.yml
generated
vendored
2
.github/workflows/__analyze-ref-input.yml
generated
vendored
@@ -75,7 +75,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/__autobuild-action.yml
generated
vendored
2
.github/workflows/__autobuild-action.yml
generated
vendored
@@ -39,7 +39,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/__config-export.yml
generated
vendored
2
.github/workflows/__config-export.yml
generated
vendored
@@ -45,7 +45,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/__diagnostics-export.yml
generated
vendored
2
.github/workflows/__diagnostics-export.yml
generated
vendored
@@ -51,7 +51,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/__export-file-baseline-information.yml
generated
vendored
2
.github/workflows/__export-file-baseline-information.yml
generated
vendored
@@ -39,7 +39,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/__extractor-ram-threads.yml
generated
vendored
2
.github/workflows/__extractor-ram-threads.yml
generated
vendored
@@ -35,7 +35,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/__go-custom-queries.yml
generated
vendored
2
.github/workflows/__go-custom-queries.yml
generated
vendored
@@ -75,7 +75,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/__go-tracing-autobuilder.yml
generated
vendored
2
.github/workflows/__go-tracing-autobuilder.yml
generated
vendored
@@ -61,7 +61,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/__go-tracing-custom-build-steps.yml
generated
vendored
2
.github/workflows/__go-tracing-custom-build-steps.yml
generated
vendored
@@ -61,7 +61,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/__go-tracing-legacy-workflow.yml
generated
vendored
2
.github/workflows/__go-tracing-legacy-workflow.yml
generated
vendored
@@ -61,7 +61,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/__init-with-registries.yml
generated
vendored
2
.github/workflows/__init-with-registries.yml
generated
vendored
@@ -52,7 +52,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/__javascript-source-root.yml
generated
vendored
2
.github/workflows/__javascript-source-root.yml
generated
vendored
@@ -39,7 +39,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
69
.github/workflows/__language-aliases.yml
generated
vendored
Normal file
69
.github/workflows/__language-aliases.yml
generated
vendored
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
# 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 - Language aliases
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GO111MODULE: auto
|
||||||
|
CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN: 'true'
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/v2
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
- ready_for_review
|
||||||
|
workflow_dispatch: {}
|
||||||
|
jobs:
|
||||||
|
language-aliases:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: latest
|
||||||
|
name: Language aliases
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
timeout-minutes: 45
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- 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'
|
||||||
|
- name: Set environment variable for Swift enablement
|
||||||
|
if: >-
|
||||||
|
runner.os != 'Windows' && (
|
||||||
|
matrix.version == '20220908' ||
|
||||||
|
matrix.version == '20221211'
|
||||||
|
)
|
||||||
|
shell: bash
|
||||||
|
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
||||||
|
- uses: ./../action/init
|
||||||
|
with:
|
||||||
|
languages: C#,java-kotlin,swift,typescript
|
||||||
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
|
||||||
|
- name: Check languages
|
||||||
|
run: |
|
||||||
|
expected_languages="csharp,java,swift,javascript"
|
||||||
|
actual_languages=$(jq -r '.languages | join(",")' "$RUNNER_TEMP"/config)
|
||||||
|
|
||||||
|
if [ "$expected_languages" != "$actual_languages" ]; then
|
||||||
|
echo "Resolved languages did not match expected list. " \
|
||||||
|
"Expected languages: $expected_languages. Actual languages: $actual_languages."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
2
.github/workflows/__ml-powered-queries.yml
generated
vendored
2
.github/workflows/__ml-powered-queries.yml
generated
vendored
@@ -75,7 +75,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/__multi-language-autodetect.yml
generated
vendored
2
.github/workflows/__multi-language-autodetect.yml
generated
vendored
@@ -61,7 +61,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/__packaging-codescanning-config-inputs-js.yml
generated
vendored
2
.github/workflows/__packaging-codescanning-config-inputs-js.yml
generated
vendored
@@ -51,7 +51,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/__packaging-config-inputs-js.yml
generated
vendored
2
.github/workflows/__packaging-config-inputs-js.yml
generated
vendored
@@ -51,7 +51,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/__packaging-config-js.yml
generated
vendored
2
.github/workflows/__packaging-config-js.yml
generated
vendored
@@ -51,7 +51,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/__packaging-inputs-js.yml
generated
vendored
2
.github/workflows/__packaging-inputs-js.yml
generated
vendored
@@ -51,7 +51,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/__remote-config.yml
generated
vendored
2
.github/workflows/__remote-config.yml
generated
vendored
@@ -75,7 +75,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/__resolve-environment-action.yml
generated
vendored
2
.github/workflows/__resolve-environment-action.yml
generated
vendored
@@ -39,7 +39,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/__rubocop-multi-language.yml
generated
vendored
2
.github/workflows/__rubocop-multi-language.yml
generated
vendored
@@ -35,7 +35,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/__ruby.yml
generated
vendored
2
.github/workflows/__ruby.yml
generated
vendored
@@ -45,7 +45,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/__scaling-reserved-ram.yml
generated
vendored
2
.github/workflows/__scaling-reserved-ram.yml
generated
vendored
@@ -61,7 +61,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/__split-workflow.yml
generated
vendored
2
.github/workflows/__split-workflow.yml
generated
vendored
@@ -45,7 +45,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
4
.github/workflows/__submit-sarif-failure.yml
generated
vendored
4
.github/workflows/__submit-sarif-failure.yml
generated
vendored
@@ -39,7 +39,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -54,7 +54,7 @@ jobs:
|
|||||||
)
|
)
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: ./init
|
- uses: ./init
|
||||||
with:
|
with:
|
||||||
languages: javascript
|
languages: javascript
|
||||||
|
|||||||
2
.github/workflows/__swift-custom-build.yml
generated
vendored
2
.github/workflows/__swift-custom-build.yml
generated
vendored
@@ -45,7 +45,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/__test-autobuild-working-dir.yml
generated
vendored
2
.github/workflows/__test-autobuild-working-dir.yml
generated
vendored
@@ -35,7 +35,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/__test-local-codeql.yml
generated
vendored
2
.github/workflows/__test-local-codeql.yml
generated
vendored
@@ -35,7 +35,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/__test-proxy.yml
generated
vendored
2
.github/workflows/__test-proxy.yml
generated
vendored
@@ -35,7 +35,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/__unset-environment.yml
generated
vendored
2
.github/workflows/__unset-environment.yml
generated
vendored
@@ -47,7 +47,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/__upload-ref-sha-input.yml
generated
vendored
2
.github/workflows/__upload-ref-sha-input.yml
generated
vendored
@@ -75,7 +75,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
4
.github/workflows/__with-checkout-path.yml
generated
vendored
4
.github/workflows/__with-checkout-path.yml
generated
vendored
@@ -75,7 +75,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -90,7 +90,7 @@ jobs:
|
|||||||
)
|
)
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6
|
ref: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6
|
||||||
path: x/y/z/some-path
|
path: x/y/z/some-path
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout CodeQL Action
|
- name: Checkout CodeQL Action
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Check Expected Release Files
|
- name: Check Expected Release Files
|
||||||
run: |
|
run: |
|
||||||
bundle_version="$(cat "./src/defaults.json" | jq -r ".bundleVersion")"
|
bundle_version="$(cat "./src/defaults.json" | jq -r ".bundleVersion")"
|
||||||
|
|||||||
6
.github/workflows/codeql.yml
vendored
6
.github/workflows/codeql.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
|||||||
security-events: write
|
security-events: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Init with default CodeQL bundle from the VM image
|
- name: Init with default CodeQL bundle from the VM image
|
||||||
id: init-default
|
id: init-default
|
||||||
uses: ./init
|
uses: ./init
|
||||||
@@ -73,7 +73,7 @@ jobs:
|
|||||||
needs: [check-codeql-versions]
|
needs: [check-codeql-versions]
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest,windows-latest,macos-latest]
|
os: [ubuntu-20.04,ubuntu-22.04,windows-2019,windows-2022,macos-11,macos-12,macos-13]
|
||||||
tools: ${{ fromJson(needs.check-codeql-versions.outputs.versions) }}
|
tools: ${{ fromJson(needs.check-codeql-versions.outputs.versions) }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: ./init
|
uses: ./init
|
||||||
id: init
|
id: init
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ jobs:
|
|||||||
- name: Dump GitHub event
|
- name: Dump GitHub event
|
||||||
run: cat "${GITHUB_EVENT_PATH}"
|
run: cat "${GITHUB_EVENT_PATH}"
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/debug-artifacts.yml
vendored
2
.github/workflows/debug-artifacts.yml
vendored
@@ -39,7 +39,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/expected-queries-runs.yml
vendored
2
.github/workflows/expected-queries-runs.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/post-release-mergeback.yml
vendored
2
.github/workflows/post-release-mergeback.yml
vendored
@@ -35,7 +35,7 @@ jobs:
|
|||||||
GITHUB_CONTEXT: '${{ toJson(github) }}'
|
GITHUB_CONTEXT: '${{ toJson(github) }}'
|
||||||
run: echo "${GITHUB_CONTEXT}"
|
run: echo "${GITHUB_CONTEXT}"
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
|
|
||||||
- name: Update git config
|
- name: Update git config
|
||||||
|
|||||||
8
.github/workflows/pr-checks.yml
vendored
8
.github/workflows/pr-checks.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
run: npm run-script lint
|
run: npm run-script lint
|
||||||
@@ -31,7 +31,7 @@ jobs:
|
|||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Check node modules up to date
|
- name: Check node modules up to date
|
||||||
run: .github/workflows/script/check-node-modules.sh
|
run: .github/workflows/script/check-node-modules.sh
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
@@ -69,7 +69,7 @@ jobs:
|
|||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: npm test
|
- name: npm test
|
||||||
run: |
|
run: |
|
||||||
# Run any commands referenced in package.json using Bash, otherwise
|
# Run any commands referenced in package.json using Bash, otherwise
|
||||||
|
|||||||
6
.github/workflows/python-deps.yml
vendored
6
.github/workflows/python-deps.yml
vendored
@@ -37,7 +37,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: ./init
|
uses: ./init
|
||||||
@@ -84,7 +84,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: ./init
|
uses: ./init
|
||||||
@@ -137,7 +137,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
2
.github/workflows/query-filters.yml
vendored
2
.github/workflows/query-filters.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/test-codeql-bundle-all.yml
vendored
2
.github/workflows/test-codeql-bundle-all.yml
vendored
@@ -32,7 +32,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
2
.github/workflows/update-bundle.yml
vendored
2
.github/workflows/update-bundle.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
|||||||
GITHUB_CONTEXT: '${{ toJson(github) }}'
|
GITHUB_CONTEXT: '${{ toJson(github) }}'
|
||||||
run: echo "$GITHUB_CONTEXT"
|
run: echo "$GITHUB_CONTEXT"
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Update git config
|
- name: Update git config
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
9
.github/workflows/update-dependencies.yml
vendored
9
.github/workflows/update-dependencies.yml
vendored
@@ -11,19 +11,20 @@ jobs:
|
|||||||
if: contains(github.event.pull_request.labels.*.name, 'Update dependencies') && (github.event.pull_request.head.repo.full_name == 'github/codeql-action')
|
if: contains(github.event.pull_request.labels.*.name, 'Update dependencies') && (github.event.pull_request.head.repo.full_name == 'github/codeql-action')
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Remove PR label
|
- name: Remove PR label
|
||||||
env:
|
env:
|
||||||
|
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
REPOSITORY: '${{ github.repository }}'
|
REPOSITORY: '${{ github.repository }}'
|
||||||
PR_NUMBER: '${{ github.event.pull_request.number }}'
|
PR_NUMBER: '${{ github.event.pull_request.number }}'
|
||||||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
|
||||||
run: |
|
run: |
|
||||||
gh api "repos/$REPOSITORY/issues/$PR_NUMBER/labels/Update%20dependencies" -X DELETE
|
gh api "repos/$REPOSITORY/issues/$PR_NUMBER/labels/Update%20dependencies" -X DELETE
|
||||||
|
|
||||||
- name: Push updated dependencies
|
- name: Push updated dependencies
|
||||||
env:
|
env:
|
||||||
BRANCH: '${{ github.head_ref }}'
|
BRANCH: '${{ github.head_ref }}'
|
||||||
|
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
run: |
|
run: |
|
||||||
git fetch origin "$BRANCH" --depth=1
|
git fetch origin "$BRANCH" --depth=1
|
||||||
git checkout "origin/$BRANCH"
|
git checkout "origin/$BRANCH"
|
||||||
@@ -34,4 +35,8 @@ jobs:
|
|||||||
git add node_modules
|
git add node_modules
|
||||||
git commit -am "Update checked-in dependencies"
|
git commit -am "Update checked-in dependencies"
|
||||||
git push origin "HEAD:$BRANCH"
|
git push origin "HEAD:$BRANCH"
|
||||||
|
echo "Pushed a commit to update the checked-in dependencies." \
|
||||||
|
"Please mark the PR as ready for review to trigger PR checks." |
|
||||||
|
gh pr comment --body-file - --repo github/codeql-action "${{ github.event.pull_request.number }}"
|
||||||
|
gh pr ready --undo --repo github/codeql-action "${{ github.event.pull_request.number }}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
2
.github/workflows/update-release-branch.yml
vendored
2
.github/workflows/update-release-branch.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
|||||||
GITHUB_CONTEXT: '${{ toJson(github) }}'
|
GITHUB_CONTEXT: '${{ toJson(github) }}'
|
||||||
run: echo "$GITHUB_CONTEXT"
|
run: echo "$GITHUB_CONTEXT"
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
# Need full history so we calculate diffs
|
# Need full history so we calculate diffs
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: "3.7"
|
python-version: "3.7"
|
||||||
- name: Checkout CodeQL Action
|
- name: Checkout CodeQL Action
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Checkout Enterprise Releases
|
- name: Checkout Enterprise Releases
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: github/enterprise-releases
|
repository: github/enterprise-releases
|
||||||
ssh-key: ${{ secrets.ENTERPRISE_RELEASES_SSH_KEY }}
|
ssh-key: ${{ secrets.ENTERPRISE_RELEASES_SSH_KEY }}
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ def main():
|
|||||||
releases = json.loads(_RELEASE_FILE_PATH.read_text())
|
releases = json.loads(_RELEASE_FILE_PATH.read_text())
|
||||||
|
|
||||||
# Remove GHES version using a previous version numbering scheme.
|
# Remove GHES version using a previous version numbering scheme.
|
||||||
if "11.10.340" in releases:
|
if "11.10" in releases:
|
||||||
del releases["11.10.340"]
|
del releases["11.10"]
|
||||||
|
|
||||||
oldest_supported_release = None
|
oldest_supported_release = None
|
||||||
newest_supported_release = semver.VersionInfo.parse(api_compatibility_data["maximumVersion"] + ".0")
|
newest_supported_release = semver.VersionInfo.parse(api_compatibility_data["maximumVersion"] + ".0")
|
||||||
|
|||||||
29
CHANGELOG.md
29
CHANGELOG.md
@@ -2,9 +2,36 @@
|
|||||||
|
|
||||||
See the [releases page](https://github.com/github/codeql-action/releases) for the relevant changes to the CodeQL CLI and language packs.
|
See the [releases page](https://github.com/github/codeql-action/releases) for the relevant changes to the CodeQL CLI and language packs.
|
||||||
|
|
||||||
## [UNRELEASED]
|
## 2.21.9 - 27 Sep 2023
|
||||||
|
|
||||||
|
- Update default CodeQL bundle version to 2.14.6. [#1897](https://github.com/github/codeql-action/pull/1897)
|
||||||
|
- We are rolling out a feature in October 2023 that will improve the success rate of C/C++ autobuild. [#1889](https://github.com/github/codeql-action/pull/1889)
|
||||||
|
- We are rolling out a feature in October 2023 that will provide specific file coverage information for C and C++, Java and Kotlin, and JavaScript and TypeScript. Currently file coverage information for each of these pairs of languages is grouped together. [#1903](https://github.com/github/codeql-action/pull/1903)
|
||||||
|
- Add a warning to help customers avoid inadvertently analyzing the same CodeQL language in multiple matrix jobs. [#1901](https://github.com/github/codeql-action/pull/1901)
|
||||||
|
|
||||||
|
## 2.21.8 - 19 Sep 2023
|
||||||
|
|
||||||
|
- Add a deprecation warning for customers using CodeQL version 2.10.4 and earlier. These versions of CodeQL were discontinued on 12 September 2023 alongside GitHub Enterprise Server 3.6, and will be unsupported by the next minor release of the CodeQL Action. [#1884](https://github.com/github/codeql-action/pull/1884)
|
||||||
|
- If you are using one of these versions, please update to CodeQL CLI version 2.10.5 or later. For instance, if you have specified a custom version of the CLI using the 'tools' input to the 'init' Action, you can remove this input to use the default version.
|
||||||
|
- Alternatively, if you want to continue using a version of the CodeQL CLI between 2.9.5 and 2.10.4, you can replace `github/codeql-action/*@v2` by `github/codeql-action/*@v2.21.7` in your code scanning workflow to ensure you continue using this version of the CodeQL Action.
|
||||||
|
- Enable the following language aliases when using CodeQL 2.14.4 and later: `c-cpp` for C/C++ analysis, `java-kotlin` for Java/Kotlin analysis, and `javascript-typescript` for JavaScript/TypeScript analysis. [#1883](https://github.com/github/codeql-action/pull/1883)
|
||||||
|
|
||||||
|
## 2.21.7 - 14 Sep 2023
|
||||||
|
|
||||||
|
- Update default CodeQL bundle version to 2.14.5. [#1882](https://github.com/github/codeql-action/pull/1882)
|
||||||
|
|
||||||
|
## 2.21.6 - 13 Sep 2023
|
||||||
|
|
||||||
|
- Better error message when there is a failure to determine the merge base of the code to analysis. [#1860](https://github.com/github/codeql-action/pull/1860)
|
||||||
|
- Improve the calculation of default amount of RAM used for query execution on GitHub Enterprise Server. This now reduces in proportion to the runner's total memory to better account for system memory usage, helping to avoid out-of-memory failures on larger runners. This feature is already available to GitHub.com users. [#1866](https://github.com/github/codeql-action/pull/1866)
|
||||||
|
- Enable improved file coverage information for GitHub Enterprise Server users. This feature is already available to GitHub.com users. [#1867](https://github.com/github/codeql-action/pull/1867)
|
||||||
|
- Update default CodeQL bundle version to 2.14.4. [#1873](https://github.com/github/codeql-action/pull/1873)
|
||||||
|
|
||||||
|
## 2.21.5 - 28 Aug 2023
|
||||||
|
|
||||||
|
- Update default CodeQL bundle version to 2.14.3. [#1845](https://github.com/github/codeql-action/pull/1845)
|
||||||
- Fixed a bug in CodeQL Action 2.21.3 onwards that affected beta support for [Project Lombok](https://projectlombok.org/) when analyzing Java. The environment variable `CODEQL_EXTRACTOR_JAVA_RUN_ANNOTATION_PROCESSORS` will now be respected if it was manually configured in the workflow. [#1844](https://github.com/github/codeql-action/pull/1844)
|
- Fixed a bug in CodeQL Action 2.21.3 onwards that affected beta support for [Project Lombok](https://projectlombok.org/) when analyzing Java. The environment variable `CODEQL_EXTRACTOR_JAVA_RUN_ANNOTATION_PROCESSORS` will now be respected if it was manually configured in the workflow. [#1844](https://github.com/github/codeql-action/pull/1844)
|
||||||
|
- Enable support for Kotlin 1.9.20 when running with CodeQL CLI v2.13.4 through v2.14.3. [#1853](https://github.com/github/codeql-action/pull/1853)
|
||||||
|
|
||||||
## 2.21.4 - 14 Aug 2023
|
## 2.21.4 - 14 Aug 2023
|
||||||
|
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ The underlying CodeQL CLI, used in this action, is licensed under the [GitHub Co
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
We recommend using default setup to configure CodeQL analysis for your repository. For more information, see "[Configuring default setup for code scanning](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-default-setup-for-code-scanning)."
|
We recommend using default setup to configure CodeQL analysis for your repository. For more information, see "[Configuring default setup for code scanning](https://docs.github.com/en/code-security/code-scanning/enabling-code-scanning/configuring-default-setup-for-code-scanning)."
|
||||||
|
|
||||||
You can also configure advanced setup for a repository to find security vulnerabilities in your code using a highly customizable code scanning configuration. For more information, see "[Configuring advanced setup for code scanning](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-advanced-setup-for-code-scanning)" and "[Customizing code scanning](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning)."
|
You can also configure advanced setup for a repository to find security vulnerabilities in your code using a highly customizable code scanning configuration. For more information, see "[Configuring advanced setup for code scanning](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/configuring-advanced-setup-for-code-scanning)" and "[Customizing your advanced setup for code scanning](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning)."
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
|
|||||||
30
lib/actions-util.js
generated
30
lib/actions-util.js
generated
@@ -75,6 +75,7 @@ const getCommitOid = async function (checkoutPath, ref = "HEAD") {
|
|||||||
// the merge commit, which must mean that git is available.
|
// the merge commit, which must mean that git is available.
|
||||||
// Even if this does go wrong, it's not a huge problem for the alerts to
|
// Even if this does go wrong, it's not a huge problem for the alerts to
|
||||||
// reported on the merge commit.
|
// reported on the merge commit.
|
||||||
|
let stderr = "";
|
||||||
try {
|
try {
|
||||||
let commitOid = "";
|
let commitOid = "";
|
||||||
await new toolrunner.ToolRunner(await safeWhich.safeWhich("git"), ["rev-parse", ref], {
|
await new toolrunner.ToolRunner(await safeWhich.safeWhich("git"), ["rev-parse", ref], {
|
||||||
@@ -84,7 +85,7 @@ const getCommitOid = async function (checkoutPath, ref = "HEAD") {
|
|||||||
commitOid += data.toString();
|
commitOid += data.toString();
|
||||||
},
|
},
|
||||||
stderr: (data) => {
|
stderr: (data) => {
|
||||||
process.stderr.write(data);
|
stderr += data.toString();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
cwd: checkoutPath,
|
cwd: checkoutPath,
|
||||||
@@ -92,9 +93,13 @@ const getCommitOid = async function (checkoutPath, ref = "HEAD") {
|
|||||||
return commitOid.trim();
|
return commitOid.trim();
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
core.info("Could not determine current commit SHA using git. Continuing with data from user input or environment.");
|
if (stderr.includes("not a git repository")) {
|
||||||
core.debug(`Reason: ${e.message}`);
|
core.info("Could not determine current commit SHA using git. Continuing with data from user input or environment. " +
|
||||||
core.debug(e.stack || "NO STACK");
|
"The checkout path provided to the action does not appear to be a git repository.");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
core.info(`Could not determine current commit SHA using git. Continuing with data from user input or environment. ${stderr}`);
|
||||||
|
}
|
||||||
return (0, exports.getOptionalInput)("sha") || (0, util_1.getRequiredEnvParam)("GITHUB_SHA");
|
return (0, exports.getOptionalInput)("sha") || (0, util_1.getRequiredEnvParam)("GITHUB_SHA");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -103,12 +108,13 @@ exports.getCommitOid = getCommitOid;
|
|||||||
* If the action was triggered by a pull request, determine the commit sha of the merge base.
|
* If the action was triggered by a pull request, determine the commit sha of the merge base.
|
||||||
* Returns undefined if run by other triggers or the merge base cannot be determined.
|
* Returns undefined if run by other triggers or the merge base cannot be determined.
|
||||||
*/
|
*/
|
||||||
const determineMergeBaseCommitOid = async function () {
|
const determineMergeBaseCommitOid = async function (checkoutPathOverride) {
|
||||||
if (getWorkflowEventName() !== "pull_request") {
|
if (getWorkflowEventName() !== "pull_request") {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
const mergeSha = (0, util_1.getRequiredEnvParam)("GITHUB_SHA");
|
const mergeSha = (0, util_1.getRequiredEnvParam)("GITHUB_SHA");
|
||||||
const checkoutPath = (0, exports.getOptionalInput)("checkout_path");
|
const checkoutPath = checkoutPathOverride ?? (0, exports.getOptionalInput)("checkout_path");
|
||||||
|
let stderr = "";
|
||||||
try {
|
try {
|
||||||
let commitOid = "";
|
let commitOid = "";
|
||||||
let baseOid = "";
|
let baseOid = "";
|
||||||
@@ -130,7 +136,7 @@ const determineMergeBaseCommitOid = async function () {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
stderr: (data) => {
|
stderr: (data) => {
|
||||||
process.stderr.write(data);
|
stderr += data.toString();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
cwd: checkoutPath,
|
cwd: checkoutPath,
|
||||||
@@ -144,8 +150,14 @@ const determineMergeBaseCommitOid = async function () {
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
core.info(`Failed to call git to determine merge base. Continuing with data from environment: ${e}`);
|
if (stderr.includes("not a git repository")) {
|
||||||
core.info(e.stack || "NO STACK");
|
core.info("The checkout path provided to the action does not appear to be a git repository. " +
|
||||||
|
"Will calculate the merge base on the server.");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
core.info(`Failed to call git to determine merge base. Will calculate the merge base on ` +
|
||||||
|
`the server. Reason: ${stderr}`);
|
||||||
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
29
lib/actions-util.test.js
generated
29
lib/actions-util.test.js
generated
@@ -28,6 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const fs = __importStar(require("fs"));
|
const fs = __importStar(require("fs"));
|
||||||
const path = __importStar(require("path"));
|
const path = __importStar(require("path"));
|
||||||
|
const core = __importStar(require("@actions/core"));
|
||||||
const ava_1 = __importDefault(require("ava"));
|
const ava_1 = __importDefault(require("ava"));
|
||||||
const sinon = __importStar(require("sinon"));
|
const sinon = __importStar(require("sinon"));
|
||||||
const actionsUtil = __importStar(require("./actions-util"));
|
const actionsUtil = __importStar(require("./actions-util"));
|
||||||
@@ -213,4 +214,32 @@ const util_1 = require("./util");
|
|||||||
getAdditionalInputStub.restore();
|
getAdditionalInputStub.restore();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
(0, ava_1.default)("determineMergeBaseCommitOid non-pullrequest", async (t) => {
|
||||||
|
const infoStub = sinon.stub(core, "info");
|
||||||
|
process.env["GITHUB_EVENT_NAME"] = "hucairz";
|
||||||
|
process.env["GITHUB_SHA"] = "100912429fab4cb230e66ffb11e738ac5194e73a";
|
||||||
|
const result = await actionsUtil.determineMergeBaseCommitOid(__dirname);
|
||||||
|
t.deepEqual(result, undefined);
|
||||||
|
t.deepEqual(0, infoStub.callCount);
|
||||||
|
infoStub.restore();
|
||||||
|
});
|
||||||
|
(0, ava_1.default)("determineMergeBaseCommitOid no error", async (t) => {
|
||||||
|
const infoStub = sinon.stub(core, "info");
|
||||||
|
process.env["GITHUB_EVENT_NAME"] = "pull_request";
|
||||||
|
process.env["GITHUB_SHA"] = "100912429fab4cb230e66ffb11e738ac5194e73a";
|
||||||
|
await actionsUtil.determineMergeBaseCommitOid(path.join(__dirname, "../.."));
|
||||||
|
t.deepEqual(1, infoStub.callCount);
|
||||||
|
t.assert(infoStub.firstCall.args[0].startsWith("The checkout path provided to the action does not appear to be a git repository."));
|
||||||
|
infoStub.restore();
|
||||||
|
});
|
||||||
|
(0, ava_1.default)("determineMergeBaseCommitOid other error", async (t) => {
|
||||||
|
const infoStub = sinon.stub(core, "info");
|
||||||
|
process.env["GITHUB_EVENT_NAME"] = "pull_request";
|
||||||
|
process.env["GITHUB_SHA"] = "100912429fab4cb230e66ffb11e738ac5194e73a";
|
||||||
|
const result = await actionsUtil.determineMergeBaseCommitOid(path.join(__dirname, "../../i-dont-exist"));
|
||||||
|
t.deepEqual(result, undefined);
|
||||||
|
t.deepEqual(1, infoStub.callCount);
|
||||||
|
t.assert(infoStub.firstCall.args[0].startsWith("Failed to call git to determine merge base."));
|
||||||
|
infoStub.restore();
|
||||||
|
});
|
||||||
//# sourceMappingURL=actions-util.test.js.map
|
//# sourceMappingURL=actions-util.test.js.map
|
||||||
File diff suppressed because one or more lines are too long
7
lib/analyze-action.js
generated
7
lib/analyze-action.js
generated
@@ -133,6 +133,7 @@ async function runAutobuildIfLegacyGoWorkflow(config, logger) {
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
logger.debug("Running Go autobuild because extraction output (TRAP files) for Go code has not been found.");
|
||||||
await (0, autobuild_1.runAutobuild)(languages_1.Language.go, config, logger);
|
await (0, autobuild_1.runAutobuild)(languages_1.Language.go, config, logger);
|
||||||
}
|
}
|
||||||
async function run() {
|
async function run() {
|
||||||
@@ -154,7 +155,7 @@ async function run() {
|
|||||||
throw new Error("Config file could not be found at expected location. Has the 'init' action been called?");
|
throw new Error("Config file could not be found at expected location. Has the 'init' action been called?");
|
||||||
}
|
}
|
||||||
if (hasBadExpectErrorInput()) {
|
if (hasBadExpectErrorInput()) {
|
||||||
throw new Error("`expect-error` input parameter is for internal use only. It should only be set by codeql-action or a fork.");
|
throw new util.UserError("`expect-error` input parameter is for internal use only. It should only be set by codeql-action or a fork.");
|
||||||
}
|
}
|
||||||
const apiDetails = (0, api_client_1.getApiDetails)();
|
const apiDetails = (0, api_client_1.getApiDetails)();
|
||||||
const outputDir = actionsUtil.getRequiredInput("output");
|
const outputDir = actionsUtil.getRequiredInput("output");
|
||||||
@@ -162,7 +163,7 @@ async function run() {
|
|||||||
const repositoryNwo = (0, repository_1.parseRepositoryNwo)(util.getRequiredEnvParam("GITHUB_REPOSITORY"));
|
const repositoryNwo = (0, repository_1.parseRepositoryNwo)(util.getRequiredEnvParam("GITHUB_REPOSITORY"));
|
||||||
const gitHubVersion = await (0, api_client_1.getGitHubVersion)();
|
const gitHubVersion = await (0, api_client_1.getGitHubVersion)();
|
||||||
const features = new feature_flags_1.Features(gitHubVersion, repositoryNwo, actionsUtil.getTemporaryDirectory(), logger);
|
const features = new feature_flags_1.Features(gitHubVersion, repositoryNwo, actionsUtil.getTemporaryDirectory(), logger);
|
||||||
const memory = util.getMemoryFlag(actionsUtil.getOptionalInput("ram") || process.env["CODEQL_RAM"], await features.getValue(feature_flags_1.Feature.ScalingReservedRamEnabled));
|
const memory = util.getMemoryFlag(actionsUtil.getOptionalInput("ram") || process.env["CODEQL_RAM"], logger);
|
||||||
await runAutobuildIfLegacyGoWorkflow(config, logger);
|
await runAutobuildIfLegacyGoWorkflow(config, logger);
|
||||||
dbCreationTimings = await (0, analyze_1.runFinalize)(outputDir, threads, memory, config, logger, features);
|
dbCreationTimings = await (0, analyze_1.runFinalize)(outputDir, threads, memory, config, logger, features);
|
||||||
if (actionsUtil.getRequiredInput("skip-queries") !== "true") {
|
if (actionsUtil.getRequiredInput("skip-queries") !== "true") {
|
||||||
@@ -179,7 +180,7 @@ async function run() {
|
|||||||
core.setOutput("sarif-output", path_1.default.resolve(outputDir));
|
core.setOutput("sarif-output", path_1.default.resolve(outputDir));
|
||||||
const uploadInput = actionsUtil.getOptionalInput("upload");
|
const uploadInput = actionsUtil.getOptionalInput("upload");
|
||||||
if (runStats && actionsUtil.getUploadValue(uploadInput) === "always") {
|
if (runStats && actionsUtil.getUploadValue(uploadInput) === "always") {
|
||||||
uploadResult = await uploadLib.uploadFromActions(outputDir, actionsUtil.getRequiredInput("checkout_path"), actionsUtil.getOptionalInput("category"), logger);
|
uploadResult = await uploadLib.uploadFromActions(outputDir, actionsUtil.getRequiredInput("checkout_path"), actionsUtil.getOptionalInput("category"), logger, { considerInvalidRequestUserError: false });
|
||||||
core.setOutput("sarif-id", uploadResult.sarifID);
|
core.setOutput("sarif-id", uploadResult.sarifID);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
{ "maximumVersion": "3.10", "minimumVersion": "3.6" }
|
{ "maximumVersion": "3.11", "minimumVersion": "3.6" }
|
||||||
|
|||||||
58
lib/autobuild.js
generated
58
lib/autobuild.js
generated
@@ -1,8 +1,37 @@
|
|||||||
"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.runAutobuild = exports.determineAutobuildLanguages = void 0;
|
exports.runAutobuild = exports.determineAutobuildLanguages = void 0;
|
||||||
|
const core = __importStar(require("@actions/core"));
|
||||||
|
const actions_util_1 = require("./actions-util");
|
||||||
|
const api_client_1 = require("./api-client");
|
||||||
const codeql_1 = require("./codeql");
|
const codeql_1 = require("./codeql");
|
||||||
|
const feature_flags_1 = require("./feature-flags");
|
||||||
const languages_1 = require("./languages");
|
const languages_1 = require("./languages");
|
||||||
|
const repository_1 = require("./repository");
|
||||||
|
const util_1 = require("./util");
|
||||||
async function determineAutobuildLanguages(config, logger) {
|
async function determineAutobuildLanguages(config, logger) {
|
||||||
// Attempt to find a language to autobuild
|
// Attempt to find a language to autobuild
|
||||||
// We want pick the dominant language in the repo from the ones we're able to build
|
// We want pick the dominant language in the repo from the ones we're able to build
|
||||||
@@ -70,9 +99,38 @@ async function determineAutobuildLanguages(config, logger) {
|
|||||||
return languages;
|
return languages;
|
||||||
}
|
}
|
||||||
exports.determineAutobuildLanguages = determineAutobuildLanguages;
|
exports.determineAutobuildLanguages = determineAutobuildLanguages;
|
||||||
|
async function setupCppAutobuild(codeql, logger) {
|
||||||
|
const envVar = feature_flags_1.featureConfig[feature_flags_1.Feature.CppDependencyInstallation].envVar;
|
||||||
|
const featureName = "C++ automatic installation of dependencies";
|
||||||
|
const envDoc = "https://docs.github.com/en/actions/learn-github-actions/variables#defining-environment-variables-for-a-single-workflow";
|
||||||
|
const gitHubVersion = await (0, api_client_1.getGitHubVersion)();
|
||||||
|
const 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);
|
||||||
|
if (await features.getValue(feature_flags_1.Feature.CppDependencyInstallation, codeql)) {
|
||||||
|
// disable autoinstall on self-hosted runners unless explicitly requested
|
||||||
|
if (process.env["RUNNER_ENVIRONMENT"] === "self-hosted" &&
|
||||||
|
process.env[envVar] !== "true") {
|
||||||
|
logger.info(`Disabling ${featureName} as we are on a self-hosted runner.${(0, actions_util_1.getWorkflowEventName)() !== "dynamic"
|
||||||
|
? ` To override this, set the ${envVar} environment variable to 'true' in your workflow (see ${envDoc}).`
|
||||||
|
: ""}`);
|
||||||
|
core.exportVariable(envVar, "false");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
logger.info(`Enabling ${featureName}. This can be disabled by setting the ${envVar} environment variable to 'false' (see ${envDoc}).`);
|
||||||
|
core.exportVariable(envVar, "true");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
logger.info(`Disabling ${featureName}.`);
|
||||||
|
core.exportVariable(envVar, "false");
|
||||||
|
}
|
||||||
|
}
|
||||||
async function runAutobuild(language, config, logger) {
|
async function runAutobuild(language, config, logger) {
|
||||||
logger.startGroup(`Attempting to automatically build ${language} code`);
|
logger.startGroup(`Attempting to automatically build ${language} code`);
|
||||||
const codeQL = await (0, codeql_1.getCodeQL)(config.codeQLCmd);
|
const codeQL = await (0, codeql_1.getCodeQL)(config.codeQLCmd);
|
||||||
|
if (language === languages_1.Language.cpp) {
|
||||||
|
await setupCppAutobuild(codeQL, logger);
|
||||||
|
}
|
||||||
await codeQL.runAutobuild(language);
|
await codeQL.runAutobuild(language);
|
||||||
logger.endGroup();
|
logger.endGroup();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"autobuild.js","sourceRoot":"","sources":["../src/autobuild.ts"],"names":[],"mappings":";;;AAAA,qCAAqC;AAErC,2CAAyD;AAGlD,KAAK,UAAU,2BAA2B,CAC/C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QAAQ,EAAE,CAAC;AACpB,CAAC;AAZD,oCAYC"}
|
||||||
50
lib/codeql.js
generated
50
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.getGeneratedCodeScanningConfigPath = exports.getTrapCachingExtractorConfigArgsForLang = exports.getTrapCachingExtractorConfigArgs = exports.getExtraOptions = exports.getCodeQLForCmd = exports.getCodeQLForTesting = exports.getCachedCodeQL = exports.setCodeQL = exports.getCodeQL = exports.setupCodeQL = exports.CODEQL_VERSION_RESOLVE_ENVIRONMENT = exports.CODEQL_VERSION_DIAGNOSTICS_EXPORT_FIXED = exports.CODEQL_VERSION_BETTER_NO_CODE_ERROR_MESSAGE = exports.CODEQL_VERSION_INIT_WITH_QLCONFIG = exports.CODEQL_VERSION_EXPORT_CODE_SCANNING_CONFIG = exports.CODEQL_VERSION_SECURITY_EXPERIMENTAL_SUITE = exports.CODEQL_VERSION_BETTER_RESOLVE_LANGUAGES = exports.CODEQL_VERSION_GHES_PACK_DOWNLOAD = exports.CommandInvocationError = void 0;
|
exports.getGeneratedCodeScanningConfigPath = exports.getTrapCachingExtractorConfigArgsForLang = exports.getTrapCachingExtractorConfigArgs = exports.getExtraOptions = exports.getCodeQLForCmd = exports.getCodeQLForTesting = exports.getCachedCodeQL = exports.setCodeQL = exports.getCodeQL = exports.setupCodeQL = exports.CODEQL_VERSION_LANGUAGE_ALIASING = exports.CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG = exports.CODEQL_VERSION_RESOLVE_ENVIRONMENT = exports.CODEQL_VERSION_DIAGNOSTICS_EXPORT_FIXED = exports.CODEQL_VERSION_BETTER_NO_CODE_ERROR_MESSAGE = exports.CODEQL_VERSION_INIT_WITH_QLCONFIG = exports.CODEQL_VERSION_EXPORT_CODE_SCANNING_CONFIG = exports.CODEQL_VERSION_SECURITY_EXPERIMENTAL_SUITE = exports.CODEQL_VERSION_BETTER_RESOLVE_LANGUAGES = exports.CODEQL_VERSION_GHES_PACK_DOWNLOAD = exports.CommandInvocationError = void 0;
|
||||||
const fs = __importStar(require("fs"));
|
const fs = __importStar(require("fs"));
|
||||||
const path = __importStar(require("path"));
|
const path = __importStar(require("path"));
|
||||||
const core = __importStar(require("@actions/core"));
|
const core = __importStar(require("@actions/core"));
|
||||||
@@ -66,7 +66,15 @@ const CODEQL_MINIMUM_VERSION = "2.9.4";
|
|||||||
/**
|
/**
|
||||||
* This version will shortly become the oldest version of CodeQL that the Action will run with.
|
* This version will shortly become the oldest version of CodeQL that the Action will run with.
|
||||||
*/
|
*/
|
||||||
const CODEQL_NEXT_MINIMUM_VERSION = "2.9.4";
|
const CODEQL_NEXT_MINIMUM_VERSION = "2.10.5";
|
||||||
|
/**
|
||||||
|
* This is the version of GHES that was most recently deprecated.
|
||||||
|
*/
|
||||||
|
const GHES_VERSION_MOST_RECENTLY_DEPRECATED = "3.6";
|
||||||
|
/**
|
||||||
|
* This is the deprecation date for the version of GHES that was most recently deprecated.
|
||||||
|
*/
|
||||||
|
const GHES_MOST_RECENT_DEPRECATION_DATE = "2023-09-12";
|
||||||
/**
|
/**
|
||||||
* Versions of CodeQL that version-flag certain functionality in the Action.
|
* Versions of CodeQL that version-flag certain functionality in the Action.
|
||||||
* For convenience, please keep these in descending order. Once a version
|
* For convenience, please keep these in descending order. Once a version
|
||||||
@@ -108,6 +116,14 @@ exports.CODEQL_VERSION_DIAGNOSTICS_EXPORT_FIXED = "2.13.1";
|
|||||||
* Versions 2.13.4+ of the CodeQL CLI support the `resolve build-environment` command.
|
* Versions 2.13.4+ of the CodeQL CLI support the `resolve build-environment` command.
|
||||||
*/
|
*/
|
||||||
exports.CODEQL_VERSION_RESOLVE_ENVIRONMENT = "2.13.4";
|
exports.CODEQL_VERSION_RESOLVE_ENVIRONMENT = "2.13.4";
|
||||||
|
/**
|
||||||
|
* 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";
|
||||||
/**
|
/**
|
||||||
* Set up CodeQL CLI access.
|
* Set up CodeQL CLI access.
|
||||||
*
|
*
|
||||||
@@ -278,9 +294,15 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||||||
(await util.codeQlVersionAbove(this, exports.CODEQL_VERSION_INIT_WITH_QLCONFIG))) {
|
(await util.codeQlVersionAbove(this, exports.CODEQL_VERSION_INIT_WITH_QLCONFIG))) {
|
||||||
extraArgs.push(`--qlconfig-file=${qlconfigFile}`);
|
extraArgs.push(`--qlconfig-file=${qlconfigFile}`);
|
||||||
}
|
}
|
||||||
if (await features.getValue(feature_flags_1.Feature.LanguageBaselineConfigEnabled, this)) {
|
if (await util.codeQlVersionAbove(this, exports.CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG)) {
|
||||||
extraArgs.push("--calculate-language-specific-baseline");
|
extraArgs.push("--calculate-language-specific-baseline");
|
||||||
}
|
}
|
||||||
|
if (await features.getValue(feature_flags_1.Feature.SublanguageFileCoverageEnabled, this)) {
|
||||||
|
extraArgs.push("--sublanguage-file-coverage");
|
||||||
|
}
|
||||||
|
else if (await util.codeQlVersionAbove(this, feature_flags_1.CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE)) {
|
||||||
|
extraArgs.push("--no-sublanguage-file-coverage");
|
||||||
|
}
|
||||||
await runTool(cmd, [
|
await runTool(cmd, [
|
||||||
"database",
|
"database",
|
||||||
"init",
|
"init",
|
||||||
@@ -374,11 +396,16 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async betterResolveLanguages() {
|
async betterResolveLanguages() {
|
||||||
|
const extraArgs = [];
|
||||||
|
if (await util.codeQlVersionAbove(this, exports.CODEQL_VERSION_LANGUAGE_ALIASING)) {
|
||||||
|
extraArgs.push("--extractor-include-aliases");
|
||||||
|
}
|
||||||
const codeqlArgs = [
|
const codeqlArgs = [
|
||||||
"resolve",
|
"resolve",
|
||||||
"languages",
|
"languages",
|
||||||
"--format=betterjson",
|
"--format=betterjson",
|
||||||
"--extractor-options-verbosity=4",
|
"--extractor-options-verbosity=4",
|
||||||
|
...extraArgs,
|
||||||
...getExtraOptionsFromEnv(["resolve", "languages"]),
|
...getExtraOptionsFromEnv(["resolve", "languages"]),
|
||||||
];
|
];
|
||||||
const output = await runTool(cmd, codeqlArgs);
|
const output = await runTool(cmd, codeqlArgs);
|
||||||
@@ -660,16 +687,17 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||||||
else if (checkVersion &&
|
else if (checkVersion &&
|
||||||
process.env[environment_1.EnvVar.SUPPRESS_DEPRECATED_SOON_WARNING] !== "true" &&
|
process.env[environment_1.EnvVar.SUPPRESS_DEPRECATED_SOON_WARNING] !== "true" &&
|
||||||
!(await util.codeQlVersionAbove(codeql, CODEQL_NEXT_MINIMUM_VERSION))) {
|
!(await util.codeQlVersionAbove(codeql, CODEQL_NEXT_MINIMUM_VERSION))) {
|
||||||
core.warning(`CodeQL CLI version ${await codeql.getVersion()} was deprecated on 2023-06-20 alongside ` +
|
core.warning(`CodeQL CLI version ${await codeql.getVersion()} was discontinued on ` +
|
||||||
"GitHub Enterprise Server 3.5 and will not be supported by the next release of the " +
|
`${GHES_MOST_RECENT_DEPRECATION_DATE} alongside GitHub Enterprise Server ` +
|
||||||
`CodeQL Action. Please update to CodeQL CLI version ${CODEQL_NEXT_MINIMUM_VERSION} or ` +
|
`${GHES_VERSION_MOST_RECENTLY_DEPRECATED} and will not be supported by the next minor ` +
|
||||||
"later. For instance, if you have specified a custom version of the CLI using the " +
|
`release of the CodeQL Action. Please update to CodeQL CLI version ` +
|
||||||
"'tools' input to the 'init' Action, you can remove this input to use the default " +
|
`${CODEQL_NEXT_MINIMUM_VERSION} or later. For instance, if you have specified a custom ` +
|
||||||
"version.\n\n" +
|
"version of the CLI using the 'tools' input to the 'init' Action, you can remove this " +
|
||||||
|
"input to use the default version.\n\n" +
|
||||||
"Alternatively, if you want to continue using CodeQL CLI version " +
|
"Alternatively, if you want to continue using CodeQL CLI version " +
|
||||||
`${await codeql.getVersion()}, you can replace 'github/codeql-action/*@v2' by ` +
|
`${await codeql.getVersion()}, you can replace 'github/codeql-action/*@v2' by ` +
|
||||||
"'github/codeql-action/*@v2.20.4' in your code scanning workflow to ensure you continue " +
|
`'github/codeql-action/*@v${(0, actions_util_1.getActionVersion)()}' in your code scanning workflow to ` +
|
||||||
"using this version of the CodeQL Action.");
|
"continue using this version of the CodeQL Action.");
|
||||||
core.exportVariable(environment_1.EnvVar.SUPPRESS_DEPRECATED_SOON_WARNING, "true");
|
core.exportVariable(environment_1.EnvVar.SUPPRESS_DEPRECATED_SOON_WARNING, "true");
|
||||||
}
|
}
|
||||||
return codeql;
|
return codeql;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
29
lib/config-utils.js
generated
29
lib/config-utils.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.wrapEnvironment = exports.generateRegistries = exports.downloadPacks = exports.getConfig = exports.getPathToParsedConfigFile = exports.initConfig = exports.getMlPoweredJsQueriesStatus = exports.parsePacks = exports.validatePackSpecification = exports.parsePacksSpecification = exports.parsePacksFromConfig = exports.calculateAugmentation = exports.getDefaultConfig = exports.getRawLanguages = exports.getLanguages = exports.getLanguagesInRepo = exports.getUnknownLanguagesError = exports.getNoLanguagesError = exports.getConfigFileDirectoryGivenMessage = exports.getConfigFileFormatInvalidMessage = exports.getConfigFileRepoFormatInvalidMessage = exports.getConfigFileDoesNotExistErrorMessage = exports.getConfigFileOutsideWorkspaceErrorMessage = exports.getLocalPathDoesNotExist = exports.getLocalPathOutsideOfRepository = exports.getPacksStrInvalid = exports.getPacksInvalid = exports.getPacksInvalidSplit = exports.getPathsInvalid = exports.getPathsIgnoreInvalid = exports.getQueryUsesInvalid = exports.getQueriesMissingUses = exports.getQueriesInvalid = exports.getDisableDefaultQueriesInvalid = exports.getNameInvalid = exports.validateAndSanitisePath = exports.defaultAugmentationProperties = void 0;
|
exports.wrapEnvironment = exports.generateRegistries = exports.downloadPacks = exports.getConfig = exports.getPathToParsedConfigFile = exports.initConfig = exports.getMlPoweredJsQueriesStatus = exports.parsePacks = exports.validatePackSpecification = exports.parsePacksSpecification = exports.parsePacksFromConfig = exports.calculateAugmentation = exports.getDefaultConfig = exports.getRawLanguages = exports.getLanguageAliases = exports.getLanguages = exports.getLanguagesInRepo = exports.getUnknownLanguagesError = exports.getNoLanguagesError = exports.getConfigFileDirectoryGivenMessage = exports.getConfigFileFormatInvalidMessage = exports.getConfigFileRepoFormatInvalidMessage = exports.getConfigFileDoesNotExistErrorMessage = exports.getConfigFileOutsideWorkspaceErrorMessage = exports.getLocalPathDoesNotExist = exports.getLocalPathOutsideOfRepository = exports.getPacksStrInvalid = exports.getPacksInvalid = exports.getPacksInvalidSplit = exports.getPathsInvalid = exports.getPathsIgnoreInvalid = exports.getQueryUsesInvalid = exports.getQueriesMissingUses = exports.getQueriesInvalid = exports.getDisableDefaultQueriesInvalid = exports.getNameInvalid = exports.validateAndSanitisePath = exports.defaultAugmentationProperties = void 0;
|
||||||
const fs = __importStar(require("fs"));
|
const fs = __importStar(require("fs"));
|
||||||
const path = __importStar(require("path"));
|
const path = __importStar(require("path"));
|
||||||
const perf_hooks_1 = require("perf_hooks");
|
const perf_hooks_1 = require("perf_hooks");
|
||||||
@@ -395,7 +395,7 @@ function getNoLanguagesError() {
|
|||||||
}
|
}
|
||||||
exports.getNoLanguagesError = getNoLanguagesError;
|
exports.getNoLanguagesError = getNoLanguagesError;
|
||||||
function getUnknownLanguagesError(languages) {
|
function getUnknownLanguagesError(languages) {
|
||||||
return `Did not recognise the following languages: ${languages.join(", ")}`;
|
return `Did not recognize the following languages: ${languages.join(", ")}`;
|
||||||
}
|
}
|
||||||
exports.getUnknownLanguagesError = getUnknownLanguagesError;
|
exports.getUnknownLanguagesError = getUnknownLanguagesError;
|
||||||
/**
|
/**
|
||||||
@@ -436,13 +436,20 @@ exports.getLanguagesInRepo = getLanguagesInRepo;
|
|||||||
async function getLanguages(codeQL, languagesInput, repository, logger) {
|
async function getLanguages(codeQL, languagesInput, repository, logger) {
|
||||||
// Obtain languages without filtering them.
|
// Obtain languages without filtering them.
|
||||||
const { rawLanguages, autodetected } = await getRawLanguages(languagesInput, repository, logger);
|
const { rawLanguages, autodetected } = await getRawLanguages(languagesInput, repository, logger);
|
||||||
let languages = rawLanguages.map(languages_1.resolveAlias);
|
let languages = rawLanguages;
|
||||||
if (autodetected) {
|
if (autodetected) {
|
||||||
const availableLanguages = await codeQL.resolveLanguages();
|
const supportedLanguages = Object.keys(await codeQL.resolveLanguages());
|
||||||
languages = languages.filter((value) => value in availableLanguages);
|
languages = languages
|
||||||
|
.map(languages_1.parseLanguage)
|
||||||
|
.filter((value) => value && supportedLanguages.includes(value))
|
||||||
|
.map((value) => value);
|
||||||
logger.info(`Automatically detected languages: ${languages.join(", ")}`);
|
logger.info(`Automatically detected languages: ${languages.join(", ")}`);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
const aliases = await getLanguageAliases(codeQL);
|
||||||
|
if (aliases) {
|
||||||
|
languages = languages.map((lang) => aliases[lang] || lang);
|
||||||
|
}
|
||||||
logger.info(`Languages from configuration: ${languages.join(", ")}`);
|
logger.info(`Languages from configuration: ${languages.join(", ")}`);
|
||||||
}
|
}
|
||||||
// If the languages parameter was not given and no languages were
|
// If the languages parameter was not given and no languages were
|
||||||
@@ -454,7 +461,6 @@ async function getLanguages(codeQL, languagesInput, repository, logger) {
|
|||||||
const parsedLanguages = [];
|
const parsedLanguages = [];
|
||||||
const unknownLanguages = [];
|
const unknownLanguages = [];
|
||||||
for (const language of languages) {
|
for (const language of languages) {
|
||||||
// We know this is not an alias since we resolved it above.
|
|
||||||
const parsedLanguage = (0, languages_1.parseLanguage)(language);
|
const parsedLanguage = (0, languages_1.parseLanguage)(language);
|
||||||
if (parsedLanguage === undefined) {
|
if (parsedLanguage === undefined) {
|
||||||
unknownLanguages.push(language);
|
unknownLanguages.push(language);
|
||||||
@@ -471,6 +477,17 @@ async function getLanguages(codeQL, languagesInput, repository, logger) {
|
|||||||
return parsedLanguages;
|
return parsedLanguages;
|
||||||
}
|
}
|
||||||
exports.getLanguages = getLanguages;
|
exports.getLanguages = getLanguages;
|
||||||
|
/**
|
||||||
|
* 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.codeQlVersionAbove)(codeql, codeql_1.CODEQL_VERSION_LANGUAGE_ALIASING)) {
|
||||||
|
return (await codeql.betterResolveLanguages()).aliases;
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
exports.getLanguageAliases = getLanguageAliases;
|
||||||
/**
|
/**
|
||||||
* 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
2
lib/debug-artifacts.js
generated
2
lib/debug-artifacts.js
generated
@@ -56,7 +56,7 @@ async function uploadDebugArtifacts(toUpload, rootDir, artifactName) {
|
|||||||
core.info("Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input.");
|
core.info("Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await artifact.create().uploadArtifact(sanitizeArifactName(`${artifactName}${suffix}`), toUpload.map((file) => path.normalize(file)), path.normalize(rootDir));
|
await artifact.create().uploadArtifact(sanitizeArifactName(`${artifactName}${suffix}`), toUpload.map((file) => path.normalize(file)), path.normalize(rootDir), { continueOnError: true });
|
||||||
}
|
}
|
||||||
exports.uploadDebugArtifacts = uploadDebugArtifacts;
|
exports.uploadDebugArtifacts = uploadDebugArtifacts;
|
||||||
async function uploadSarifDebugArtifact(config, outputDir) {
|
async function uploadSarifDebugArtifact(config, outputDir) {
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"debug-artifacts.js","sourceRoot":"","sources":["../src/debug-artifacts.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,4DAA8C;AAC9C,oDAAsC;AACtC,sDAA6B;AAC7B,8CAAsB;AAEtB,iDAAkD;AAClD,uCAA0C;AAC1C,qCAAqC;AAIrC,iCAKgB;AAEhB,SAAgB,mBAAmB,CAAC,IAAY;IAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;AAChD,CAAC;AAFD,kDAEC;AAEM,KAAK,UAAU,oBAAoB,CACxC,QAAkB,EAClB,OAAe,EACf,YAAoB;IAEpB,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;QACzB,OAAO;KACR;IACD,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,MAAM,MAAM,GAAG,IAAA,+BAAgB,EAAC,QAAQ,CAAC,CAAC;IAC1C,IAAI,MAAM,EAAE;QACV,IAAI;YACF,KAAK,MAAM,CAAC,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CACxC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAY,CAC9B,CAAC,IAAI,EAAE;gBACN,MAAM,IAAI,IAAI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AQ,CACT,CAAC;aACH;iBAAM;gBACL,kBAAkB,GAAG,MAAM,uBAAuB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;aACtE;YACD,MAAM,oBAAoB,CACxB,CAAC,kBAAkB,CAAC,EACpB,MAAM,CAAC,UAAU,EACjB,MAAM,CAAC,iBAAiB,CACzB,CAAC;SACH;QAAC,OAAO,KAAK,EAAE;YACd,IAAI,CAAC,IAAI,CACP,8CAA8C,MAAM,CAAC,iBAAiB,IAAI,QAAQ,KAAK,KAAK,EAAE,CAC/F,CAAC;SACH;KACF;AACH,CAAC;AA1BD,8EA0BC"}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"bundleVersion": "codeql-bundle-v2.14.2",
|
"bundleVersion": "codeql-bundle-v2.14.6",
|
||||||
"cliVersion": "2.14.2",
|
"cliVersion": "2.14.6",
|
||||||
"priorBundleVersion": "codeql-bundle-v2.14.1",
|
"priorBundleVersion": "codeql-bundle-v2.14.5",
|
||||||
"priorCliVersion": "2.14.1"
|
"priorCliVersion": "2.14.5"
|
||||||
}
|
}
|
||||||
|
|||||||
5
lib/environment.js
generated
5
lib/environment.js
generated
@@ -31,6 +31,11 @@ var EnvVar;
|
|||||||
/** UUID representing the current job run. */
|
/** UUID representing the current job run. */
|
||||||
EnvVar["JOB_RUN_UUID"] = "JOB_RUN_UUID";
|
EnvVar["JOB_RUN_UUID"] = "JOB_RUN_UUID";
|
||||||
EnvVar["ODASA_TRACER_CONFIGURATION"] = "ODASA_TRACER_CONFIGURATION";
|
EnvVar["ODASA_TRACER_CONFIGURATION"] = "ODASA_TRACER_CONFIGURATION";
|
||||||
|
/**
|
||||||
|
* What percentage of the total amount of RAM over 8 GB that the Action should reserve for the
|
||||||
|
* system.
|
||||||
|
*/
|
||||||
|
EnvVar["SCALING_RESERVED_RAM_PERCENTAGE"] = "CODEQL_ACTION_SCALING_RESERVED_RAM_PERCENTAGE";
|
||||||
/** Whether to suppress the warning if the current CLI will soon be unsupported. */
|
/** Whether to suppress the warning if the current CLI will soon be unsupported. */
|
||||||
EnvVar["SUPPRESS_DEPRECATED_SOON_WARNING"] = "CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING";
|
EnvVar["SUPPRESS_DEPRECATED_SOON_WARNING"] = "CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING";
|
||||||
/** Whether to disable uploading SARIF results or status reports to the GitHub API */
|
/** Whether to disable uploading SARIF results or status reports to the GitHub API */
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../src/environment.ts"],"names":[],"mappings":";;;AAAA,IAAY,MA0DX;AA1DD,WAAY,MAAM;IAChB,2DAA2D;IAC3D,+FAAqF,CAAA;IAErF,gEAAgE;IAChE,qEAA2D,CAAA;IAE3D;;;OAGG;IACH,yFAA+E,CAAA;IAE/E;;;OAGG;IACH,yEAA+D,CAAA;IAE/D,gFAAgF;IAChF,6DAAmD,CAAA;IAEnD;;;OAGG;IACH,uEAA6D,CAAA;IAE7D,gEAAgE;IAChE,mEAAyD,CAAA;IAEzD,kFAAkF;IAClF,mFAAyE,CAAA;IAEzE,6CAA6C;IAC7C,uCAA6B,CAAA;IAE7B,mEAAyD,CAAA;IAEzD,mFAAmF;IACnF,6FAAmF,CAAA;IAEnF,qFAAqF;IACrF,+CAAqC,CAAA;IAErC,mEAAyD,CAAA;IAEzD,kEAAkE;IAClE,2CAAiC,CAAA;IAEjC;;;;;;OAMG;IACH,4DAAkD,CAAA;AACpD,CAAC,EA1DW,MAAM,sBAAN,MAAM,QA0DjB"}
|
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../src/environment.ts"],"names":[],"mappings":";;;AAAA,IAAY,MAgEX;AAhED,WAAY,MAAM;IAChB,2DAA2D;IAC3D,+FAAqF,CAAA;IAErF,gEAAgE;IAChE,qEAA2D,CAAA;IAE3D;;;OAGG;IACH,yFAA+E,CAAA;IAE/E;;;OAGG;IACH,yEAA+D,CAAA;IAE/D,gFAAgF;IAChF,6DAAmD,CAAA;IAEnD;;;OAGG;IACH,uEAA6D,CAAA;IAE7D,gEAAgE;IAChE,mEAAyD,CAAA;IAEzD,kFAAkF;IAClF,mFAAyE,CAAA;IAEzE,6CAA6C;IAC7C,uCAA6B,CAAA;IAE7B,mEAAyD,CAAA;IAEzD;;;OAGG;IACH,2FAAiF,CAAA;IAEjF,mFAAmF;IACnF,6FAAmF,CAAA;IAEnF,qFAAqF;IACrF,+CAAqC,CAAA;IAErC,mEAAyD,CAAA;IAEzD,kEAAkE;IAClE,2CAAiC,CAAA;IAEjC;;;;;;OAMG;IACH,4DAAkD,CAAA;AACpD,CAAC,EAhEW,MAAM,sBAAN,MAAM,QAgEjB"}
|
||||||
31
lib/feature-flags.js
generated
31
lib/feature-flags.js
generated
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.logCodeScanningConfigInCli = exports.useCodeScanningConfigInCli = exports.Features = exports.FEATURE_FLAGS_FILE_NAME = exports.featureConfig = exports.Feature = exports.CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG = exports.CODEQL_VERSION_INTRA_LAYER_PARALLELISM = exports.CODEQL_VERSION_ANALYSIS_SUMMARY_V2 = exports.CODEQL_VERSION_BUNDLE_SEMANTICALLY_VERSIONED = void 0;
|
exports.logCodeScanningConfigInCli = exports.useCodeScanningConfigInCli = exports.Features = exports.FEATURE_FLAGS_FILE_NAME = exports.featureConfig = exports.Feature = exports.CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE = exports.CODEQL_VERSION_INTRA_LAYER_PARALLELISM = exports.CODEQL_VERSION_ANALYSIS_SUMMARY_V2 = exports.CODEQL_VERSION_BUNDLE_SEMANTICALLY_VERSIONED = void 0;
|
||||||
const fs = __importStar(require("fs"));
|
const fs = __importStar(require("fs"));
|
||||||
const path = __importStar(require("path"));
|
const path = __importStar(require("path"));
|
||||||
const semver = __importStar(require("semver"));
|
const semver = __importStar(require("semver"));
|
||||||
@@ -41,13 +41,14 @@ exports.CODEQL_VERSION_BUNDLE_SEMANTICALLY_VERSIONED = "2.13.4";
|
|||||||
*/
|
*/
|
||||||
exports.CODEQL_VERSION_ANALYSIS_SUMMARY_V2 = "2.14.0";
|
exports.CODEQL_VERSION_ANALYSIS_SUMMARY_V2 = "2.14.0";
|
||||||
/**
|
/**
|
||||||
* Versions 2.14.0+ of the CodeQL CLI support intra-layer parallelism (aka fine-grained parallelism) options.
|
* Versions 2.14.0+ of the CodeQL CLI support intra-layer parallelism (aka fine-grained parallelism) options, but we
|
||||||
|
* limit to 2.14.6 onwards, since that's the version that has mitigations against OOM failures.
|
||||||
*/
|
*/
|
||||||
exports.CODEQL_VERSION_INTRA_LAYER_PARALLELISM = "2.14.0";
|
exports.CODEQL_VERSION_INTRA_LAYER_PARALLELISM = "2.14.6";
|
||||||
/**
|
/**
|
||||||
* Versions 2.14.2+ of the CodeQL CLI support language-specific baseline configuration.
|
* Versions 2.15.0+ of the CodeQL CLI support sub-language file coverage information.
|
||||||
*/
|
*/
|
||||||
exports.CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG = "2.14.2";
|
exports.CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE = "2.15.0";
|
||||||
/**
|
/**
|
||||||
* Feature enablement as returned by the GitHub API endpoint.
|
* Feature enablement as returned by the GitHub API endpoint.
|
||||||
*
|
*
|
||||||
@@ -58,14 +59,14 @@ var Feature;
|
|||||||
Feature["AnalysisSummaryV2Enabled"] = "analysis_summary_v2_enabled";
|
Feature["AnalysisSummaryV2Enabled"] = "analysis_summary_v2_enabled";
|
||||||
Feature["CliConfigFileEnabled"] = "cli_config_file_enabled";
|
Feature["CliConfigFileEnabled"] = "cli_config_file_enabled";
|
||||||
Feature["CodeqlJavaLombokEnabled"] = "codeql_java_lombok_enabled";
|
Feature["CodeqlJavaLombokEnabled"] = "codeql_java_lombok_enabled";
|
||||||
|
Feature["CppDependencyInstallation"] = "cpp_dependency_installation_enabled";
|
||||||
Feature["DisableKotlinAnalysisEnabled"] = "disable_kotlin_analysis_enabled";
|
Feature["DisableKotlinAnalysisEnabled"] = "disable_kotlin_analysis_enabled";
|
||||||
Feature["DisablePythonDependencyInstallationEnabled"] = "disable_python_dependency_installation_enabled";
|
Feature["DisablePythonDependencyInstallationEnabled"] = "disable_python_dependency_installation_enabled";
|
||||||
Feature["EvaluatorIntraLayerParallelismEnabled"] = "evaluator_intra_layer_parallelism_enabled";
|
Feature["EvaluatorIntraLayerParallelismEnabled"] = "evaluator_intra_layer_parallelism_enabled";
|
||||||
Feature["ExportDiagnosticsEnabled"] = "export_diagnostics_enabled";
|
Feature["ExportDiagnosticsEnabled"] = "export_diagnostics_enabled";
|
||||||
Feature["LanguageBaselineConfigEnabled"] = "language_baseline_config_enabled";
|
|
||||||
Feature["MlPoweredQueriesEnabled"] = "ml_powered_queries_enabled";
|
Feature["MlPoweredQueriesEnabled"] = "ml_powered_queries_enabled";
|
||||||
Feature["QaTelemetryEnabled"] = "qa_telemetry_enabled";
|
Feature["QaTelemetryEnabled"] = "qa_telemetry_enabled";
|
||||||
Feature["ScalingReservedRamEnabled"] = "scaling_reserved_ram_enabled";
|
Feature["SublanguageFileCoverageEnabled"] = "sublanguage_file_coverage_enabled";
|
||||||
Feature["UploadFailedSarifEnabled"] = "upload_failed_sarif_enabled";
|
Feature["UploadFailedSarifEnabled"] = "upload_failed_sarif_enabled";
|
||||||
})(Feature || (exports.Feature = Feature = {}));
|
})(Feature || (exports.Feature = Feature = {}));
|
||||||
exports.featureConfig = {
|
exports.featureConfig = {
|
||||||
@@ -79,6 +80,11 @@ exports.featureConfig = {
|
|||||||
minimumVersion: "2.14.0",
|
minimumVersion: "2.14.0",
|
||||||
defaultValue: false,
|
defaultValue: false,
|
||||||
},
|
},
|
||||||
|
[Feature.CppDependencyInstallation]: {
|
||||||
|
envVar: "CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES",
|
||||||
|
minimumVersion: "2.15.0",
|
||||||
|
defaultValue: false,
|
||||||
|
},
|
||||||
[Feature.DisableKotlinAnalysisEnabled]: {
|
[Feature.DisableKotlinAnalysisEnabled]: {
|
||||||
envVar: "CODEQL_DISABLE_KOTLIN_ANALYSIS",
|
envVar: "CODEQL_DISABLE_KOTLIN_ANALYSIS",
|
||||||
minimumVersion: undefined,
|
minimumVersion: undefined,
|
||||||
@@ -99,11 +105,6 @@ exports.featureConfig = {
|
|||||||
minimumVersion: "2.12.4",
|
minimumVersion: "2.12.4",
|
||||||
defaultValue: true,
|
defaultValue: true,
|
||||||
},
|
},
|
||||||
[Feature.LanguageBaselineConfigEnabled]: {
|
|
||||||
envVar: "CODEQL_ACTION_LANGUAGE_BASELINE_CONFIG",
|
|
||||||
minimumVersion: exports.CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG,
|
|
||||||
defaultValue: false,
|
|
||||||
},
|
|
||||||
[Feature.MlPoweredQueriesEnabled]: {
|
[Feature.MlPoweredQueriesEnabled]: {
|
||||||
envVar: "CODEQL_ML_POWERED_QUERIES",
|
envVar: "CODEQL_ML_POWERED_QUERIES",
|
||||||
minimumVersion: undefined,
|
minimumVersion: undefined,
|
||||||
@@ -114,9 +115,9 @@ exports.featureConfig = {
|
|||||||
minimumVersion: undefined,
|
minimumVersion: undefined,
|
||||||
defaultValue: false,
|
defaultValue: false,
|
||||||
},
|
},
|
||||||
[Feature.ScalingReservedRamEnabled]: {
|
[Feature.SublanguageFileCoverageEnabled]: {
|
||||||
envVar: "CODEQL_ACTION_SCALING_RESERVED_RAM",
|
envVar: "CODEQL_ACTION_SUBLANGUAGE_FILE_COVERAGE",
|
||||||
minimumVersion: undefined,
|
minimumVersion: exports.CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE,
|
||||||
defaultValue: false,
|
defaultValue: false,
|
||||||
},
|
},
|
||||||
[Feature.UploadFailedSarifEnabled]: {
|
[Feature.UploadFailedSarifEnabled]: {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
2
lib/init-action-post-helper.js
generated
2
lib/init-action-post-helper.js
generated
@@ -74,7 +74,7 @@ async function maybeUploadFailedSarif(config, repositoryNwo, features, logger) {
|
|||||||
await codeql.databaseExportDiagnostics(databasePath, sarifFile, category, config.tempDir, logger);
|
await codeql.databaseExportDiagnostics(databasePath, sarifFile, category, config.tempDir, logger);
|
||||||
}
|
}
|
||||||
core.info(`Uploading failed SARIF file ${sarifFile}`);
|
core.info(`Uploading failed SARIF file ${sarifFile}`);
|
||||||
const uploadResult = await uploadLib.uploadFromActions(sarifFile, checkoutPath, category, logger);
|
const uploadResult = await uploadLib.uploadFromActions(sarifFile, checkoutPath, category, logger, { considerInvalidRequestUserError: false });
|
||||||
await uploadLib.waitForProcessing(repositoryNwo, uploadResult.sarifID, logger, { isUnsuccessfulExecution: true });
|
await uploadLib.waitForProcessing(repositoryNwo, uploadResult.sarifID, logger, { isUnsuccessfulExecution: true });
|
||||||
return uploadResult?.statusReport ?? {};
|
return uploadResult?.statusReport ?? {};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"init-action-post-helper.js","sourceRoot":"","sources":["../src/init-action-post-helper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AAEtC,4DAA8C;AAC9C,qCAAqC;AACrC,iDAAmD;AACnD,+CAAuC;AACvC,mDAA6D;AAG7D,wDAA0C;AAC1C,iCAKgB;AAChB,yCAKoB;AAWpB,SAAS,mCAAmC,CAC1C,KAAc;IAEd,MAAM,YAAY,GAAG,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC;IACtC,OAAO;QACL,uBAAuB,EAAE,YAAY,CAAC,OAAO;QAC7C,6BAA6B,EAAE,YAAY,CAAC,KAAK;KAClD,CAAC;AACJ,CAA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,CACvB,iCAA2C,EAC3C,uBAAiC,EACjC,cAAwB,EACxB,aAA4B,EAC5B,QAA2B,EAC3B,MAAc;IAEd,MAAM,MAAM,GAAG,MAAM,IAAA,wBAAS,EAAC,WAAW,CAAC,qBAAqB,EAAE,EAAE,MAAM,CAAC,CAAC;IAC5E,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,MAAM,CAAC,OAAO,CACZ,iGAAiG,CAClG,CAAC;QACF,OAAO;KACR;IAED,MAAM,uBAAuB,GAAG,MAAM,yBAAyB,CAC7D,MAAM,EACN,aAAa,EACb,QAAQ,EACR,MAAM,CACP,CAAC;IAEF,IAAI,uBAAuB,CAAC,iCAAiC,EAAE;QAC7D,MAAM,CAAC,KAAK,CACV,8EAA8E;YAC5E,GAAG,uBAAuB,CAAC,iCAAiC,GAAG,CAClE,CAAC;KACH;IACD,8FAA8F;IAC9F,iCAAiC;IACjC,IACE,OAAO,CAAC,GAAG,CAAC,0CAA0C,CAAC,KAAK,MAAM;QAClE,CAAC,uBAAuB,CAAC,qBAAqB,EAC9C;QACA,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,uBAAuB,CAAC,CAAC;QACtD,MAAM,IAAI,KAAK,CACb,4EAA4E;YAC1E,8BAA8B,KAAK,GAAG,CACzC,CAAC;KACH;IAED,qDAAqD;IACrD,IAAI,MAAM,CAAC,SAAS,EAAE;QACpB,IAAI,CAAC,IAAI,CACP,mGAAmG,CACpG,CAAC;QACF,MAAM,iCAAiC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACxD,MAAM,uBAAuB,CAAC,MAAM,CAAC,CAAC;QAEtC,MAAM,cAAc,CAAC,MAAM,CAAC,CAAC;KAC9B;IAED,OAAO,uBAAuB,CAAC;AACjC,CAAC;AAtDD,kBAsDC"}
|
{"version":3,"file":"init-action-post-helper.js","sourceRoot":"","sources":["../src/init-action-post-helper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;A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,CAAC,IAAI,CACP,mGAAmG,CACpG,CAAC;QACF,MAAM,iCAAiC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACxD,MAAM,uBAAuB,CAAC,MAAM,CAAC,CAAC;QAEtC,MAAM,cAAc,CAAC,MAAM,CAAC,CAAC;KAC9B;IAED,OAAO,uBAAuB,CAAC;AACjC,CAAC;AAtDD,kBAsDC"}
|
||||||
11
lib/init-action.js
generated
11
lib/init-action.js
generated
@@ -121,8 +121,7 @@ async function run() {
|
|||||||
const features = new feature_flags_1.Features(gitHubVersion, repositoryNwo, (0, actions_util_1.getTemporaryDirectory)(), logger);
|
const features = new feature_flags_1.Features(gitHubVersion, repositoryNwo, (0, actions_util_1.getTemporaryDirectory)(), logger);
|
||||||
core.exportVariable(environment_1.EnvVar.JOB_RUN_UUID, (0, uuid_1.v4)());
|
core.exportVariable(environment_1.EnvVar.JOB_RUN_UUID, (0, uuid_1.v4)());
|
||||||
try {
|
try {
|
||||||
const workflowErrors = await (0, workflow_1.validateWorkflow)(logger);
|
if (!(await (0, status_report_1.sendStatusReport)(await (0, status_report_1.createStatusReportBase)("init", "starting", startedAt, await (0, util_1.checkDiskUsage)(logger))))) {
|
||||||
if (!(await (0, status_report_1.sendStatusReport)(await (0, status_report_1.createStatusReportBase)("init", "starting", startedAt, await (0, util_1.checkDiskUsage)(logger), workflowErrors)))) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const codeQLDefaultVersionInfo = await features.getDefaultCliVersion(gitHubVersion.type);
|
const codeQLDefaultVersionInfo = await features.getDefaultCliVersion(gitHubVersion.type);
|
||||||
@@ -132,6 +131,7 @@ async function run() {
|
|||||||
toolsDownloadDurationMs = initCodeQLResult.toolsDownloadDurationMs;
|
toolsDownloadDurationMs = initCodeQLResult.toolsDownloadDurationMs;
|
||||||
toolsVersion = initCodeQLResult.toolsVersion;
|
toolsVersion = initCodeQLResult.toolsVersion;
|
||||||
toolsSource = initCodeQLResult.toolsSource;
|
toolsSource = initCodeQLResult.toolsSource;
|
||||||
|
await (0, workflow_1.validateWorkflow)(codeql, logger);
|
||||||
config = await (0, init_1.initConfig)((0, actions_util_1.getOptionalInput)("languages"), (0, actions_util_1.getOptionalInput)("queries"), (0, actions_util_1.getOptionalInput)("packs"), registriesInput, (0, actions_util_1.getOptionalInput)("config-file"), (0, actions_util_1.getOptionalInput)("db-location"), (0, actions_util_1.getOptionalInput)("config"), getTrapCachingEnabled(),
|
config = await (0, init_1.initConfig)((0, actions_util_1.getOptionalInput)("languages"), (0, actions_util_1.getOptionalInput)("queries"), (0, actions_util_1.getOptionalInput)("packs"), registriesInput, (0, actions_util_1.getOptionalInput)("config-file"), (0, actions_util_1.getOptionalInput)("db-location"), (0, actions_util_1.getOptionalInput)("config"), getTrapCachingEnabled(),
|
||||||
// Debug mode is enabled if:
|
// Debug mode is enabled if:
|
||||||
// - The `init` Action is passed `debug: true`.
|
// - The `init` Action is passed `debug: true`.
|
||||||
@@ -173,12 +173,17 @@ async function run() {
|
|||||||
// options at https://codeql.github.com/docs/codeql-cli/manual/database-trace-command/
|
// options at https://codeql.github.com/docs/codeql-cli/manual/database-trace-command/
|
||||||
// for details.
|
// for details.
|
||||||
core.exportVariable("CODEQL_RAM", process.env["CODEQL_RAM"] ||
|
core.exportVariable("CODEQL_RAM", process.env["CODEQL_RAM"] ||
|
||||||
(0, util_1.getMemoryFlagValue)((0, actions_util_1.getOptionalInput)("ram"), await features.getValue(feature_flags_1.Feature.ScalingReservedRamEnabled)).toString());
|
(0, util_1.getMemoryFlagValue)((0, actions_util_1.getOptionalInput)("ram"), logger).toString());
|
||||||
core.exportVariable("CODEQL_THREADS", (0, util_1.getThreadsFlagValue)((0, actions_util_1.getOptionalInput)("threads"), logger).toString());
|
core.exportVariable("CODEQL_THREADS", (0, util_1.getThreadsFlagValue)((0, actions_util_1.getOptionalInput)("threads"), logger).toString());
|
||||||
// Disable Kotlin extractor if feature flag set
|
// Disable Kotlin extractor if feature flag set
|
||||||
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.codeQlVersionAbove)(codeql, "2.13.4")) &&
|
||||||
|
!(await (0, util_1.codeQlVersionAbove)(codeql, "2.14.4"))) {
|
||||||
|
core.exportVariable(kotlinLimitVar, "1.9.20");
|
||||||
|
}
|
||||||
if (config.languages.includes(languages_1.Language.java)) {
|
if (config.languages.includes(languages_1.Language.java)) {
|
||||||
const envVar = "CODEQL_EXTRACTOR_JAVA_RUN_ANNOTATION_PROCESSORS";
|
const envVar = "CODEQL_EXTRACTOR_JAVA_RUN_ANNOTATION_PROCESSORS";
|
||||||
if (process.env[envVar]) {
|
if (process.env[envVar]) {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
13
lib/languages.js
generated
13
lib/languages.js
generated
@@ -1,6 +1,6 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.isScannedLanguage = exports.isTracedLanguage = exports.parseLanguage = exports.resolveAlias = exports.LANGUAGE_ALIASES = exports.Language = void 0;
|
exports.isScannedLanguage = exports.isTracedLanguage = exports.parseLanguage = exports.LANGUAGE_ALIASES = exports.Language = void 0;
|
||||||
// All the languages supported by CodeQL
|
// All the languages supported by CodeQL
|
||||||
var Language;
|
var Language;
|
||||||
(function (Language) {
|
(function (Language) {
|
||||||
@@ -21,18 +21,13 @@ exports.LANGUAGE_ALIASES = {
|
|||||||
kotlin: Language.java,
|
kotlin: Language.java,
|
||||||
typescript: Language.javascript,
|
typescript: Language.javascript,
|
||||||
};
|
};
|
||||||
function resolveAlias(lang) {
|
|
||||||
return exports.LANGUAGE_ALIASES[lang] || lang;
|
|
||||||
}
|
|
||||||
exports.resolveAlias = resolveAlias;
|
|
||||||
/**
|
/**
|
||||||
* Translate from user input or GitHub's API names for languages to CodeQL's
|
* Translate from user input or GitHub's API names for languages to CodeQL's
|
||||||
* names for languages. This does not translate a language alias to the actual
|
* names for languages.
|
||||||
* language used by CodeQL.
|
|
||||||
*
|
*
|
||||||
* @param language The language to translate.
|
* @param language The language to translate.
|
||||||
* @returns A language supported by CodeQL, an alias for a language, or
|
* @returns A language supported by CodeQL, an alias for a language, or
|
||||||
* `undefined` if the input language cannot be parsed into a langauge supported
|
* `undefined` if the input language cannot be parsed into a language supported
|
||||||
* by CodeQL.
|
* by CodeQL.
|
||||||
*/
|
*/
|
||||||
function parseLanguage(language) {
|
function parseLanguage(language) {
|
||||||
@@ -45,7 +40,7 @@ function parseLanguage(language) {
|
|||||||
// Check language aliases, but return the original language name,
|
// Check language aliases, but return the original language name,
|
||||||
// the alias will be resolved later.
|
// the alias will be resolved later.
|
||||||
if (language in exports.LANGUAGE_ALIASES) {
|
if (language in exports.LANGUAGE_ALIASES) {
|
||||||
return language;
|
return exports.LANGUAGE_ALIASES[language];
|
||||||
}
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"languages.js","sourceRoot":"","sources":["../src/languages.ts"],"names":[],"mappings":";;;AAAA,wCAAwC;AACxC,IAAY,QASX;AATD,WAAY,QAAQ;IAClB,6BAAiB,CAAA;IACjB,uBAAW,CAAA;IACX,qBAAS,CAAA;IACT,yBAAa,CAAA;IACb,qCAAyB,CAAA;IACzB,6BAAiB,CAAA;IACjB,yBAAa,CAAA;IACb,2BAAe,CAAA;AACjB,CAAC,EATW,QAAQ,wBAAR,QAAQ,QAS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
t.deepEqual((0, languages_1.parseLanguage)("javascript"), languages_1.Language.javascript);
|
t.deepEqual((0, languages_1.parseLanguage)("javascript"), languages_1.Language.javascript);
|
||||||
t.deepEqual((0, languages_1.parseLanguage)("python"), languages_1.Language.python);
|
t.deepEqual((0, languages_1.parseLanguage)("python"), languages_1.Language.python);
|
||||||
// Aliases
|
// Aliases
|
||||||
t.deepEqual((0, languages_1.parseLanguage)("c"), "c");
|
t.deepEqual((0, languages_1.parseLanguage)("c"), languages_1.Language.cpp);
|
||||||
t.deepEqual((0, languages_1.parseLanguage)("c++"), "c++");
|
t.deepEqual((0, languages_1.parseLanguage)("c++"), languages_1.Language.cpp);
|
||||||
t.deepEqual((0, languages_1.parseLanguage)("c#"), "c#");
|
t.deepEqual((0, languages_1.parseLanguage)("c#"), languages_1.Language.csharp);
|
||||||
t.deepEqual((0, languages_1.parseLanguage)("kotlin"), "kotlin");
|
t.deepEqual((0, languages_1.parseLanguage)("kotlin"), languages_1.Language.java);
|
||||||
t.deepEqual((0, languages_1.parseLanguage)("typescript"), "typescript");
|
t.deepEqual((0, languages_1.parseLanguage)("typescript"), languages_1.Language.javascript);
|
||||||
// spaces and case-insensitivity
|
// spaces and case-insensitivity
|
||||||
t.deepEqual((0, languages_1.parseLanguage)(" \t\nCsHaRp\t\t"), languages_1.Language.csharp);
|
t.deepEqual((0, languages_1.parseLanguage)(" \t\nCsHaRp\t\t"), languages_1.Language.csharp);
|
||||||
t.deepEqual((0, languages_1.parseLanguage)(" \t\nkOtLin\t\t"), "kotlin");
|
t.deepEqual((0, languages_1.parseLanguage)(" \t\nkOtLin\t\t"), languages_1.Language.java);
|
||||||
// Not matches
|
// Not matches
|
||||||
t.deepEqual((0, languages_1.parseLanguage)("foo"), undefined);
|
t.deepEqual((0, languages_1.parseLanguage)("foo"), undefined);
|
||||||
t.deepEqual((0, languages_1.parseLanguage)(" "), undefined);
|
t.deepEqual((0, languages_1.parseLanguage)(" "), undefined);
|
||||||
|
|||||||
@@ -1 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,EAAE,CAAC,EAAE,EAAE;IACpC,CAAC,CAAC,KAAK,CAAC,IAAA,6BAAiB,EAAC,oBAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;IACzC,CAAC,CAAC,KAAK,CAAC,IAAA,6BAAiB,EAAC,oBAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IAC5C,CAAC,CAAC,KAAK,CAAC,IAAA,6BAAiB,EAAC,oBAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;IACxC,CAAC,CAAC,KAAK,CAAC,IAAA,6BAAiB,EAAC,oBAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;IAC1C,CAAC,CAAC,KAAK,CAAC,IAAA,6BAAiB,EAAC,oBAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IAE3C,CAAC,CAAC,IAAI,CAAC,IAAA,6BAAiB,EAAC,oBAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;IAC/C,CAAC,CAAC,IAAI,CAAC,IAAA,6BAAiB,EAAC,oBAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3C,CAAC,CAAC,IAAI,CAAC,IAAA,6BAAiB,EAAC,oBAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;AAC3C,CAAC,CAAC,CAAC"}
|
||||||
5
lib/resolve-environment-action.js
generated
5
lib/resolve-environment-action.js
generated
@@ -38,11 +38,14 @@ const ENVIRONMENT_OUTPUT_NAME = "environment";
|
|||||||
async function run() {
|
async function run() {
|
||||||
const startedAt = new Date();
|
const startedAt = new Date();
|
||||||
const logger = (0, logging_1.getActionsLogger)();
|
const logger = (0, logging_1.getActionsLogger)();
|
||||||
const language = (0, languages_1.resolveAlias)((0, actions_util_1.getRequiredInput)("language"));
|
|
||||||
try {
|
try {
|
||||||
if (!(await (0, status_report_1.sendStatusReport)(await (0, status_report_1.createStatusReportBase)(ACTION_NAME, "starting", startedAt, await (0, util_1.checkDiskUsage)(logger))))) {
|
if (!(await (0, status_report_1.sendStatusReport)(await (0, status_report_1.createStatusReportBase)(ACTION_NAME, "starting", startedAt, await (0, util_1.checkDiskUsage)(logger))))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const language = (0, languages_1.parseLanguage)((0, actions_util_1.getRequiredInput)("language"));
|
||||||
|
if (language === undefined) {
|
||||||
|
throw new Error(`Did not recognize the language "${(0, actions_util_1.getRequiredInput)("language")}".`);
|
||||||
|
}
|
||||||
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 config = await configUtils.getConfig((0, actions_util_1.getTemporaryDirectory)(), logger);
|
const config = await configUtils.getConfig((0, actions_util_1.getTemporaryDirectory)(), logger);
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"resolve-environment-action.js","sourceRoot":"","sources":["../src/resolve-environment-action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AAEtC,iDAIwB;AACxB,6CAAgD;AAChD,qCAAkD;AAClD,4DAA8C;AAC9C,2CAAqD;AACrD,uCAA6C;AAC7C,+DAAmE;AACnE,mDAIyB;AACzB,iCAKgB;AAEhB,MAAM,WAAW,GAAG,qBAAqB,CAAC;AAC1C,MAAM,uBAAuB,GAAG,aAAa,CAAC;AAE9C,KAAK,UAAU,GAAG;IAChB,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC;IAC7B,MAAM,MAAM,GAAG,IAAA,0BAAgB,GAAE,CAAC;IAClC,MAAM,QAAQ,GAAa,IAAA,wBAAY,EAAC,IAAA,+BAAgB,EAAC,UAAU,CAAC,CAAC,CAAC;IAEtE,IAAI;QACF,IACE,CAAC,CAAC,MAAM,IAAA,gCAAgB,EACtB,MAAM,IAAA,sCAAsB,EAC1B,WAAW,EACX,UAAU,EACV,SAAS,EACT,MAAM,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ACH;QAED,OAAO;KACR;IAED,MAAM,IAAA,gCAAgB,EACpB,MAAM,IAAA,sCAAsB,EAC1B,WAAW,EACX,SAAS,EACT,SAAS,EACT,MAAM,IAAA,qBAAc,GAAE,CACvB,CACF,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,UAAU;IACvB,IAAI;QACF,MAAM,GAAG,EAAE,CAAC;KACb;IAAC,OAAO,KAAK,EAAE;QACd,IAAI,CAAC,SAAS,CAAC,GAAG,WAAW,mBAAmB,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KAC7E;IACD,MAAM,IAAA,sBAAe,GAAE,CAAC;AAC1B,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}
|
{"version":3,"file":"resolve-environment-action.js","sourceRoot":"","sources":["../src/resolve-environment-action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AAEtC,iDAIwB;AACxB,6CAAgD;AAChD,qCAAkD;AAClD,4DAA8C;AAC9C,2CAAsD;AACtD,uCAA6C;AAC7C,+DAAmE;AACnE,mDAIyB;AACzB,iCAKgB;AAEhB,MAAM,WAAW,GAAG,qBAAqB,CAAC;AAC1C,MAAM,uBAAuB,GAAG,aAAa,CAAC;AAE9C,KAAK,UAAU,GAAG;IAChB,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC;IAC7B,MAAM,MAAM,GAAG,IAAA,0BAAgB,GAAE,CAAC;IAElC,IAAI;QACF,IACE,CAAC,CAAC,MAAM,IAAA,gCAAgB,EACtB,MAAM,IAAA,sCAAsB,EAC1B,WAAW,EACX,UAAU,EACV,SAAS,EACT,MAAM,IAAA,qBAAc,EAAC,MAAM,CAAC,CAC7B,CACF,CAAC,EACF;YACA,OAAO;SACR;QAED,MAAM,QAAQ,GAAyB,IAAA,yBAAa,EAClD,IAAA,+BAAgB,EAAC,UAAU,CAAC,CAC7B,CAAC;QAEF,IAAI,QAAQ,KAAK,SAAS,E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AAC,KAAK,CACZ,CACF,CAAC;SACH;QAED,OAAO;KACR;IAED,MAAM,IAAA,gCAAgB,EACpB,MAAM,IAAA,sCAAsB,EAC1B,WAAW,EACX,SAAS,EACT,SAAS,EACT,MAAM,IAAA,qBAAc,GAAE,CACvB,CACF,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,UAAU;IACvB,IAAI;QACF,MAAM,GAAG,EAAE,CAAC;KACb;IAAC,OAAO,KAAK,EAAE;QACd,IAAI,CAAC,SAAS,CAAC,GAAG,WAAW,mBAAmB,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KAC7E;IACD,MAAM,IAAA,sBAAe,GAAE,CAAC;AAC1B,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}
|
||||||
50
lib/upload-lib.js
generated
50
lib/upload-lib.js
generated
@@ -55,7 +55,7 @@ function combineSarifFiles(sarifFiles) {
|
|||||||
combinedSarif.version = sarifObject.version;
|
combinedSarif.version = sarifObject.version;
|
||||||
}
|
}
|
||||||
else if (combinedSarif.version !== sarifObject.version) {
|
else if (combinedSarif.version !== sarifObject.version) {
|
||||||
throw new Error(`Different SARIF versions encountered: ${combinedSarif.version} and ${sarifObject.version}`);
|
throw new InvalidRequestError(`Different SARIF versions encountered: ${combinedSarif.version} and ${sarifObject.version}`);
|
||||||
}
|
}
|
||||||
combinedSarif.runs.push(...sarifObject.runs);
|
combinedSarif.runs.push(...sarifObject.runs);
|
||||||
}
|
}
|
||||||
@@ -129,21 +129,35 @@ function findSarifFilesInDir(sarifPath) {
|
|||||||
return sarifFiles;
|
return sarifFiles;
|
||||||
}
|
}
|
||||||
exports.findSarifFilesInDir = findSarifFilesInDir;
|
exports.findSarifFilesInDir = findSarifFilesInDir;
|
||||||
// Uploads a single sarif file or a directory of sarif files
|
/**
|
||||||
// depending on what the path happens to refer to.
|
* Uploads a single SARIF file or a directory of SARIF files depending on what `sarifPath` refers
|
||||||
async function uploadFromActions(sarifPath, checkoutPath, category, logger) {
|
* to.
|
||||||
return await uploadFiles(getSarifFilePaths(sarifPath), (0, repository_1.parseRepositoryNwo)(util.getRequiredEnvParam("GITHUB_REPOSITORY")), await actionsUtil.getCommitOid(checkoutPath), await actionsUtil.getRef(), await api.getAnalysisKey(), category, util.getRequiredEnvParam("GITHUB_WORKFLOW"), actionsUtil.getWorkflowRunID(), actionsUtil.getWorkflowRunAttempt(), checkoutPath, actionsUtil.getRequiredInput("matrix"), logger);
|
*
|
||||||
|
* @param considerInvalidRequestUserError Whether an invalid request, for example one with a
|
||||||
|
* `sarifPath` that does not exist, should be considered a
|
||||||
|
* user error.
|
||||||
|
*/
|
||||||
|
async function uploadFromActions(sarifPath, checkoutPath, category, logger, { considerInvalidRequestUserError, }) {
|
||||||
|
try {
|
||||||
|
return await uploadFiles(getSarifFilePaths(sarifPath), (0, repository_1.parseRepositoryNwo)(util.getRequiredEnvParam("GITHUB_REPOSITORY")), await actionsUtil.getCommitOid(checkoutPath), await actionsUtil.getRef(), await api.getAnalysisKey(), category, util.getRequiredEnvParam("GITHUB_WORKFLOW"), actionsUtil.getWorkflowRunID(), actionsUtil.getWorkflowRunAttempt(), checkoutPath, actionsUtil.getRequiredInput("matrix"), logger);
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
if (e instanceof InvalidRequestError && considerInvalidRequestUserError) {
|
||||||
|
throw new util_1.UserError(e.message);
|
||||||
|
}
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
exports.uploadFromActions = uploadFromActions;
|
exports.uploadFromActions = uploadFromActions;
|
||||||
function getSarifFilePaths(sarifPath) {
|
function getSarifFilePaths(sarifPath) {
|
||||||
if (!fs.existsSync(sarifPath)) {
|
if (!fs.existsSync(sarifPath)) {
|
||||||
throw new Error(`Path does not exist: ${sarifPath}`);
|
throw new InvalidRequestError(`Path does not exist: ${sarifPath}`);
|
||||||
}
|
}
|
||||||
let sarifFiles;
|
let sarifFiles;
|
||||||
if (fs.lstatSync(sarifPath).isDirectory()) {
|
if (fs.lstatSync(sarifPath).isDirectory()) {
|
||||||
sarifFiles = findSarifFilesInDir(sarifPath);
|
sarifFiles = findSarifFilesInDir(sarifPath);
|
||||||
if (sarifFiles.length === 0) {
|
if (sarifFiles.length === 0) {
|
||||||
throw new Error(`No SARIF files found to upload in "${sarifPath}".`);
|
throw new InvalidRequestError(`No SARIF files found to upload in "${sarifPath}".`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -159,14 +173,14 @@ function countResultsInSarif(sarif) {
|
|||||||
parsedSarif = JSON.parse(sarif);
|
parsedSarif = JSON.parse(sarif);
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
throw new Error(`Invalid SARIF. JSON syntax error: ${(0, util_1.wrapError)(e).message}`);
|
throw new InvalidRequestError(`Invalid SARIF. JSON syntax error: ${(0, util_1.wrapError)(e).message}`);
|
||||||
}
|
}
|
||||||
if (!Array.isArray(parsedSarif.runs)) {
|
if (!Array.isArray(parsedSarif.runs)) {
|
||||||
throw new Error("Invalid SARIF. Missing 'runs' array.");
|
throw new InvalidRequestError("Invalid SARIF. Missing 'runs' array.");
|
||||||
}
|
}
|
||||||
for (const run of parsedSarif.runs) {
|
for (const run of parsedSarif.runs) {
|
||||||
if (!Array.isArray(run.results)) {
|
if (!Array.isArray(run.results)) {
|
||||||
throw new Error("Invalid SARIF. Missing 'results' array in run.");
|
throw new InvalidRequestError("Invalid SARIF. Missing 'results' array in run.");
|
||||||
}
|
}
|
||||||
numResults += run.results.length;
|
numResults += run.results.length;
|
||||||
}
|
}
|
||||||
@@ -195,7 +209,7 @@ function validateSarifFileSchema(sarifFilePath, logger) {
|
|||||||
// Set the main error message to the stacks of all the errors.
|
// Set the main error message to the stacks of all the errors.
|
||||||
// This should be of a manageable size and may even give enough to fix the error.
|
// This should be of a manageable size and may even give enough to fix the error.
|
||||||
const sarifErrors = errors.map((e) => `- ${e.stack}`);
|
const sarifErrors = errors.map((e) => `- ${e.stack}`);
|
||||||
throw new Error(`Unable to upload "${sarifFilePath}" as it is not valid SARIF:\n${sarifErrors.join("\n")}`);
|
throw new InvalidRequestError(`Unable to upload "${sarifFilePath}" as it is not valid SARIF:\n${sarifErrors.join("\n")}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports.validateSarifFileSchema = validateSarifFileSchema;
|
exports.validateSarifFileSchema = validateSarifFileSchema;
|
||||||
@@ -334,7 +348,7 @@ async function waitForProcessing(repositoryNwo, sarifID, logger, options = {
|
|||||||
const message = `Code Scanning could not process the submitted SARIF file:\n${response.data.errors}`;
|
const message = `Code Scanning could not process the submitted SARIF file:\n${response.data.errors}`;
|
||||||
throw shouldConsiderAsUserError(response.data.errors)
|
throw shouldConsiderAsUserError(response.data.errors)
|
||||||
? new util_1.UserError(message)
|
? new util_1.UserError(message)
|
||||||
: new Error(message);
|
: new InvalidRequestError(message);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
util.assertNever(status);
|
util.assertNever(status);
|
||||||
@@ -397,7 +411,7 @@ function validateUniqueCategory(sarif) {
|
|||||||
for (const [category, { id, tool }] of Object.entries(categories)) {
|
for (const [category, { id, tool }] of Object.entries(categories)) {
|
||||||
const sentinelEnvVar = `CODEQL_UPLOAD_SARIF_${category}`;
|
const sentinelEnvVar = `CODEQL_UPLOAD_SARIF_${category}`;
|
||||||
if (process.env[sentinelEnvVar]) {
|
if (process.env[sentinelEnvVar]) {
|
||||||
throw new Error("Aborting upload: only one run of the codeql/analyze or codeql/upload-sarif actions is allowed per job per tool/category. " +
|
throw new InvalidRequestError("Aborting upload: only one run of the codeql/analyze or codeql/upload-sarif actions is allowed per job per tool/category. " +
|
||||||
"The easiest fix is to specify a unique value for the `category` input. If .runs[].automationDetails.id is specified " +
|
"The easiest fix is to specify a unique value for the `category` input. If .runs[].automationDetails.id is specified " +
|
||||||
"in the sarif file, that will take precedence over your configured `category`. " +
|
"in the sarif file, that will take precedence over your configured `category`. " +
|
||||||
`Category: (${id ? id : "none"}) Tool: (${tool ? tool : "none"})`);
|
`Category: (${id ? id : "none"}) Tool: (${tool ? tool : "none"})`);
|
||||||
@@ -407,7 +421,7 @@ function validateUniqueCategory(sarif) {
|
|||||||
}
|
}
|
||||||
exports.validateUniqueCategory = validateUniqueCategory;
|
exports.validateUniqueCategory = validateUniqueCategory;
|
||||||
/**
|
/**
|
||||||
* Santizes a string to be used as an environment variable name.
|
* Sanitizes a string to be used as an environment variable name.
|
||||||
* This will replace all non-alphanumeric characters with underscores.
|
* This will replace all non-alphanumeric characters with underscores.
|
||||||
* There could still be some false category clashes if two uploads
|
* There could still be some false category clashes if two uploads
|
||||||
* occur that differ only in their non-alphanumeric characters. This is
|
* occur that differ only in their non-alphanumeric characters. This is
|
||||||
@@ -449,4 +463,12 @@ function pruneInvalidResults(sarif, logger) {
|
|||||||
return { ...sarif, runs: newRuns };
|
return { ...sarif, runs: newRuns };
|
||||||
}
|
}
|
||||||
exports.pruneInvalidResults = pruneInvalidResults;
|
exports.pruneInvalidResults = pruneInvalidResults;
|
||||||
|
/**
|
||||||
|
* An error that occurred due to an invalid SARIF upload request.
|
||||||
|
*/
|
||||||
|
class InvalidRequestError extends Error {
|
||||||
|
constructor(message) {
|
||||||
|
super(message);
|
||||||
|
}
|
||||||
|
}
|
||||||
//# sourceMappingURL=upload-lib.js.map
|
//# sourceMappingURL=upload-lib.js.map
|
||||||
File diff suppressed because one or more lines are too long
2
lib/upload-sarif-action.js
generated
2
lib/upload-sarif-action.js
generated
@@ -47,7 +47,7 @@ async function run() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const uploadResult = await upload_lib.uploadFromActions(actionsUtil.getRequiredInput("sarif_file"), actionsUtil.getRequiredInput("checkout_path"), actionsUtil.getOptionalInput("category"), logger);
|
const uploadResult = await upload_lib.uploadFromActions(actionsUtil.getRequiredInput("sarif_file"), actionsUtil.getRequiredInput("checkout_path"), actionsUtil.getOptionalInput("category"), logger, { considerInvalidRequestUserError: true });
|
||||||
core.setOutput("sarif-id", uploadResult.sarifID);
|
core.setOutput("sarif-id", uploadResult.sarifID);
|
||||||
// We don't upload results in test mode, so don't wait for processing
|
// We don't upload results in test mode, so don't wait for processing
|
||||||
if ((0, util_1.isInTestMode)()) {
|
if ((0, util_1.isInTestMode)()) {
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"upload-sarif-action.js","sourceRoot":"","sources":["../src/upload-sarif-action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AAEtC,4DAA8C;AAC9C,iDAAkD;AAClD,uCAA6C;AAC7C,6CAAkD;AAClD,mDAKyB;AACzB,yDAA2C;AAC3C,iCAMgB;AAMhB,KAAK,UAAU,uBAAuB,CACpC,SAAe,EACf,WAA0C;IAE1C,MAAM,gBAAgB,GAAG,MAAM,IAAA,sCAAsB,EACnD,cAAc,EACd,SAAS,EACT,SAAS,EACT,MAAM,IAAA,qBAAc,GAAE,CACvB,CAAC;IACF,MAAM,YAAY,GAA4B;QAC5C,GAAG,gBAAgB;QACnB,GAAG,WAAW;KACf,CAAC;IACF,MAAM,IAAA,gCAAgB,EAAC,YAAY,CAAC,CAAC;AACvC,CAAC;AAED,KAAK,UAAU,GAAG;IAChB,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC;IAC7B,MAAM,MAAM,GAAG,IAAA,0BAAgB,GAAE,CAAC;IAClC,IAAA,4BAAqB,EAAC,IAAA,+BAAgB,GAAE,CAAC,CAAC;IAC1C,IACE,CAAC,CAAC,MAAM,IAAA,gCAAgB,EACtB,MAAM,IAAA,sCAAsB,EAC1B,cAAc,EACd,UAAU,EACV,SAAS,EACT,MAAM,IAAA,qBAAc,GAAE,CACvB,CACF,CAAC,EACF;QACA,OAAO;KACR;IAED,IAAI;QACF,MAAM,YAAY,GAAG,MAAM,UAAU,CAAC,iBAAiB,CACrD,WAAW,CAAC,gBAA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AC,OAAO,EAAE,CACjE,CAAC;KACH;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}
|
{"version":3,"file":"upload-sarif-action.js","sourceRoot":"","sources":["../src/upload-sarif-action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AAEtC,4DAA8C;AAC9C,iDAAkD;AAClD,uCAA6C;AAC7C,6CAAkD;AAClD,mDAKyB;AACzB,yDAA2C;AAC3C,iCAMgB;AAMhB,KAAK,UAAU,uBAAuB,CACpC,SAAe,EACf,WAA0C;IAE1C,MAAM,gBAAgB,GAAG,MAAM,IAAA,sCAAsB,EACnD,cAAc,EACd,SAAS,EACT,SAAS,EACT,MAAM,IAAA,qBAAc,GAAE,CACvB,CAAC;IACF,MAAM,YAAY,GAA4B;QAC5C,GAAG,gBAAgB;QACnB,GAAG,WAAW;KACf,CAAC;IACF,MAAM,IAAA,gCAAgB,EAAC,YAAY,CAAC,CAAC;AACvC,CAAC;AAED,KAAK,UAAU,GAAG;IAChB,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC;IAC7B,MAAM,MAAM,GAAG,IAAA,0BAAgB,GAAE,CAAC;IAClC,IAAA,4BAAqB,EAAC,IAAA,+BAAgB,GAAE,CAAC,CAAC;IAC1C,IACE,CAAC,CAAC,MAAM,IAAA,gCAAgB,EACtB,MAAM,IAAA,sCAAsB,EAC1B,cAAc,EACd,UAAU,EACV,SAAS,EACT,MAAM,IAAA,qBAAc,GAAE,CACvB,CACF,CAAC,EACF;QACA,OAAO;KACR;IAED,IAAI;QACF,MAAM,YAAY,GAAG,MAAM,UAAU,CAAC,iBAAiB,CACrD,WAAW,CAAC,gBAAgB,CAAC,YAAY,CAAC,EAC1C,WAAW,CAAC,gBAAgB,CAAC,eAAe,CAAC,EAC7C,WAAW,CAAC,gBAAgB,CAAC,UAAU,CAAC,EACxC,MAAM,EACN,EAAE,+BAA+B,EAAE,IAAI,EAAE,CAC1C,CAAC;QACF,IA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EBUG_ARTIFACT_NAME = "debug-artifacts";
|
|||||||
* Default name of the database in the debugging artifact.
|
* Default name of the database in the debugging artifact.
|
||||||
*/
|
*/
|
||||||
exports.DEFAULT_DEBUG_DATABASE_NAME = "db";
|
exports.DEFAULT_DEBUG_DATABASE_NAME = "db";
|
||||||
|
/**
|
||||||
|
* The default fraction of the total RAM above 8 GB that should be reserved for the system.
|
||||||
|
*/
|
||||||
|
const DEFAULT_RESERVED_RAM_SCALING_FACTOR = 0.05;
|
||||||
|
/**
|
||||||
|
* The minimum amount of memory imposed by a cgroup limit that we will consider. Memory limits below
|
||||||
|
* this amount are ignored.
|
||||||
|
*/
|
||||||
|
const MINIMUM_CGROUP_MEMORY_LIMIT_BYTES = 1024 * 1024;
|
||||||
/**
|
/**
|
||||||
* Get the extra options for the codeql commands.
|
* Get the extra options for the codeql commands.
|
||||||
*/
|
*/
|
||||||
@@ -106,18 +115,20 @@ exports.withTmpDir = withTmpDir;
|
|||||||
* from committing too much of the available memory to CodeQL.
|
* from committing too much of the available memory to CodeQL.
|
||||||
* @returns number
|
* @returns number
|
||||||
*/
|
*/
|
||||||
function getSystemReservedMemoryMegaBytes(totalMemoryMegaBytes, platform, isScalingReservedRamEnabled) {
|
function getSystemReservedMemoryMegaBytes(totalMemoryMegaBytes, platform) {
|
||||||
// Windows needs more memory for OS processes.
|
// Windows needs more memory for OS processes.
|
||||||
const fixedAmount = 1024 * (platform === "win32" ? 1.5 : 1);
|
const fixedAmount = 1024 * (platform === "win32" ? 1.5 : 1);
|
||||||
if (isScalingReservedRamEnabled) {
|
// Reserve an additional percentage of the amount of memory above 8 GB, since the amount used by
|
||||||
// Reserve an additional 5% of the amount of memory above 8 GB, since the amount used by the
|
// the kernel for page tables scales with the size of physical memory.
|
||||||
// kernel for page tables scales with the size of physical memory.
|
const scaledAmount = getReservedRamScaleFactor() * Math.max(totalMemoryMegaBytes - 8 * 1024, 0);
|
||||||
const scaledAmount = 0.05 * Math.max(totalMemoryMegaBytes - 8 * 1024, 0);
|
return fixedAmount + scaledAmount;
|
||||||
return fixedAmount + scaledAmount;
|
}
|
||||||
}
|
function getReservedRamScaleFactor() {
|
||||||
else {
|
const envVar = Number.parseInt(process.env[environment_1.EnvVar.SCALING_RESERVED_RAM_PERCENTAGE] || "", 10);
|
||||||
return fixedAmount;
|
if (envVar < 0 || envVar > 100 || Number.isNaN(envVar)) {
|
||||||
|
return DEFAULT_RESERVED_RAM_SCALING_FACTOR;
|
||||||
}
|
}
|
||||||
|
return envVar / 100;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Get the value of the codeql `--ram` flag as configured by the `ram` input.
|
* Get the value of the codeql `--ram` flag as configured by the `ram` input.
|
||||||
@@ -126,7 +137,7 @@ function getSystemReservedMemoryMegaBytes(totalMemoryMegaBytes, platform, isScal
|
|||||||
*
|
*
|
||||||
* @returns {number} the amount of RAM to use, in megabytes
|
* @returns {number} the amount of RAM to use, in megabytes
|
||||||
*/
|
*/
|
||||||
function getMemoryFlagValueForPlatform(userInput, totalMemoryBytes, platform, isScalingReservedRamEnabled) {
|
function getMemoryFlagValueForPlatform(userInput, totalMemoryBytes, platform) {
|
||||||
let memoryToUseMegaBytes;
|
let memoryToUseMegaBytes;
|
||||||
if (userInput) {
|
if (userInput) {
|
||||||
memoryToUseMegaBytes = Number(userInput);
|
memoryToUseMegaBytes = Number(userInput);
|
||||||
@@ -136,12 +147,55 @@ function getMemoryFlagValueForPlatform(userInput, totalMemoryBytes, platform, is
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const totalMemoryMegaBytes = totalMemoryBytes / (1024 * 1024);
|
const totalMemoryMegaBytes = totalMemoryBytes / (1024 * 1024);
|
||||||
const reservedMemoryMegaBytes = getSystemReservedMemoryMegaBytes(totalMemoryMegaBytes, platform, isScalingReservedRamEnabled);
|
const reservedMemoryMegaBytes = getSystemReservedMemoryMegaBytes(totalMemoryMegaBytes, platform);
|
||||||
memoryToUseMegaBytes = totalMemoryMegaBytes - reservedMemoryMegaBytes;
|
memoryToUseMegaBytes = totalMemoryMegaBytes - reservedMemoryMegaBytes;
|
||||||
}
|
}
|
||||||
return Math.floor(memoryToUseMegaBytes);
|
return Math.floor(memoryToUseMegaBytes);
|
||||||
}
|
}
|
||||||
exports.getMemoryFlagValueForPlatform = getMemoryFlagValueForPlatform;
|
exports.getMemoryFlagValueForPlatform = getMemoryFlagValueForPlatform;
|
||||||
|
/**
|
||||||
|
* Get the total amount of memory available to the Action, taking into account constraints imposed
|
||||||
|
* by cgroups on Linux.
|
||||||
|
*/
|
||||||
|
function getTotalMemoryBytes(logger) {
|
||||||
|
const limits = [os.totalmem()];
|
||||||
|
if (os.platform() === "linux") {
|
||||||
|
limits.push(...[
|
||||||
|
"/sys/fs/cgroup/memory/memory.limit_in_bytes",
|
||||||
|
"/sys/fs/cgroup/memory.max",
|
||||||
|
]
|
||||||
|
.map((file) => getCgroupMemoryLimitBytes(file, logger))
|
||||||
|
.filter((limit) => limit !== undefined)
|
||||||
|
.map((limit) => limit));
|
||||||
|
}
|
||||||
|
const limit = Math.min(...limits);
|
||||||
|
logger.debug(`While resolving RAM, determined that the total memory available to the Action is ${limit / (1024 * 1024)} MiB.`);
|
||||||
|
return limit;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Gets the number of bytes of available memory specified by the cgroup limit file at the given path.
|
||||||
|
*
|
||||||
|
* May be greater than the total memory reported by the operating system if there is no cgroup limit.
|
||||||
|
*/
|
||||||
|
function getCgroupMemoryLimitBytes(limitFile, logger) {
|
||||||
|
if (!fs.existsSync(limitFile)) {
|
||||||
|
logger.debug(`While resolving RAM, did not find a cgroup memory limit at ${limitFile}.`);
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
const limit = Number(fs.readFileSync(limitFile, "utf8"));
|
||||||
|
if (!Number.isInteger(limit)) {
|
||||||
|
logger.debug(`While resolving RAM, ignored the file ${limitFile} that may contain a cgroup memory limit ` +
|
||||||
|
"as this file did not contain an integer.");
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
const displayLimit = `${Math.floor(limit / (1024 * 1024))} MiB`;
|
||||||
|
if (limit < MINIMUM_CGROUP_MEMORY_LIMIT_BYTES) {
|
||||||
|
logger.info(`While resolving RAM, ignored a cgroup limit of ${displayLimit} in ${limitFile} as it was below ${MINIMUM_CGROUP_MEMORY_LIMIT_BYTES / (1024 * 1024)} MiB.`);
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
logger.info(`While resolving RAM, found a cgroup limit of ${displayLimit} in ${limitFile}.`);
|
||||||
|
return limit;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Get the value of the codeql `--ram` flag as configured by the `ram` input.
|
* Get the value of the codeql `--ram` flag as configured by the `ram` input.
|
||||||
* If no value was specified, the total available memory will be used minus a
|
* If no value was specified, the total available memory will be used minus a
|
||||||
@@ -149,8 +203,8 @@ exports.getMemoryFlagValueForPlatform = getMemoryFlagValueForPlatform;
|
|||||||
*
|
*
|
||||||
* @returns {number} the amount of RAM to use, in megabytes
|
* @returns {number} the amount of RAM to use, in megabytes
|
||||||
*/
|
*/
|
||||||
function getMemoryFlagValue(userInput, isScalingReservedRamEnabled) {
|
function getMemoryFlagValue(userInput, logger) {
|
||||||
return getMemoryFlagValueForPlatform(userInput, os.totalmem(), process.platform, isScalingReservedRamEnabled);
|
return getMemoryFlagValueForPlatform(userInput, getTotalMemoryBytes(logger), process.platform);
|
||||||
}
|
}
|
||||||
exports.getMemoryFlagValue = getMemoryFlagValue;
|
exports.getMemoryFlagValue = getMemoryFlagValue;
|
||||||
/**
|
/**
|
||||||
@@ -160,8 +214,8 @@ exports.getMemoryFlagValue = getMemoryFlagValue;
|
|||||||
*
|
*
|
||||||
* @returns string
|
* @returns string
|
||||||
*/
|
*/
|
||||||
function getMemoryFlag(userInput, isScalingReservedRamEnabled) {
|
function getMemoryFlag(userInput, logger) {
|
||||||
const megabytes = getMemoryFlagValue(userInput, isScalingReservedRamEnabled);
|
const megabytes = getMemoryFlagValue(userInput, logger);
|
||||||
return `--ram=${megabytes}`;
|
return `--ram=${megabytes}`;
|
||||||
}
|
}
|
||||||
exports.getMemoryFlag = getMemoryFlag;
|
exports.getMemoryFlag = getMemoryFlag;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
35
lib/util.test.js
generated
35
lib/util.test.js
generated
@@ -30,6 +30,7 @@ const fs = __importStar(require("fs"));
|
|||||||
const os = __importStar(require("os"));
|
const os = __importStar(require("os"));
|
||||||
const path_1 = __importDefault(require("path"));
|
const path_1 = __importDefault(require("path"));
|
||||||
const ava_1 = __importDefault(require("ava"));
|
const ava_1 = __importDefault(require("ava"));
|
||||||
|
const environment_1 = require("./environment");
|
||||||
const logging_1 = require("./logging");
|
const logging_1 = require("./logging");
|
||||||
const testing_utils_1 = require("./testing-utils");
|
const testing_utils_1 = require("./testing-utils");
|
||||||
const util = __importStar(require("./util"));
|
const util = __importStar(require("./util"));
|
||||||
@@ -45,56 +46,58 @@ const GET_MEMORY_FLAG_TESTS = [
|
|||||||
totalMemoryMb: 8 * 1024,
|
totalMemoryMb: 8 * 1024,
|
||||||
platform: "linux",
|
platform: "linux",
|
||||||
expectedMemoryValue: 7 * 1024,
|
expectedMemoryValue: 7 * 1024,
|
||||||
expectedMemoryValueWithScaling: 7 * 1024,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
input: undefined,
|
input: undefined,
|
||||||
totalMemoryMb: 8 * 1024,
|
totalMemoryMb: 8 * 1024,
|
||||||
platform: "win32",
|
platform: "win32",
|
||||||
expectedMemoryValue: 6.5 * 1024,
|
expectedMemoryValue: 6.5 * 1024,
|
||||||
expectedMemoryValueWithScaling: 6.5 * 1024,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
input: "",
|
input: "",
|
||||||
totalMemoryMb: 8 * 1024,
|
totalMemoryMb: 8 * 1024,
|
||||||
platform: "linux",
|
platform: "linux",
|
||||||
expectedMemoryValue: 7 * 1024,
|
expectedMemoryValue: 7 * 1024,
|
||||||
expectedMemoryValueWithScaling: 7 * 1024,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
input: "512",
|
input: "512",
|
||||||
totalMemoryMb: 8 * 1024,
|
totalMemoryMb: 8 * 1024,
|
||||||
platform: "linux",
|
platform: "linux",
|
||||||
expectedMemoryValue: 512,
|
expectedMemoryValue: 512,
|
||||||
expectedMemoryValueWithScaling: 512,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
input: undefined,
|
input: undefined,
|
||||||
totalMemoryMb: 64 * 1024,
|
totalMemoryMb: 64 * 1024,
|
||||||
platform: "linux",
|
platform: "linux",
|
||||||
expectedMemoryValue: 63 * 1024,
|
expectedMemoryValue: 61644, // Math.floor(1024 * (64 - 1 - 0.05 * (64 - 8)))
|
||||||
expectedMemoryValueWithScaling: 61644, // Math.floor(1024 * (64 - 1 - 0.05 * (64 - 8)))
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
input: undefined,
|
input: undefined,
|
||||||
totalMemoryMb: 64 * 1024,
|
totalMemoryMb: 64 * 1024,
|
||||||
platform: "win32",
|
platform: "win32",
|
||||||
expectedMemoryValue: 62.5 * 1024,
|
expectedMemoryValue: 61132, // Math.floor(1024 * (64 - 1.5 - 0.05 * (64 - 8)))
|
||||||
expectedMemoryValueWithScaling: 61132, // Math.floor(1024 * (64 - 1.5 - 0.05 * (64 - 8)))
|
},
|
||||||
|
{
|
||||||
|
input: undefined,
|
||||||
|
totalMemoryMb: 64 * 1024,
|
||||||
|
platform: "linux",
|
||||||
|
expectedMemoryValue: 58777,
|
||||||
|
reservedPercentageValue: "10",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
for (const { input, totalMemoryMb, platform, expectedMemoryValue, expectedMemoryValueWithScaling, } of GET_MEMORY_FLAG_TESTS) {
|
for (const { input, totalMemoryMb, platform, expectedMemoryValue, reservedPercentageValue, } of GET_MEMORY_FLAG_TESTS) {
|
||||||
(0, ava_1.default)(`Memory flag value is ${expectedMemoryValue} without scaling and ${expectedMemoryValueWithScaling} with scaling ` +
|
(0, ava_1.default)(`Memory flag value is ${expectedMemoryValue} for ${input ?? "no user input"} on ${platform} with ${totalMemoryMb} MB total system RAM${reservedPercentageValue
|
||||||
`for ${input ?? "no user input"} on ${platform} with ${totalMemoryMb} MB total system RAM`, async (t) => {
|
? ` and reserved percentage env var set to ${reservedPercentageValue}`
|
||||||
for (const withScaling of [true, false]) {
|
: ""}`, async (t) => {
|
||||||
const flag = util.getMemoryFlagValueForPlatform(input, totalMemoryMb * 1024 * 1024, platform, withScaling);
|
process.env[environment_1.EnvVar.SCALING_RESERVED_RAM_PERCENTAGE] =
|
||||||
t.deepEqual(flag, withScaling ? expectedMemoryValueWithScaling : expectedMemoryValue);
|
reservedPercentageValue || undefined;
|
||||||
}
|
const flag = util.getMemoryFlagValueForPlatform(input, totalMemoryMb * 1024 * 1024, platform);
|
||||||
|
t.deepEqual(flag, expectedMemoryValue);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
(0, ava_1.default)("getMemoryFlag() throws if the ram input is < 0 or NaN", async (t) => {
|
(0, ava_1.default)("getMemoryFlag() throws if the ram input is < 0 or NaN", async (t) => {
|
||||||
for (const input of ["-1", "hello!"]) {
|
for (const input of ["-1", "hello!"]) {
|
||||||
t.throws(() => util.getMemoryFlag(input, false));
|
t.throws(() => util.getMemoryFlag(input, (0, logging_1.getRunnerLogger)(true)));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
(0, ava_1.default)("getAddSnippetsFlag() should return the correct flag", (t) => {
|
(0, ava_1.default)("getAddSnippetsFlag() should return the correct flag", (t) => {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
52
lib/workflow.js
generated
52
lib/workflow.js
generated
@@ -78,11 +78,57 @@ exports.WorkflowErrors = toCodedErrors({
|
|||||||
MissingPushHook: `Please specify an on.push hook to analyze and see code scanning alerts from the default branch on the Security tab.`,
|
MissingPushHook: `Please specify an on.push hook to analyze and see code scanning alerts from the default branch on the Security tab.`,
|
||||||
CheckoutWrongHead: `git checkout HEAD^2 is no longer necessary. Please remove this step as Code Scanning recommends analyzing the merge commit for best results.`,
|
CheckoutWrongHead: `git checkout HEAD^2 is no longer necessary. Please remove this step as Code Scanning recommends analyzing the merge commit for best results.`,
|
||||||
});
|
});
|
||||||
function getWorkflowErrors(doc) {
|
/**
|
||||||
|
* Groups the given list of CodeQL languages by their extractor name.
|
||||||
|
*
|
||||||
|
* Resolves to `undefined` if the CodeQL version does not support language aliasing.
|
||||||
|
*/
|
||||||
|
async function groupLanguagesByExtractor(languages, codeql) {
|
||||||
|
const resolveResult = await codeql.betterResolveLanguages();
|
||||||
|
if (!resolveResult.aliases) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
const aliases = resolveResult.aliases;
|
||||||
|
const languagesByExtractor = {};
|
||||||
|
for (const language of languages) {
|
||||||
|
const extractorName = aliases[language] || language;
|
||||||
|
if (!languagesByExtractor[extractorName]) {
|
||||||
|
languagesByExtractor[extractorName] = [];
|
||||||
|
}
|
||||||
|
languagesByExtractor[extractorName].push(language);
|
||||||
|
}
|
||||||
|
return languagesByExtractor;
|
||||||
|
}
|
||||||
|
async function getWorkflowErrors(doc, codeql) {
|
||||||
const errors = [];
|
const errors = [];
|
||||||
const jobName = process.env.GITHUB_JOB;
|
const jobName = process.env.GITHUB_JOB;
|
||||||
if (jobName) {
|
if (jobName) {
|
||||||
const job = doc?.jobs?.[jobName];
|
const job = doc?.jobs?.[jobName];
|
||||||
|
if (job?.strategy?.matrix?.language) {
|
||||||
|
const matrixLanguages = job.strategy.matrix.language;
|
||||||
|
if (Array.isArray(matrixLanguages)) {
|
||||||
|
// Map extractors to entries in the `language` matrix parameter. This will allow us to
|
||||||
|
// detect languages which are analyzed in more than one job.
|
||||||
|
const matrixLanguagesByExtractor = await groupLanguagesByExtractor(matrixLanguages, codeql);
|
||||||
|
// If the CodeQL version does not support language aliasing, then `matrixLanguagesByExtractor`
|
||||||
|
// will be `undefined`. In this case, we cannot detect duplicate languages in the matrix.
|
||||||
|
if (matrixLanguagesByExtractor !== undefined) {
|
||||||
|
// Check for duplicate languages in the matrix
|
||||||
|
for (const [extractor, languages] of Object.entries(matrixLanguagesByExtractor)) {
|
||||||
|
if (languages.length > 1) {
|
||||||
|
errors.push({
|
||||||
|
message: `CodeQL language '${extractor}' is referenced by more than one entry in the ` +
|
||||||
|
`'language' matrix parameter for job '${jobName}'. This may result in duplicate alerts. ` +
|
||||||
|
`Please edit the 'language' matrix parameter to keep only one of the following: ${languages
|
||||||
|
.map((language) => `'${language}'`)
|
||||||
|
.join(", ")}.`,
|
||||||
|
code: "DuplicateLanguageInMatrix",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
const steps = job?.steps;
|
const steps = job?.steps;
|
||||||
if (Array.isArray(steps)) {
|
if (Array.isArray(steps)) {
|
||||||
for (const step of steps) {
|
for (const step of steps) {
|
||||||
@@ -127,7 +173,7 @@ function getWorkflowErrors(doc) {
|
|||||||
return errors;
|
return errors;
|
||||||
}
|
}
|
||||||
exports.getWorkflowErrors = getWorkflowErrors;
|
exports.getWorkflowErrors = getWorkflowErrors;
|
||||||
async function validateWorkflow(logger) {
|
async function validateWorkflow(codeql, logger) {
|
||||||
let workflow;
|
let workflow;
|
||||||
try {
|
try {
|
||||||
workflow = await getWorkflow(logger);
|
workflow = await getWorkflow(logger);
|
||||||
@@ -137,7 +183,7 @@ async function validateWorkflow(logger) {
|
|||||||
}
|
}
|
||||||
let workflowErrors;
|
let workflowErrors;
|
||||||
try {
|
try {
|
||||||
workflowErrors = getWorkflowErrors(workflow);
|
workflowErrors = await getWorkflowErrors(workflow, codeql);
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
return `error: getWorkflowErrors() failed: ${String(e)}`;
|
return `error: getWorkflowErrors() failed: ${String(e)}`;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
240
lib/workflow.test.js
generated
240
lib/workflow.test.js
generated
@@ -28,119 +28,114 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const ava_1 = __importDefault(require("ava"));
|
const ava_1 = __importDefault(require("ava"));
|
||||||
const yaml = __importStar(require("js-yaml"));
|
const yaml = __importStar(require("js-yaml"));
|
||||||
|
const sinon = __importStar(require("sinon"));
|
||||||
|
const codeql_1 = require("./codeql");
|
||||||
const testing_utils_1 = require("./testing-utils");
|
const testing_utils_1 = require("./testing-utils");
|
||||||
const workflow_1 = require("./workflow");
|
const workflow_1 = require("./workflow");
|
||||||
function errorCodes(actual, expected) {
|
function errorCodes(actual, expected) {
|
||||||
return [actual.map(({ code }) => code), expected.map(({ code }) => code)];
|
return [actual.map(({ code }) => code), expected.map(({ code }) => code)];
|
||||||
}
|
}
|
||||||
(0, testing_utils_1.setupTests)(ava_1.default);
|
(0, testing_utils_1.setupTests)(ava_1.default);
|
||||||
(0, ava_1.default)("getWorkflowErrors() when on is empty", (t) => {
|
(0, ava_1.default)("getWorkflowErrors() when on is empty", async (t) => {
|
||||||
const errors = (0, workflow_1.getWorkflowErrors)({ on: {} });
|
const errors = await (0, workflow_1.getWorkflowErrors)({ on: {} }, await (0, codeql_1.getCodeQLForTesting)());
|
||||||
t.deepEqual(...errorCodes(errors, []));
|
t.deepEqual(...errorCodes(errors, []));
|
||||||
});
|
});
|
||||||
(0, ava_1.default)("getWorkflowErrors() when on.push is an array missing pull_request", (t) => {
|
(0, ava_1.default)("getWorkflowErrors() when on.push is an array missing pull_request", async (t) => {
|
||||||
const errors = (0, workflow_1.getWorkflowErrors)({ on: ["push"] });
|
const errors = await (0, workflow_1.getWorkflowErrors)({ on: ["push"] }, await (0, codeql_1.getCodeQLForTesting)());
|
||||||
t.deepEqual(...errorCodes(errors, []));
|
t.deepEqual(...errorCodes(errors, []));
|
||||||
});
|
});
|
||||||
(0, ava_1.default)("getWorkflowErrors() when on.push is an array missing push", (t) => {
|
(0, ava_1.default)("getWorkflowErrors() when on.push is an array missing push", async (t) => {
|
||||||
const errors = (0, workflow_1.getWorkflowErrors)({ on: ["pull_request"] });
|
const errors = await (0, workflow_1.getWorkflowErrors)({ on: ["pull_request"] }, await (0, codeql_1.getCodeQLForTesting)());
|
||||||
t.deepEqual(...errorCodes(errors, [workflow_1.WorkflowErrors.MissingPushHook]));
|
t.deepEqual(...errorCodes(errors, [workflow_1.WorkflowErrors.MissingPushHook]));
|
||||||
});
|
});
|
||||||
(0, ava_1.default)("getWorkflowErrors() when on.push is valid", (t) => {
|
(0, ava_1.default)("getWorkflowErrors() when on.push is valid", async (t) => {
|
||||||
const errors = (0, workflow_1.getWorkflowErrors)({
|
const errors = await (0, workflow_1.getWorkflowErrors)({
|
||||||
on: ["push", "pull_request"],
|
on: ["push", "pull_request"],
|
||||||
});
|
}, await (0, codeql_1.getCodeQLForTesting)());
|
||||||
t.deepEqual(...errorCodes(errors, []));
|
t.deepEqual(...errorCodes(errors, []));
|
||||||
});
|
});
|
||||||
(0, ava_1.default)("getWorkflowErrors() when on.push is a valid superset", (t) => {
|
(0, ava_1.default)("getWorkflowErrors() when on.push is a valid superset", async (t) => {
|
||||||
const errors = (0, workflow_1.getWorkflowErrors)({
|
const errors = await (0, workflow_1.getWorkflowErrors)({
|
||||||
on: ["push", "pull_request", "schedule"],
|
on: ["push", "pull_request", "schedule"],
|
||||||
});
|
}, await (0, codeql_1.getCodeQLForTesting)());
|
||||||
t.deepEqual(...errorCodes(errors, []));
|
t.deepEqual(...errorCodes(errors, []));
|
||||||
});
|
});
|
||||||
(0, ava_1.default)("getWorkflowErrors() when on.push is a correct object", (t) => {
|
(0, ava_1.default)("getWorkflowErrors() when on.push is a correct object", async (t) => {
|
||||||
const errors = (0, workflow_1.getWorkflowErrors)({
|
const errors = await (0, workflow_1.getWorkflowErrors)({
|
||||||
on: { push: { branches: ["main"] }, pull_request: { branches: ["main"] } },
|
on: {
|
||||||
});
|
push: { branches: ["main"] },
|
||||||
|
pull_request: { branches: ["main"] },
|
||||||
|
},
|
||||||
|
}, await (0, codeql_1.getCodeQLForTesting)());
|
||||||
t.deepEqual(...errorCodes(errors, []));
|
t.deepEqual(...errorCodes(errors, []));
|
||||||
});
|
});
|
||||||
(0, ava_1.default)("getWorkflowErrors() when on.pull_requests is a string and correct", (t) => {
|
(0, ava_1.default)("getWorkflowErrors() when on.pull_requests is a string and correct", async (t) => {
|
||||||
const errors = (0, workflow_1.getWorkflowErrors)({
|
const errors = await (0, workflow_1.getWorkflowErrors)({
|
||||||
on: { push: { branches: "*" }, pull_request: { branches: "*" } },
|
on: { push: { branches: "*" }, pull_request: { branches: "*" } },
|
||||||
});
|
}, await (0, codeql_1.getCodeQLForTesting)());
|
||||||
t.deepEqual(...errorCodes(errors, []));
|
t.deepEqual(...errorCodes(errors, []));
|
||||||
});
|
});
|
||||||
(0, ava_1.default)("getWorkflowErrors() when on.push is correct with empty objects", (t) => {
|
(0, ava_1.default)("getWorkflowErrors() when on.push is correct with empty objects", async (t) => {
|
||||||
const errors = (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
const errors = await (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
pull_request:
|
pull_request:
|
||||||
`));
|
`), await (0, codeql_1.getCodeQLForTesting)());
|
||||||
t.deepEqual(...errorCodes(errors, []));
|
t.deepEqual(...errorCodes(errors, []));
|
||||||
});
|
});
|
||||||
(0, ava_1.default)("getWorkflowErrors() when on.push is not mismatched", (t) => {
|
(0, ava_1.default)("getWorkflowErrors() when on.push is not mismatched", async (t) => {
|
||||||
const errors = (0, workflow_1.getWorkflowErrors)({
|
const errors = await (0, workflow_1.getWorkflowErrors)({
|
||||||
on: {
|
on: {
|
||||||
push: { branches: ["main", "feature"] },
|
push: { branches: ["main", "feature"] },
|
||||||
pull_request: { branches: ["main"] },
|
pull_request: { branches: ["main"] },
|
||||||
},
|
},
|
||||||
});
|
}, await (0, codeql_1.getCodeQLForTesting)());
|
||||||
t.deepEqual(...errorCodes(errors, []));
|
t.deepEqual(...errorCodes(errors, []));
|
||||||
});
|
});
|
||||||
(0, ava_1.default)("getWorkflowErrors() for a range of malformed workflows", (t) => {
|
(0, ava_1.default)("getWorkflowErrors() for a range of malformed workflows", async (t) => {
|
||||||
t.deepEqual(...errorCodes((0, workflow_1.getWorkflowErrors)({
|
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)({
|
||||||
on: {
|
on: {
|
||||||
push: 1,
|
push: 1,
|
||||||
pull_request: 1,
|
pull_request: 1,
|
||||||
},
|
},
|
||||||
}), []));
|
}, await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||||
t.deepEqual(...errorCodes((0, workflow_1.getWorkflowErrors)({
|
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)({
|
||||||
on: 1,
|
on: 1,
|
||||||
}), []));
|
}, await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||||
t.deepEqual(...errorCodes(
|
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)({
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
||||||
(0, workflow_1.getWorkflowErrors)({
|
|
||||||
on: 1,
|
on: 1,
|
||||||
jobs: 1,
|
jobs: 1,
|
||||||
}), []));
|
}, await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||||
t.deepEqual(...errorCodes(
|
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)({
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
||||||
(0, workflow_1.getWorkflowErrors)({
|
|
||||||
on: 1,
|
on: 1,
|
||||||
jobs: [1],
|
jobs: [1],
|
||||||
}), []));
|
}, await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||||
t.deepEqual(...errorCodes((0, workflow_1.getWorkflowErrors)({
|
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)({
|
||||||
on: 1,
|
on: 1,
|
||||||
jobs: { 1: 1 },
|
jobs: { 1: 1 },
|
||||||
}), []));
|
}, await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||||
t.deepEqual(...errorCodes((0, workflow_1.getWorkflowErrors)({
|
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)({
|
||||||
on: 1,
|
on: 1,
|
||||||
jobs: { test: 1 },
|
jobs: { test: 1 },
|
||||||
}), []));
|
}, await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||||
t.deepEqual(...errorCodes((0, workflow_1.getWorkflowErrors)({
|
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)({
|
||||||
on: 1,
|
on: 1,
|
||||||
jobs: { test: [1] },
|
jobs: { test: [1] },
|
||||||
}), []));
|
}, await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||||
t.deepEqual(...errorCodes(
|
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)({
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
||||||
(0, workflow_1.getWorkflowErrors)({
|
|
||||||
on: 1,
|
on: 1,
|
||||||
jobs: { test: { steps: 1 } },
|
jobs: { test: { steps: 1 } },
|
||||||
}), []));
|
}, await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||||
t.deepEqual(...errorCodes(
|
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)({
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
||||||
(0, workflow_1.getWorkflowErrors)({
|
|
||||||
on: 1,
|
on: 1,
|
||||||
jobs: { test: { steps: [{ notrun: "git checkout HEAD^2" }] } },
|
jobs: { test: { steps: [{ notrun: "git checkout HEAD^2" }] } },
|
||||||
}), []));
|
}, await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||||
t.deepEqual(...errorCodes((0, workflow_1.getWorkflowErrors)({
|
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)({
|
||||||
on: 1,
|
on: 1,
|
||||||
jobs: { test: [undefined] },
|
jobs: { test: [undefined] },
|
||||||
}), []));
|
}, await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||||
t.deepEqual(...errorCodes((0, workflow_1.getWorkflowErrors)(1), []));
|
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)(1, await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||||
t.deepEqual(...errorCodes(
|
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)({
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
||||||
(0, workflow_1.getWorkflowErrors)({
|
|
||||||
on: {
|
on: {
|
||||||
push: {
|
push: {
|
||||||
branches: 1,
|
branches: 1,
|
||||||
@@ -149,25 +144,86 @@ function errorCodes(actual, expected) {
|
|||||||
branches: 1,
|
branches: 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}), []));
|
}, await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||||
});
|
});
|
||||||
(0, ava_1.default)("getWorkflowErrors() when on.pull_request for wildcard branches", (t) => {
|
(0, ava_1.default)("getWorkflowErrors() when on.pull_request for wildcard branches", async (t) => {
|
||||||
const errors = (0, workflow_1.getWorkflowErrors)({
|
const errors = await (0, workflow_1.getWorkflowErrors)({
|
||||||
on: {
|
on: {
|
||||||
push: { branches: ["feature/*"] },
|
push: { branches: ["feature/*"] },
|
||||||
pull_request: { branches: "feature/moose" },
|
pull_request: { branches: "feature/moose" },
|
||||||
},
|
},
|
||||||
});
|
}, await (0, codeql_1.getCodeQLForTesting)());
|
||||||
t.deepEqual(...errorCodes(errors, []));
|
t.deepEqual(...errorCodes(errors, []));
|
||||||
});
|
});
|
||||||
(0, ava_1.default)("getWorkflowErrors() when HEAD^2 is checked out", (t) => {
|
(0, ava_1.default)("getWorkflowErrors() when HEAD^2 is checked out", async (t) => {
|
||||||
process.env.GITHUB_JOB = "test";
|
process.env.GITHUB_JOB = "test";
|
||||||
const errors = (0, workflow_1.getWorkflowErrors)({
|
const errors = await (0, workflow_1.getWorkflowErrors)({
|
||||||
on: ["push", "pull_request"],
|
on: ["push", "pull_request"],
|
||||||
jobs: { test: { steps: [{ run: "git checkout HEAD^2" }] } },
|
jobs: { test: { steps: [{ run: "git checkout HEAD^2" }] } },
|
||||||
});
|
}, await (0, codeql_1.getCodeQLForTesting)());
|
||||||
t.deepEqual(...errorCodes(errors, [workflow_1.WorkflowErrors.CheckoutWrongHead]));
|
t.deepEqual(...errorCodes(errors, [workflow_1.WorkflowErrors.CheckoutWrongHead]));
|
||||||
});
|
});
|
||||||
|
(0, ava_1.default)("getWorkflowErrors() produces an error for workflow with language name and its alias", async (t) => {
|
||||||
|
await testLanguageAliases(t, ["java", "kotlin"], { java: ["java-kotlin", "kotlin"] }, [
|
||||||
|
"CodeQL language 'java' is referenced by more than one entry in the 'language' matrix " +
|
||||||
|
"parameter for job 'test'. This may result in duplicate alerts. Please edit the 'language' " +
|
||||||
|
"matrix parameter to keep only one of the following: 'java', 'kotlin'.",
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
(0, ava_1.default)("getWorkflowErrors() produces an error for workflow with two aliases same language", async (t) => {
|
||||||
|
await testLanguageAliases(t, ["java-kotlin", "kotlin"], { java: ["java-kotlin", "kotlin"] }, [
|
||||||
|
"CodeQL language 'java' is referenced by more than one entry in the 'language' matrix " +
|
||||||
|
"parameter for job 'test'. This may result in duplicate alerts. Please edit the 'language' " +
|
||||||
|
"matrix parameter to keep only one of the following: 'java-kotlin', 'kotlin'.",
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
(0, ava_1.default)("getWorkflowErrors() does not produce an error for workflow with two distinct languages", async (t) => {
|
||||||
|
await testLanguageAliases(t, ["java", "typescript"], {
|
||||||
|
java: ["java-kotlin", "kotlin"],
|
||||||
|
javascript: ["javascript-typescript", "typescript"],
|
||||||
|
}, []);
|
||||||
|
});
|
||||||
|
(0, ava_1.default)("getWorkflowErrors() does not produce an error if codeql doesn't support language aliases", async (t) => {
|
||||||
|
await testLanguageAliases(t, ["java-kotlin", "kotlin"], undefined, []);
|
||||||
|
});
|
||||||
|
async function testLanguageAliases(t, matrixLanguages, aliases, expectedErrorMessages) {
|
||||||
|
process.env.GITHUB_JOB = "test";
|
||||||
|
const codeql = await (0, codeql_1.getCodeQLForTesting)();
|
||||||
|
sinon.stub(codeql, "betterResolveLanguages").resolves({
|
||||||
|
aliases: aliases !== undefined
|
||||||
|
? // Remap from languageName -> aliases to alias -> languageName
|
||||||
|
Object.assign({}, ...Object.entries(aliases).flatMap(([language, languageAliases]) => languageAliases.map((alias) => ({
|
||||||
|
[alias]: language,
|
||||||
|
}))))
|
||||||
|
: undefined,
|
||||||
|
extractors: {
|
||||||
|
java: [
|
||||||
|
{
|
||||||
|
extractor_root: "",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const errors = await (0, workflow_1.getWorkflowErrors)({
|
||||||
|
on: ["push", "pull_request"],
|
||||||
|
jobs: {
|
||||||
|
test: {
|
||||||
|
strategy: {
|
||||||
|
matrix: {
|
||||||
|
language: matrixLanguages,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
steps: [
|
||||||
|
{ uses: "actions/checkout@v2" },
|
||||||
|
{ uses: "github/codeql-action/init@v2" },
|
||||||
|
{ uses: "github/codeql-action/analyze@v2" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}, codeql);
|
||||||
|
t.is(errors.length, expectedErrorMessages.length);
|
||||||
|
t.deepEqual(errors.map((e) => e.message), expectedErrorMessages);
|
||||||
|
}
|
||||||
(0, ava_1.default)("formatWorkflowErrors() when there is one error", (t) => {
|
(0, ava_1.default)("formatWorkflowErrors() when there is one error", (t) => {
|
||||||
const message = (0, workflow_1.formatWorkflowErrors)([workflow_1.WorkflowErrors.CheckoutWrongHead]);
|
const message = (0, workflow_1.formatWorkflowErrors)([workflow_1.WorkflowErrors.CheckoutWrongHead]);
|
||||||
t.true(message.startsWith("1 issue was detected with this workflow:"));
|
t.true(message.startsWith("1 issue was detected with this workflow:"));
|
||||||
@@ -213,19 +269,19 @@ function errorCodes(actual, expected) {
|
|||||||
t.true((0, workflow_1.patternIsSuperset)("/robin/*/release/*", "/robin/moose/release/goose"));
|
t.true((0, workflow_1.patternIsSuperset)("/robin/*/release/*", "/robin/moose/release/goose"));
|
||||||
t.false((0, workflow_1.patternIsSuperset)("/robin/moose/release/goose", "/robin/*/release/*"));
|
t.false((0, workflow_1.patternIsSuperset)("/robin/moose/release/goose", "/robin/*/release/*"));
|
||||||
});
|
});
|
||||||
(0, ava_1.default)("getWorkflowErrors() when branches contain dots", (t) => {
|
(0, ava_1.default)("getWorkflowErrors() when branches contain dots", async (t) => {
|
||||||
const errors = (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
const errors = await (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [4.1, master]
|
branches: [4.1, master]
|
||||||
pull_request:
|
pull_request:
|
||||||
# The branches below must be a subset of the branches above
|
# The branches below must be a subset of the branches above
|
||||||
branches: [4.1, master]
|
branches: [4.1, master]
|
||||||
`));
|
`), await (0, codeql_1.getCodeQLForTesting)());
|
||||||
t.deepEqual(...errorCodes(errors, []));
|
t.deepEqual(...errorCodes(errors, []));
|
||||||
});
|
});
|
||||||
(0, ava_1.default)("getWorkflowErrors() when on.push has a trailing comma", (t) => {
|
(0, ava_1.default)("getWorkflowErrors() when on.push has a trailing comma", async (t) => {
|
||||||
const errors = (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
const errors = await (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||||
name: "CodeQL"
|
name: "CodeQL"
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -233,12 +289,12 @@ function errorCodes(actual, expected) {
|
|||||||
pull_request:
|
pull_request:
|
||||||
# The branches below must be a subset of the branches above
|
# The branches below must be a subset of the branches above
|
||||||
branches: [master]
|
branches: [master]
|
||||||
`));
|
`), await (0, codeql_1.getCodeQLForTesting)());
|
||||||
t.deepEqual(...errorCodes(errors, []));
|
t.deepEqual(...errorCodes(errors, []));
|
||||||
});
|
});
|
||||||
(0, ava_1.default)("getWorkflowErrors() should only report the current job's CheckoutWrongHead", (t) => {
|
(0, ava_1.default)("getWorkflowErrors() should only report the current job's CheckoutWrongHead", async (t) => {
|
||||||
process.env.GITHUB_JOB = "test";
|
process.env.GITHUB_JOB = "test";
|
||||||
const errors = (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
const errors = await (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||||
name: "CodeQL"
|
name: "CodeQL"
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -257,12 +313,12 @@ function errorCodes(actual, expected) {
|
|||||||
|
|
||||||
test3:
|
test3:
|
||||||
steps: []
|
steps: []
|
||||||
`));
|
`), await (0, codeql_1.getCodeQLForTesting)());
|
||||||
t.deepEqual(...errorCodes(errors, [workflow_1.WorkflowErrors.CheckoutWrongHead]));
|
t.deepEqual(...errorCodes(errors, [workflow_1.WorkflowErrors.CheckoutWrongHead]));
|
||||||
});
|
});
|
||||||
(0, ava_1.default)("getWorkflowErrors() should not report a different job's CheckoutWrongHead", (t) => {
|
(0, ava_1.default)("getWorkflowErrors() should not report a different job's CheckoutWrongHead", async (t) => {
|
||||||
process.env.GITHUB_JOB = "test3";
|
process.env.GITHUB_JOB = "test3";
|
||||||
const errors = (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
const errors = await (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||||
name: "CodeQL"
|
name: "CodeQL"
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -281,41 +337,41 @@ function errorCodes(actual, expected) {
|
|||||||
|
|
||||||
test3:
|
test3:
|
||||||
steps: []
|
steps: []
|
||||||
`));
|
`), await (0, codeql_1.getCodeQLForTesting)());
|
||||||
t.deepEqual(...errorCodes(errors, []));
|
t.deepEqual(...errorCodes(errors, []));
|
||||||
});
|
});
|
||||||
(0, ava_1.default)("getWorkflowErrors() when on is missing", (t) => {
|
(0, ava_1.default)("getWorkflowErrors() when on is missing", async (t) => {
|
||||||
const errors = (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
const errors = await (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||||
name: "CodeQL"
|
name: "CodeQL"
|
||||||
`));
|
`), await (0, codeql_1.getCodeQLForTesting)());
|
||||||
t.deepEqual(...errorCodes(errors, []));
|
t.deepEqual(...errorCodes(errors, []));
|
||||||
});
|
});
|
||||||
(0, ava_1.default)("getWorkflowErrors() with a different on setup", (t) => {
|
(0, ava_1.default)("getWorkflowErrors() with a different on setup", async (t) => {
|
||||||
t.deepEqual(...errorCodes((0, workflow_1.getWorkflowErrors)(yaml.load(`
|
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||||
name: "CodeQL"
|
name: "CodeQL"
|
||||||
on: "workflow_dispatch"
|
on: "workflow_dispatch"
|
||||||
`)), []));
|
`), await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||||
t.deepEqual(...errorCodes((0, workflow_1.getWorkflowErrors)(yaml.load(`
|
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||||
name: "CodeQL"
|
name: "CodeQL"
|
||||||
on: [workflow_dispatch]
|
on: [workflow_dispatch]
|
||||||
`)), []));
|
`), await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||||
t.deepEqual(...errorCodes((0, workflow_1.getWorkflowErrors)(yaml.load(`
|
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||||
name: "CodeQL"
|
name: "CodeQL"
|
||||||
on:
|
on:
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
`)), []));
|
`), await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||||
});
|
});
|
||||||
(0, ava_1.default)("getWorkflowErrors() should not report an error if PRs are totally unconfigured", (t) => {
|
(0, ava_1.default)("getWorkflowErrors() should not report an error if PRs are totally unconfigured", async (t) => {
|
||||||
t.deepEqual(...errorCodes((0, workflow_1.getWorkflowErrors)(yaml.load(`
|
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||||
name: "CodeQL"
|
name: "CodeQL"
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [master]
|
branches: [master]
|
||||||
`)), []));
|
`), await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||||
t.deepEqual(...errorCodes((0, workflow_1.getWorkflowErrors)(yaml.load(`
|
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||||
name: "CodeQL"
|
name: "CodeQL"
|
||||||
on: ["push"]
|
on: ["push"]
|
||||||
`)), []));
|
`), await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||||
});
|
});
|
||||||
(0, ava_1.default)("getCategoryInputOrThrow returns category for simple workflow with category", (t) => {
|
(0, ava_1.default)("getCategoryInputOrThrow returns category for simple workflow with category", (t) => {
|
||||||
process.env["GITHUB_REPOSITORY"] = "github/codeql-action-fake-repository";
|
process.env["GITHUB_REPOSITORY"] = "github/codeql-action-fake-repository";
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
232
node_modules/.package-lock.json
generated
vendored
232
node_modules/.package-lock.json
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "codeql",
|
"name": "codeql",
|
||||||
"version": "2.21.5",
|
"version": "2.21.9",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
@@ -14,9 +14,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/artifact": {
|
"node_modules/@actions/artifact": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/artifact/-/artifact-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/artifact/-/artifact-1.1.2.tgz",
|
||||||
"integrity": "sha512-Vv4y0EW0ptEkU+Pjs5RGS/0EryTvI6s79LjSV9Gg/h+O3H/ddpjhuX/Bi/HZE4pbNPyjGtQjbdFWphkZhmgabA==",
|
"integrity": "sha512-1gLONA4xw3/Q/9vGxKwkFdV9u1LE2RWGx/IpAqg28ZjprCnJFjwn4pA7LtShqg5mg5WhMek2fjpyH1leCmOlQQ==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.9.1",
|
"@actions/core": "^1.9.1",
|
||||||
"@actions/http-client": "^2.0.1",
|
"@actions/http-client": "^2.0.1",
|
||||||
@@ -41,6 +41,14 @@
|
|||||||
"uuid": "^3.3.3"
|
"uuid": "^3.3.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@actions/cache/node_modules/semver": {
|
||||||
|
"version": "6.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
||||||
|
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
|
||||||
|
"bin": {
|
||||||
|
"semver": "bin/semver.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@actions/cache/node_modules/uuid": {
|
"node_modules/@actions/cache/node_modules/uuid": {
|
||||||
"version": "3.4.0",
|
"version": "3.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
|
||||||
@@ -51,9 +59,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/core": {
|
"node_modules/@actions/core": {
|
||||||
"version": "1.10.0",
|
"version": "1.10.1",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.1.tgz",
|
||||||
"integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==",
|
"integrity": "sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/http-client": "^2.0.1",
|
"@actions/http-client": "^2.0.1",
|
||||||
"uuid": "^8.3.2"
|
"uuid": "^8.3.2"
|
||||||
@@ -440,9 +448,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@eslint/js": {
|
"node_modules/@eslint/js": {
|
||||||
"version": "8.47.0",
|
"version": "8.50.0",
|
||||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.47.0.tgz",
|
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.50.0.tgz",
|
||||||
"integrity": "sha512-P6omY1zv5MItm93kLM8s2vr1HICJH8v0dvddDhysbIuZ+vcjOHg5Zbkf1mTkcmi2JA9oBG2anOkRnW8WJTS8Og==",
|
"integrity": "sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||||
@@ -455,9 +463,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@humanwhocodes/config-array": {
|
"node_modules/@humanwhocodes/config-array": {
|
||||||
"version": "0.11.10",
|
"version": "0.11.11",
|
||||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz",
|
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz",
|
||||||
"integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==",
|
"integrity": "sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@humanwhocodes/object-schema": "^1.2.1",
|
"@humanwhocodes/object-schema": "^1.2.1",
|
||||||
@@ -754,13 +762,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/types": {
|
"node_modules/@octokit/types": {
|
||||||
"version": "11.1.0",
|
"version": "12.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-11.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.0.0.tgz",
|
||||||
"integrity": "sha512-Fz0+7GyLm/bHt8fwEqgvRBWwIV1S6wRRyq+V6exRKLVWaKGsuy6H9QFYeBVDV7rK6fO3XwHgQOPxv+cLj2zpXQ==",
|
"integrity": "sha512-EzD434aHTFifGudYAygnFlS1Tl6KhbTynEWELQXIbTY8Msvb5nEqTZIm7sbPEt4mQYLZwu3zPKVdeIrw0g7ovg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/openapi-types": "^18.0.0"
|
"@octokit/openapi-types": "^19.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@octokit/types/node_modules/@octokit/openapi-types": {
|
||||||
|
"version": "19.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-19.0.0.tgz",
|
||||||
|
"integrity": "sha512-PclQ6JGMTE9iUStpzMkwLCISFn/wDeRjkZFIKALpvJQNBGwDoYYi2fFvuHwssoQ1rXI5mfh6jgTgWuddeUzfWw=="
|
||||||
|
},
|
||||||
"node_modules/@opentelemetry/api": {
|
"node_modules/@opentelemetry/api": {
|
||||||
"version": "1.4.1",
|
"version": "1.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.4.1.tgz",
|
||||||
@@ -827,9 +840,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/adm-zip": {
|
"node_modules/@types/adm-zip": {
|
||||||
"version": "0.5.0",
|
"version": "0.5.2",
|
||||||
"resolved": "https://registry.npmjs.org/@types/adm-zip/-/adm-zip-0.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/@types/adm-zip/-/adm-zip-0.5.2.tgz",
|
||||||
"integrity": "sha512-FCJBJq9ODsQZUNURo5ILAQueuA8WJhRvuihS3ke2iI25mJlfV2LK8jG2Qj2z2AWg8U0FtWWqBHVRetceLskSaw==",
|
"integrity": "sha512-33OTTnnW3onOE6HJuoqsi7T7Ojupz7zO/Vs5ddRNVCYQnu4lg05RqH/pr9eidHGvGyYfdO4uPO9cvegAMixBCQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
@@ -847,15 +860,15 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/js-yaml": {
|
"node_modules/@types/js-yaml": {
|
||||||
"version": "4.0.5",
|
"version": "4.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.6.tgz",
|
||||||
"integrity": "sha512-FhpRzf927MNQdRZP0J5DLIdTXhjLYzeUTmLAu69mnVksLH9CJY3IuSeEgbKUki7GQZm0WqDkGzyxju2EZGD2wA==",
|
"integrity": "sha512-ACTuifTSIIbyksx2HTon3aFtCKWcID7/h3XEmRpDYdMCXxPbl+m9GteOJeaAkiAta/NJaSFuA7ahZ0NkwajDSw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/json-schema": {
|
"node_modules/@types/json-schema": {
|
||||||
"version": "7.0.12",
|
"version": "7.0.13",
|
||||||
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz",
|
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.13.tgz",
|
||||||
"integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==",
|
"integrity": "sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/json5": {
|
"node_modules/@types/json5": {
|
||||||
@@ -892,15 +905,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/semver": {
|
"node_modules/@types/semver": {
|
||||||
"version": "7.5.0",
|
"version": "7.5.3",
|
||||||
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.3.tgz",
|
||||||
"integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==",
|
"integrity": "sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/sinon": {
|
"node_modules/@types/sinon": {
|
||||||
"version": "10.0.16",
|
"version": "10.0.17",
|
||||||
"resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.16.tgz",
|
"resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.17.tgz",
|
||||||
"integrity": "sha512-j2Du5SYpXZjJVJtXBokASpPRj+e2z+VUhCPHmM6WMfe3dpHu6iVKJMU6AiBcMp/XTAYnEj6Wc1trJUWwZ0QaAQ==",
|
"integrity": "sha512-+6ILpcixQ0Ma3dHMTLv4rSycbDXkDljgKL+E0nI2RUxxhYTFyPSjt6RVMxh7jUshvyVcBvicb0Ktj+lAJcjgeA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/sinonjs__fake-timers": "*"
|
"@types/sinonjs__fake-timers": "*"
|
||||||
@@ -921,21 +934,21 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/uuid": {
|
"node_modules/@types/uuid": {
|
||||||
"version": "9.0.2",
|
"version": "9.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.4.tgz",
|
||||||
"integrity": "sha512-kNnC1GFBLuhImSnV7w4njQkUiJi0ZXUycu1rUaouPqiKlXkh77JKgdRnTAp1x5eBwcIwbtI+3otwzuIDEuDoxQ=="
|
"integrity": "sha512-zAuJWQflfx6dYJM62vna+Sn5aeSWhh3OB+wfUEACNcqUSc0AGc5JKl+ycL1vrH7frGTXhJchYjE1Hak8L819dA=="
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||||
"version": "6.4.0",
|
"version": "6.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.2.tgz",
|
||||||
"integrity": "sha512-62o2Hmc7Gs3p8SLfbXcipjWAa6qk2wZGChXG2JbBtYpwSRmti/9KHLqfbLs9uDigOexG+3PaQ9G2g3201FWLKg==",
|
"integrity": "sha512-ooaHxlmSgZTM6CHYAFRlifqh1OAr3PAQEwi7lhYhaegbnXrnh7CDcHmc3+ihhbQC7H0i4JF0psI5ehzkF6Yl6Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint-community/regexpp": "^4.5.1",
|
"@eslint-community/regexpp": "^4.5.1",
|
||||||
"@typescript-eslint/scope-manager": "6.4.0",
|
"@typescript-eslint/scope-manager": "6.7.2",
|
||||||
"@typescript-eslint/type-utils": "6.4.0",
|
"@typescript-eslint/type-utils": "6.7.2",
|
||||||
"@typescript-eslint/utils": "6.4.0",
|
"@typescript-eslint/utils": "6.7.2",
|
||||||
"@typescript-eslint/visitor-keys": "6.4.0",
|
"@typescript-eslint/visitor-keys": "6.7.2",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"graphemer": "^1.4.0",
|
"graphemer": "^1.4.0",
|
||||||
"ignore": "^5.2.4",
|
"ignore": "^5.2.4",
|
||||||
@@ -961,15 +974,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/parser": {
|
"node_modules/@typescript-eslint/parser": {
|
||||||
"version": "6.4.0",
|
"version": "6.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.7.2.tgz",
|
||||||
"integrity": "sha512-I1Ah1irl033uxjxO9Xql7+biL3YD7w9IU8zF+xlzD/YxY6a4b7DYA08PXUUCbm2sEljwJF6ERFy2kTGAGcNilg==",
|
"integrity": "sha512-KA3E4ox0ws+SPyxQf9iSI25R6b4Ne78ORhNHeVKrPQnoYsb9UhieoiRoJgrzgEeKGOXhcY1i8YtOeCHHTDa6Fw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/scope-manager": "6.4.0",
|
"@typescript-eslint/scope-manager": "6.7.2",
|
||||||
"@typescript-eslint/types": "6.4.0",
|
"@typescript-eslint/types": "6.7.2",
|
||||||
"@typescript-eslint/typescript-estree": "6.4.0",
|
"@typescript-eslint/typescript-estree": "6.7.2",
|
||||||
"@typescript-eslint/visitor-keys": "6.4.0",
|
"@typescript-eslint/visitor-keys": "6.7.2",
|
||||||
"debug": "^4.3.4"
|
"debug": "^4.3.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -989,13 +1002,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/scope-manager": {
|
"node_modules/@typescript-eslint/scope-manager": {
|
||||||
"version": "6.4.0",
|
"version": "6.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.7.2.tgz",
|
||||||
"integrity": "sha512-TUS7vaKkPWDVvl7GDNHFQMsMruD+zhkd3SdVW0d7b+7Zo+bd/hXJQ8nsiUZMi1jloWo6c9qt3B7Sqo+flC1nig==",
|
"integrity": "sha512-bgi6plgyZjEqapr7u2mhxGR6E8WCzKNUFWNh6fkpVe9+yzRZeYtDTbsIBzKbcxI+r1qVWt6VIoMSNZ4r2A+6Yw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "6.4.0",
|
"@typescript-eslint/types": "6.7.2",
|
||||||
"@typescript-eslint/visitor-keys": "6.4.0"
|
"@typescript-eslint/visitor-keys": "6.7.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
"node": "^16.0.0 || >=18.0.0"
|
||||||
@@ -1006,13 +1019,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/type-utils": {
|
"node_modules/@typescript-eslint/type-utils": {
|
||||||
"version": "6.4.0",
|
"version": "6.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.7.2.tgz",
|
||||||
"integrity": "sha512-TvqrUFFyGY0cX3WgDHcdl2/mMCWCDv/0thTtx/ODMY1QhEiyFtv/OlLaNIiYLwRpAxAtOLOY9SUf1H3Q3dlwAg==",
|
"integrity": "sha512-36F4fOYIROYRl0qj95dYKx6kybddLtsbmPIYNK0OBeXv2j9L5nZ17j9jmfy+bIDHKQgn2EZX+cofsqi8NPATBQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/typescript-estree": "6.4.0",
|
"@typescript-eslint/typescript-estree": "6.7.2",
|
||||||
"@typescript-eslint/utils": "6.4.0",
|
"@typescript-eslint/utils": "6.7.2",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"ts-api-utils": "^1.0.1"
|
"ts-api-utils": "^1.0.1"
|
||||||
},
|
},
|
||||||
@@ -1033,9 +1046,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/types": {
|
"node_modules/@typescript-eslint/types": {
|
||||||
"version": "6.4.0",
|
"version": "6.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.7.2.tgz",
|
||||||
"integrity": "sha512-+FV9kVFrS7w78YtzkIsNSoYsnOtrYVnKWSTVXoL1761CsCRv5wpDOINgsXpxD67YCLZtVQekDDyaxfjVWUJmmg==",
|
"integrity": "sha512-flJYwMYgnUNDAN9/GAI3l8+wTmvTYdv64fcH8aoJK76Y+1FCZ08RtI5zDerM/FYT5DMkAc+19E4aLmd5KqdFyg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
"node": "^16.0.0 || >=18.0.0"
|
||||||
@@ -1046,13 +1059,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/typescript-estree": {
|
"node_modules/@typescript-eslint/typescript-estree": {
|
||||||
"version": "6.4.0",
|
"version": "6.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.2.tgz",
|
||||||
"integrity": "sha512-iDPJArf/K2sxvjOR6skeUCNgHR/tCQXBsa+ee1/clRKr3olZjZ/dSkXPZjG6YkPtnW6p5D1egeEPMCW6Gn4yLA==",
|
"integrity": "sha512-kiJKVMLkoSciGyFU0TOY0fRxnp9qq1AzVOHNeN1+B9erKFCJ4Z8WdjAkKQPP+b1pWStGFqezMLltxO+308dJTQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "6.4.0",
|
"@typescript-eslint/types": "6.7.2",
|
||||||
"@typescript-eslint/visitor-keys": "6.4.0",
|
"@typescript-eslint/visitor-keys": "6.7.2",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"globby": "^11.1.0",
|
"globby": "^11.1.0",
|
||||||
"is-glob": "^4.0.3",
|
"is-glob": "^4.0.3",
|
||||||
@@ -1073,17 +1086,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/utils": {
|
"node_modules/@typescript-eslint/utils": {
|
||||||
"version": "6.4.0",
|
"version": "6.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.7.2.tgz",
|
||||||
"integrity": "sha512-BvvwryBQpECPGo8PwF/y/q+yacg8Hn/2XS+DqL/oRsOPK+RPt29h5Ui5dqOKHDlbXrAeHUTnyG3wZA0KTDxRZw==",
|
"integrity": "sha512-ZCcBJug/TS6fXRTsoTkgnsvyWSiXwMNiPzBUani7hDidBdj1779qwM1FIAmpH4lvlOZNF3EScsxxuGifjpLSWQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint-community/eslint-utils": "^4.4.0",
|
"@eslint-community/eslint-utils": "^4.4.0",
|
||||||
"@types/json-schema": "^7.0.12",
|
"@types/json-schema": "^7.0.12",
|
||||||
"@types/semver": "^7.5.0",
|
"@types/semver": "^7.5.0",
|
||||||
"@typescript-eslint/scope-manager": "6.4.0",
|
"@typescript-eslint/scope-manager": "6.7.2",
|
||||||
"@typescript-eslint/types": "6.4.0",
|
"@typescript-eslint/types": "6.7.2",
|
||||||
"@typescript-eslint/typescript-estree": "6.4.0",
|
"@typescript-eslint/typescript-estree": "6.7.2",
|
||||||
"semver": "^7.5.4"
|
"semver": "^7.5.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -1098,12 +1111,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/visitor-keys": {
|
"node_modules/@typescript-eslint/visitor-keys": {
|
||||||
"version": "6.4.0",
|
"version": "6.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.2.tgz",
|
||||||
"integrity": "sha512-yJSfyT+uJm+JRDWYRYdCm2i+pmvXJSMtPR9Cq5/XQs4QIgNoLcoRtDdzsLbLsFM/c6um6ohQkg/MLxWvoIndJA==",
|
"integrity": "sha512-uVw9VIMFBUTz8rIeaUT3fFe8xIUx8r4ywAdlQv1ifH+6acn/XF8Y6rwJ7XNmkNMDrTW+7+vxFFPIF40nJCVsMQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "6.4.0",
|
"@typescript-eslint/types": "6.7.2",
|
||||||
"eslint-visitor-keys": "^3.4.1"
|
"eslint-visitor-keys": "^3.4.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -2457,16 +2470,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/eslint": {
|
"node_modules/eslint": {
|
||||||
"version": "8.47.0",
|
"version": "8.50.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.47.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.50.0.tgz",
|
||||||
"integrity": "sha512-spUQWrdPt+pRVP1TTJLmfRNJJHHZryFmptzcafwSvHsceV81djHOdnEeDmkdotZyLNjDhrOasNK8nikkoG1O8Q==",
|
"integrity": "sha512-FOnOGSuFuFLv/Sa+FDVRZl4GGVAAFFi8LecRsI5a1tMO5HIE8nCm4ivAlzt4dT3ol/PaaGC0rJEEXQmHJBGoOg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint-community/eslint-utils": "^4.2.0",
|
"@eslint-community/eslint-utils": "^4.2.0",
|
||||||
"@eslint-community/regexpp": "^4.6.1",
|
"@eslint-community/regexpp": "^4.6.1",
|
||||||
"@eslint/eslintrc": "^2.1.2",
|
"@eslint/eslintrc": "^2.1.2",
|
||||||
"@eslint/js": "^8.47.0",
|
"@eslint/js": "8.50.0",
|
||||||
"@humanwhocodes/config-array": "^0.11.10",
|
"@humanwhocodes/config-array": "^0.11.11",
|
||||||
"@humanwhocodes/module-importer": "^1.0.1",
|
"@humanwhocodes/module-importer": "^1.0.1",
|
||||||
"@nodelib/fs.walk": "^1.2.8",
|
"@nodelib/fs.walk": "^1.2.8",
|
||||||
"ajv": "^6.12.4",
|
"ajv": "^6.12.4",
|
||||||
@@ -2543,9 +2556,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/eslint-import-resolver-typescript": {
|
"node_modules/eslint-import-resolver-typescript": {
|
||||||
"version": "3.6.0",
|
"version": "3.6.1",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.1.tgz",
|
||||||
"integrity": "sha512-QTHR9ddNnn35RTxlaEnx2gCxqFlF2SEN0SE2d17SqwyM7YOSI2GHWRYp5BiRkObTUNYPupC/3Fq2a0PpT+EKpg==",
|
"integrity": "sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
@@ -2638,9 +2651,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/eslint-plugin-github": {
|
"node_modules/eslint-plugin-github": {
|
||||||
"version": "4.9.2",
|
"version": "4.10.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-4.9.2.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-4.10.0.tgz",
|
||||||
"integrity": "sha512-osez6Sio/fLr/3QkW5HE1wbCOcmYG5030/6QIa9IcKyyfchewlecdnYcsbeUMUtdIiU9lWqhroQp2H/O7auxBA==",
|
"integrity": "sha512-YKtqBtFbjih1wZNTwZjtLPEG6B/4ySMa38fgOo/rbMJpNKO3+OaKzwwOYkeKx/FapM/4MsTP9ExqUcDV+dkixA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@github/browserslist-config": "^1.0.0",
|
"@github/browserslist-config": "^1.0.0",
|
||||||
@@ -2678,9 +2691,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/eslint-plugin-import": {
|
"node_modules/eslint-plugin-import": {
|
||||||
"version": "2.28.0",
|
"version": "2.28.1",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.28.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.28.1.tgz",
|
||||||
"integrity": "sha512-B8s/n+ZluN7sxj9eUf7/pRFERX0r5bnFA2dCaLHy2ZeaQEAz0k+ZZkFWRFHJAqxfxQDx6KLv9LeIki7cFdwW+Q==",
|
"integrity": "sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"array-includes": "^3.1.6",
|
"array-includes": "^3.1.6",
|
||||||
@@ -2692,13 +2705,12 @@
|
|||||||
"eslint-import-resolver-node": "^0.3.7",
|
"eslint-import-resolver-node": "^0.3.7",
|
||||||
"eslint-module-utils": "^2.8.0",
|
"eslint-module-utils": "^2.8.0",
|
||||||
"has": "^1.0.3",
|
"has": "^1.0.3",
|
||||||
"is-core-module": "^2.12.1",
|
"is-core-module": "^2.13.0",
|
||||||
"is-glob": "^4.0.3",
|
"is-glob": "^4.0.3",
|
||||||
"minimatch": "^3.1.2",
|
"minimatch": "^3.1.2",
|
||||||
"object.fromentries": "^2.0.6",
|
"object.fromentries": "^2.0.6",
|
||||||
"object.groupby": "^1.0.0",
|
"object.groupby": "^1.0.0",
|
||||||
"object.values": "^1.1.6",
|
"object.values": "^1.1.6",
|
||||||
"resolve": "^1.22.3",
|
|
||||||
"semver": "^6.3.1",
|
"semver": "^6.3.1",
|
||||||
"tsconfig-paths": "^3.14.2"
|
"tsconfig-paths": "^3.14.2"
|
||||||
},
|
},
|
||||||
@@ -3761,9 +3773,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/is-core-module": {
|
"node_modules/is-core-module": {
|
||||||
"version": "2.12.1",
|
"version": "2.13.0",
|
||||||
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz",
|
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz",
|
||||||
"integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==",
|
"integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"has": "^1.0.3"
|
"has": "^1.0.3"
|
||||||
@@ -4475,9 +4487,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/nock": {
|
"node_modules/nock": {
|
||||||
"version": "13.3.2",
|
"version": "13.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/nock/-/nock-13.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/nock/-/nock-13.3.3.tgz",
|
||||||
"integrity": "sha512-CwbljitiWJhF1gL83NbanhoKs1l23TDlRioNraPTZrzZIEooPemrHRj5m0FZCPkB1ecdYCSWWGcHysJgX/ngnQ==",
|
"integrity": "sha512-z+KUlILy9SK/RjpeXDiDUEAq4T94ADPHE3qaRkf66mpEhzc/ytOMm3Bwdrbq6k1tMWkbdujiKim3G2tfQARuJw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"debug": "^4.1.0",
|
"debug": "^4.1.0",
|
||||||
@@ -5433,9 +5445,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/sinon": {
|
"node_modules/sinon": {
|
||||||
"version": "15.2.0",
|
"version": "16.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/sinon/-/sinon-15.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/sinon/-/sinon-16.0.0.tgz",
|
||||||
"integrity": "sha512-nPS85arNqwBXaIsFCkolHjGIkFo+Oxu9vbgmBJizLAhqe6P2o3Qmj3KCUoRkfhHtvgDhZdWD3risLHAUJ8npjw==",
|
"integrity": "sha512-B8AaZZm9CT5pqe4l4uWJztfD/mOTa7dL8Qo0W4+s+t74xECOgSZDDQCBjNgIK3+n4kyxQrSTv2V5ul8K25qkiQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sinonjs/commons": "^3.0.0",
|
"@sinonjs/commons": "^3.0.0",
|
||||||
@@ -5992,9 +6004,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/typescript": {
|
"node_modules/typescript": {
|
||||||
"version": "5.1.6",
|
"version": "5.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz",
|
||||||
"integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==",
|
"integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"tsc": "bin/tsc",
|
"tsc": "bin/tsc",
|
||||||
@@ -6076,9 +6088,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/uuid": {
|
"node_modules/uuid": {
|
||||||
"version": "9.0.0",
|
"version": "9.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz",
|
||||||
"integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==",
|
"integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==",
|
||||||
|
"funding": [
|
||||||
|
"https://github.com/sponsors/broofa",
|
||||||
|
"https://github.com/sponsors/ctavan"
|
||||||
|
],
|
||||||
"bin": {
|
"bin": {
|
||||||
"uuid": "dist/bin/uuid"
|
"uuid": "dist/bin/uuid"
|
||||||
}
|
}
|
||||||
|
|||||||
38
node_modules/@actions/artifact/lib/internal/artifact-client.js
generated
vendored
38
node_modules/@actions/artifact/lib/internal/artifact-client.js
generated
vendored
@@ -1,7 +1,11 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[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) {
|
}) : (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
o[k2] = m[k];
|
o[k2] = m[k];
|
||||||
@@ -14,7 +18,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
if (mod && mod.__esModule) return mod;
|
if (mod && mod.__esModule) return mod;
|
||||||
var result = {};
|
var result = {};
|
||||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
__setModuleDefault(result, mod);
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
@@ -52,9 +56,9 @@ class DefaultArtifactClient {
|
|||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
core.info(`Starting artifact upload
|
core.info(`Starting artifact upload
|
||||||
For more detailed logs during the artifact upload process, enable step-debugging: https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging`);
|
For more detailed logs during the artifact upload process, enable step-debugging: https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging`);
|
||||||
path_and_artifact_name_validation_1.checkArtifactName(name);
|
(0, path_and_artifact_name_validation_1.checkArtifactName)(name);
|
||||||
// Get specification for the files being uploaded
|
// Get specification for the files being uploaded
|
||||||
const uploadSpecification = upload_specification_1.getUploadSpecification(name, rootDirectory, files);
|
const uploadSpecification = (0, upload_specification_1.getUploadSpecification)(name, rootDirectory, files);
|
||||||
const uploadResponse = {
|
const uploadResponse = {
|
||||||
artifactName: name,
|
artifactName: name,
|
||||||
artifactItems: [],
|
artifactItems: [],
|
||||||
@@ -113,20 +117,20 @@ Note: The size of downloaded zips can differ significantly from the reported siz
|
|||||||
}
|
}
|
||||||
const items = yield downloadHttpClient.getContainerItems(artifactToDownload.name, artifactToDownload.fileContainerResourceUrl);
|
const items = yield downloadHttpClient.getContainerItems(artifactToDownload.name, artifactToDownload.fileContainerResourceUrl);
|
||||||
if (!path) {
|
if (!path) {
|
||||||
path = config_variables_1.getWorkSpaceDirectory();
|
path = (0, config_variables_1.getWorkSpaceDirectory)();
|
||||||
}
|
}
|
||||||
path = path_1.normalize(path);
|
path = (0, path_1.normalize)(path);
|
||||||
path = path_1.resolve(path);
|
path = (0, path_1.resolve)(path);
|
||||||
// During upload, empty directories are rejected by the remote server so there should be no artifacts that consist of only empty directories
|
// During upload, empty directories are rejected by the remote server so there should be no artifacts that consist of only empty directories
|
||||||
const downloadSpecification = download_specification_1.getDownloadSpecification(name, items.value, path, (options === null || options === void 0 ? void 0 : options.createArtifactFolder) || false);
|
const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(name, items.value, path, (options === null || options === void 0 ? void 0 : options.createArtifactFolder) || false);
|
||||||
if (downloadSpecification.filesToDownload.length === 0) {
|
if (downloadSpecification.filesToDownload.length === 0) {
|
||||||
core.info(`No downloadable files were found for the artifact: ${artifactToDownload.name}`);
|
core.info(`No downloadable files were found for the artifact: ${artifactToDownload.name}`);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Create all necessary directories recursively before starting any download
|
// Create all necessary directories recursively before starting any download
|
||||||
yield utils_1.createDirectoriesForArtifact(downloadSpecification.directoryStructure);
|
yield (0, utils_1.createDirectoriesForArtifact)(downloadSpecification.directoryStructure);
|
||||||
core.info('Directory structure has been setup for the artifact');
|
core.info('Directory structure has been set up for the artifact');
|
||||||
yield utils_1.createEmptyFilesForArtifact(downloadSpecification.emptyFilesToCreate);
|
yield (0, utils_1.createEmptyFilesForArtifact)(downloadSpecification.emptyFilesToCreate);
|
||||||
yield downloadHttpClient.downloadSingleArtifact(downloadSpecification.filesToDownload);
|
yield downloadHttpClient.downloadSingleArtifact(downloadSpecification.filesToDownload);
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
@@ -145,10 +149,10 @@ Note: The size of downloaded zips can differ significantly from the reported siz
|
|||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
if (!path) {
|
if (!path) {
|
||||||
path = config_variables_1.getWorkSpaceDirectory();
|
path = (0, config_variables_1.getWorkSpaceDirectory)();
|
||||||
}
|
}
|
||||||
path = path_1.normalize(path);
|
path = (0, path_1.normalize)(path);
|
||||||
path = path_1.resolve(path);
|
path = (0, path_1.resolve)(path);
|
||||||
let downloadedArtifacts = 0;
|
let downloadedArtifacts = 0;
|
||||||
while (downloadedArtifacts < artifacts.count) {
|
while (downloadedArtifacts < artifacts.count) {
|
||||||
const currentArtifactToDownload = artifacts.value[downloadedArtifacts];
|
const currentArtifactToDownload = artifacts.value[downloadedArtifacts];
|
||||||
@@ -156,13 +160,13 @@ Note: The size of downloaded zips can differ significantly from the reported siz
|
|||||||
core.info(`starting download of artifact ${currentArtifactToDownload.name} : ${downloadedArtifacts}/${artifacts.count}`);
|
core.info(`starting download of artifact ${currentArtifactToDownload.name} : ${downloadedArtifacts}/${artifacts.count}`);
|
||||||
// Get container entries for the specific artifact
|
// Get container entries for the specific artifact
|
||||||
const items = yield downloadHttpClient.getContainerItems(currentArtifactToDownload.name, currentArtifactToDownload.fileContainerResourceUrl);
|
const items = yield downloadHttpClient.getContainerItems(currentArtifactToDownload.name, currentArtifactToDownload.fileContainerResourceUrl);
|
||||||
const downloadSpecification = download_specification_1.getDownloadSpecification(currentArtifactToDownload.name, items.value, path, true);
|
const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(currentArtifactToDownload.name, items.value, path, true);
|
||||||
if (downloadSpecification.filesToDownload.length === 0) {
|
if (downloadSpecification.filesToDownload.length === 0) {
|
||||||
core.info(`No downloadable files were found for any artifact ${currentArtifactToDownload.name}`);
|
core.info(`No downloadable files were found for any artifact ${currentArtifactToDownload.name}`);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
yield utils_1.createDirectoriesForArtifact(downloadSpecification.directoryStructure);
|
yield (0, utils_1.createDirectoriesForArtifact)(downloadSpecification.directoryStructure);
|
||||||
yield utils_1.createEmptyFilesForArtifact(downloadSpecification.emptyFilesToCreate);
|
yield (0, utils_1.createEmptyFilesForArtifact)(downloadSpecification.emptyFilesToCreate);
|
||||||
yield downloadHttpClient.downloadSingleArtifact(downloadSpecification.filesToDownload);
|
yield downloadHttpClient.downloadSingleArtifact(downloadSpecification.filesToDownload);
|
||||||
}
|
}
|
||||||
response.push({
|
response.push({
|
||||||
|
|||||||
2
node_modules/@actions/artifact/lib/internal/artifact-client.js.map
generated
vendored
2
node_modules/@actions/artifact/lib/internal/artifact-client.js.map
generated
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"artifact-client.js","sourceRoot":"","sources":["../../src/internal/artifact-client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAqC;AACrC,iEAG+B;AAC/B,6DAAqD;AAKrD,mCAGgB;AAChB,2FAAqE;AACrE,iEAAyD;AACzD,qEAAiE;AACjE,yDAAwD;AACxD,+BAAuC;AAuCvC,MAAa,qBAAqB;IAChC;;OAEG;IACH,MAAM,CAAC,MAAM;QACX,OAAO,IAAI,qBAAqB,EAAE,CAAA;IACpC,CAAC;IAED;;OAEG;IACG,cAAc,CAClB,IAAY,EACZ,KAAe,EACf,aAAqB,EACrB,OAAmC;;YAEnC,IAAI,CAAC,IAAI,CACP;8MACwM,CACzM,CAAA;YACD,qDAAiB,CAAC,IAAI,CAAC,CAAA;YAEvB,iDAAiD;YACjD,MAAM,mBAAmB,GA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AI,EAAE,CACtF,CAAA;iBACF;qBAAM;oBACL,MAAM,IAAA,oCAA4B,EAChC,qBAAqB,CAAC,kBAAkB,CACzC,CAAA;oBACD,MAAM,IAAA,mCAA2B,EAC/B,qBAAqB,CAAC,kBAAkB,CACzC,CAAA;oBACD,MAAM,kBAAkB,CAAC,sBAAsB,CAC7C,qBAAqB,CAAC,eAAe,CACtC,CAAA;iBACF;gBAED,QAAQ,CAAC,IAAI,CAAC;oBACZ,YAAY,EAAE,yBAAyB,CAAC,IAAI;oBAC5C,YAAY,EAAE,qBAAqB,CAAC,oBAAoB;iBACzD,CAAC,CAAA;aACH;YACD,OAAO,QAAQ,CAAA;QACjB,CAAC;KAAA;CACF;AAhOD,sDAgOC"}
|
||||||
1
node_modules/@actions/artifact/lib/internal/config-variables.d.ts
generated
vendored
1
node_modules/@actions/artifact/lib/internal/config-variables.d.ts
generated
vendored
@@ -9,3 +9,4 @@ export declare function getRuntimeUrl(): string;
|
|||||||
export declare function getWorkFlowRunId(): string;
|
export declare function getWorkFlowRunId(): string;
|
||||||
export declare function getWorkSpaceDirectory(): string;
|
export declare function getWorkSpaceDirectory(): string;
|
||||||
export declare function getRetentionDays(): string | undefined;
|
export declare function getRetentionDays(): string | undefined;
|
||||||
|
export declare function isGhes(): boolean;
|
||||||
|
|||||||
7
node_modules/@actions/artifact/lib/internal/config-variables.js
generated
vendored
7
node_modules/@actions/artifact/lib/internal/config-variables.js
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.getRetentionDays = exports.getWorkSpaceDirectory = exports.getWorkFlowRunId = exports.getRuntimeUrl = exports.getRuntimeToken = exports.getDownloadFileConcurrency = exports.getInitialRetryIntervalInMilliseconds = exports.getRetryMultiplier = exports.getRetryLimit = exports.getUploadChunkSize = exports.getUploadFileConcurrency = void 0;
|
exports.isGhes = exports.getRetentionDays = exports.getWorkSpaceDirectory = exports.getWorkFlowRunId = exports.getRuntimeUrl = exports.getRuntimeToken = exports.getDownloadFileConcurrency = exports.getInitialRetryIntervalInMilliseconds = exports.getRetryMultiplier = exports.getRetryLimit = exports.getUploadChunkSize = exports.getUploadFileConcurrency = void 0;
|
||||||
// The number of concurrent uploads that happens at the same time
|
// The number of concurrent uploads that happens at the same time
|
||||||
function getUploadFileConcurrency() {
|
function getUploadFileConcurrency() {
|
||||||
return 2;
|
return 2;
|
||||||
@@ -69,4 +69,9 @@ function getRetentionDays() {
|
|||||||
return process.env['GITHUB_RETENTION_DAYS'];
|
return process.env['GITHUB_RETENTION_DAYS'];
|
||||||
}
|
}
|
||||||
exports.getRetentionDays = getRetentionDays;
|
exports.getRetentionDays = getRetentionDays;
|
||||||
|
function isGhes() {
|
||||||
|
const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
|
||||||
|
return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM';
|
||||||
|
}
|
||||||
|
exports.isGhes = isGhes;
|
||||||
//# sourceMappingURL=config-variables.js.map
|
//# sourceMappingURL=config-variables.js.map
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user