Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge main into releases/v2 #1428

Merged
merged 74 commits into from
Dec 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
79f8286
Refactoring: Separate out workflow related functionality
henrymercer Nov 22, 2022
996d04b
Fix a type error affecting later versions of TypeScript
henrymercer Nov 22, 2022
e2d523c
Add function to read the analysis category from a workflow
henrymercer Nov 22, 2022
daf4614
Substitute matrix variables into category input
henrymercer Nov 22, 2022
bff0be7
Generalize `getCategoryInputOrThrow` to arbitrary inputs
henrymercer Nov 23, 2022
9f2aa7e
Merge branch 'main' into henrymercer/parse-category
henrymercer Nov 25, 2022
8f05fcd
Filter set of possible Action inputs to those from a particular job
henrymercer Nov 25, 2022
e233806
Add `diagnostics export` command
henrymercer Nov 9, 2022
44ae944
Add a workflow to test reporting a failed run
henrymercer Nov 22, 2022
9de6c31
Log matrix input
henrymercer Nov 22, 2022
4d4e250
Use a matrix in testing workflow
henrymercer Nov 22, 2022
3cf2a1b
Add function for retrieving the "upload" input
henrymercer Nov 23, 2022
3afc2b1
Add feature flag for uploading failed SARIF
henrymercer Nov 23, 2022
5296a76
Upload failed SARIF files to Code Scanning
henrymercer Nov 23, 2022
8337c2b
Only upload failed SARIF if the run failed
henrymercer Nov 25, 2022
122b180
Add an integration test for uploading SARIF when the run fails
henrymercer Nov 25, 2022
37b4358
Handle API versions that reject unsuccessful executions
henrymercer Nov 25, 2022
d0517be
Ensure we finish the log group when waiting for processing
henrymercer Nov 25, 2022
24fd4c0
Generate the "Submit SARIF after failure" workflow
henrymercer Nov 25, 2022
7fc3c60
Add changelog note
henrymercer Nov 25, 2022
605b23d
Explicitly suggest wrapping in a try/catch block
henrymercer Nov 29, 2022
e628ee0
Push unsuccessful execution API error detection into upload library
henrymercer Nov 29, 2022
00a3c45
Always wait for processing when uploading a failed SARIF file
henrymercer Nov 29, 2022
e0dec83
Explicitly mention surrounding by try/catch in JSDoc
henrymercer Nov 29, 2022
58b2ab0
Add unit test for typical workflow
henrymercer Nov 29, 2022
6c5cad7
Merge branch 'henrymercer/parse-category' into henrymercer/report-fai…
henrymercer Nov 29, 2022
3d90c4f
Improve error message when failed SARIF file doesn't process as expected
henrymercer Nov 30, 2022
77cda4d
Add testing environment to submit SARIF after failure PR check
henrymercer Nov 30, 2022
0828b04
Update changelog and version after v2.1.35
invalid-email-address Dec 1, 2022
21044b0
Update checked-in dependencies
invalid-email-address Dec 1, 2022
b1c26c4
Merge pull request #1409 from github/mergeback/v2.1.35-to-main-b2a92eb5
henrymercer Dec 1, 2022
0d9b15c
Merge pull request #1392 from github/henrymercer/parse-category
henrymercer Dec 1, 2022
98b2ddc
Merge branch 'main' into henrymercer/report-failed-runs
henrymercer Dec 1, 2022
aa0e650
Surface fatal CLI errors in `interpret-results` and `run-queries` (#1…
angelapwen Dec 2, 2022
e0ff272
Merge branch 'main' into henrymercer/report-failed-runs
henrymercer Dec 2, 2022
375daca
Only print the full error message in debug mode
henrymercer Dec 2, 2022
1e5919b
Bump default CodeQL version to 2.11.5
cklin Dec 2, 2022
4acf201
Merge pull request #1393 from github/henrymercer/report-failed-runs
henrymercer Dec 2, 2022
4b18b7b
Update Dependabot config file
sentinel Dec 2, 2022
81f99a8
Remove outdated section for runner and perform all updates daily
henrymercer Dec 2, 2022
ee6ba9c
Reformat
henrymercer Dec 2, 2022
794a4b5
Switch to weekly interval for both ecosystems
henrymercer Dec 2, 2022
62b14cb
Merge pull request #1413 from github/update-dependabot-e0f8a3c2
henrymercer Dec 2, 2022
c80f00a
Bump peter-evans/create-pull-request from 3.4.1 to 4.2.3
dependabot[bot] Dec 2, 2022
7aa5026
Bump actions/setup-python from 3 to 4 (#1416)
dependabot[bot] Dec 5, 2022
61cc378
Bump swift-actions/setup-swift from 1.19.0 to 1.20.0 (#1415)
dependabot[bot] Dec 5, 2022
1653364
Merge pull request #1414 from github/dependabot/github_actions/peter-…
henrymercer Dec 5, 2022
2cbc140
Enable file baseline export by default
henrymercer Dec 5, 2022
7fc528c
python-setup: Don't allow Poetry to make venv in project
RasmusWL Dec 6, 2022
1e8d3b8
Merge pull request #1418 from github/henrymercer/remove-file-baseline…
henrymercer Dec 6, 2022
27c1438
python-setup: Apply suggestions from code review
RasmusWL Dec 6, 2022
5566638
Update CHANGELOG.md
RasmusWL Dec 6, 2022
3b0a2f6
python-setup: Update comment with fully qualified configuration name
RasmusWL Dec 6, 2022
9085295
Add regression test
henrymercer Dec 6, 2022
4623c8e
Make `getInputOrThrow` throw when it can't find any calls to the Action
henrymercer Dec 6, 2022
2207a72
Downgrade log severity when we can't upload a failed SARIF file
henrymercer Dec 6, 2022
697ed97
Factor out some code in post-init tests
henrymercer Dec 6, 2022
384a214
Allow testing workflow parsing functionality from PR checks
henrymercer Dec 6, 2022
44ef9d9
Merge pull request #1419 from github/rasmuswl/poetry-no-local-venv
RasmusWL Dec 6, 2022
79166d0
Merge pull request #1420 from github/henrymercer/failed-runs-fix-acti…
henrymercer Dec 7, 2022
c51babb
Merge branch 'main' into cklin/codeql-cli-2.11.5
cklin Dec 7, 2022
fb74504
Disable nightly-latest checks for Swift
cklin Dec 7, 2022
8bebf77
update-required-checks.sh: fix argument handling
cklin Dec 7, 2022
5e452f0
Merge pull request #1412 from github/cklin/codeql-cli-2.11.5
cklin Dec 7, 2022
19f867a
Merge branch 'main' into cklin/fix-update-required-checks-sha
cklin Dec 7, 2022
4a5ad5a
update-required-checks.sh: ignore check-expected-release-files
cklin Dec 7, 2022
aba18b8
Bump certifi in /python-setup/tests/pipenv/requests-3
dependabot[bot] Dec 8, 2022
104319f
Merge pull request #1423 from github/dependabot/pip/python-setup/test…
aeisenberg Dec 8, 2022
8121f62
Bump certifi in /python-setup/tests/pipenv/python-3.8
dependabot[bot] Dec 8, 2022
10c8997
Merge pull request #1421 from github/cklin/fix-update-required-checks…
cklin Dec 8, 2022
566a5e6
Merge pull request #1424 from github/dependabot/pip/python-setup/test…
aeisenberg Dec 8, 2022
bf944d7
Bump certifi in /python-setup/tests/poetry/requests-3
dependabot[bot] Dec 8, 2022
2b971a7
Merge pull request #1426 from github/dependabot/pip/python-setup/test…
henrymercer Dec 8, 2022
aab7a26
Update changelog for v2.1.36
invalid-email-address Dec 8, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 9 additions & 12 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
version: 2
updates:
- package-ecosystem: "npm"
- package-ecosystem: npm
directory: "/"
schedule:
interval: "weekly"
day: "thursday" # Gives us a working day to merge this before our typical release
interval: weekly
labels:
- "Update dependencies"
- Update dependencies
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-minor", "version-update:semver-patch"]
- package-ecosystem: "npm"
directory: "/runner"
update-types:
- version-update:semver-minor
- version-update:semver-patch
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: "weekly"
day: "thursday" # Gives us a working day to merge this before our typical release
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-minor", "version-update:semver-patch"]
interval: weekly
4 changes: 2 additions & 2 deletions .github/workflows/__export-file-baseline-information.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 2 additions & 6 deletions .github/workflows/__multi-language-autodetect.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

72 changes: 72 additions & 0 deletions .github/workflows/__submit-sarif-failure.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/__swift-autobuild.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 2 additions & 6 deletions .github/workflows/__swift-custom-build.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
fi

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: 3.8

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/script/update-required-checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fi

if [ "$#" -eq 1 ]; then
# If we were passed an argument, use that as the SHA
GITHUB_SHA="$0"
GITHUB_SHA="$1"
elif [ "$#" -gt 1 ]; then
echo "Usage: $0 [SHA]"
echo "Update the required checks based on the SHA, or main."
Expand All @@ -23,7 +23,7 @@ fi
echo "Getting checks for $GITHUB_SHA"

# Ignore any checks with "https://", CodeQL, LGTM, and Update checks.
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')"
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 . == "check-expected-release-files" or contains("Update") or contains("update") or contains("test-setup-python-scripts") | not)] | unique | sort')"

echo "$CHECKS" | jq

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: 3.8

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

steps:
- name: Setup Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "3.7"
- name: Checkout CodeQL Action
Expand All @@ -35,7 +35,7 @@ jobs:
env:
ENTERPRISE_RELEASES_PATH: ${{ github.workspace }}/enterprise-releases/
- name: Commit Changes
uses: peter-evans/create-pull-request@c7f493a8000b8aeb17a1332e326ba76b57cb83eb # v3.4.1
uses: peter-evans/create-pull-request@2b011faafdcbc9ceb11414d64d0573f37c774b04 # v4.2.3
with:
commit-message: Update supported GitHub Enterprise Server versions.
title: Update supported GitHub Enterprise Server versions.
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CodeQL Action Changelog

## 2.1.36 - 08 Dec 2022

- Update default CodeQL bundle version to 2.11.5. [#1412](https://github.com/github/codeql-action/pull/1412)
- Add a step that tries to upload a SARIF file for the workflow run when that workflow run fails. This will help better surface failed code scanning workflow runs. [#1393](https://github.com/github/codeql-action/pull/1393)
- Python automatic dependency installation will no longer consider dependecy code installed in venv as user-written, for projects using Poetry that specify `virtualenvs.in-project = true` in their `poetry.toml`. [#1419](https://github.com/github/codeql-action/pull/1419).

## 2.1.35 - 01 Dec 2022

No user facing changes.
Expand Down
2 changes: 2 additions & 0 deletions analyze/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ inputs:
upload:
description: Upload the SARIF file to Code Scanning
required: false
# If changing this, make sure to update workflow.ts accordingly.
default: "true"
cleanup-level:
description: "Level of cleanup to perform on CodeQL databases at the end of the analyze step. This should either be 'none' to skip cleanup, or be a valid argument for the --mode flag of the CodeQL CLI command 'codeql database cleanup' as documented at https://codeql.github.com/docs/codeql-cli/manual/database-cleanup"
Expand Down Expand Up @@ -44,6 +45,7 @@ inputs:
checkout_path:
description: "The path at which the analyzed repository was checked out. Used to relativize any absolute paths in the uploaded SARIF file."
required: false
# If changing this, make sure to update workflow.ts accordingly.
default: ${{ github.workspace }}
ref:
description: "The ref where results will be uploaded. If not provided, the Action will use the GITHUB_REF environment variable. If provided, the sha input must be provided as well. This input is not available in pull requests from forks."
Expand Down
Loading