Skip to content

Commit 9b3b049

Browse files
committed
update codeql action
1 parent f4d1e85 commit 9b3b049

File tree

1 file changed

+37
-21
lines changed

1 file changed

+37
-21
lines changed

.github/workflows/codeql-analysis.yml

+37-21
Original file line numberDiff line numberDiff line change
@@ -13,55 +13,71 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [master]
16+
branches: ["master"]
1717
pull_request:
18-
# The branches below must be a subset of the branches above
19-
branches: [master]
18+
branches: ["master"]
2019
schedule:
21-
- cron: "33 1 * * 3"
20+
- cron: "30 16 * * 6"
2221

2322
jobs:
2423
analyze:
2524
name: Analyze
26-
runs-on: ubuntu-latest
25+
# Runner size impacts CodeQL analysis time. To learn more, please see:
26+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
27+
# - https://gh.io/supported-runners-and-hardware-resources
28+
# - https://gh.io/using-larger-runners
29+
# Consider using larger runners for possible analysis time improvements.
30+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
31+
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
32+
permissions:
33+
# required for all workflows
34+
security-events: write
35+
36+
# only required for workflows in private repositories
37+
actions: read
38+
contents: read
2739

2840
strategy:
2941
fail-fast: false
3042
matrix:
3143
language: ["python"]
32-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
33-
# Learn more:
34-
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
44+
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
45+
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
46+
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
47+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
3548

3649
steps:
3750
- name: Checkout repository
38-
uses: actions/checkout@v2
51+
uses: actions/checkout@v4
3952

4053
# Initializes the CodeQL tools for scanning.
4154
- name: Initialize CodeQL
42-
uses: github/codeql-action/init@v1
55+
uses: github/codeql-action/init@v3
4356
with:
4457
languages: ${{ matrix.language }}
4558
# If you wish to specify custom queries, you can do so here or in a config file.
4659
# By default, queries listed here will override any specified in a config file.
4760
# Prefix the list here with "+" to use these queries and those in the config file.
48-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
4961

50-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
62+
# 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
63+
# queries: security-extended,security-and-quality
64+
65+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
5166
# If this step fails, then you should remove it and run the build manually (see below)
5267
- name: Autobuild
53-
uses: github/codeql-action/autobuild@v1
68+
uses: github/codeql-action/autobuild@v3
5469

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

58-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
59-
# and modify them (or add more) to build your code if your project
60-
# uses a compiled language
73+
# If the Autobuild fails above, remove it and uncomment the following three lines.
74+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
6175

62-
#- run: |
63-
# make bootstrap
64-
# make release
76+
# - run: |
77+
# echo "Run, Build Application using script"
78+
# ./location_of_script_within_repo/buildscript.sh
6579

6680
- name: Perform CodeQL Analysis
67-
uses: github/codeql-action/analyze@v1
81+
uses: github/codeql-action/analyze@v3
82+
with:
83+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)