From 61c6867ca7ddb502c0b075628a6ee28d57d96b43 Mon Sep 17 00:00:00 2001 From: Alon Yeshurun <98805507+ayeshurun@users.noreply.github.com> Date: Mon, 10 Jun 2024 15:24:46 +0300 Subject: [PATCH 1/4] Create codeql.yml --- .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 00000000..98c06730 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,39 @@ +name: "CodeQL" + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + schedule: + - cron: '45 20 * * 2' + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + runs-on: 'ubuntu-latest' + timeout-minutes: 360 + permissions: + # required for all workflows + security-events: write + strategy: + fail-fast: false + matrix: + include: + - language: csharp + build-mode: autobuild + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{matrix.language}}" From 6ca8a11ca37182eb66c6f31dd2663c094c528731 Mon Sep 17 00:00:00 2001 From: Alon Yeshurun <98805507+ayeshurun@users.noreply.github.com> Date: Mon, 24 Jun 2024 18:02:09 +0300 Subject: [PATCH 2/4] Update codeql.yml --- .github/workflows/codeql.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 98c06730..3fc88cf4 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -21,7 +21,7 @@ jobs: matrix: include: - language: csharp - build-mode: autobuild + build-mode: manual steps: - name: Checkout repository uses: actions/checkout@v4 @@ -33,6 +33,16 @@ jobs: languages: ${{ matrix.language }} build-mode: ${{ matrix.build-mode }} + - name: Build + shell: bash + run: | + echo 'If you are using a "manual" build mode for one or more of the' \ + 'languages you are analyzing, replace this with the commands to build' \ + 'your code, for example:' + echo ' make bootstrap' + echo ' make release' + exit 1 + - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 with: From 2b9933966ad56cfe99c9555d456eb988827c0b49 Mon Sep 17 00:00:00 2001 From: Alon Yeshurun <98805507+ayeshurun@users.noreply.github.com> Date: Mon, 24 Jun 2024 22:00:04 +0300 Subject: [PATCH 3/4] Update codeql.yml --- .github/workflows/codeql.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 3fc88cf4..6ac77674 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -26,6 +26,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v3 @@ -34,15 +39,8 @@ jobs: build-mode: ${{ matrix.build-mode }} - name: Build - shell: bash - run: | - echo 'If you are using a "manual" build mode for one or more of the' \ - 'languages you are analyzing, replace this with the commands to build' \ - 'your code, for example:' - echo ' make bootstrap' - echo ' make release' - exit 1 - + run: scripts\build-sdk.cmd + - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 with: From 55aabfd6ca5a0db1c83404b0301222e68d80aea0 Mon Sep 17 00:00:00 2001 From: Alon Yeshurun <98805507+ayeshurun@users.noreply.github.com> Date: Mon, 24 Jun 2024 22:03:21 +0300 Subject: [PATCH 4/4] Update codeql.yml --- .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 6ac77674..7252e8cd 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -39,7 +39,7 @@ jobs: build-mode: ${{ matrix.build-mode }} - name: Build - run: scripts\build-sdk.cmd + run: scripts/build-sdk.cmd - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3