Fix: GitHub SecurityAlerts 198,199, 200, 201, 202 #1477
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 Security Scan" | |
| on: | |
| push: | |
| branches: [ master, Features/Linux-Migration, Releases/*, Releases/*/*] | |
| pull_request: | |
| branches: [ master ] | |
| schedule: | |
| - cron: '0 0 * * 0' | |
| jobs: | |
| analyze: | |
| name: CodeQL - ${{ matrix.language }} - ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| actions: read | |
| contents: read | |
| security-events: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| language: [ 'csharp', 'javascript' ] | |
| os: [ubuntu-latest, windows-latest] | |
| # ------------------------------------------------------------------------------------------------------ | |
| # Checkout Ginger Repository | |
| # ------------------------------------------------------------------------------------------------------ | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| # ------------------------------------------------------------------------------------------------------ | |
| # Initialize CodeQL | |
| # ------------------------------------------------------------------------------------------------------ | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@v3 | |
| with: | |
| languages: ${{ matrix.language }} | |
| config-file: ./.github/workflows/codeql-config.yml | |
| # ------------------------------------------------------------------------------------------------------ | |
| # Install .Net core SDK 8.0.100 | |
| # ------------------------------------------------------------------------------------------------------ | |
| - name: Install .NET 8 | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: '8.0.100' | |
| # ------------------------------------------------------------------------------------------------------ | |
| # Install Mono - for Ubuntu & macOS as pre-requisite for building Ginger | |
| # ------------------------------------------------------------------------------------------------------ | |
| - name: Install Mono - Linux | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y mono-complete | |
| - name: 'Install Mono - macOS' | |
| if: runner.os == 'macOS' | |
| run: brew install mono | |
| # ------------------------------------------------------------------------------------------------------ | |
| # Build && Publish Ginger Solution | |
| # ------------------------------------------------------------------------------------------------------ | |
| - name: Setup Nuget | |
| uses: Nuget/setup-nuget@v1.0.5 | |
| - name: Restore Nuget Packages | |
| run: nuget restore ./Ginger/Ginger.sln | |
| - name: Add msbuild to PATH | |
| if: runner.os == 'windows' | |
| uses: microsoft/setup-msbuild@v1.0.2 | |
| - name: Build Windows Ginger Solution | |
| if: runner.os == 'windows' | |
| run: msbuild ./Ginger/Ginger.sln /p:DebugSymbols=true /p:DebugType=full /p:Configuration=Release | |
| - name: Publish GingerRuntime - Linux | |
| if: runner.os == 'Linux' | |
| run: dotnet publish ./Ginger/GingerRuntime/GingerRuntime.csproj --runtime linux-x64 --self-contained true -c Release | |
| - name: Publish GingerRuntime - macOS | |
| if: runner.os == 'macOS' | |
| run: dotnet publish ./Ginger/GingerRuntime/GingerRuntime.csproj --runtime osx-x64 --self-contained true -c Release | |
| # ------------------------------------------------------------------------------------------------------ | |
| # Security Scan with CodeQL | |
| # ------------------------------------------------------------------------------------------------------ | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@v3 | |
| with: | |
| category: "/language:${{ matrix.language }}" |