From 44e37fd7de59652bf5ca813013bacc9a9ebe9507 Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Sun, 5 Feb 2023 00:50:29 +0100 Subject: [PATCH] Add CodeQL analysis --- .github/workflows/build.yml | 2 +- .github/workflows/codeql-analysis.yml | 41 +++++++++++++++++++++++++++ README.md | 1 + 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1c53206..ca62e6d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v3 - - name: ./autogen + - name: ./autogen.sh run: ./autogen.sh - name: Compiler version run: $CC -v diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..2516692 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,41 @@ +name: CodeQL analysis + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + schedule: + # build the main branch every Monday morning + - cron: '46 9 * * 1' + workflow_dispatch: + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + strategy: + fail-fast: false + matrix: + language: [ 'cpp' ] + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + - name: Build Application using script + run: | + ./autogen.sh + sudo apt-get install autoconf libtls-dev libpcap-dev libnet1-dev libjson-c-dev + ./configure + make + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{matrix.language}}" diff --git a/README.md b/README.md index b143770..6384207 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # ssldump - (de-facto repository gathering patches around the cyberspace) [![Build CI](https://github.com/adulau/ssldump/actions/workflows/build.yml/badge.svg)](https://github.com/adulau/ssldump/actions/workflows/build.yml) +[![CodeQL analysis](https://github.com/adulau/ssldump/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/adulau/ssldump/actions/workflows/codeql-analysis.yml) # Release and tagging