From e15eb1de0505e203133a89a502b499f12f9c7047 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 13 Jan 2025 19:18:19 +0000 Subject: [PATCH] Updating GitHub Code Scanning Workflows --- .github/workflows/codeql-analysis-csharp.yaml | 62 +++++++++++++++++++ .../workflows/codeql-analysis-javascript.yaml | 6 -- 2 files changed, 62 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/codeql-analysis-csharp.yaml diff --git a/.github/workflows/codeql-analysis-csharp.yaml b/.github/workflows/codeql-analysis-csharp.yaml new file mode 100644 index 000000000..af5faae6c --- /dev/null +++ b/.github/workflows/codeql-analysis-csharp.yaml @@ -0,0 +1,62 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json + +name: "CodeQL C#" + +on: + push: + branches: ["master", "main"] + pull_request: + # The branches below must be a subset of the branches above + branches: ["master", "main"] + schedule: + - cron: "27 4 * * 5" + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: ["csharp"] + + 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 }} + queries: security-extended # security-and-quality + build-mode: none # This mode only analyzes Java. Set this to 'autobuild' or 'manual' to analyze Kotlin too. + # 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. + + # # Autobuild attempts to build any compiled languages (C/C++, C#, Go, 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@v3 + + # ℹī¸ 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@v3 + with: + category: "/language:${{matrix.language}}" + diff --git a/.github/workflows/codeql-analysis-javascript.yaml b/.github/workflows/codeql-analysis-javascript.yaml index 29450a00c..b020548b0 100644 --- a/.github/workflows/codeql-analysis-javascript.yaml +++ b/.github/workflows/codeql-analysis-javascript.yaml @@ -44,9 +44,3 @@ jobs: with: category: "/language:${{matrix.language}}" - - name: upload output to artifact - uses: actions/upload-artifact@v4 - with: - name: JS_scanning - path: | - /home/runner/work/puppeteer-sharp-test/results/javascript.sarif