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

try codeql #775

Merged
merged 1 commit into from
Nov 10, 2023
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
9 changes: 9 additions & 0 deletions .github/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# only for python/non-compiled languages

name: "CodeQL config"
paths:
- pyphare
- src
paths-ignore:
- subprojects/
- tests/
4 changes: 4 additions & 0 deletions .github/workflows/cmake_macos.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: CMake MacOS

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

on:
pull_request:
workflow_dispatch:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/cmake_ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: CMake Ubuntu

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

on:
pull_request:
workflow_dispatch:
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: "CodeQL"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: "42 19 * * 4"

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
container: ghcr.io/pharchive/phare_dep/ubuntu:22.04
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ python, cpp ]

steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive

- name: Configure (cpp)
if: ${{ matrix.language == 'cpp' }}
run: mkdir build; cd build; cmake ..

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
config-file: ./.github/codeql-config.yml
languages: ${{ matrix.language }}
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v2
if: ${{ matrix.language == 'python' }}

- name: Build cpp
if: ${{ matrix.language == 'cpp' }}
run: cd build; make

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{ matrix.language }}"
Loading