Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add C# security audit step #8

Merged
merged 2 commits into from
Oct 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 39 additions & 1 deletion .github/workflows/security-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- "**/Cargo.toml"
- "**/Cargo.lock"
- ".github/workflows/security-audit.yaml"
- "cloud_connectors/azure/**"
schedule:
- cron: "0 0 * * *" # once a day at midnight UTC
# NB: that cron trigger on GH actions runs only on the default branch
Expand All @@ -24,4 +25,41 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: audit
args: --deny warnings
args: --deny warnings

security_audit_csharp:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: [ 'csharp' ]
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install .NET 6.0.119
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.119
global-json-file: cloud_connectors/azure/digital_twins_connector/global.json
- name: Cache NuGet dependencies
uses: actions/cache@v3
with:
path: ~/.nuget/packages
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget
- name: Check .NET version
run: dotnet --info
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Build Digital Twins Connector
run: ./cloud_connectors/azure/digital_twins_connector/build.sh
- name: Build MQTT Connector's Azure Function
run: dotnet build cloud_connectors/azure/mqtt_connector/azure_function/src/function.csproj
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2