From a78b25b954fd777af156ce00696f6f2d1d264a14 Mon Sep 17 00:00:00 2001 From: Stargator Date: Tue, 28 May 2024 12:14:31 -0400 Subject: [PATCH 1/3] CodeQL action gains security permissions --- .github/workflows/codeql-analysis.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index ff6c957..44221c4 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -35,6 +35,17 @@ jobs: analyze: name: Analyze runs-on: ubuntu-latest + timeout-minutes: 120 + permissions: + # required for all workflows + security-events: write + + # required to fetch internal or private CodeQL packs + packages: read + + # only required for workflows in private repositories + actions: read + contents: read strategy: fail-fast: false From de77374645e4db6c9faa0c705099380297bddd6a Mon Sep 17 00:00:00 2001 From: Stargator Date: Tue, 28 May 2024 12:15:03 -0400 Subject: [PATCH 2/3] CodeQL action will now scan the _includes directory --- .github/codeql/codeql-config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml index 7f23349..95d720d 100644 --- a/.github/codeql/codeql-config.yml +++ b/.github/codeql/codeql-config.yml @@ -1,6 +1,6 @@ name: "Void CodeQL Config" paths: - - _drafts/ + - _includes/ - _layouts/ - assets/javascript From 6976234fb1102f44a68ea01c07ea9012c6d011d9 Mon Sep 17 00:00:00 2001 From: Stargator Date: Tue, 28 May 2024 12:15:32 -0400 Subject: [PATCH 3/3] CodeQL action uses build-mode config --- .github/workflows/codeql-analysis.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 44221c4..6e01922 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -50,11 +50,13 @@ jobs: strategy: fail-fast: false matrix: - # Override automatic language detection by changing the below list - # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] - language: ['javascript'] - # Learn more... - # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection + include: + # Override automatic language detection by changing the below list + # Supported options are ['c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'] + - language: 'javascript-typescript' + build-mode: none + # Learn more... + # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection steps: - name: Checkout repository @@ -70,6 +72,9 @@ jobs: with: config-file: './.github/codeql/codeql-config.yml' languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{matrix.language}}"