Skip to content
Merged
Show file tree
Hide file tree
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
41 changes: 41 additions & 0 deletions .github/workflows/audit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: 🔍 Audit
permissions:
contents: read

on:
schedule:
- cron: '0 6 * * WED' # At 06:00 AM, only on Wednesday
workflow_dispatch:

jobs:
audit:
name: Vulnerability audit
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Set up runner
uses: ./.github/actions/setup-runner

- name: Get latest release tag
id: release
env:
GH_TOKEN: ${{ github.token }}
run: |
tag=$(gh release view --repo ${{ github.repository }} --json tagName --jq '.tagName')
echo "tag=$tag" >> $GITHUB_OUTPUT

- name: Checkout latest release
uses: actions/checkout@v6
with:
ref: ${{ steps.release.outputs.tag }}

# From https://learn.microsoft.com/en-us/nuget/concepts/auditing-packages
# NU1900: Error communicating with package source, while getting vulnerability information.
# NU1901: Package with low severity detected
# NU1902: Package with moderate severity detected
# NU1903: Package with high severity detected
# NU1904: Package with critical severity detected
# NU1905: An audit source does not provide a vulnerability database
- name: Audit
run: >
dotnet restore Drift.sln -p:WarningsAsErrors='"NU1900;NU1901;NU1902;NU1903;NU1904;NU1905"'
3 changes: 3 additions & 0 deletions Drift.sln
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Workflows", "Workflows", "{
.github\workflows\ci.yaml = .github\workflows\ci.yaml
.github\workflows\release.yaml = .github\workflows\release.yaml
.github\workflows\prerelease.yaml = .github\workflows\prerelease.yaml
.github\workflows\audit.yaml = .github\workflows\audit.yaml
.github\workflows\renovate.yaml = .github\workflows\renovate.yaml
.github\workflows\codeql.yml = .github\workflows\codeql.yml
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cli.E2ETests.Abstractions", "src\Cli.E2ETests.Abstractions\Cli.E2ETests.Abstractions.csproj", "{A2CE629F-8D56-4539-9642-C31B550F7C30}"
Expand Down
Loading