From 572fbc89160d5dcf88c080603ad157c462928869 Mon Sep 17 00:00:00 2001 From: Aleksandar Ivanov <74899441+aleks-ivanov@users.noreply.github.com> Date: Tue, 25 May 2021 19:08:31 +0300 Subject: [PATCH] Add CodeQL pipeline (#2) * add CQL pipeline * add path to build loop * format the code and test basic queries * add saq queries --- .github/workflows/codeql-analysis.yml | 42 +++++++++++++++++++++++++++ 1 file changed, 42 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 000000000..c9f1bd3b4 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,42 @@ +name: CodeQL Analysis + +on: + push: + paths: + - 'src/csharp/**' + pull_request: + paths: + - 'src/csharp/**' + schedule: + - cron: '0 8 * * *' + workflow_dispatch: + +jobs: + analyze: + name: CodeQL Analysis + runs-on: ubuntu-latest + steps: + - name: Checkout repository + id: checkout_repo + uses: actions/checkout@v2 + + - name: Initialize CodeQL + id: init_codeql + uses: github/codeql-action/init@v1 + with: + queries: security-and-quality + + - name: Build projects + id: build_projects + shell: pwsh + run: | + Get-ChildItem -Path src/csharp/ -Filter *.csproj -Exclude *test* -Recurse -File | ForEach-Object { + dotnet build $PSItem.FullName ` + --configuration Release + } + + - name: Perform CodeQL Analysis + id: analyze_codeql + uses: github/codeql-action/analyze@v1 + +# Built with ❤ by [Pipeline Foundation](https://pipeline.foundation)