Skip to content

Commit a96c607

Browse files
committed
chore(ci): update codeql workflows
1 parent 556874b commit a96c607

File tree

1 file changed

+22
-46
lines changed

1 file changed

+22
-46
lines changed

.github/workflows/codeql.yml

Lines changed: 22 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,15 @@
1-
# For most projects, this workflow file will not need changing; you simply need
2-
# to commit it to your repository.
3-
#
4-
# You may wish to alter this file to override the set of languages analyzed,
5-
# or to provide custom queries or build logic.
6-
#
7-
# ******** NOTE ********
8-
# We have attempted to detect the languages in your repository. Please check
9-
# the `language` matrix defined below to confirm you have the correct set of
10-
# supported CodeQL languages.
11-
#
12-
name: "CodeQL"
1+
name: CodeQL
132

143
on:
154
push:
16-
branches: ["main", "*-releases"]
17-
tags: ["v*"]
5+
branches:
6+
- main
7+
- "*-releases"
8+
tags:
9+
- v*
1810
pull_request:
19-
# The branches below must be a subset of the branches above
20-
branches: ["main"]
11+
branches:
12+
- main
2113
schedule:
2214
- cron: "30 14 * * 4"
2315
workflow_dispatch:
@@ -26,8 +18,8 @@ on:
2618
jobs:
2719
analyze:
2820
name: Analyze
29-
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
30-
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
21+
runs-on: ubuntu-latest
22+
timeout-minutes: 360
3123
permissions:
3224
actions: read
3325
contents: read
@@ -36,26 +28,25 @@ jobs:
3628
strategy:
3729
fail-fast: false
3830
matrix:
39-
language: ["go", "javascript", "python"]
40-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
41-
# Use only 'java' to analyze code written in Java, Kotlin or both
42-
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
43-
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
31+
include:
32+
- language: go
33+
build-mode: autobuild
34+
- language: javascript
35+
build-mode: none
36+
- language: python
37+
build-mode: none
38+
- language: actions
39+
build-mode: none
4440

4541
steps:
4642
- name: Checkout repository
4743
uses: actions/checkout@v4
4844

49-
# Initializes the CodeQL tools for scanning.
5045
- name: Initialize CodeQL
51-
uses: github/codeql-action/init@v2
46+
uses: github/codeql-action/init@v3
5247
with:
5348
languages: ${{ matrix.language }}
54-
# If you wish to specify custom queries, you can do so here or in a config file.
55-
# By default, queries listed here will override any specified in a config file.
56-
# Prefix the list here with "+" to use these queries and those in the config file.
57-
58-
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
49+
build-mode: ${{ matrix.build-mode }}
5950
queries: security-extended
6051
config: |
6152
paths-ignore:
@@ -67,22 +58,7 @@ jobs:
6758
- '**/*.spec.tsx'
6859
- 'scripts/**'
6960
70-
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
71-
# If this step fails, then you should remove it and run the build manually (see below)
72-
- name: Autobuild
73-
uses: github/codeql-action/autobuild@v2
74-
75-
# ℹ️ Command-line programs to run using the OS shell.
76-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
77-
78-
# If the Autobuild fails above, remove it and uncomment the following three lines.
79-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
80-
81-
# - run: |
82-
# echo "Run, Build Application using script"
83-
# ./location_of_script_within_repo/buildscript.sh
84-
8561
- name: Perform CodeQL Analysis
86-
uses: github/codeql-action/analyze@v2
62+
uses: github/codeql-action/analyze@v3
8763
with:
8864
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)