From 096ee5fbd8eba4d8e12ba001f6e66806033ee153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ignacio=20Rodr=C3=ADguez?= Date: Tue, 10 Nov 2020 22:05:39 +0700 Subject: [PATCH 1/8] Create codeql-analysis.yml SYNERGY-384 --- .github/workflows/codeql-analysis.yml | 68 +++++++++++++++++++++++++++ 1 file changed, 68 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 0000000000..0b71727379 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,68 @@ +# 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. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# ******** NOTE ******** + +name: "CodeQL" + +on: + push: + branches: [ master ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ master ] + schedule: + - cron: '28 21 * * 0' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + language: [ 'cpp' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] + # 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 + + # 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 c7f85a8baf831e01ddf144a12838c9d4d80e1edc Mon Sep 17 00:00:00 2001 From: Ignacio Rodriguez Date: Tue, 10 Nov 2020 22:12:13 +0700 Subject: [PATCH 2/8] changelog --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index 7406a44130..52c5ff7da2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,10 @@ +v1.13.x-?? =========== Bug fixes: - #6831 Incorporating Sonar's major Enhancements: +- #6836 Enabling Github Code Scanning v1.12.x-snapshot =========== From ebcf923845871023538ab0f0e0397d411a7e4405 Mon Sep 17 00:00:00 2001 From: Ignacio Rodriguez Date: Tue, 10 Nov 2020 22:23:37 +0700 Subject: [PATCH 3/8] adding required packages --- .github/workflows/codeql-analysis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 0b71727379..5a70dcfdbc 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -48,6 +48,10 @@ 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 + - run: | + apt-get update + apt-get install libxtst-dev libxext-dev + # 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 From 25a61c9a764d1ffd7c603f0f2d3579ba9c24d6e8 Mon Sep 17 00:00:00 2001 From: Ignacio Rodriguez Date: Tue, 10 Nov 2020 22:25:44 +0700 Subject: [PATCH 4/8] sudo --- .github/workflows/codeql-analysis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 5a70dcfdbc..39feb6b0d5 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -49,8 +49,7 @@ jobs: # queries: ./path/to/local/query, your-org/your-repo/queries@main - run: | - apt-get update - apt-get install libxtst-dev libxext-dev + sudo apt-get install libxtst-dev libxext-dev # 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) From a43041389e4c3d194386bc24d85050e4e698a234 Mon Sep 17 00:00:00 2001 From: Ignacio Rodriguez Date: Tue, 10 Nov 2020 22:28:10 +0700 Subject: [PATCH 5/8] adding qt --- .github/workflows/codeql-analysis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 39feb6b0d5..55bb0abe52 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -49,7 +49,8 @@ jobs: # queries: ./path/to/local/query, your-org/your-repo/queries@main - run: | - sudo apt-get install libxtst-dev libxext-dev + sudo apt-get update + sudo apt-get install libxtst-dev libxext-dev qt # 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) From abb15683399837b64634f7bc92a01fef12cb777a Mon Sep 17 00:00:00 2001 From: Ignacio Rodriguez Date: Tue, 10 Nov 2020 22:30:00 +0700 Subject: [PATCH 6/8] install command copied from our Dockerfile --- .github/workflows/codeql-analysis.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 55bb0abe52..1a419763ec 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -49,8 +49,21 @@ jobs: # queries: ./path/to/local/query, your-org/your-repo/queries@main - run: | - sudo apt-get update - sudo apt-get install libxtst-dev libxext-dev qt + export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get upgrade -y && apt-get install -y \ + git \ + cmake3 \ + qtbase5-dev \ + build-essential \ + libx11-dev \ + libxtst-dev \ + libgl1-mesa-dev \ + libssl-dev \ + libavahi-compat-libdnssd-dev \ + debhelper \ + devscripts \ + qttools5-dev \ + qttools5-dev-tools \ + && rm -rf /var/lib/apt/lists # 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) From 50a1172a4408543e0a45981ab0d93c76124eec28 Mon Sep 17 00:00:00 2001 From: Ignacio Rodriguez Date: Tue, 10 Nov 2020 22:32:57 +0700 Subject: [PATCH 7/8] with sudo --- .github/workflows/codeql-analysis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 1a419763ec..fbe40a18fc 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -49,7 +49,7 @@ jobs: # queries: ./path/to/local/query, your-org/your-repo/queries@main - run: | - export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get upgrade -y && apt-get install -y \ + sudo sh -c 'export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get upgrade -y && apt-get install -y \ git \ cmake3 \ qtbase5-dev \ @@ -63,7 +63,7 @@ jobs: devscripts \ qttools5-dev \ qttools5-dev-tools \ - && rm -rf /var/lib/apt/lists + && rm -rf /var/lib/apt/lists' # 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) From 94e04c634b4ff5ab46347191bfa82dc09c8ff0d5 Mon Sep 17 00:00:00 2001 From: Ignacio Rodriguez Date: Tue, 10 Nov 2020 22:41:32 +0700 Subject: [PATCH 8/8] cmake instead of cmake3 --- .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 fbe40a18fc..7ca21888c6 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -51,7 +51,7 @@ jobs: - run: | sudo sh -c 'export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get upgrade -y && apt-get install -y \ git \ - cmake3 \ + cmake \ qtbase5-dev \ build-essential \ libx11-dev \