-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to Github Actions Code Scanner (#1739)
* Added CodeQL security scan * typo fix * Fix codeql error alert
- Loading branch information
Showing
4 changed files
with
71 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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,19 @@ | ||
name: "CodeQL security and quality" | ||
|
||
queries: | ||
- uses: security-and-quality | ||
|
||
query-filters: | ||
- include: | ||
id: cpp/incorrect-not-operator-usage | ||
- include: | ||
tags contain: correctness | ||
- include: | ||
tags contain: reliability | ||
|
||
paths-ignore: | ||
- docs/ | ||
- cmake/docs/ | ||
- cmake/test/ | ||
- Autocoders/Python/src/fprime_ac/utils/DiffAndRename.py | ||
- Autocoders/Python/src/fprime_ac/utils/pyparsing.py |
This file contains 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 |
---|---|---|
|
@@ -193,6 +193,7 @@ cntx | |
cobj | ||
CODEFILE | ||
codegen | ||
codeql | ||
colno | ||
COLORSTYLE | ||
colorwheel | ||
|
This file contains 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,50 @@ | ||
# Semantic code analysis with CodeQL | ||
# see https://github.com/github/codeql-action | ||
|
||
name: "CodeQL Security Scan" | ||
|
||
on: | ||
push: | ||
branches: [ master, devel ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ master, devel ] | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'cpp', 'python' ] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
config-file: ./.github/actions/codeql/security-pack.yml | ||
|
||
- if: ${{ matrix.language == 'cpp' }} | ||
name: Build | ||
run: | | ||
python3 -m venv ./fprime-venv | ||
. ./fprime-venv/bin/activate | ||
pip install -U setuptools setuptools_scm wheel pip | ||
pip install -r ./requirements.txt | ||
fprime-util generate | ||
fprime-util build --all | ||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 | ||
with: | ||
category: "/language:${{matrix.language}}" |
This file contains 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