Sandboxie/.github/workflows/codeql.yml

99 lines
3.2 KiB
YAML
Raw Normal View History

2023-07-03 08:19:52 +01:00
name: "CodeQL"
on:
2023-07-12 10:47:04 +01:00
workflow_dispatch:
2023-07-03 08:19:52 +01:00
push:
2023-07-12 10:53:35 +01:00
branches: [ 'codeql' ]
2023-07-03 08:19:52 +01:00
pull_request:
# The branches below must be a subset of the branches above.
branches: [ 'master' ]
paths:
- '**.c'
- '**.cpp'
- '**.h'
2023-07-03 08:19:52 +01:00
schedule:
- cron: '33 7 * * 6'
jobs:
analyze:
2023-07-12 16:26:34 +01:00
name: Analyze ${{ matrix.configuration }}-${{ matrix.platform }}
2023-07-03 08:19:52 +01:00
runs-on: windows-2019
timeout-minutes: 45
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
2023-07-12 17:02:26 +01:00
platform2: [ Win32, x64 ]
2023-07-12 16:21:28 +01:00
include:
- platform: x64
configuration: SbieRelease
2023-07-03 08:19:52 +01:00
language: [ 'cpp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Use only 'java' to analyze code written in Java, Kotlin or both.
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both.
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps:
- name: 'Cleanup build folder'
run: |
2023-07-12 15:38:21 +01:00
rm ${{ github.workspace }}\* -r -Force
2023-07-03 08:19:52 +01:00
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup msbuild
uses: microsoft/setup-msbuild@v1
# Qt 6 is only required for ARM64 build currently.
# - name: Install Qt6 x64
# uses: jurplel/install-qt-action@v3
# with:
# version: '6.3.1'
# arch: 'win64_msvc2019_64'
- name: Install Qt5 x64
uses: jurplel/install-qt-action@v3
with:
version: '5.15.2'
arch: 'win64_msvc2019_64'
cache: true
- name: Installing Jom
run: SandboxiePlus\install_jom.cmd
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/codeql-config.yml
2023-07-03 08:19:52 +01:00
# 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.
# 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
# queries: security-extended,security-and-quality
2023-07-12 16:21:28 +01:00
- name: Build Sandboxie
2023-07-12 17:02:26 +01:00
run: msbuild /t:build Sandboxie\Sandbox.sln /p:Configuration="SbieRelease" /p:Platform=${{ matrix.platform2 }}
2023-07-03 08:19:52 +01:00
- name: Build Sandboxie-Plus x64
2023-07-12 14:07:01 +01:00
run: SandboxiePlus\qmake_plus.cmd ${{ matrix.platform }}
2023-07-03 08:19:52 +01:00
- name: Build SbieShell x64
2023-07-12 14:07:01 +01:00
run: msbuild /t:restore,build -p:RestorePackagesConfig=true SandboxiePlus\SbieShell\SbieShell.sln /p:Configuration="Release" /p:Platform=${{ matrix.platform }}
2023-07-03 08:19:52 +01:00
- name: Build Sandboxie-Tools x64
2023-07-12 14:07:01 +01:00
run: msbuild /t:build SandboxieTools\SandboxieTools.sln /p:Configuration="Release" /p:Platform=${{ matrix.platform }}
2023-07-03 08:19:52 +01:00
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"