Skip to content

Commit 7cb1b30

Browse files
authored
Add codeQL action and nightly runs to the public CI (#1083)
* Add nightly runs to the public CI * Add codeQL GH workflow action
1 parent 3a7158a commit 7cb1b30

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed

Diff for: .github/workflows/codeQL.yml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# This workflow generates weekly CodeQL reports for this repo, a security requirements.
2+
# The workflow is adapted from the following reference: https://github.com/Azure/azure-functions-durable-extension/commit/6cb5cc5814102685094e64a55ad1f885c2bfb14d
3+
# Generic comments on how to modify these file are left intactfor future maintenance.
4+
5+
name: "CodeQL"
6+
7+
on:
8+
push:
9+
branches: [ "dev", "*" ] # TODO: remove development branch after approval
10+
pull_request:
11+
branches: [ "dev", "*"] # TODO: remove development branch after approval
12+
schedule:
13+
- cron: '0 0 * * 1' # Weekly Monday run, needed for weekly reports
14+
workflow_call: # allows to be invoked as part of a larger workflow
15+
workflow_dispatch: # allows for the workflow to run manually see: https://docs.github.com/en/actions/using-workflows/manually-running-a-workflow
16+
17+
env:
18+
solution: azure-functions-powershell-worker.sln
19+
config: Release
20+
21+
jobs:
22+
23+
analyze:
24+
name: Analyze
25+
runs-on: windows-latest
26+
permissions:
27+
actions: read
28+
contents: read
29+
security-events: write
30+
31+
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
language: ['csharp']
36+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
38+
39+
steps:
40+
# Initializes the CodeQL tools for scanning.
41+
- name: Initialize CodeQL
42+
uses: github/codeql-action/init@v3
43+
with:
44+
languages: ${{ matrix.language }}
45+
# If you wish to specify custom queries, you can do so here or in a config file.
46+
# By default, queries listed here will override any specified in a config file.
47+
# Prefix the list here with "+" to use these queries and those in the config file.
48+
49+
# 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
50+
# queries: security-extended,security-and-quality
51+
52+
- uses: actions/checkout@v3
53+
with:
54+
submodules: true
55+
56+
- name: Build
57+
shell: pwsh
58+
run: ./build.ps1 -Clean -Bootstrap
59+
60+
# Run CodeQL analysis
61+
- name: Perform CodeQL Analysis
62+
uses: github/codeql-action/analyze@v3
63+
with:
64+
category: "/language:${{matrix.language}}"

Diff for: eng/ci/public.yml

+8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ trigger:
44
include:
55
- dev
66

7+
schedules:
8+
- cron: "0 0 * * *"
9+
displayName: Daily midnight build
10+
branches:
11+
include:
12+
- dev
13+
always: true
14+
715
resources:
816
repositories:
917
- repository: 1es

0 commit comments

Comments
 (0)