2022-12-16 06:52:58 -05:00
name : "CodeQL"
on :
push :
branches : [ 'main' ]
pull_request :
# The branches below must be a subset of the branches above
branches : [ 'main' ]
schedule :
- cron : '34 11 * * 4'
2023-10-09 11:48:50 -04:00
# See https://github.com/hibernate/hibernate-orm/pull/4615 for a description of the behavior we're getting.
concurrency :
# Consider that two builds are in the same concurrency group (cannot run concurrently)
# if they use the same workflow and are about the same branch ("ref") or pull request.
group : "workflow = ${{ github.workflow }}, ref = ${{ github.event.ref }}, pr = ${{ github.event.pull_request.id }}"
# Cancel previous builds in the same concurrency group even if they are in process
# for pull requests or pushes to forks (not the upstream repository).
cancel-in-progress : ${{ github.event_name == 'pull_request' || github.repository != 'hibernate/hibernate-orm' }}
2022-12-16 06:52:58 -05:00
jobs :
analyze :
name : Analyze
runs-on : ubuntu-latest
permissions :
actions : read
contents : read
security-events : write
strategy :
fail-fast : false
matrix :
language : [ 'java' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps :
- name : Checkout repository
2023-09-05 01:58:43 -04:00
uses : actions/checkout@v4
2022-12-16 06:52:58 -05:00
# Initializes the CodeQL tools for scanning.
- name : Initialize CodeQL
2023-12-14 00:09:14 -05:00
uses : github/codeql-action/init@v3
2022-12-16 06:52:58 -05:00
with :
languages : ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# 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
queries : +security-and-quality
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name : Autobuild
2023-12-14 00:09:14 -05:00
uses : github/codeql-action/autobuild@v3
2022-12-16 06:52:58 -05:00
# ℹ ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
- name : Perform CodeQL Analysis
2023-12-14 00:09:14 -05:00
uses : github/codeql-action/analyze@v3
2022-12-16 06:52:58 -05:00
with :
category : "/language:${{matrix.language}}"