Skip to content

Commit acc6292

Browse files
Merge pull request #79 from delphix-integrations/codeQL
HUBS-2257 Update codeql.yml to version 2
2 parents 6e8b119 + 7ae1f22 commit acc6292

File tree

1 file changed

+52
-22
lines changed

1 file changed

+52
-22
lines changed

.github/workflows/codeql.yml

Lines changed: 52 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,39 @@
1-
# CodeQL configuration for the dxi-terraform-provider repo
1+
#
2+
# Copyright (c) 2023, 2024 by Delphix. All rights reserved.
3+
#
4+
#
5+
# For most projects, this workflow file will not need changing; you simply need
6+
# to commit it to your repository.
7+
#
8+
# You may wish to alter this file to override the set of languages analyzed,
9+
# or to provide custom queries or build logic.
10+
#
11+
# ******** NOTE ********
12+
# We have attempted to detect the languages in your repository. Please check
13+
# the `language` matrix defined below to confirm you have the correct set of
14+
# supported CodeQL languages.
15+
#
216
name: "CodeQL"
317

418
on:
519
push:
620
branches: [ main, develop ]
721
pull_request:
8-
branches: [ develop ]
22+
# The branches below must be a subset of the branches above
23+
branches: [ "develop" ]
24+
schedule:
25+
- cron: '40 13 * * 5'
926

1027
jobs:
1128
analyze:
1229
name: Analyze
13-
runs-on: ubuntu-latest
30+
# Runner size impacts CodeQL analysis time. To learn more, please see:
31+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
32+
# - https://gh.io/supported-runners-and-hardware-resources
33+
# - https://gh.io/using-larger-runners
34+
# Consider using larger runners for possible analysis time improvements.
35+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
36+
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
1437
permissions:
1538
actions: read
1639
contents: read
@@ -20,38 +43,45 @@ jobs:
2043
fail-fast: false
2144
matrix:
2245
language: [ 'go' ]
46+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
47+
# Use only 'java' to analyze code written in Java, Kotlin or both
48+
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
49+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
2350

2451
steps:
2552
- name: Checkout repository
26-
uses: actions/checkout@v2
27-
28-
- uses: actions/setup-go@v2
29-
with:
30-
go-version: '^1.17.7'
53+
uses: actions/checkout@v3
3154

3255
# Initializes the CodeQL tools for scanning.
3356
- name: Initialize CodeQL
34-
uses: github/codeql-action/init@v1
57+
uses: github/codeql-action/init@v2
3558
with:
3659
languages: ${{ matrix.language }}
37-
queries: +security-and-quality
60+
queries: security-extended,security-and-quality
61+
# If you wish to specify custom queries, you can do so here or in a config file.
62+
# By default, queries listed here will override any specified in a config file.
63+
# Prefix the list here with "+" to use these queries and those in the config file.
3864

65+
# 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
66+
# queries: security-extended,security-and-quality
3967

40-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
41-
# If this step fails, then you should remove it and run the build manually (see below)
42-
- name: Autobuild
43-
uses: github/codeql-action/autobuild@v1
4468

69+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
70+
# If this step fails, then you should remove it and run the build manually (see below)
71+
- if: matrix.language == 'go'
72+
name: Autobuild
73+
uses: github/codeql-action/autobuild@v2
4574
# ℹ️ Command-line programs to run using the OS shell.
46-
# 📚
75+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
4776

48-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
49-
# and modify them (or add more) to build your code if your project
50-
# uses a compiled language
77+
# If the Autobuild fails above, remove it and uncomment the following three lines.
78+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
5179

52-
#- run: |
53-
# make bootstrap
54-
# make release
80+
# - run: |
81+
# echo "Run, Build Application using script"
82+
# ./location_of_script_within_repo/buildscript.sh
5583

5684
- name: Perform CodeQL Analysis
57-
uses: github/codeql-action/analyze@v1
85+
uses: github/codeql-action/analyze@v2
86+
with:
87+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)