-
Notifications
You must be signed in to change notification settings - Fork 67
Modernize qlpacks #179
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
Modernize qlpacks #179
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
dfc95c1
Modernize qlpacks and update to CodeQL 2.8.5
jketema 3b7a5e0
Update to CodeQL 2.9.4
jketema 8c2be28
Standardize on Python 3.9 per the user manual
jketema 4d698bc
Bump codeql submodule
jketema a1750a6
Update test expectations for new flow paths
jketema 487c371
Fix braced initialization detection in A8-5-3
jketema 5c63296
Update symbol location in expected test output
jketema e85a16f
Fix M0-1-4 to ignore compiler-generated accesses
jketema 498f72c
Bump codeql submodule
jketema 6bd668a
Update c/cert/src/qlpack.yml
mbaluda 41ce019
Update change notes
mbaluda b4b935d
Update change notes
mbaluda 1a6a71e
Bump to 2.9.0-dev
mbaluda 6022aa1
Merge branch 'main' into mbaluda/updateql2.9.4
mbaluda 1394c95
merge with main
mbaluda d3f3624
Update qlpack name in query suites
mbaluda 6549297
Merge fix
mbaluda 55ff603
Fix deprecated libraries
mbaluda e40d933
Revert "Fix deprecated libraries"
jketema 104a317
Modernize the `scripts/generate_modules/queries` qlpack
jketema 8398907
Fix path filter in verify standard library dependencies workflow
jketema 9cd9638
Install codeql packs in "Run analysis report tests" workflow
jketema c7c00f9
Merge branch 'main' into mbaluda/updateql2.9.4
mbaluda 9c20bfc
Update development_handbook.md
mbaluda 78acc97
Add properties to qlpack.yml files
mbaluda 74ff65d
Replace .codeqlmanifest.json with codeql-workspace.yml
mbaluda 70c4184
remove .codeqlmanifest.json
mbaluda 3cf49f1
Update codeql_unit_tests.yml
mbaluda f7572ed
Build codeql pack
mbaluda 871a52c
Update code-scanning-pack-gen.yml
mbaluda fae4944
Revert "remove .codeqlmanifest.json"
mbaluda febe990
Revert commit 74ff65d
mbaluda f1ccade
Update code-scanning-pack-gen.yml
mbaluda 25638c8
Revert "Update code-scanning-pack-gen.yml"
mbaluda 588efba
Add .codeqlmanifest.json back
mbaluda f235db6
Delete .codeqlmanifest.json
mbaluda 1a6d68e
Delete .codeqlmanifest.json
mbaluda 1c9a91e
Remove defaultSuite property
mbaluda f515ab5
Replace .codeqlmanifest.json with codeql-workspace.yml
mbaluda d3d4bd3
Revert "Replace .codeqlmanifest.json with codeql-workspace.yml"
mbaluda 995d6f5
Merge branch 'main' into mbaluda/updateql2.9.4
mbaluda 6467c68
Merge branch 'main' into mbaluda/updateql2.9.4
mbaluda 9fffa55
Merge branch 'main' into mbaluda/updateql2.9.4
jsinglet 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", "scripts/generate_modules/queries/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
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.2.3 | ||
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
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,8 @@ | ||
name: cert-c-coding-standards | ||
name: codeql/cert-c-coding-standards | ||
version: 2.14.0-dev | ||
description: CERT C 2016 | ||
suites: codeql-suites | ||
libraryPathDependencies: common-c-coding-standards | ||
license: MIT | ||
dependencies: | ||
rvermeulen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
codeql/common-c-coding-standards: '*' | ||
codeql/cpp-all: 0.2.3 |
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.2.3 | ||
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-tests | ||
name: codeql/cert-c-coding-standards-tests | ||
version: 2.14.0-dev | ||
libraryPathDependencies: cert-c-coding-standards | ||
extractor: cpp | ||
extractor: cpp | ||
mbaluda marked this conversation as resolved.
Show resolved
Hide resolved
|
||
license: MIT | ||
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.2.3 | ||
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,6 @@ | ||
name: common-c-coding-standards | ||
name: codeql/common-c-coding-standards | ||
version: 2.14.0-dev | ||
libraryPathDependencies: common-cpp-coding-standards | ||
license: MIT | ||
dependencies: | ||
codeql/common-cpp-coding-standards: '*' | ||
codeql/cpp-all: 0.2.3 | ||
mbaluda marked this conversation as resolved.
Show resolved
Hide resolved
|
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.2.3 | ||
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: common-c-coding-standards-tests | ||
name: codeql/common-c-coding-standards-tests | ||
version: 2.14.0-dev | ||
libraryPathDependencies: common-c-coding-standards | ||
extractor: cpp | ||
mbaluda marked this conversation as resolved.
Show resolved
Hide resolved
|
||
license: MIT | ||
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.2.3 | ||
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
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,8 @@ | ||
name: misra-c-coding-standards | ||
name: codeql/misra-c-coding-standards | ||
version: 2.14.0-dev | ||
description: MISRA C 2012 | ||
suites: codeql-suites | ||
libraryPathDependencies: common-c-coding-standards | ||
license: MIT | ||
dependencies: | ||
rvermeulen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
codeql/common-c-coding-standards: '*' | ||
codeql/cpp-all: 0.2.3 |
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.2.3 | ||
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-tests | ||
name: codeql/misra-c-coding-standards-tests | ||
version: 2.14.0-dev | ||
libraryPathDependencies: misra-c-coding-standards | ||
extractor: cpp | ||
extractor: cpp | ||
mbaluda marked this conversation as resolved.
Show resolved
Hide resolved
|
||
license: MIT | ||
dependencies: | ||
codeql/misra-c-coding-standards: '*' |
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.2.3 | ||
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
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
2 changes: 1 addition & 1 deletion
2
cpp/autosar/src/codeql-suites/autosar-single-translation-unit.qls
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
name: autosar-cpp-coding-standards | ||
name: codeql/autosar-cpp-coding-standards | ||
version: 2.14.0-dev | ||
description: AUTOSAR C++14 Guidelines 20-11 | ||
suites: codeql-suites | ||
libraryPathDependencies: common-cpp-coding-standards | ||
license: MIT | ||
dependencies: | ||
rvermeulen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
codeql/common-cpp-coding-standards: '*' | ||
codeql/cpp-all: 0.2.3 |
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.2.3 | ||
compiled: false | ||
lockVersion: 1.0.0 |
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.
Uh oh!
There was an error while loading. Please reload this page.