Skip to content

CodeQL Scanning - Action #67

CodeQL Scanning - Action

CodeQL Scanning - Action #67

name: "CodeQL Scanning - Action"
on:
schedule:
- cron: '0 3 * * 1'
jobs:
analyze:
name: Analyze
runs-on: windows-2019
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ['csharp']
# 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
uses: actions/checkout@v3
with:
path: Dynamo
repository: DynamoDS/Dynamo
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
debug: true
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-extended,security-and-quality
# ℹ️ 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
- name: Setup Nuget.exe to use on VM
uses: nuget/setup-nuget@v1
- name: Nuget Restore in Dynamo solution
run: nuget restore $Env:GITHUB_WORKSPACE\Dynamo\src\Dynamo.All.sln
- name: Build Dynamo with MSBuild
run: |
echo "***Continue with the build, Good luck developer!***"
.\MSBuild.exe $Env:GITHUB_WORKSPACE\Dynamo\src\Dynamo.All.sln /p:UseSharedCompilation=false
working-directory: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\
- name: Navigate back to Dynamo directory
run: |
cd $Env:GITHUB_WORKSPACE\Dynamo
cd
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2