Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3d4a926

Browse files
authoredDec 8, 2022
Updated to CodeQL v2 (#1112)
1 parent ee7b7de commit 3d4a926

File tree

1 file changed

+26
-19
lines changed

1 file changed

+26
-19
lines changed
 

‎.github/workflows/codeql-analysis.yml

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,55 +13,62 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [ main ]
16+
branches: [ "main" ]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ main ]
19+
branches: [ "main" ]
2020
schedule:
21-
- cron: '33 5 * * 6'
21+
- cron: '39 4 * * 2'
2222

2323
jobs:
2424
analyze:
2525
name: Analyze
2626
runs-on: ubuntu-latest
27+
permissions:
28+
actions: read
29+
contents: read
30+
security-events: write
2731

2832
strategy:
2933
fail-fast: false
3034
matrix:
3135
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
36+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
3538

3639
steps:
3740
- name: Checkout repository
38-
uses: actions/checkout@v2
41+
uses: actions/checkout@v3
3942

4043
# Initializes the CodeQL tools for scanning.
4144
- name: Initialize CodeQL
42-
uses: github/codeql-action/init@v1
45+
uses: github/codeql-action/init@v2
4346
with:
4447
languages: ${{ matrix.language }}
4548
# If you wish to specify custom queries, you can do so here or in a config file.
4649
# By default, queries listed here will override any specified in a config file.
4750
# 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
4951

50-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
52+
# 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
53+
# queries: security-extended,security-and-quality
54+
55+
56+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
5157
# If this step fails, then you should remove it and run the build manually (see below)
5258
- name: Autobuild
53-
uses: github/codeql-action/autobuild@v1
59+
uses: github/codeql-action/autobuild@v2
5460

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

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
64+
# If the Autobuild fails above, remove it and uncomment the following three lines.
65+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
6166

62-
#- run: |
63-
# make bootstrap
64-
# make release
67+
# - run: |
68+
# echo "Run, Build Application using script"
69+
# ./location_of_script_within_repo/buildscript.sh
6570

6671
- name: Perform CodeQL Analysis
67-
uses: github/codeql-action/analyze@v1
72+
uses: github/codeql-action/analyze@v2
73+
with:
74+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)
Please sign in to comment.