Skip to content

Commit 1a15b37

Browse files
authored
Update codeql.yml
1 parent cb9c905 commit 1a15b37

File tree

1 file changed

+33
-47
lines changed

1 file changed

+33
-47
lines changed

.github/workflows/codeql.yml

Lines changed: 33 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -9,92 +9,78 @@
99
# the `language` matrix defined below to confirm you have the correct set of
1010
# supported CodeQL languages.
1111
#
12-
name: "CodeQL Advanced"
12+
name: "CodeQL"
1313

1414
on:
1515
push:
1616
branches: [ "master" ]
1717
pull_request:
1818
branches: [ "master" ]
1919
schedule:
20-
- cron: '42 8 * * 5'
20+
- cron: '37 10 * * 6'
21+
22+
# Declare default permissions as read only.
23+
permissions: read-all
2124

2225
jobs:
2326
analyze:
24-
name: Analyze (${{ matrix.language }})
27+
name: Analyze
2528
# Runner size impacts CodeQL analysis time. To learn more, please see:
2629
# - https://gh.io/recommended-hardware-resources-for-running-codeql
2730
# - https://gh.io/supported-runners-and-hardware-resources
28-
# - https://gh.io/using-larger-runners (GitHub.com only)
29-
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
31+
# - https://gh.io/using-larger-runners
32+
# Consider using larger runners for possible analysis time improvements.
3033
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
34+
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
3135
permissions:
32-
# required for all workflows
33-
security-events: write
34-
35-
# required to fetch internal or private CodeQL packs
36-
packages: read
37-
38-
# only required for workflows in private repositories
3936
actions: read
4037
contents: read
38+
security-events: write
4139

4240
strategy:
4341
fail-fast: false
4442
matrix:
45-
include:
46-
- language: actions
47-
build-mode: none
48-
- language: java-kotlin
49-
build-mode: none # This mode only analyzes Java. Set this to 'autobuild' or 'manual' to analyze Kotlin too.
50-
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
51-
# Use `c-cpp` to analyze code written in C, C++ or both
52-
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
53-
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
54-
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
55-
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
56-
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
57-
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
43+
language: [ 'java-kotlin', 'javascript-typescript' ]
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
48+
5849
steps:
5950
- name: Checkout repository
60-
uses: actions/checkout@v4
51+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
6152

62-
# Add any setup steps before running the `github/codeql-action/init` action.
63-
# This includes steps like installing compilers or runtimes (`actions/setup-node`
64-
# or others). This is typically only required for manual builds.
65-
# - name: Setup runtime (example)
66-
# uses: actions/setup-example@v1
53+
- uses: gradle/actions/wrapper-validation@8379f6a1328ee0e06e2bb424dadb7b159856a326 # v4
6754

6855
# Initializes the CodeQL tools for scanning.
6956
- name: Initialize CodeQL
70-
uses: github/codeql-action/init@v3
57+
uses: github/codeql-action/init@fca7ace96b7d713c7035871441bd52efbe39e27e # v3.28.19
7158
with:
7259
languages: ${{ matrix.language }}
73-
build-mode: ${{ matrix.build-mode }}
7460
# If you wish to specify custom queries, you can do so here or in a config file.
7561
# By default, queries listed here will override any specified in a config file.
7662
# Prefix the list here with "+" to use these queries and those in the config file.
7763

7864
# 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
7965
# queries: security-extended,security-and-quality
8066

81-
# If the analyze step fails for one of the languages you are analyzing with
82-
# "We were unable to automatically build your code", modify the matrix above
83-
# to set the build mode to "manual" for that language. Then modify this step
84-
# to build your code.
67+
68+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
69+
# If this step fails, then you should remove it and run the build manually (see below)
70+
- name: Autobuild
71+
uses: github/codeql-action/autobuild@fca7ace96b7d713c7035871441bd52efbe39e27e # v3.28.19
72+
8573
# ℹ️ Command-line programs to run using the OS shell.
8674
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
87-
- if: matrix.build-mode == 'manual'
88-
shell: bash
89-
run: |
90-
echo 'If you are using a "manual" build mode for one or more of the' \
91-
'languages you are analyzing, replace this with the commands to build' \
92-
'your code, for example:'
93-
echo ' make bootstrap'
94-
echo ' make release'
95-
exit 1
75+
76+
# If the Autobuild fails above, remove it and uncomment the following three lines.
77+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
78+
79+
# - run: |
80+
# echo "Run, Build Application using script"
81+
# ./location_of_script_within_repo/buildscript.sh
9682

9783
- name: Perform CodeQL Analysis
98-
uses: github/codeql-action/analyze@v3
84+
uses: github/codeql-action/analyze@fca7ace96b7d713c7035871441bd52efbe39e27e # v3.28.19
9985
with:
10086
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)