From 0b7e39c92a0e91836199ebd71c037188c7131dd2 Mon Sep 17 00:00:00 2001 From: LGTM Migrator Date: Wed, 16 Nov 2022 15:16:30 +0000 Subject: [PATCH] Add CodeQL workflow for GitHub code scanning --- .github/codeql.yml | 5 +++++ .github/workflows/codeql.yml | 43 ++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 .github/codeql.yml create mode 100644 .github/workflows/codeql.yml diff --git a/.github/codeql.yml b/.github/codeql.yml new file mode 100644 index 0000000000..e7af45294f --- /dev/null +++ b/.github/codeql.yml @@ -0,0 +1,5 @@ +query-filters: + - exclude: + id: cpp/short-global-name + - exclude: + id: cpp/useless-expression diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000000..aa6fa72f40 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,43 @@ +name: "CodeQL" + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + schedule: + - cron: "15 19 * * 6" + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ javascript, cpp ] + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + config-file: ./.github/codeql.yml + queries: +security-and-quality + + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + if: ${{ matrix.language == 'javascript' || matrix.language == 'cpp' }} + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{ matrix.language }}"