From 4b5923f685af129b02015a9ec9ffcae7316ca59d Mon Sep 17 00:00:00 2001 From: Nicolas Favre-Felix Date: Fri, 2 Apr 2021 19:14:17 -0700 Subject: [PATCH] Add CodeQL workflow * Configures code scanning for C * Adds built-in "security and quality" suite * Imports more CodeQL queries from GitHub repo --- .github/workflows/codeql.yml | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..a1d9113 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,39 @@ +name: CodeQL + +# trigger the workflow on push or pull requests for some paths +on: + push: + paths: + - 'src/**' + - '.github/**' + - 'Makefile' + pull_request: + paths: + - 'src/**' + - '.github/**' + - 'Makefile' + +jobs: + CodeQL-Build: + runs-on: ubuntu-latest # GitHub Runner + + steps: + - name: Check out repository + uses: actions/checkout@v2 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: cpp + queries: +security-and-quality + + - name: Install dependencies + run: | + sudo apt-get -y update + sudo apt-get -y --force-yes install make gcc libevent-dev libmsgpack-dev python3 + + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + - name: CodeQL Analysis + uses: github/codeql-action/analyze@v1