From ffd170e23820c3cf0de80a8b91e04b8d13ba602b Mon Sep 17 00:00:00 2001 From: LGTM Migrator Date: Wed, 16 Nov 2022 15:44:17 +0000 Subject: [PATCH] Add CodeQL workflow for GitHub code scanning --- .github/codeql.yml | 3 +++ .github/workflows/codeql.yml | 42 ++++++++++++++++++++++++++++++++++++ 2 files changed, 45 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 000000000..cfca0ecfe --- /dev/null +++ b/.github/codeql.yml @@ -0,0 +1,3 @@ +query-filters: + - exclude: + id: js/template-syntax-in-string-literal diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 000000000..71ff2d54a --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,42 @@ +name: "CodeQL" + +on: + push: + branches: [ "master", "next" ] + pull_request: + branches: [ "master" ] + schedule: + - cron: "7 7 * * 3" + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ javascript ] + + 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 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{ matrix.language }}"