Skip to content

Commit 5968bc3

Browse files
authored
Update CodeQL workflow (#2181)
1 parent abc3504 commit 5968bc3

File tree

2 files changed

+16
-29
lines changed

2 files changed

+16
-29
lines changed

.github/dependabot.yml

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ updates:
88
- package-ecosystem: gomod
99
directories:
1010
- "**/*"
11-
1211
schedule:
1312
interval: daily
1413

.github/workflows/codeql-analysis.yml

+16-28
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,29 @@ permissions:
2323
jobs:
2424
analyze:
2525
permissions:
26+
packages: read
2627
actions: read # for github/codeql-action/init to get workflow details
2728
contents: read # for actions/checkout to fetch code
2829
security-events: write # for github/codeql-action/autobuild to send a status report
29-
name: Analyze
30+
name: Analyze (${{ matrix.language }})
3031
runs-on: ubuntu-22.04
3132

3233
strategy:
3334
fail-fast: false
3435
matrix:
35-
language: ["go", "javascript"]
36-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
37-
# Use only 'java' to analyze code written in Java, Kotlin or both
38-
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
39-
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
40-
36+
include:
37+
- language: go
38+
build-mode: autobuild
39+
- language: javascript-typescript
40+
build-mode: none
41+
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
42+
# Use `c-cpp` to analyze code written in C, C++ or both
43+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
44+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
45+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
46+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
47+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
48+
# 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.
4149
steps:
4250
- name: Checkout repository
4351
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
@@ -47,34 +55,14 @@ jobs:
4755
uses: github/codeql-action/init@23acc5c183826b7a8a97bce3cecc52db901f8251 # v3.25.10
4856
with:
4957
languages: ${{ matrix.language }}
58+
build-mode: ${{ matrix.build-mode }}
5059
# If you wish to specify custom queries, you can do so here or in a config file.
5160
# By default, queries listed here will override any specified in a config file.
5261
# Prefix the list here with "+" to use these queries and those in the config file.
5362

5463
# 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
5564
# queries: security-extended,security-and-quality
5665

57-
- name: Setup Golang Environment
58-
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
59-
with:
60-
go-version: stable
61-
if: matrix.language == 'go'
62-
63-
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
64-
# If this step fails, then you should remove it and run the build manually (see below)
65-
- name: Autobuild
66-
uses: github/codeql-action/autobuild@23acc5c183826b7a8a97bce3cecc52db901f8251 # v3.25.10
67-
68-
# ℹ️ Command-line programs to run using the OS shell.
69-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
70-
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.
73-
74-
# - run: |
75-
# echo "Run, Build Application using script"
76-
# ./location_of_script_within_repo/buildscript.sh
77-
7866
- name: Perform CodeQL Analysis
7967
uses: github/codeql-action/analyze@23acc5c183826b7a8a97bce3cecc52db901f8251 # v3.25.10
8068
with:

0 commit comments

Comments
 (0)