Compare commits

...

39 Commits

Author SHA1 Message Date
Nick Fyson
03e7845b7b Merge pull request #2036 from github/backport-v2.22.11-b374143c1
Merge releases/v3 into releases/v2
2023-12-13 20:40:33 +00:00
github-actions[bot]
54f10077ea Rebuild 2023-12-13 20:11:03 +00:00
github-actions[bot]
20d1a9b175 Update checked-in dependencies 2023-12-13 20:08:43 +00:00
Nick Fyson
c28d79bb2e Update src/codeql.ts
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-12-13 20:05:23 +00:00
nickfyson
241e8b42b2 Revert "switch check sarif action to node20"
This reverts commit 0bc194ee69.
2023-12-13 20:05:23 +00:00
nickfyson
8bc67d15e2 Revert "update javascript files"
This reverts commit 3a9f6a89e0.
2023-12-13 20:05:23 +00:00
nickfyson
e106171cbb Revert "reintroduce PR check that confirm action can be still be compiled on node16"
This reverts commit 5b52b36d41.
2023-12-13 20:05:23 +00:00
nickfyson
231f9f1b59 Revert "upgrade node type definitions"
This reverts commit f2d0c2e7ae.
2023-12-13 20:05:23 +00:00
nickfyson
47334bf4e9 Revert "change to node20 for all actions"
This reverts commit d651fbc494.
2023-12-13 20:05:23 +00:00
github-actions[bot]
e763762131 Update version and changelog for v2.22.11 2023-12-13 20:05:18 +00:00
Nick Fyson
b374143c11 Merge pull request #2034 from github/update-v3.22.11-64e61baea
Merge main into releases/v3
2023-12-13 15:19:46 +00:00
github-actions[bot]
e2b5cc75ce Update changelog for v3.22.11 2023-12-13 14:39:53 +00:00
Nick Fyson
64e61baeac Merge pull request #2006 from github/nickfyson/node-20
change to node20 for all actions
2023-12-13 14:36:55 +00:00
Nick Fyson
c757f9f6de Apply suggestions from code review
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-12-13 12:47:00 +00:00
nickfyson
7898bc2041 add pr check for node version consistency 2023-12-13 11:54:57 +00:00
nickfyson
6b5b958063 remove dedundant single quotes from node version strings 2023-12-13 11:38:14 +00:00
Nick Fyson
ea1e72c669 Update .github/workflows/pr-checks.yml
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-12-13 11:37:06 +00:00
Nick Fyson
b974542e9f Merge branch 'main' into nickfyson/node-20 2023-12-13 11:26:45 +00:00
dependabot[bot]
b995212303 Bump the actions group with 2 updates (#2024)
* Bump the actions group with 2 updates

Bumps the actions group with 2 updates: [actions/setup-python](https://github.com/actions/setup-python) and [actions/setup-go](https://github.com/actions/setup-go).


Updates `actions/setup-python` from 4 to 5
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

Updates `actions/setup-go` from 4 to 5
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>

* Rebuild

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-12-12 21:18:31 +00:00
Chuan-kai Lin
3c1878d8f9 Merge pull request #2029 from github/mergeback/v2.22.10-to-main-305f6546
Mergeback v2.22.10 refs/heads/releases/v2 into main
2023-12-12 09:32:02 -08:00
github-actions[bot]
1bca5bfcf5 Update checked-in dependencies 2023-12-12 17:01:14 +00:00
github-actions[bot]
691226ecb5 Update changelog and version after v2.22.10 2023-12-12 16:58:02 +00:00
Chuan-kai Lin
305f654631 Merge pull request #2028 from github/update-v2.22.10-fe23b5a3e
Merge main into releases/v2
2023-12-12 08:56:03 -08:00
github-actions[bot]
31e94d8cb1 Update changelog for v2.22.10 2023-12-12 16:16:38 +00:00
Nick Fyson
1de8705f6b Merge branch 'main' into nickfyson/node-20 2023-12-12 13:01:04 +00:00
Chuan-kai Lin
fe23b5a3e1 Merge pull request #2016 from github/update-bundle/codeql-bundle-v2.15.4
Update default bundle to 2.15.4
2023-12-11 08:22:58 -08:00
nickfyson
0bc194ee69 switch check sarif action to node20 2023-12-11 14:08:35 +00:00
nickfyson
95be4b277c add not about continuing testing on node 16 2023-12-07 17:04:27 +00:00
github-actions[bot]
bf51594343 Update checked-in dependencies 2023-12-07 16:21:44 +00:00
nickfyson
303dec0fbd fix choice of older node version to test 2023-12-07 16:03:07 +00:00
nickfyson
3a9f6a89e0 update javascript files 2023-12-07 16:00:04 +00:00
nickfyson
cc4fead714 update version in various hardcoded locations 2023-12-07 15:44:56 +00:00
Chuan-kai Lin
183559cea8 Merge branch 'main' into update-bundle/codeql-bundle-v2.15.4 2023-12-07 06:34:56 -08:00
nickfyson
5b52b36d41 reintroduce PR check that confirm action can be still be compiled on node16 2023-12-07 14:10:26 +00:00
nickfyson
5b19bef41e change to node20 for all actions 2023-12-07 14:10:12 +00:00
nickfyson
f2d0c2e7ae upgrade node type definitions 2023-12-07 14:09:14 +00:00
nickfyson
d651fbc494 change to node20 for all actions 2023-12-07 14:07:26 +00:00
github-actions[bot]
b6dc4ba94b Add changelog note 2023-12-05 20:47:47 +00:00
github-actions[bot]
1c3b8c867b Update default bundle to codeql-bundle-v2.15.4 2023-12-05 20:47:43 +00:00
25 changed files with 166 additions and 118 deletions

View File

@@ -255,10 +255,13 @@ def main():
print(f'No commits to merge from {source_branch} to {target_branch}.')
return
# define distinct prefix in order to support specific pr checks on backports
branch_prefix = 'update' if is_primary_release else 'backport'
# The branch name is based off of the name of branch being merged into
# and the SHA of the branch being merged from. Thus if the branch already
# exists we can assume we don't need to recreate it.
new_branch_name = f'update-v{version}-{source_branch_short_sha}'
new_branch_name = f'{branch_prefix}-v{version}-{source_branch_short_sha}'
print(f'Branch name is {new_branch_name}.')
# Check if the branch already exists. If so we can abort as this script

View File

@@ -39,11 +39,11 @@ jobs:
uses: ./.github/actions/prepare-test
with:
version: latest
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: ^1.13.1
- name: Setup Python on MacOS
uses: actions/setup-python@v4
uses: actions/setup-python@v5
if: |
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20220908' ||

View File

@@ -46,11 +46,11 @@ jobs:
uses: ./.github/actions/prepare-test
with:
version: ${{ matrix.version }}
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: ^1.13.1
- name: Setup Python on MacOS
uses: actions/setup-python@v4
uses: actions/setup-python@v5
if: |
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20220908' ||

View File

@@ -45,7 +45,7 @@ jobs:
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.11
@@ -70,7 +70,7 @@ jobs:
steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v4
uses: actions/setup-python@v5
if: |
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20220908' ||
@@ -88,3 +88,44 @@ jobs:
# we won't be able to find them on Windows.
npm config set script-shell bash
npm test
check-node-version:
if: ${{ github.event.pull_request }}
name: Check Action Node versions
runs-on: ubuntu-latest
timeout-minutes: 45
env:
BASE_REF: ${{ github.base_ref }}
steps:
- uses: actions/checkout@v4
- id: head-version
name: Verify all Actions use the same Node version
run: |
NODE_VERSION=$(find . -name "action.yml" -exec yq -e '.runs.using' {} \; | grep node | sort | uniq)
echo "NODE_VERSION: ${NODE_VERSION}"
if [[ $(echo "$NODE_VERSION" | wc -l) -gt 1 ]]; then
echo "::error::More than one node version used in 'action.yml' files."
exit 1
fi
echo "node_version=${NODE_VERSION}" >> $GITHUB_OUTPUT
- id: checkout-base
name: 'Backport: Check out base ref'
if: ${{ startsWith(github.head_ref, 'backport-') }}
uses: actions/checkout@v4
with:
ref: ${{ env.BASE_REF }}
- name: 'Backport: Verify Node versions unchanged'
if: steps.checkout-base.outcome == 'success'
env:
HEAD_VERSION: ${{ steps.head-version.outputs.node_version }}
run: |
BASE_VERSION=$(find . -name "action.yml" -exec yq -e '.runs.using' {} \; | grep node | sort | uniq)
echo "HEAD_VERSION: ${HEAD_VERSION}"
echo "BASE_VERSION: ${BASE_VERSION}"
if [[ "$BASE_VERSION" != "$HEAD_VERSION" ]]; then
echo "::error::Cannot change the Node version of an Action in a backport PR."
exit 1
fi

View File

@@ -37,7 +37,7 @@ jobs:
steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v4
uses: actions/setup-python@v5
if: |
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20220908' ||
@@ -151,7 +151,7 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}

View File

@@ -18,7 +18,7 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12

View File

@@ -31,7 +31,7 @@ jobs:
npm run build
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.11

View File

@@ -14,7 +14,7 @@ jobs:
steps:
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.7"
- name: Checkout CodeQL Action

View File

@@ -2,10 +2,14 @@
See the [releases page](https://github.com/github/codeql-action/releases) for the relevant changes to the CodeQL CLI and language packs.
## [UNRELEASED]
## 2.22.11 - 13 Dec 2023
No user facing changes.
## 2.22.10 - 12 Dec 2023
- Update default CodeQL bundle version to 2.15.4. [#2016](https://github.com/github/codeql-action/pull/2016)
## 2.22.9 - 07 Dec 2023
No user facing changes.

View File

@@ -84,6 +84,6 @@ outputs:
sarif-id:
description: The ID of the uploaded SARIF file.
runs:
using: "node16"
using: node16
main: "../lib/analyze-action.js"
post: "../lib/analyze-action-post.js"

View File

@@ -13,5 +13,5 @@ inputs:
$GITHUB_WORKSPACE as its working directory.
required: false
runs:
using: 'node16'
using: node16
main: '../lib/autobuild-action.js'

View File

@@ -109,6 +109,6 @@ outputs:
codeql-path:
description: The path of the CodeQL binary used for analysis
runs:
using: 'node16'
using: node16
main: '../lib/init-action.js'
post: '../lib/init-action-post.js'

6
lib/autobuild.js generated
View File

@@ -51,11 +51,11 @@ async function determineAutobuildLanguages(config, logger) {
* For example, consider a user with the following workflow file:
*
* ```yml
* - uses: github/codeql-action/init@v2
* - uses: github/codeql-action/init@v3
* with:
* languages: go, java
* - uses: github/codeql-action/autobuild@v2
* - uses: github/codeql-action/analyze@v2
* - uses: github/codeql-action/autobuild@v3
* - uses: github/codeql-action/analyze@v3
* ```
*
* - With Go extraction disabled, we will run the Java autobuilder in the

View File

@@ -1,6 +1,6 @@
{
"bundleVersion": "codeql-bundle-v2.15.3",
"cliVersion": "2.15.3",
"priorBundleVersion": "codeql-bundle-v2.15.2",
"priorCliVersion": "2.15.2"
"bundleVersion": "codeql-bundle-v2.15.4",
"cliVersion": "2.15.4",
"priorBundleVersion": "codeql-bundle-v2.15.3",
"priorCliVersion": "2.15.3"
}

View File

@@ -92,14 +92,14 @@ const workflow = __importStar(require("./workflow"));
},
{
name: "Initialize CodeQL",
uses: "github/codeql-action/init@v2",
uses: "github/codeql-action/init@v3",
with: {
languages: "javascript",
},
},
{
name: "Perform CodeQL Analysis",
uses: "github/codeql-action/analyze@v2",
uses: "github/codeql-action/analyze@v3",
with: {
category: "my-category",
},
@@ -115,14 +115,14 @@ const workflow = __importStar(require("./workflow"));
},
{
name: "Initialize CodeQL",
uses: "github/codeql-action/init@v2",
uses: "github/codeql-action/init@v3",
with: {
languages: "javascript",
},
},
{
name: "Perform CodeQL Analysis",
uses: "github/codeql-action/analyze@v2",
uses: "github/codeql-action/analyze@v3",
with: {
category: "my-category",
},
@@ -141,14 +141,14 @@ const workflow = __importStar(require("./workflow"));
},
{
name: "Initialize CodeQL",
uses: "github/codeql-action/init@v2",
uses: "github/codeql-action/init@v3",
with: {
languages: "javascript",
},
},
{
name: "Perform CodeQL Analysis",
uses: "github/codeql-action/analyze@v2",
uses: "github/codeql-action/analyze@v3",
with: {
category: "my-category",
},
@@ -194,14 +194,14 @@ for (const { uploadInput, shouldUpload } of UPLOAD_INPUT_TEST_CASES) {
},
{
name: "Initialize CodeQL",
uses: "github/codeql-action/init@v2",
uses: "github/codeql-action/init@v3",
with: {
languages: "javascript",
},
},
{
name: "Perform CodeQL Analysis",
uses: "github/codeql-action/analyze@v2",
uses: "github/codeql-action/analyze@v3",
with: {
category: "my-category",
upload: uploadInput,
@@ -225,14 +225,14 @@ for (const { uploadInput, shouldUpload } of UPLOAD_INPUT_TEST_CASES) {
},
{
name: "Initialize CodeQL",
uses: "github/codeql-action/init@v2",
uses: "github/codeql-action/init@v3",
with: {
languages: "javascript",
},
},
{
name: "Perform CodeQL Analysis",
uses: "github/codeql-action/analyze@v2",
uses: "github/codeql-action/analyze@v3",
with: {
category: "/language:${{ matrix.language }}",
},
@@ -251,14 +251,14 @@ for (const { uploadInput, shouldUpload } of UPLOAD_INPUT_TEST_CASES) {
},
{
name: "Initialize CodeQL",
uses: "github/codeql-action/init@v2",
uses: "github/codeql-action/init@v3",
with: {
languages: "javascript",
},
},
{
name: "Perform CodeQL Analysis",
uses: "github/codeql-action/analyze@v2",
uses: "github/codeql-action/analyze@v3",
with: {
upload: "${{ matrix.language != 'csharp' }}",
},

58
lib/workflow.test.js generated
View File

@@ -214,9 +214,9 @@ async function testLanguageAliases(t, matrixLanguages, aliases, expectedErrorMes
},
},
steps: [
{ uses: "actions/checkout@v2" },
{ uses: "github/codeql-action/init@v2" },
{ uses: "github/codeql-action/analyze@v2" },
{ uses: "actions/checkout@v3" },
{ uses: "github/codeql-action/init@v3" },
{ uses: "github/codeql-action/analyze@v3" },
],
},
},
@@ -306,11 +306,11 @@ async function testLanguageAliases(t, matrixLanguages, aliases, expectedErrorMes
test:
steps:
- run: "git checkout HEAD^2"
test2:
steps:
- run: "git checkout HEAD^2"
test3:
steps: []
`), await (0, codeql_1.getCodeQLForTesting)());
@@ -330,11 +330,11 @@ async function testLanguageAliases(t, matrixLanguages, aliases, expectedErrorMes
test:
steps:
- run: "git checkout HEAD^2"
test2:
steps:
- run: "git checkout HEAD^2"
test3:
steps: []
`), await (0, codeql_1.getCodeQLForTesting)());
@@ -380,9 +380,9 @@ async function testLanguageAliases(t, matrixLanguages, aliases, expectedErrorMes
analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: github/codeql-action/init@v2
- uses: github/codeql-action/analyze@v2
- uses: actions/checkout@v3
- uses: github/codeql-action/init@v3
- uses: github/codeql-action/analyze@v3
with:
category: some-category
`), "analysis", {}), "some-category");
@@ -394,9 +394,9 @@ async function testLanguageAliases(t, matrixLanguages, aliases, expectedErrorMes
analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: github/codeql-action/init@v2
- uses: github/codeql-action/analyze@v2
- uses: actions/checkout@v3
- uses: github/codeql-action/init@v3
- uses: github/codeql-action/analyze@v3
`), "analysis", {}), undefined);
});
(0, ava_1.default)("getCategoryInputOrThrow returns category for workflow with multiple jobs", (t) => {
@@ -406,19 +406,19 @@ async function testLanguageAliases(t, matrixLanguages, aliases, expectedErrorMes
foo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: github/codeql-action/init@v2
- uses: actions/checkout@v3
- uses: github/codeql-action/init@v3
- runs: ./build foo
- uses: github/codeql-action/analyze@v2
- uses: github/codeql-action/analyze@v3
with:
category: foo-category
bar:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: github/codeql-action/init@v2
- uses: actions/checkout@v3
- uses: github/codeql-action/init@v3
- runs: ./build bar
- uses: github/codeql-action/analyze@v2
- uses: github/codeql-action/analyze@v3
with:
category: bar-category
`), "bar", {}), "bar-category");
@@ -433,11 +433,11 @@ async function testLanguageAliases(t, matrixLanguages, aliases, expectedErrorMes
matrix:
language: [javascript, python]
steps:
- uses: actions/checkout@v2
- uses: github/codeql-action/init@v2
- uses: actions/checkout@v3
- uses: github/codeql-action/init@v3
with:
language: \${{ matrix.language }}
- uses: github/codeql-action/analyze@v2
- uses: github/codeql-action/analyze@v3
with:
category: "/language:\${{ matrix.language }}"
`), "analysis", { language: "javascript" }), "/language:javascript");
@@ -448,9 +448,9 @@ async function testLanguageAliases(t, matrixLanguages, aliases, expectedErrorMes
jobs:
analysis:
steps:
- uses: actions/checkout@v2
- uses: github/codeql-action/init@v2
- uses: github/codeql-action/analyze@v2
- uses: actions/checkout@v3
- uses: github/codeql-action/init@v3
- uses: github/codeql-action/analyze@v3
with:
category: "\${{ github.workflow }}"
`), "analysis", {}), {
@@ -465,12 +465,12 @@ async function testLanguageAliases(t, matrixLanguages, aliases, expectedErrorMes
analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: github/codeql-action/init@v2
- uses: github/codeql-action/analyze@v2
- uses: actions/checkout@v3
- uses: github/codeql-action/init@v3
- uses: github/codeql-action/analyze@v3
with:
category: some-category
- uses: github/codeql-action/analyze@v2
- uses: github/codeql-action/analyze@v3
with:
category: another-category
`), "analysis", {}), {

2
node_modules/.package-lock.json generated vendored
View File

@@ -1,6 +1,6 @@
{
"name": "codeql",
"version": "2.22.10",
"version": "2.22.11",
"lockfileVersion": 3,
"requires": true,
"packages": {

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "codeql",
"version": "2.22.10",
"version": "2.22.11",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "codeql",
"version": "2.22.10",
"version": "2.22.11",
"license": "MIT",
"dependencies": {
"@actions/artifact": "^1.1.2",

View File

@@ -1,6 +1,6 @@
{
"name": "codeql",
"version": "2.22.10",
"version": "2.22.11",
"private": true,
"description": "CodeQL action",
"scripts": {

View File

@@ -19,5 +19,5 @@ outputs:
environment:
description: The inferred build environment configuration.
runs:
using: 'node16'
using: node16
main: '../lib/resolve-environment-action.js'

View File

@@ -38,11 +38,11 @@ export async function determineAutobuildLanguages(
* For example, consider a user with the following workflow file:
*
* ```yml
* - uses: github/codeql-action/init@v2
* - uses: github/codeql-action/init@v3
* with:
* languages: go, java
* - uses: github/codeql-action/autobuild@v2
* - uses: github/codeql-action/analyze@v2
* - uses: github/codeql-action/autobuild@v3
* - uses: github/codeql-action/analyze@v3
* ```
*
* - With Go extraction disabled, we will run the Java autobuilder in the

View File

@@ -1,6 +1,6 @@
{
"bundleVersion": "codeql-bundle-v2.15.3",
"cliVersion": "2.15.3",
"priorBundleVersion": "codeql-bundle-v2.15.2",
"priorCliVersion": "2.15.2"
"bundleVersion": "codeql-bundle-v2.15.4",
"cliVersion": "2.15.4",
"priorBundleVersion": "codeql-bundle-v2.15.3",
"priorCliVersion": "2.15.3"
}

View File

@@ -91,14 +91,14 @@ test("uploads failed SARIF run with `diagnostics export` if feature flag is off"
},
{
name: "Initialize CodeQL",
uses: "github/codeql-action/init@v2",
uses: "github/codeql-action/init@v3",
with: {
languages: "javascript",
},
},
{
name: "Perform CodeQL Analysis",
uses: "github/codeql-action/analyze@v2",
uses: "github/codeql-action/analyze@v3",
with: {
category: "my-category",
},
@@ -115,14 +115,14 @@ test("uploads failed SARIF run with `diagnostics export` if the database doesn't
},
{
name: "Initialize CodeQL",
uses: "github/codeql-action/init@v2",
uses: "github/codeql-action/init@v3",
with: {
languages: "javascript",
},
},
{
name: "Perform CodeQL Analysis",
uses: "github/codeql-action/analyze@v2",
uses: "github/codeql-action/analyze@v3",
with: {
category: "my-category",
},
@@ -142,14 +142,14 @@ test("uploads failed SARIF run with database export-diagnostics if the database
},
{
name: "Initialize CodeQL",
uses: "github/codeql-action/init@v2",
uses: "github/codeql-action/init@v3",
with: {
languages: "javascript",
},
},
{
name: "Perform CodeQL Analysis",
uses: "github/codeql-action/analyze@v2",
uses: "github/codeql-action/analyze@v3",
with: {
category: "my-category",
},
@@ -199,14 +199,14 @@ for (const { uploadInput, shouldUpload } of UPLOAD_INPUT_TEST_CASES) {
},
{
name: "Initialize CodeQL",
uses: "github/codeql-action/init@v2",
uses: "github/codeql-action/init@v3",
with: {
languages: "javascript",
},
},
{
name: "Perform CodeQL Analysis",
uses: "github/codeql-action/analyze@v2",
uses: "github/codeql-action/analyze@v3",
with: {
category: "my-category",
upload: uploadInput,
@@ -234,14 +234,14 @@ test("uploading failed SARIF run succeeds when workflow uses an input with a mat
},
{
name: "Initialize CodeQL",
uses: "github/codeql-action/init@v2",
uses: "github/codeql-action/init@v3",
with: {
languages: "javascript",
},
},
{
name: "Perform CodeQL Analysis",
uses: "github/codeql-action/analyze@v2",
uses: "github/codeql-action/analyze@v3",
with: {
category: "/language:${{ matrix.language }}",
},
@@ -261,14 +261,14 @@ test("uploading failed SARIF run fails when workflow uses a complex upload input
},
{
name: "Initialize CodeQL",
uses: "github/codeql-action/init@v2",
uses: "github/codeql-action/init@v3",
with: {
languages: "javascript",
},
},
{
name: "Perform CodeQL Analysis",
uses: "github/codeql-action/analyze@v2",
uses: "github/codeql-action/analyze@v3",
with: {
upload: "${{ matrix.language != 'csharp' }}",
},

View File

@@ -396,9 +396,9 @@ async function testLanguageAliases(
},
},
steps: [
{ uses: "actions/checkout@v2" },
{ uses: "github/codeql-action/init@v2" },
{ uses: "github/codeql-action/analyze@v2" },
{ uses: "actions/checkout@v3" },
{ uses: "github/codeql-action/init@v3" },
{ uses: "github/codeql-action/analyze@v3" },
],
},
},
@@ -516,11 +516,11 @@ test("getWorkflowErrors() should only report the current job's CheckoutWrongHead
test:
steps:
- run: "git checkout HEAD^2"
test2:
steps:
- run: "git checkout HEAD^2"
test3:
steps: []
`) as Workflow,
@@ -546,11 +546,11 @@ test("getWorkflowErrors() should not report a different job's CheckoutWrongHead"
test:
steps:
- run: "git checkout HEAD^2"
test2:
steps:
- run: "git checkout HEAD^2"
test3:
steps: []
`) as Workflow,
@@ -652,9 +652,9 @@ test("getCategoryInputOrThrow returns category for simple workflow with category
analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: github/codeql-action/init@v2
- uses: github/codeql-action/analyze@v2
- uses: actions/checkout@v3
- uses: github/codeql-action/init@v3
- uses: github/codeql-action/analyze@v3
with:
category: some-category
`) as Workflow,
@@ -674,9 +674,9 @@ test("getCategoryInputOrThrow returns undefined for simple workflow without cate
analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: github/codeql-action/init@v2
- uses: github/codeql-action/analyze@v2
- uses: actions/checkout@v3
- uses: github/codeql-action/init@v3
- uses: github/codeql-action/analyze@v3
`) as Workflow,
"analysis",
{},
@@ -694,19 +694,19 @@ test("getCategoryInputOrThrow returns category for workflow with multiple jobs",
foo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: github/codeql-action/init@v2
- uses: actions/checkout@v3
- uses: github/codeql-action/init@v3
- runs: ./build foo
- uses: github/codeql-action/analyze@v2
- uses: github/codeql-action/analyze@v3
with:
category: foo-category
bar:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: github/codeql-action/init@v2
- uses: actions/checkout@v3
- uses: github/codeql-action/init@v3
- runs: ./build bar
- uses: github/codeql-action/analyze@v2
- uses: github/codeql-action/analyze@v3
with:
category: bar-category
`) as Workflow,
@@ -729,11 +729,11 @@ test("getCategoryInputOrThrow finds category for workflow with language matrix",
matrix:
language: [javascript, python]
steps:
- uses: actions/checkout@v2
- uses: github/codeql-action/init@v2
- uses: actions/checkout@v3
- uses: github/codeql-action/init@v3
with:
language: \${{ matrix.language }}
- uses: github/codeql-action/analyze@v2
- uses: github/codeql-action/analyze@v3
with:
category: "/language:\${{ matrix.language }}"
`) as Workflow,
@@ -753,9 +753,9 @@ test("getCategoryInputOrThrow throws error for workflow with dynamic category",
jobs:
analysis:
steps:
- uses: actions/checkout@v2
- uses: github/codeql-action/init@v2
- uses: github/codeql-action/analyze@v2
- uses: actions/checkout@v3
- uses: github/codeql-action/init@v3
- uses: github/codeql-action/analyze@v3
with:
category: "\${{ github.workflow }}"
`) as Workflow,
@@ -780,12 +780,12 @@ test("getCategoryInputOrThrow throws error for workflow with multiple calls to a
analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: github/codeql-action/init@v2
- uses: github/codeql-action/analyze@v2
- uses: actions/checkout@v3
- uses: github/codeql-action/init@v3
- uses: github/codeql-action/analyze@v3
with:
category: some-category
- uses: github/codeql-action/analyze@v2
- uses: github/codeql-action/analyze@v3
with:
category: another-category
`) as Workflow,

View File

@@ -34,5 +34,5 @@ outputs:
sarif-id:
description: The ID of the uploaded SARIF file.
runs:
using: 'node16'
using: node16
main: '../lib/upload-sarif-action.js'