Skip to content

Commit

Permalink
Create codeql with advance setup (#356)
Browse files Browse the repository at this point in the history
* Create codeql with advance setup

* Refactor codeql.yml for advanced setup for yaml lint

* Refactor codeql.yml for advanced setup for yaml lint

* Yaml

* Adjust comment

* Delete .github/workflows/codeql-databricks.yml
  • Loading branch information
Sondergaard authored Oct 8, 2024
1 parent f7ebd38 commit 40e09f5
Showing 1 changed file with 17 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,25 @@
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: CodeQL
name: CodeQL Advanced

on:
push:
branches: [main]
paths:
- source/Databricks/**
pull_request:
branches: [main]
paths:
- source/Databricks/**
schedule:
- cron: 28 3 * * 5
- cron: 44 10 * * 1

jobs:
analyze:
name: Analyze (${{ matrix.language }})
name: Analyze (${{ matrix.solution }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
# required for all workflows
security-events: write
Expand All @@ -47,18 +42,18 @@ jobs:
strategy:
fail-fast: false
matrix:
include:
- language: csharp
build-mode: manual
# CodeQL supports the following values keywords for 'language':
# 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# 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
language: [csharp]
build-mode: [manual]
solution: [./source/Outbox/Outbox.sln, ./source/JsonSerialization/JsonSerialization.sln, ./source/FeatureManagement/FeatureManagement.sln, ./source/App/App.sln, ./source/Databricks/Databricks.sln, ./source/TestCommon/TestCommon.sln, ./source/Messaging/Messaging.sln, ./source/Logging/Logging.sln]

# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# 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
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -73,8 +68,7 @@ jobs:
# 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
# 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

# If the analyze step fails for one of the languages you are analyzing with
Expand All @@ -86,7 +80,7 @@ jobs:
- if: matrix.build-mode == 'manual'
shell: bash
run: |
dotnet build source/Databricks/Databricks.sln
dotnet build ${{ matrix.solution }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
Expand Down

0 comments on commit 40e09f5

Please sign in to comment.