Skip to content

Commit e0e5ded

Browse files
authored
Merge pull request #1276 from github/update-v2.1.26-97054749
Merge main into releases/v2
2 parents 86f3159 + c60b854 commit e0e5ded

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+528
-232
lines changed

.github/workflows/__go-custom-queries.yml

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/__unset-environment.yml

-97
This file was deleted.

.github/workflows/script/update-required-checks.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fi
2323
echo "Getting checks for $GITHUB_SHA"
2424

2525
# Ignore any checks with "https://", CodeQL, LGTM, and Update checks.
26-
CHECKS="$(gh api repos/github/codeql-action/commits/"${GITHUB_SHA}"/check-runs --paginate | jq --slurp --compact-output --raw-output '[.[].check_runs | .[].name | select(contains("https://") or . == "CodeQL" or . == "LGTM.com" or contains("Update") or contains("update") | not)] | unique | sort')"
26+
CHECKS="$(gh api repos/github/codeql-action/commits/"${GITHUB_SHA}"/check-runs --paginate | jq --slurp --compact-output --raw-output '[.[].check_runs | .[].name | select(contains("https://") or . == "CodeQL" or . == "LGTM.com" or contains("Update") or contains("update") or contains("test-setup-python-scripts") | not)] | unique | sort')"
2727

