mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-24 07:15:27 +00:00
56 lines
1.3 KiB
YAML
56 lines
1.3 KiB
YAML
name: "CodeQL"
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "29 3 * * 0"
|
|
|
|
jobs:
|
|
analyze:
|
|
name: Analyze
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
language: ["csharp", "python"]
|
|
|
|
permissions:
|
|
security-events: write
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
|
|
# 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
|
|
|
|
# Compiling is required for csharp
|
|
- name: Setup .NET Core SDK
|
|
if: ${{ matrix.language == 'csharp' }}
|
|
uses: actions/setup-dotnet@v3
|
|
with:
|
|
dotnet-version: "7.0.x"
|
|
dotnet-quality: "ga"
|
|
|
|
- name: Install dependencies
|
|
if: ${{ matrix.language == 'csharp' }}
|
|
run: |
|
|
cd src/ApiService/
|
|
dotnet restore --locked-mode
|
|
|
|
- name: Build Service
|
|
if: ${{ matrix.language == 'csharp' }}
|
|
run: |
|
|
cd src/ApiService/
|
|
dotnet build -warnaserror --configuration Release
|
|
|
|
- name: Perform CodeQL Analysis
|
|
uses: github/codeql-action/analyze@v2
|