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

Fix #372, Add CodeQL Query Suites #373

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 2 additions & 14 deletions .github/codeql/codeql-coding-standard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,5 @@ name: "CodeQL Coding Standard Configuration File"
disable-default-queries: true

queries:
- name: JPL Rules
uses: github/codeql/cpp/ql/src/JPL_C@main
- name: MISRA Rule 9-5-1
uses: github/codeql/cpp/ql/src/jsf/4.20 Unions and Bit Fields/AV Rule 153.ql@main
- name: MISRA Rule 5-18-1
uses: github/codeql/cpp/ql/src/jsf/4.21 Operators/AV Rule 168.ql@main
- name: MISRA 6-2-2
uses: github/codeql/cpp/ql/src/jsf/4.25 Expressions/AV Rule 202.ql@main
- name: MISRA Rule 5-14-1
uses: github/codeql/cpp/ql/src/jsf/4.21 Operators/AV Rule 165.ql@main
- name: MISRA Rule 5-3-2
uses: github/codeql/cpp/ql/src/jsf/4.21 Operators/AV Rule 165.ql@main
- name: MISRA Rule 7-5-2
uses: github/codeql/cpp/ql/src/jsf/4.22 Pointers and References/AV Rule 173.ql@main
- name: JPL and MISRA
uses: ./.github/codeql/jpl-misra.qls
21 changes: 21 additions & 0 deletions .github/codeql/jpl-misra.qls
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Start with all the queries in the codeql/cpp-queries pack.
- queries: .
from: codeql/cpp-queries
# Restrict to only the queries with the following ID patterns.
- include:
id:
# Regular expression matching all query IDs that start with `cpp/jpl-c/`
# This covers all queries in the `JPL_C` directory,
# but matching on query ID is more stable.
- /cpp/jpl-c/*/
# Specific JSF queries, identified by query ID.
# MISRA Rule 9-5-1
- cpp/jsf/av-rule-153
# MISRA Rule 5-18-1
- cpp/jsf/av-rule-168
# MISRA 6-2-2
- cpp/jsf/av-rule-202
# MISRA Rule 5-14-1
- cpp/jsf/av-rule-165
# MISRA Rule 5-3-2
- cpp/jsf/av-rule-173
8 changes: 0 additions & 8 deletions .github/workflows/codeql-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,6 @@ jobs:
git log -1 --pretty=oneline
git submodule

- name: Checkout codeql code
if: ${{ !steps.skip-workflow.outputs.skip }}
uses: actions/checkout@v2
with:
repository: github/codeql
submodules: true
path: codeql

- name: Initialize CodeQL
if: ${{ !steps.skip-workflow.outputs.skip }}
uses: github/codeql-action/init@v1
Expand Down