-
Notifications
You must be signed in to change notification settings - Fork 67
Modernize qlpacks and update to CodeQL 2.8.5 #4
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
48986a5
Modernize qlpacks and update to CodeQL 2.8.5
jketema d514cfb
Update test expectations for new flow paths
jketema cb88149
Add missing whitespace in development handbook
jketema 2401e86
Bump codeql submodule
jketema 896e289
Standardize on Python 3.9 per the user manual
jketema File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{ "provide": [ "codeql_modules/*/.codeqlmanifest.json", "cpp/.codeqlmanifest.json", "c/.codeqlmanifest.json"] } | ||
{ "provide": [ "cpp/*/src/qlpack.yml", "cpp/*/test/qlpack.yml", "c/*/src/qlpack.yml", "c/*/test/qlpack.yml" ] } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Install CodeQL library pack dependencies | ||
description: | | ||
Downloads any necessary CodeQL library packs needed by packs in the repo. | ||
inputs: | ||
cli_path: | ||
description: | | ||
The path to the CodeQL CLI directory. | ||
required: false | ||
|
||
mode: | ||
description: | | ||
The `--mode` option to `codeql pack install`. | ||
required: true | ||
default: verify | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Install CodeQL library packs | ||
shell: bash | ||
env: | ||
CODEQL_CLI: ${{ inputs.cli_path }} | ||
run: | | ||
PATH=$PATH:$CODEQL_CLI | ||
python scripts/install-packs.py --mode ${{ inputs.mode }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
.github/workflows/verify-standard-library-dependencies.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: Verify Standard Library Dependencies | ||
|
||
# Run this workflow every time the "supported_codeql_configs.json" file or a "qlpack.yml" file is changed | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- "rc/**" | ||
- next | ||
paths: | ||
- "supported_codeql_configs.json" | ||
- "qlpack.yml" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
prepare-matrix: | ||
name: Prepare CodeQL configuration matrix | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.export-matrix.outputs.matrix }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Export unit test matrix | ||
id: export-matrix | ||
run: | | ||
echo "::set-output name=matrix::$( | ||
jq --compact-output \ | ||
'.supported_environment | map([.+{os: "ubuntu-20.04-xl", codeql_standard_library_ident : .codeql_standard_library | sub("\/"; "_")}]) | flatten | {include: .}' \ | ||
supported_codeql_configs.json | ||
)" | ||
|
||
verify-dependencies: | ||
name: Verify dependencies | ||
needs: prepare-matrix | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: ${{fromJSON(needs.prepare-matrix.outputs.matrix)}} | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Python 3 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.9" | ||
|
||
- name: Cache CodeQL | ||
id: cache-codeql | ||
uses: actions/cache@v2.1.3 | ||
with: | ||
# A list of files, directories, and wildcard patterns to cache and restore | ||
path: ${{github.workspace}}/codeql_home | ||
# An explicit key for restoring and saving the cache | ||
key: codeql-home-${{matrix.os}}-${{matrix.codeql_cli}}-${{matrix.codeql_standard_library}} | ||
|
||
- name: Install CodeQL | ||
if: steps.cache-codeql.outputs.cache-hit != 'true' | ||
uses: ./.github/actions/install-codeql | ||
with: | ||
codeql-cli-version: ${{matrix.codeql_cli}} | ||
codeql-stdlib-version: ${{matrix.codeql_standard_library}} | ||
codeql-home: ${{ github.workspace }}/codeql_home | ||
|
||
- name: Verify dependencies | ||
shell: bash | ||
env: | ||
CLI_PATH: ${{ github.workspace }}/codeql_home/codeql | ||
STDLIB_PATH: ${{ github.workspace }}/codeql_home/codeql-stdlib | ||
run: | | ||
PATH=$PATH:$CLI_PATH | ||
ls $STDLIB_PATH | ||
pip install -r scripts/requirements.txt | ||
python3 scripts/verify-standard-library-version.py --codeql-repo $STDLIB_PATH --mode verify | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,6 @@ | |
# C/C++ build artifacts | ||
*.o | ||
/databases/ | ||
|
||
# CodeQL build artifacts | ||
**/.codeql/** |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
dependencies: | ||
codeql/cpp-all: | ||
version: 0.0.13 | ||
compiled: false | ||
lockVersion: 1.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
name: cert-c-coding-standards | ||
name: codeql/cert-c-coding-standards | ||
version: 2.6.0-dev | ||
suites: codeql-suites | ||
libraryPathDependencies: common-c-coding-standards | ||
dependencies: | ||
codeql/common-c-coding-standards: '*' | ||
codeql/cpp-all: 0.0.13 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
dependencies: | ||
codeql/cpp-all: | ||
version: 0.0.13 | ||
compiled: false | ||
lockVersion: 1.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
name: cert-c-coding-standards-tests | ||
name: codeql/cert-c-coding-standards-tests | ||
version: 2.6.0-dev | ||
libraryPathDependencies: cert-c-coding-standards | ||
extractor: cpp | ||
extractor: cpp | ||
dependencies: | ||
codeql/cert-c-coding-standards: '*' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
dependencies: | ||
codeql/cpp-all: | ||
version: 0.0.13 | ||
compiled: false | ||
lockVersion: 1.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
name: common-c-coding-standards | ||
name: codeql/common-c-coding-standards | ||
version: 2.6.0-dev | ||
libraryPathDependencies: common-cpp-coding-standards | ||
dependencies: | ||
codeql/common-cpp-coding-standards: '*' | ||
codeql/cpp-all: 0.0.13 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
dependencies: | ||
codeql/cpp-all: | ||
version: 0.0.13 | ||
compiled: false | ||
lockVersion: 1.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
name: common-c-coding-standards-tests | ||
name: codeql/common-c-coding-standards-tests | ||
version: 2.6.0-dev | ||
libraryPathDependencies: common-c-coding-standards | ||
extractor: cpp | ||
dependencies: | ||
codeql/common-c-coding-standards: '*' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
dependencies: | ||
codeql/cpp-all: | ||
version: 0.0.13 | ||
compiled: false | ||
lockVersion: 1.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
name: misra-c-coding-standards | ||
name: codeql/misra-c-coding-standards | ||
version: 2.6.0-dev | ||
suites: codeql-suites | ||
libraryPathDependencies: common-c-coding-standards | ||
dependencies: | ||
codeql/common-c-coding-standards: '*' | ||
codeql/cpp-all: 0.0.13 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
dependencies: | ||
codeql/cpp-all: | ||
version: 0.0.13 | ||
compiled: false | ||
lockVersion: 1.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
name: misra-c-coding-standards-tests | ||
name: codeql/misra-c-coding-standards-tests | ||
version: 2.6.0-dev | ||
libraryPathDependencies: misra-c-coding-standards | ||
extractor: cpp | ||
extractor: cpp | ||
dependencies: | ||
codeql/misra-c-coding-standards: '*' |
Submodule codeql
updated
4147 files
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
dependencies: | ||
codeql/cpp-all: | ||
version: 0.0.13 | ||
compiled: false | ||
lockVersion: 1.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
name: autosar-cpp-coding-standards | ||
name: codeql/autosar-cpp-coding-standards | ||
version: 2.6.0-dev | ||
suites: codeql-suites | ||
libraryPathDependencies: common-cpp-coding-standards | ||
dependencies: | ||
codeql/common-cpp-coding-standards: '*' | ||
codeql/cpp-all: 0.0.13 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
dependencies: | ||
codeql/cpp-all: | ||
version: 0.0.13 | ||
compiled: false | ||
lockVersion: 1.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
name: autosar-cpp-coding-standards-tests | ||
name: codeql/autosar-cpp-coding-standards-tests | ||
version: 2.6.0-dev | ||
libraryPathDependencies: autosar-cpp-coding-standards | ||
extractor: cpp | ||
dependencies: | ||
codeql/autosar-cpp-coding-standards: '*' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
dependencies: | ||
codeql/cpp-all: | ||
version: 0.0.13 | ||
compiled: false | ||
lockVersion: 1.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
name: cert-cpp-coding-standards | ||
name: codeql/cert-cpp-coding-standards | ||
version: 2.6.0-dev | ||
suites: codeql-suites | ||
libraryPathDependencies: common-cpp-coding-standards | ||
dependencies: | ||
codeql/cpp-all: 0.0.13 | ||
codeql/common-cpp-coding-standards: '*' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
dependencies: | ||
codeql/cpp-all: | ||
version: 0.0.13 | ||
compiled: false | ||
lockVersion: 1.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
name: cert-cpp-coding-standards-tests | ||
name: codeql/cert-cpp-coding-standards-tests | ||
version: 2.6.0-dev | ||
libraryPathDependencies: cert-cpp-coding-standards | ||
extractor: cpp | ||
dependencies: | ||
codeql/cert-cpp-coding-standards: '*' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
dependencies: | ||
codeql/cpp-all: | ||
version: 0.0.13 | ||
compiled: false | ||
lockVersion: 1.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
name: common-cpp-coding-standards | ||
name: codeql/common-cpp-coding-standards | ||
version: 2.6.0-dev | ||
libraryPathDependencies: codeql-cpp | ||
dependencies: | ||
codeql/cpp-all: 0.0.13 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
dependencies: | ||
codeql/cpp-all: | ||
version: 0.0.13 | ||
compiled: false | ||
lockVersion: 1.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
name: common-cpp-coding-standards-tests | ||
name: codeql/common-cpp-coding-standards-tests | ||
version: 2.6.0-dev | ||
libraryPathDependencies: common-cpp-coding-standards | ||
extractor: cpp | ||
dependencies: | ||
codeql/common-cpp-coding-standards: '*' |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are standardizing on Python 3.9 for all our workflows and scripts to ensure that we are compliant with the requirements in our user manual.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes the file non-parsable. I also think this is covered by the installation of python in the workflow files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/github/codeql-coding-standards/runs/7362437649?check_suite_focus=true#step:6:2
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your are probably right that the using workflow has already setup the correct version. In that case we can ignore my suggestion for the action.