From dcc15da2606f7a5472990098b5659fdc26fbb5e6 Mon Sep 17 00:00:00 2001 From: KircMax Date: Sat, 2 Dec 2023 12:29:38 +0100 Subject: [PATCH 01/20] Create codeql.yml --- .github/workflows/codeql.yml | 82 ++++++++++++++++++++++++++++++++++++ 1 file changed, 82 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..25871bf --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,82 @@ +# 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. +# +name: "CodeQL" + +on: + push: + branches: [ "main", "OnlyPRToGetOnMainBranch" ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ "main" ] + schedule: + - cron: '40 7 * * 4' + +jobs: + analyze: + name: Analyze + # Runner size impacts CodeQL analysis time. To learn more, please see: + # - https://gh.io/recommended-hardware-resources-for-running-codeql + # - https://gh.io/supported-runners-and-hardware-resources + # - https://gh.io/using-larger-runners + # Consider using larger runners for possible analysis time improvements. + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} + timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'csharp' ] + # CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ] + # Use only 'java-kotlin' to analyze code written in Java, Kotlin or both + # Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + 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. + + # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + + # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + + # If the Autobuild fails above, remove it and uncomment the following three lines. + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. + + # - run: | + # echo "Run, Build Application using script" + # ./location_of_script_within_repo/buildscript.sh + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{matrix.language}}" From 80d0983135274df4a9edc40ee9414a7fda01be8a Mon Sep 17 00:00:00 2001 From: Max Kirchberger Date: Sat, 2 Dec 2023 12:41:34 +0100 Subject: [PATCH 02/20] just check if itd run when only targeting .net 6 and 7 --- src/Webserver.API/Webserver.API.csproj | 2 +- tests/Webserver.API.UnitTests/Webserver.Api.UnitTests.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Webserver.API/Webserver.API.csproj b/src/Webserver.API/Webserver.API.csproj index 1494cd8..910afdf 100644 --- a/src/Webserver.API/Webserver.API.csproj +++ b/src/Webserver.API/Webserver.API.csproj @@ -1,7 +1,7 @@  - net48;netstandard2.0;net6.0;net7.0 + net6.0;net7.0 Siemens.Simatic.S7.Webserver.API Siemens.Simatic.S7.Webserver.API x64;AnyCPU;x86 diff --git a/tests/Webserver.API.UnitTests/Webserver.Api.UnitTests.csproj b/tests/Webserver.API.UnitTests/Webserver.Api.UnitTests.csproj index e885974..9b27c4b 100644 --- a/tests/Webserver.API.UnitTests/Webserver.Api.UnitTests.csproj +++ b/tests/Webserver.API.UnitTests/Webserver.Api.UnitTests.csproj @@ -5,7 +5,7 @@ - net48;net6.0;net7.0 + net6.0;net7.0 false Webserver.API.UnitTests Webserver.API.UnitTests From 7587a2bbeffcd6ee769d54d5dd5f47ba4821c378 Mon Sep 17 00:00:00 2001 From: Max Kirchberger Date: Sat, 2 Dec 2023 12:43:37 +0100 Subject: [PATCH 03/20] remove gitversioning --- src/Webserver.API/Webserver.API.csproj | 5 +---- tests/Webserver.API.UnitTests/Webserver.Api.UnitTests.csproj | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Webserver.API/Webserver.API.csproj b/src/Webserver.API/Webserver.API.csproj index 910afdf..b5ab52b 100644 --- a/src/Webserver.API/Webserver.API.csproj +++ b/src/Webserver.API/Webserver.API.csproj @@ -1,7 +1,7 @@  - net6.0;net7.0 + net48;netstandard2.0;net6.0;net7.0 Siemens.Simatic.S7.Webserver.API Siemens.Simatic.S7.Webserver.API x64;AnyCPU;x86 @@ -32,8 +32,5 @@ - - - \ No newline at end of file diff --git a/tests/Webserver.API.UnitTests/Webserver.Api.UnitTests.csproj b/tests/Webserver.API.UnitTests/Webserver.Api.UnitTests.csproj index 9b27c4b..e885974 100644 --- a/tests/Webserver.API.UnitTests/Webserver.Api.UnitTests.csproj +++ b/tests/Webserver.API.UnitTests/Webserver.Api.UnitTests.csproj @@ -5,7 +5,7 @@ - net6.0;net7.0 + net48;net6.0;net7.0 false Webserver.API.UnitTests Webserver.API.UnitTests From bb7c9e203db0be8adb8a4ff4e9a30fa8e5ed42a6 Mon Sep 17 00:00:00 2001 From: Max Kirchberger Date: Sat, 2 Dec 2023 12:45:23 +0100 Subject: [PATCH 04/20] reinclude gitversioning --- src/Webserver.API/Webserver.API.csproj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Webserver.API/Webserver.API.csproj b/src/Webserver.API/Webserver.API.csproj index b5ab52b..1494cd8 100644 --- a/src/Webserver.API/Webserver.API.csproj +++ b/src/Webserver.API/Webserver.API.csproj @@ -32,5 +32,8 @@ + + + \ No newline at end of file From a0ce838260c5fc9250be2dae5cfcda1f2f8690c9 Mon Sep 17 00:00:00 2001 From: Max Kirchberger Date: Sat, 2 Dec 2023 12:48:16 +0100 Subject: [PATCH 05/20] adjust cdeql yml --- .github/workflows/codeql.yml | 37 +++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 25871bf..6d36b1a 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -72,9 +72,40 @@ jobs: # If the Autobuild fails above, remove it and uncomment the following three lines. # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. - # - run: | - # echo "Run, Build Application using script" - # ./location_of_script_within_repo/buildscript.sh + - name: Build + strategy: + fail-fast: false + matrix: + os: [windows-latest] #to consider later , ubuntu-latest, macos-latest + runs-on: ${{ matrix.os }} + steps: + - name: Checkout sources + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Setup .NET Core 2.1 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: "2.1.x" + - name: Setup .NET Core 3.1 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: "3.1.x" + - name: Setup .NET 6.0 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: "6.0.x" + - name: Setup .NET 7.0 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: "7.0.x" + - name: Setup .NET + uses: actions/setup-dotnet@v1 + - name: Run tests + run: dotnet build + #- run: | + #echo "Run, Build Application using script" + #./location_of_script_within_repo/buildscript.sh - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 From 1ca1963ddfa3434309fffb9f04dddffe590beed2 Mon Sep 17 00:00:00 2001 From: Max Kirchberger Date: Sat, 2 Dec 2023 12:50:24 +0100 Subject: [PATCH 06/20] comment out autobuild --- .github/workflows/codeql.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 6d36b1a..1eaea3d 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -63,8 +63,8 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v2 + #- name: Autobuild + #uses: github/codeql-action/autobuild@v2 # ℹ️ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun From d5421ea219c5cb771c39809d09459a4fe12e66a5 Mon Sep 17 00:00:00 2001 From: Max Kirchberger Date: Sat, 2 Dec 2023 13:05:45 +0100 Subject: [PATCH 07/20] adjust codeql script --- .github/workflows/codeql.yml | 69 ++++++++++++++++++------------------ scripts/buildscript.sh | 1 + 2 files changed, 36 insertions(+), 34 deletions(-) create mode 100644 scripts/buildscript.sh diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 1eaea3d..bd4400d 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -72,40 +72,41 @@ jobs: # If the Autobuild fails above, remove it and uncomment the following three lines. # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. - - name: Build - strategy: - fail-fast: false - matrix: - os: [windows-latest] #to consider later , ubuntu-latest, macos-latest - runs-on: ${{ matrix.os }} - steps: - - name: Checkout sources - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Setup .NET Core 2.1 - uses: actions/setup-dotnet@v1 - with: - dotnet-version: "2.1.x" - - name: Setup .NET Core 3.1 - uses: actions/setup-dotnet@v1 - with: - dotnet-version: "3.1.x" - - name: Setup .NET 6.0 - uses: actions/setup-dotnet@v1 - with: - dotnet-version: "6.0.x" - - name: Setup .NET 7.0 - uses: actions/setup-dotnet@v1 - with: - dotnet-version: "7.0.x" - - name: Setup .NET - uses: actions/setup-dotnet@v1 - - name: Run tests - run: dotnet build - #- run: | - #echo "Run, Build Application using script" - #./location_of_script_within_repo/buildscript.sh +# - name: Build +# strategy: +# fail-fast: false +# matrix: +# os: [windows-latest] #to consider later , ubuntu-latest, macos-latest +# runs-on: ${{ matrix.os }} +# steps: +# - name: Checkout sources +# uses: actions/checkout@v2 +# with: +# fetch-depth: 0 +# - name: Setup .NET Core 2.1 +# uses: actions/setup-dotnet@v1 +# with: +# dotnet-version: "2.1.x" +# - name: Setup .NET Core 3.1 +# uses: actions/setup-dotnet@v1 +# with: +# dotnet-version: "3.1.x" +# - name: Setup .NET 6.0 +# uses: actions/setup-dotnet@v1 +# with: +# dotnet-version: "6.0.x" +# - name: Setup .NET 7.0 +# uses: actions/setup-dotnet@v1 +# with: +# dotnet-version: "7.0.x" +# - name: Setup .NET +# uses: actions/setup-dotnet@v1 +# - name: Run tests +# run: dotnet build + + - run: | + echo "Run, Build Application using script" + ./././scripts/buildscript.sh - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 diff --git a/scripts/buildscript.sh b/scripts/buildscript.sh new file mode 100644 index 0000000..5d22d8a --- /dev/null +++ b/scripts/buildscript.sh @@ -0,0 +1 @@ +dotnet build ./src/Webserver.API.csproj \ No newline at end of file From b84ac634a8c8354c654139154a9c43fb0070cf70 Mon Sep 17 00:00:00 2001 From: Max Kirchberger Date: Sat, 2 Dec 2023 13:11:53 +0100 Subject: [PATCH 08/20] adjust buildscript --- scripts/buildscript.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/buildscript.sh b/scripts/buildscript.sh index 5d22d8a..0511e62 100644 --- a/scripts/buildscript.sh +++ b/scripts/buildscript.sh @@ -1 +1 @@ -dotnet build ./src/Webserver.API.csproj \ No newline at end of file +dotnet build ../src/Webserver.API/Webserver.API.csproj \ No newline at end of file From 9f4da38f9b9f5ee71bb0da795d11e13058050e2f Mon Sep 17 00:00:00 2001 From: Max Kirchberger Date: Sat, 2 Dec 2023 13:14:21 +0100 Subject: [PATCH 09/20] try ps1 --- .github/workflows/codeql.yml | 2 +- scripts/buildscript.ps1 | 3 +++ scripts/buildscript.sh | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 scripts/buildscript.ps1 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index bd4400d..5468cf1 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -106,7 +106,7 @@ jobs: - run: | echo "Run, Build Application using script" - ./././scripts/buildscript.sh + ./././scripts/buildscript.ps1 - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 diff --git a/scripts/buildscript.ps1 b/scripts/buildscript.ps1 new file mode 100644 index 0000000..c611842 --- /dev/null +++ b/scripts/buildscript.ps1 @@ -0,0 +1,3 @@ +$currentFolder = (Get-Location).Path +echo $currentFolder +dotnet build ../src/Webserver.API/Webserver.API.csproj \ No newline at end of file diff --git a/scripts/buildscript.sh b/scripts/buildscript.sh index 0511e62..c611842 100644 --- a/scripts/buildscript.sh +++ b/scripts/buildscript.sh @@ -1 +1,3 @@ +$currentFolder = (Get-Location).Path +echo $currentFolder dotnet build ../src/Webserver.API/Webserver.API.csproj \ No newline at end of file From 6be3121a6ababba7dc0b588899a8cf6005f3e0a6 Mon Sep 17 00:00:00 2001 From: Max Kirchberger Date: Sat, 2 Dec 2023 13:16:09 +0100 Subject: [PATCH 10/20] use invocation --- scripts/buildscript.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/buildscript.ps1 b/scripts/buildscript.ps1 index c611842..d5c9fe5 100644 --- a/scripts/buildscript.ps1 +++ b/scripts/buildscript.ps1 @@ -1,3 +1,4 @@ -$currentFolder = (Get-Location).Path +$currentFolder = $MyInvocation.MyCommand.Path | Split-Path -Parent; +#$currentFolder = (Get-Location).Path echo $currentFolder dotnet build ../src/Webserver.API/Webserver.API.csproj \ No newline at end of file From b5ed6397ab684757764c69e7bf1837a110ba3526 Mon Sep 17 00:00:00 2001 From: Max Kirchberger Date: Sat, 2 Dec 2023 13:18:11 +0100 Subject: [PATCH 11/20] try doubleslash ... --- scripts/buildscript.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/buildscript.ps1 b/scripts/buildscript.ps1 index d5c9fe5..321810a 100644 --- a/scripts/buildscript.ps1 +++ b/scripts/buildscript.ps1 @@ -1,4 +1,4 @@ -$currentFolder = $MyInvocation.MyCommand.Path | Split-Path -Parent; +#$currentFolder = $MyInvocation.MyCommand.Path | Split-Path -Parent; #$currentFolder = (Get-Location).Path -echo $currentFolder -dotnet build ../src/Webserver.API/Webserver.API.csproj \ No newline at end of file +#echo $currentFolder +dotnet build ../../src/Webserver.API/Webserver.API.csproj \ No newline at end of file From 0fe6029dbcdb1e9557f67c0bf0baea953230a53a Mon Sep 17 00:00:00 2001 From: Max Kirchberger Date: Sat, 2 Dec 2023 13:19:55 +0100 Subject: [PATCH 12/20] use shell... --- .github/workflows/codeql.yml | 2 +- scripts/buildscript.ps1 | 2 +- scripts/buildscript.sh | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 5468cf1..bd4400d 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -106,7 +106,7 @@ jobs: - run: | echo "Run, Build Application using script" - ./././scripts/buildscript.ps1 + ./././scripts/buildscript.sh - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 diff --git a/scripts/buildscript.ps1 b/scripts/buildscript.ps1 index 321810a..4257ee4 100644 --- a/scripts/buildscript.ps1 +++ b/scripts/buildscript.ps1 @@ -1,4 +1,4 @@ #$currentFolder = $MyInvocation.MyCommand.Path | Split-Path -Parent; #$currentFolder = (Get-Location).Path #echo $currentFolder -dotnet build ../../src/Webserver.API/Webserver.API.csproj \ No newline at end of file +dotnet build ../src/Webserver.API/Webserver.API.csproj \ No newline at end of file diff --git a/scripts/buildscript.sh b/scripts/buildscript.sh index c611842..0511e62 100644 --- a/scripts/buildscript.sh +++ b/scripts/buildscript.sh @@ -1,3 +1 @@ -$currentFolder = (Get-Location).Path -echo $currentFolder dotnet build ../src/Webserver.API/Webserver.API.csproj \ No newline at end of file From 3c2843fafc967dbba1334ec4f4f75f1d19b69654 Mon Sep 17 00:00:00 2001 From: Max Kirchberger Date: Mon, 18 Dec 2023 21:02:22 +0100 Subject: [PATCH 13/20] update codeql yml --- .github/workflows/codeql.yml | 113 ++++++++++------------------------- 1 file changed, 30 insertions(+), 83 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index bd4400d..0e24f95 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,52 +1,38 @@ -# 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. -# +# A CodeQL query for the UA .NET Standard project name: "CodeQL" on: push: - branches: [ "main", "OnlyPRToGetOnMainBranch" ] + branches: [ master, main, release/* ] pull_request: # The branches below must be a subset of the branches above - branches: [ "main" ] + branches: [ master, main ] + paths: + - '**.cs' schedule: - - cron: '40 7 * * 4' + - cron: '30 6 * * 6' + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true jobs: analyze: name: Analyze - # Runner size impacts CodeQL analysis time. To learn more, please see: - # - https://gh.io/recommended-hardware-resources-for-running-codeql - # - https://gh.io/supported-runners-and-hardware-resources - # - https://gh.io/using-larger-runners - # Consider using larger runners for possible analysis time improvements. - runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} - timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} - permissions: - actions: read - contents: read - security-events: write + runs-on: windows-2022 strategy: fail-fast: false matrix: language: [ 'csharp' ] - # CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ] - # Use only 'java-kotlin' to analyze code written in Java, Kotlin or both - # Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both - # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] + # Learn more: + # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL @@ -56,59 +42,20 @@ jobs: # 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 + + - name: Set up .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '8.x' - # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - # queries: security-extended,security-and-quality - - - # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). - # If this step fails, then you should remove it and run the build manually (see below) - #- name: Autobuild - #uses: github/codeql-action/autobuild@v2 - - # ℹ️ Command-line programs to run using the OS shell. - # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - - # If the Autobuild fails above, remove it and uncomment the following three lines. - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. - -# - name: Build -# strategy: -# fail-fast: false -# matrix: -# os: [windows-latest] #to consider later , ubuntu-latest, macos-latest -# runs-on: ${{ matrix.os }} -# steps: -# - name: Checkout sources -# uses: actions/checkout@v2 -# with: -# fetch-depth: 0 -# - name: Setup .NET Core 2.1 -# uses: actions/setup-dotnet@v1 -# with: -# dotnet-version: "2.1.x" -# - name: Setup .NET Core 3.1 -# uses: actions/setup-dotnet@v1 -# with: -# dotnet-version: "3.1.x" -# - name: Setup .NET 6.0 -# uses: actions/setup-dotnet@v1 -# with: -# dotnet-version: "6.0.x" -# - name: Setup .NET 7.0 -# uses: actions/setup-dotnet@v1 -# with: -# dotnet-version: "7.0.x" -# - name: Setup .NET -# uses: actions/setup-dotnet@v1 -# - name: Run tests -# run: dotnet build - - - run: | - echo "Run, Build Application using script" - ./././scripts/buildscript.sh + # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild + - name: Setup MSBuild.exe + uses: microsoft/setup-msbuild@v1.3.1 + + - name: Build Solution + run: | + msbuild.exe "WeserverAPI.sln" /p:configuration="Release" /p:UseSharedCompilation=false - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 - with: - category: "/language:${{matrix.language}}" + uses: github/codeql-action/analyze@v2 \ No newline at end of file From f0d7eb23284a6cb061d5b9fbab1f2fbd76f79b52 Mon Sep 17 00:00:00 2001 From: Max Kirchberger Date: Mon, 18 Dec 2023 21:05:16 +0100 Subject: [PATCH 14/20] add branch onlypr --- .github/workflows/codeql.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 0e24f95..cc422aa 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -3,7 +3,7 @@ name: "CodeQL" on: push: - branches: [ master, main, release/* ] + branches: [ master, main, release/*, "OnlyPRToGetOnMainBranch" ] pull_request: # The branches below must be a subset of the branches above branches: [ master, main ] From 1f3aef8375ba997affc5e42c82a34aef1f0f05a3 Mon Sep 17 00:00:00 2001 From: Max Kirchberger Date: Mon, 18 Dec 2023 21:18:22 +0100 Subject: [PATCH 15/20] adjust cron --- .github/workflows/codeql.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index cc422aa..17c30ef 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -10,7 +10,7 @@ on: paths: - '**.cs' schedule: - - cron: '30 6 * * 6' + - cron: '40 7 * * 4' workflow_dispatch: concurrency: From d79478296fd65856502dfdb7b9906fab3e4922ed Mon Sep 17 00:00:00 2001 From: Max Kirchberger Date: Mon, 18 Dec 2023 21:22:01 +0100 Subject: [PATCH 16/20] comment --- .github/workflows/codeql.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 17c30ef..c74d84d 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,4 +1,4 @@ -# A CodeQL query for the UA .NET Standard project +# A CodeQL query for the S7-1500 WebserverApi Client library project name: "CodeQL" on: From 58d9de37ec707ae20add51f7e23ae60dfe61248d Mon Sep 17 00:00:00 2001 From: Max Kirchberger Date: Wed, 23 Oct 2024 20:58:47 +0200 Subject: [PATCH 17/20] adjust codeql workflow --- .github/workflows/codeql.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index c74d84d..f419179 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -3,7 +3,7 @@ name: "CodeQL" on: push: - branches: [ master, main, release/*, "OnlyPRToGetOnMainBranch" ] + branches: [ master, main, release/*, "KircMax/AddCodeQl" ] pull_request: # The branches below must be a subset of the branches above branches: [ master, main ] @@ -36,7 +36,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -51,11 +51,15 @@ jobs: # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild - name: Setup MSBuild.exe - uses: microsoft/setup-msbuild@v1.3.1 + uses: microsoft/setup-msbuild@v2.0.0 + + - name: Restore Packages + run: | + nuget restore "WebserverApi.sln" - name: Build Solution run: | - msbuild.exe "WeserverAPI.sln" /p:configuration="Release" /p:UseSharedCompilation=false + msbuild.exe "WebserverAPI.sln" /p:configuration="Release" /p:UseSharedCompilation=false - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 \ No newline at end of file + uses: github/codeql-action/analyze@v3 \ No newline at end of file From 1d6e7e19a5bde632985de42d5ac7b4b2efa9629d Mon Sep 17 00:00:00 2001 From: Max Kirchberger Date: Thu, 24 Oct 2024 08:38:40 +0200 Subject: [PATCH 18/20] add fetch depth 0 --- .github/workflows/codeql.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index f419179..95cfd84 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -33,6 +33,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + with: + fetch-depth: 0 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL From e1bf67bac6d19c7c85285bd8036869c3878dc12f Mon Sep 17 00:00:00 2001 From: Max Kirchberger Date: Thu, 24 Oct 2024 12:40:24 +0200 Subject: [PATCH 19/20] remove empty line --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 50ad0a6..4894ba3 100644 --- a/README.md +++ b/README.md @@ -285,4 +285,4 @@ See Also: ## SIMATIC S7-1200: - SIMATIC S7-1200: https://new.siemens.com/global/en/products/automation/systems/industrial/plc/s7-1200.html - SIMATIC S7-1200 Manual: https://support.industry.siemens.com/cs/ch/en/view/109797241 -- SIMATIC S7-1200 Manual: https://support.industry.siemens.com/cs/us/en/view/91696622/45063671307 +- SIMATIC S7-1200 Manual: https://support.industry.siemens.com/cs/us/en/view/91696622/45063671307 \ No newline at end of file From 1717909983dadf3228c745539ecdfe2cb88a8b1c Mon Sep 17 00:00:00 2001 From: Max Kirchberger Date: Thu, 24 Oct 2024 13:23:00 +0200 Subject: [PATCH 20/20] remove pr --- .github/workflows/codeql.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 95cfd84..8cb1bbf 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -3,7 +3,7 @@ name: "CodeQL" on: push: - branches: [ master, main, release/*, "KircMax/AddCodeQl" ] + branches: [ master, main, release/* ] pull_request: # The branches below must be a subset of the branches above branches: [ master, main ]