Skip to content

Commit 13b532d

Browse files
authored
Update codeql-analysis.yml
1 parent ea4cd00 commit 13b532d

File tree

1 file changed

+35
-28
lines changed

1 file changed

+35
-28
lines changed

.github/workflows/codeql-analysis.yml

+35-28
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,61 @@
1-
name: "Code scanning - action"
1+
name: "CodeQL"
22

33
on:
44
push:
5-
branches-ignore:
6-
- pr/*
7-
- scratch/*
5+
branches: [ "develop" ]
86
pull_request:
7+
# The branches below must be a subset of the branches above
8+
branches: [ "develop" ]
99
schedule:
10-
- cron: '0 9 * * MON'
10+
- cron: '26 5 * * 4'
1111

1212
jobs:
13-
CodeQL-Build:
14-
13+
analyze:
14+
name: Analyze
1515
runs-on: ubuntu-latest
16+
permissions:
17+
actions: read
18+
contents: read
19+
security-events: write
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
language: [ 'ruby' ]
1625

1726
steps:
1827
- name: Checkout repository
1928
uses: actions/checkout@v3
20-
with:
21-
# We must fetch at least the immediate parents so that if this is
22-
# a pull request then we can checkout the head.
23-
fetch-depth: 2
24-
25-
# If this run was triggered by a pull request event, then checkout
26-
# the head of the pull request instead of the merge commit.
27-
- run: git checkout HEAD^2
28-
if: ${{ github.event_name == 'pull_request' }}
29-
29+
3030
# Initializes the CodeQL tools for scanning.
3131
- name: Initialize CodeQL
3232
uses: github/codeql-action/init@v2
33-
# Override language selection by uncommenting this and choosing your languages
34-
# with:
35-
languages: ruby
33+
with:
34+
languages: ${{ matrix.language }}
35+
# If you wish to specify custom queries, you can do so here or in a config file.
36+
# By default, queries listed here will override any specified in a config file.
37+
# Prefix the list here with "+" to use these queries and those in the config file.
38+
39+
# 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
40+
# queries: security-extended,security-and-quality
3641

37-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
42+
43+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
3844
# If this step fails, then you should remove it and run the build manually (see below)
3945
- name: Autobuild
4046
uses: github/codeql-action/autobuild@v2
4147

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

45-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
46-
# and modify them (or add more) to build your code if your project
47-
# uses a compiled language
51+
# If the Autobuild fails above, remove it and uncomment the following three lines.
52+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
4853

49-
#- run: |
50-
# make bootstrap
51-
# make release
54+
# - run: |
55+
# echo "Run, Build Application using script"
56+
# ./location_of_script_within_repo/buildscript.sh
5257

5358
- name: Perform CodeQL Analysis
5459
uses: github/codeql-action/analyze@v2
60+
with:
61+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)