Skip to content

Commit 17410d6

Browse files
committed
chore: upgrade codeql action
1 parent 26a0fcf commit 17410d6

File tree

1 file changed

+48
-29
lines changed

1 file changed

+48
-29
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 48 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,81 @@
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+
#
112
name: 'CodeQL'
213

314
on:
415
push:
5-
branches: [master]
16+
branches: ['master']
617
pull_request:
718
# The branches below must be a subset of the branches above
8-
branches: [master]
19+
branches: ['master']
920
schedule:
10-
- cron: '0 14 * * 2'
21+
- cron: '33 16 * * 2'
1122

1223
jobs:
1324
analyze:
1425
name: Analyze
15-
runs-on: ubuntu-22.04
26+
# Runner size impacts CodeQL analysis time. To learn more, please see:
27+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
28+
# - https://gh.io/supported-runners-and-hardware-resources
29+
# - https://gh.io/using-larger-runners
30+
# Consider using larger runners for possible analysis time improvements.
31+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
32+
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
33+
permissions:
34+
actions: read
35+
contents: read
36+
security-events: write
1637

1738
strategy:
1839
fail-fast: false
1940
matrix:
20-
# Override automatic language detection by changing the below list
21-
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
22-
language: ['javascript']
23-
# Learn more...
24-
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
41+
language: ['javascript-typescript']
42+
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
43+
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
44+
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
45+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
2546

2647
steps:
2748
- name: Checkout repository
2849
uses: actions/checkout@v4
29-
with:
30-
# We must fetch at least the immediate parents so that if this is
31-
# a pull request then we can checkout the head.
32-
fetch-depth: 2
33-
34-
# If this run was triggered by a pull request event, then checkout
35-
# the head of the pull request instead of the merge commit.
36-
- run: git checkout HEAD^2
37-
if: ${{ github.event_name == 'pull_request' }}
3850

3951
# Initializes the CodeQL tools for scanning.
4052
- name: Initialize CodeQL
41-
uses: github/codeql-action/init@v1
53+
uses: github/codeql-action/init@v2
4254
with:
4355
languages: ${{ matrix.language }}
56+
# If you wish to specify custom queries, you can do so here or in a config file.
57+
# By default, queries listed here will override any specified in a config file.
58+
# Prefix the list here with "+" to use these queries and those in the config file.
4459

45-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
60+
# 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
61+
# queries: security-extended,security-and-quality
62+
63+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
4664
# If this step fails, then you should remove it and run the build manually (see below)
4765
- name: Autobuild
48-
uses: github/codeql-action/autobuild@v1
66+
uses: github/codeql-action/autobuild@v2
4967

5068
# ℹ️ Command-line programs to run using the OS shell.
51-
# 📚 https://git.io/JvXDl
69+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
5270

53-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
54-
# and modify them (or add more) to build your code if your project
55-
# uses a compiled language
71+
# If the Autobuild fails above, remove it and uncomment the following three lines.
72+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
5673

57-
#- run: |
58-
# make bootstrap
59-
# make release
74+
# - run: |
75+
# echo "Run, Build Application using script"
76+
# ./location_of_script_within_repo/buildscript.sh
6077

6178
- name: Perform CodeQL Analysis
62-
uses: github/codeql-action/analyze@v1
79+
uses: github/codeql-action/analyze@v2
80+
with:
81+
category: '/language:${{matrix.language}}'

0 commit comments

Comments
 (0)