2828
echo "$CHECKS" | jq
2929

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# See `unset-environment-old-cli.yml` for reasoning behind the separate tests.
2+
name: PR Check - Test unsetting environment variables for CLI version >= 2.5.1
3+
env:
4+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5+
GO111MODULE: auto
6+
on:
7+
push:
8+
branches:
9+
- main
10+
- releases/v1
11+
- releases/v2
12+
pull_request:
13+
types:
14+
- opened
15+
- synchronize
16+
- reopened
17+
- ready_for_review
18+
workflow_dispatch: {}
19+
jobs:
20+
unset-environment:
21+
strategy:
22+
matrix:
23+
include:
24+
- os: ubuntu-latest
25+
version: stable-20210809
26+
- os: ubuntu-latest
27+
version: cached
28+
- os: ubuntu-latest
29+
version: latest
30+
- os: ubuntu-latest
31+
version: nightly-latest
32+
name: Test unsetting environment variables
33+
timeout-minutes: 45
34+
runs-on: ${{ matrix.os }}
35+
steps:
36+
- name: Check out repository
37+
uses: actions/checkout@v3
38+
- name: Prepare test
39+
id: prepare-test
40+
uses: ./.github/prepare-test
41+
with:
42+
version: ${{ matrix.version }}
43+
- uses: ./../action/init
44+
with:
45+
db-location: ${{ runner.temp }}/customDbLocation
46+
tools: ${{ steps.prepare-test.outputs.tools-url }}
47+
env:
48+
TEST_MODE: true
49+
- name: Build code
50+
shell: bash
51+
run: env -i PATH="$PATH" HOME="$HOME" ./build.sh
52+
- uses: ./../action/analyze
53+
id: analysis
54+
env:
55+
TEST_MODE: true
56+
- shell: bash
57+
run: |
58+
CPP_DB="${{ fromJson(steps.analysis.outputs.db-locations).cpp }}"
59+
if [[ ! -d "$CPP_DB" ]] || [[ ! "$CPP_DB" == "${RUNNER_TEMP}/customDbLocation/cpp" ]]; then
60+
echo "::error::Did not create a database for CPP, or created it in the wrong location." \
61+
"Expected location was '${RUNNER_TEMP}/customDbLocation/cpp' but actual was '${CPP_DB}'"
62+
exit 1
63+
fi
64+
CSHARP_DB="${{ fromJson(steps.analysis.outputs.db-locations).csharp }}"
65+
if [[ ! -d "$CSHARP_DB" ]] || [[ ! "$CSHARP_DB" == "${RUNNER_TEMP}/customDbLocation/csharp" ]]; then
66+
echo "::error::Did not create a database for C Sharp, or created it in the wrong location." \
67+
"Expected location was '${RUNNER_TEMP}/customDbLocation/csharp' but actual was '${CSHARP_DB}'"
68+
exit 1
69+
fi
70+
GO_DB="${{ fromJson(steps.analysis.outputs.db-locations).go }}"
71+
if [[ ! -d "$GO_DB" ]] || [[ ! "$GO_DB" == "${RUNNER_TEMP}/customDbLocation/go" ]]; then
72+
echo "::error::Did not create a database for Go, or created it in the wrong location." \
73+
"Expected location was '${RUNNER_TEMP}/customDbLocation/go' but actual was '${GO_DB}'"
74+
exit 1
75+
fi
76+
JAVA_DB="${{ fromJson(steps.analysis.outputs.db-locations).java }}"
77+
if [[ ! -d "$JAVA_DB" ]] || [[ ! "$JAVA_DB" == "${RUNNER_TEMP}/customDbLocation/java" ]]; then
78+
echo "::error::Did not create a database for Java, or created it in the wrong location." \
79+
"Expected location was '${RUNNER_TEMP}/customDbLocation/java' but actual was '${JAVA_DB}'"
80+
exit 1
81+
fi
82+
JAVASCRIPT_DB="${{ fromJson(steps.analysis.outputs.db-locations).javascript }}"
83+
if [[ ! -d "$JAVASCRIPT_DB" ]] || [[ ! "$JAVASCRIPT_DB" == "${RUNNER_TEMP}/customDbLocation/javascript" ]]; then
84+
echo "::error::Did not create a database for Javascript, or created it in the wrong location." \
85+
"Expected location was '${RUNNER_TEMP}/customDbLocation/javascript' but actual was '${JAVASCRIPT_DB}'"
86+
exit 1
87+
fi
88+
PYTHON_DB="${{ fromJson(steps.analysis.outputs.db-locations).python }}"
89+
if [[ ! -d "$PYTHON_DB" ]] || [[ ! "$PYTHON_DB" == "${RUNNER_TEMP}/customDbLocation/python" ]]; then
90+
echo "::error::Did not create a database for Python, or created it in the wrong location." \
91+
"Expected location was '${RUNNER_TEMP}/customDbLocation/python' but actual was '${PYTHON_DB}'"
92+
exit 1
93+
fi
94+
env:
95+
INTERNAL_CODEQL_ACTION_DEBUG_LOC: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# There was a bug, fixed in CLI v2.5.1, that didn't propagate environment
2+
# variables that the Java tracer needed. Here we test all languages
3+
# except Java for these CLI versions. In `unset-environment-new-cli.yml`
4+
# we test all languages for recent CLI versions.
5+
name: PR Check - Test unsetting environment variables for CLI version < 2.5.1
6+
env:
7+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8+
GO111MODULE: auto
9+
on:
10+
push:
11+
branches:
12+
- main
13+
- releases/v1
14+
- releases/v2
15+
pull_request:
16+
types:
17+
- opened
18+
- synchronize
19+
- reopened
20+
- ready_for_review
21+
workflow_dispatch: {}
22+
jobs:
23+
unset-environment:
24+
strategy:
25+
matrix:
26+
include:
27+
- os: ubuntu-latest
28+
version: stable-20210308
29+
- os: ubuntu-latest
30+
version: stable-20210319
31+
name: Test unsetting environment variables
32+
timeout-minutes: 45
33+
runs-on: ${{ matrix.os }}
34+
steps:
35+
- name: Check out repository
36+
uses: actions/checkout@v3
37+
- name: Prepare test
38+
id: prepare-test
39+
uses: ./.github/prepare-test
40+
with:
41+
version: ${{ matrix.version }}
42+
- uses: ./../action/init
43+
with:
44+
languages: csharp,cpp,go,javascript,python
45+
db-location: ${{ runner.temp }}/customDbLocation
46+
tools: ${{ steps.prepare-test.outputs.tools-url }}
47+
env:
48+
TEST_MODE: true
49+
- name: Build code
50+
shell: bash
51+
run: env -i PATH="$PATH" HOME="$HOME" ./build.sh
52+
- uses: ./../action/analyze
53+
id: analysis
54+
env:
55+
TEST_MODE: true
56+
- shell: bash
57+
run: |
58+
CPP_DB="${{ fromJson(steps.analysis.outputs.db-locations).cpp }}"
59+
if [[ ! -d "$CPP_DB" ]] || [[ ! "$CPP_DB" == "${RUNNER_TEMP}/customDbLocation/cpp" ]]; then
60+
echo "::error::Did not create a database for CPP, or created it in the wrong location." \
61+
"Expected location was '${RUNNER_TEMP}/customDbLocation/cpp' but actual was '${CPP_DB}'"
62+
exit 1
63+
fi
64+
CSHARP_DB="${{ fromJson(steps.analysis.outputs.db-locations).csharp }}"
65+
if [[ ! -d "$CSHARP_DB" ]] || [[ ! "$CSHARP_DB" == "${RUNNER_TEMP}/customDbLocation/csharp" ]]; then
66+
echo "::error::Did not create a database for C Sharp, or created it in the wrong location." \
67+
"Expected location was '${RUNNER_TEMP}/customDbLocation/csharp' but actual was '${CSHARP_DB}'"
68+
exit 1
69+
fi
70+
GO_DB="${{ fromJson(steps.analysis.outputs.db-locations).go }}"
71+
if [[ ! -d "$GO_DB" ]] || [[ ! "$GO_DB" == "${RUNNER_TEMP}/customDbLocation/go" ]]; then
72+
echo "::error::Did not create a database for Go, or created it in the wrong location." \
73+
"Expected location was '${RUNNER_TEMP}/customDbLocation/go' but actual was '${GO_DB}'"
74+
exit 1
75+
fi
76+
JAVASCRIPT_DB="${{ fromJson(steps.analysis.outputs.db-locations).javascript }}"
77+
if [[ ! -d "$JAVASCRIPT_DB" ]] || [[ ! "$JAVASCRIPT_DB" == "${RUNNER_TEMP}/customDbLocation/javascript" ]]; then
78+
echo "::error::Did not create a database for Javascript, or created it in the wrong location." \
79+
"Expected location was '${RUNNER_TEMP}/customDbLocation/javascript' but actual was '${JAVASCRIPT_DB}'"
80+
exit 1
81+
fi
82+
PYTHON_DB="${{ fromJson(steps.analysis.outputs.db-locations).python }}"
83+
if [[ ! -d "$PYTHON_DB" ]] || [[ ! "$PYTHON_DB" == "${RUNNER_TEMP}/customDbLocation/python" ]]; then
84+
echo "::error::Did not create a database for Python, or created it in the wrong location." \
85+
"Expected location was '${RUNNER_TEMP}/customDbLocation/python' but actual was '${PYTHON_DB}'"
86+
exit 1
87+
fi
88+
env:
89+
INTERNAL_CODEQL_ACTION_DEBUG_LOC: true

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CodeQL Action Changelog
22

3+
## 2.1.26 - 29 Sep 2022
4+
5+
- Update default CodeQL bundle version to 2.11.0. [#1267](https://github.com/github/codeql-action/pull/1267)
6+
37
## 2.1.25 - 21 Sep 2022
48

59
- We will soon be rolling out a feature of the CodeQL Action that stores some information used to make future runs faster in the GitHub Actions cache. Initially, this will only be enabled on JavaScript repositories, but we plan to add more languages to this soon. The new feature can be disabled by passing the `trap-caching: false` option to your workflow's `init` step, for example if you are already using the GitHub Actions cache for a different purpose and are near the storage limit for it.

lib/actions-util.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/analyze-action-env.test.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/analyze-action-env.test.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/analyze-action-input.test.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)