From 9c1f6fb05a52dcab33554552a9302c7157bc68e1 Mon Sep 17 00:00:00 2001 From: Markus Gans Date: Fri, 2 Oct 2020 01:23:26 +0200 Subject: [PATCH 1/6] Create codeql-analysis.yml --- .github/workflows/codeql-analysis.yml | 71 +++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 00000000..4c79fbdd --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,71 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +name: "CodeQL" + +on: + push: + branches: [master] + pull_request: + # The branches below must be a subset of the branches above + branches: [master] + schedule: + - cron: '0 7 * * 2' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + # Override automatic language detection by changing the below list + # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] + language: ['cpp'] + # Learn more... + # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + # We must fetch at least the immediate parents so that if this is + # a pull request then we can checkout the head. + fetch-depth: 2 + + # If this run was triggered by a pull request event, then checkout + # the head of the pull request instead of the merge commit. + - run: git checkout HEAD^2 + if: ${{ github.event_name == 'pull_request' }} + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + # ℹī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 From b428db3d9c438ba8e62739cab3bee9bf9537d2c6 Mon Sep 17 00:00:00 2001 From: Markus Gans Date: Fri, 2 Oct 2020 01:31:49 +0200 Subject: [PATCH 2/6] Update codeql-analysis.yml --- .github/workflows/codeql-analysis.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 4c79fbdd..81f76659 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -51,11 +51,6 @@ jobs: # Prefix the list here with "+" to use these queries and those in the config file. # queries: ./path/to/local/query, your-org/your-repo/queries@main - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v1 - # ℹī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -63,9 +58,10 @@ jobs: # and modify them (or add more) to build your code if your project # uses a compiled language - #- run: | - # make bootstrap - # make release + - run: | + autoreconf -v --install --force + ./configure --prefix=/usr CPPFLAGS="-DDEBUG" CXXFLAGS="-g -O0 -DDEBUG -W -Wall -pedantic" + make V=1 -j10 - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v1 From 31eb81d61250783d7dd3416012ca4846a526b22d Mon Sep 17 00:00:00 2001 From: Markus Gans Date: Fri, 2 Oct 2020 01:51:52 +0200 Subject: [PATCH 3/6] Update codeql-analysis.yml --- .github/workflows/codeql-analysis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 81f76659..ad83a4f9 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -59,6 +59,8 @@ jobs: # uses a compiled language - run: | + apt-get update + apt-get install autoconf-archive autoreconf -v --install --force ./configure --prefix=/usr CPPFLAGS="-DDEBUG" CXXFLAGS="-g -O0 -DDEBUG -W -Wall -pedantic" make V=1 -j10 From 021cd12d583211c79101c39a54a3ff9aade1ad39 Mon Sep 17 00:00:00 2001 From: Markus Gans Date: Fri, 2 Oct 2020 02:04:20 +0200 Subject: [PATCH 4/6] Update codeql-analysis.yml --- .github/workflows/codeql-analysis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index ad83a4f9..496581e5 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -59,7 +59,6 @@ jobs: # uses a compiled language - run: | - apt-get update apt-get install autoconf-archive autoreconf -v --install --force ./configure --prefix=/usr CPPFLAGS="-DDEBUG" CXXFLAGS="-g -O0 -DDEBUG -W -Wall -pedantic" From dcc66b14dbd1c1667b106e9c5169bcd2b670074e Mon Sep 17 00:00:00 2001 From: Markus Gans Date: Fri, 2 Oct 2020 02:23:00 +0200 Subject: [PATCH 5/6] Update codeql-analysis.yml --- .github/workflows/codeql-analysis.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 496581e5..72fd0efd 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -58,11 +58,17 @@ jobs: # and modify them (or add more) to build your code if your project # uses a compiled language - - run: | - apt-get install autoconf-archive - autoreconf -v --install --force - ./configure --prefix=/usr CPPFLAGS="-DDEBUG" CXXFLAGS="-g -O0 -DDEBUG -W -Wall -pedantic" - make V=1 -j10 + - name: Build dependencies + run: apt-get install autoconf-archive + + - name: Create configure file + run: autoreconf -v --install --force + + - name: Create makefiles + run: ./configure --prefix=/usr CPPFLAGS="-DDEBUG" CXXFLAGS="-g -O0 -DDEBUG -W -Wall -pedantic" + + - name: Build + run: make V=1 -j10 - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v1 From 61434b4d16b73feae5f84ff2892b97c657fe2b6d Mon Sep 17 00:00:00 2001 From: Markus Gans Date: Fri, 2 Oct 2020 02:26:42 +0200 Subject: [PATCH 6/6] Update codeql-analysis.yml --- .github/workflows/codeql-analysis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 72fd0efd..4b08a42d 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -59,7 +59,7 @@ jobs: # uses a compiled language - name: Build dependencies - run: apt-get install autoconf-archive + run: sudo apt-get install autoconf-archive - name: Create configure file run: autoreconf -v --install --force