From d28e8e943f2baccffe7f335cc3ae594375c9a891 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi <dreamorosi@gmail.com> Date: Wed, 3 Jul 2024 13:41:59 +0200 Subject: [PATCH 1/2] chore(ci): enable CodeQl --- .github/workflows/codeql.yml | 52 ++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000000..f3323b12bd --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,52 @@ +name: "CodeQL" + +on: + push: + branches: ["main"] + pull_request: + # The branches below must be a subset of the branches above + branches: ["main"] + schedule: + - cron: "0 0 * * 1" + +permissions: + contents: read + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: ["typescript"] + + steps: + - name: Checkout code + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@e5f05b81d5b6ff8cfa111c80c22c5fd02a384118 # v3.23.0 + with: + languages: ${{ matrix.language }} + + - name: Setup NodeJS + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 + with: + node-version: ${{ matrix.version }} + cache: "npm" + - name: Setup dependencies + uses: ./.github/actions/cached-node-modules + with: + nodeVersion: 20 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@e5f05b81d5b6ff8cfa111c80c22c5fd02a384118 # v3.23.0 + with: + category: "/language:${{matrix.language}}" \ No newline at end of file From f66377cffdac4284a53fc7770895c822f13b2290 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi <dreamorosi@gmail.com> Date: Fri, 5 Jul 2024 10:41:09 +0200 Subject: [PATCH 2/2] Update codeql.yml --- .github/workflows/codeql.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index f3323b12bd..71c7931153 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -4,7 +4,6 @@ on: push: branches: ["main"] pull_request: - # The branches below must be a subset of the branches above branches: ["main"] schedule: - cron: "0 0 * * 1" @@ -49,4 +48,4 @@ jobs: - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@e5f05b81d5b6ff8cfa111c80c22c5fd02a384118 # v3.23.0 with: - category: "/language:${{matrix.language}}" \ No newline at end of file + category: "/language:${{matrix.language}}"