Skip to content

Commit e5af627

Browse files
committed
update codeql config
1 parent 550bf3e commit e5af627

File tree

1 file changed

+39
-39
lines changed

1 file changed

+39
-39
lines changed

.github/workflows/codeql.yml

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
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-
#
121
name: 'CodeQL'
132

143
on:
@@ -17,71 +6,82 @@ on:
176
paths:
187
- 'container_provisioner/**'
198
- 'scraper/**'
20-
# pull_request:
21-
# # The branches below must be a subset of the branches above
22-
# branches: ['main']
239
schedule:
24-
- cron: '21 2 * * 3'
10+
- cron: '27 0 * * 0'
2511

2612
concurrency:
2713
group: ${{ github.workflow }}-${{ github.ref }}
2814
cancel-in-progress: false
2915

3016
jobs:
3117
analyze:
32-
name: Analyze
18+
name: Analyze (${{ matrix.language }})
3319
# Runner size impacts CodeQL analysis time. To learn more, please see:
3420
# - https://gh.io/recommended-hardware-resources-for-running-codeql
3521
# - https://gh.io/supported-runners-and-hardware-resources
36-
# - https://gh.io/using-larger-runners
37-
# Consider using larger runners for possible analysis time improvements.
22+
# - https://gh.io/using-larger-runners (GitHub.com only)
23+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
3824
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
3925
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
4026
permissions:
27+
# required for all workflows
28+
security-events: write
29+
30+
# required to fetch internal or private CodeQL packs
31+
packages: read
32+
33+
# only required for workflows in private repositories
4134
actions: read
4235
contents: read
43-
security-events: write
4436

4537
strategy:
4638
fail-fast: false
4739
matrix:
48-
# language: ['go', 'javascript']
49-
language: ['go']
50-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
51-
# Use only 'java' to analyze code written in Java, Kotlin or both
52-
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
53-
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
54-
40+
include:
41+
- language: go
42+
build-mode: autobuild
43+
# - language: javascript-typescript
44+
# build-mode: none
45+
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
46+
# Use `c-cpp` to analyze code written in C, C++ or both
47+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
48+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
49+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
50+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
51+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
52+
# 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
5553
steps:
5654
- name: Checkout repository
57-
uses: actions/checkout@v3
55+
uses: actions/checkout@v4
5856

5957
# Initializes the CodeQL tools for scanning.
6058
- name: Initialize CodeQL
6159
uses: github/codeql-action/init@v3
6260
with:
6361
languages: ${{ matrix.language }}
62+
build-mode: ${{ matrix.build-mode }}
6463
# If you wish to specify custom queries, you can do so here or in a config file.
6564
# By default, queries listed here will override any specified in a config file.
6665
# Prefix the list here with "+" to use these queries and those in the config file.
6766

6867
# 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
6968
# queries: security-extended,security-and-quality
7069

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

0 commit comments

Comments
 (0)