Skip to content

Commit 9365bf1

Browse files
authored
DYN-8686 Update CodeQL Analysis workflow (#16181)
1 parent bc44eb5 commit 9365bf1

File tree

2 files changed

+69
-61
lines changed

2 files changed

+69
-61
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: CodeQL Analysis
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- master
8+
pull_request:
9+
branches:
10+
- master
11+
schedule:
12+
- cron: '0 3 * * 1'
13+
14+
jobs:
15+
analyze:
16+
name: Analyze (${{ matrix.language }})
17+
runs-on: windows-latest
18+
permissions:
19+
security-events: write
20+
packages: read
21+
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
include:
26+
- language: actions
27+
build-mode: none
28+
- language: csharp
29+
build-mode: none
30+
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
31+
# Use `c-cpp` to analyze code written in C, C++ or both
32+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
33+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
34+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
35+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
36+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
37+
# 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
38+
steps:
39+
- name: Checkout repository
40+
uses: actions/checkout@v4
41+
- name: Initialize CodeQL
42+
uses: github/codeql-action/init@v3
43+
with:
44+
languages: ${{ matrix.language }}
45+
build-mode: ${{ matrix.build-mode }}
46+
# If you wish to specify custom queries, you can do so here or in a config file.
47+
# By default, queries listed here will override any specified in a config file.
48+
# Prefix the list here with "+" to use these queries and those in the config file.
49+
50+
# 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
51+
# queries: security-extended,security-and-quality
52+
53+
# If the analyze step fails for one of the languages you are analyzing with
54+
# "We were unable to automatically build your code", modify the matrix above
55+
# to set the build mode to "manual" for that language. Then modify this step
56+
# to build your code.
57+
# ℹ️ Command-line programs to run using the OS shell.
58+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
59+
60+
- name: Perform CodeQL Analysis
61+
uses: github/codeql-action/analyze@v3
62+
with:
63+
category: "/language:${{matrix.language}}"
64+
details:
65+
name: Details
66+
runs-on: ubuntu-latest
67+
steps:
68+
- name: Print details
69+
run: echo "For details check the [CodeQL Status](https://github.com/DynamoDS/Dynamo/security/code-scanning/tools/CodeQL/status/) page" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)