Skip to content

Commit abc739f

Browse files
committed
Update netlicesning-client-codeql-analysis.yml
1 parent c04db22 commit abc739f

File tree

1 file changed

+48
-25
lines changed

1 file changed

+48
-25
lines changed

.github/workflows/netlicesning-client-codeql-analysis.yml

Lines changed: 48 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,61 +13,84 @@ name: "NetLicensing Client - CodeQL"
1313

1414
on:
1515
push:
16-
branches: [ master ]
16+
branches: [ "master" ]
1717
pull_request:
18-
# The branches below must be a subset of the branches above
19-
branches: [ master ]
18+
branches: [ "master" ]
2019
schedule:
2120
- cron: '0 0 */7 * *'
22-
workflow_dispatch:
2321

2422
jobs:
2523
analyze:
26-
name: Analyze
27-
runs-on: [self-hosted]
28-
container: maven:3-eclipse-temurin-17
24+
name: Analyze (${{ matrix.language }})
25+
# Runner size impacts CodeQL analysis time. To learn more, please see:
26+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
27+
# - https://gh.io/supported-runners-and-hardware-resources
28+
# - https://gh.io/using-larger-runners (GitHub.com only)
29+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
30+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
2931
permissions:
32+
# required for all workflows
3033
security-events: write
3134

35+
# required to fetch internal or private CodeQL packs
36+
packages: read
37+
38+
# only required for workflows in private repositories
39+
actions: read
40+
contents: read
41+
3242
strategy:
3343
fail-fast: false
3444
matrix:
35-
language: [ 'java-kotlin' ]
36-
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
37-
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
38-
# Use only 'javascript-typescript' 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-
45+
include:
46+
- language: java-kotlin
47+
build-mode: none # This mode only analyzes Java. Set this to 'autobuild' or 'manual' to analyze Kotlin too.
48+
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
49+
# Use `c-cpp` to analyze code written in C, C++ or both
50+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
51+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
52+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
53+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
54+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
55+
# 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
4156
steps:
4257
- name: Checkout repository
4358
uses: actions/checkout@v4
4459

60+
# Add any setup steps before running the `github/codeql-action/init` action.
61+
# This includes steps like installing compilers or runtimes (`actions/setup-node`
62+
# or others). This is typically only required for manual builds.
63+
# - name: Setup runtime (example)
64+
# uses: actions/setup-example@v1
65+
4566
# Initializes the CodeQL tools for scanning.
4667
- name: Initialize CodeQL
4768
uses: github/codeql-action/init@v3
4869
with:
4970
languages: ${{ matrix.language }}
71+
build-mode: ${{ matrix.build-mode }}
5072
# If you wish to specify custom queries, you can do so here or in a config file.
5173
# By default, queries listed here will override any specified in a config file.
5274
# Prefix the list here with "+" to use these queries and those in the config file.
5375

5476
# 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
5577
# queries: security-extended,security-and-quality
5678

57-
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
58-
# If this step fails, then you should remove it and run the build manually (see below)
59-
- name: Autobuild
60-
uses: github/codeql-action/autobuild@v3
61-
79+
# If the analyze step fails for one of the languages you are analyzing with
80+
# "We were unable to automatically build your code", modify the matrix above
81+
# to set the build mode to "manual" for that language. Then modify this step
82+
# to build your code.
6283
# ℹ️ Command-line programs to run using the OS shell.
6384
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
64-
65-
# If the Autobuild fails above, remove it and uncomment the following three lines.
66-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
67-
68-
# - run: |
69-
# echo "Run, Build Application using script"
70-
# ./location_of_script_within_repo/buildscript.sh
85+
- if: matrix.build-mode == 'manual'
86+
shell: bash
87+
run: |
88+
echo 'If you are using a "manual" build mode for one or more of the' \
89+
'languages you are analyzing, replace this with the commands to build' \
90+
'your code, for example:'
91+
echo ' make bootstrap'
92+
echo ' make release'
93+
exit 1
7194
7295
- name: Perform CodeQL Analysis
7396
uses: github/codeql-action/analyze@v3

0 commit comments

Comments
 (0)