mirror of
https://github.com/alex289/CleanArchitecture.git
synced 2025-07-05 05:23:57 +00:00
feat: Add workflow for dependency checks
This commit is contained in:
parent
b2e4466446
commit
5d00431e47
53
.github/workflows/dependency-check.yml
vendored
Normal file
53
.github/workflows/dependency-check.yml
vendored
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
name: Dependency Check
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 1 * *'
|
||||||
|
|
||||||
|
env:
|
||||||
|
solutionFile: CleanArchitecture.sln
|
||||||
|
projectName: CleanArchitecture
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
checkLicenses:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install .NET Core
|
||||||
|
uses: actions/setup-dotnet@v3
|
||||||
|
with:
|
||||||
|
dotnet-version: |
|
||||||
|
8.x.x
|
||||||
|
|
||||||
|
- name: Restore dependencies
|
||||||
|
run: dotnet restore
|
||||||
|
|
||||||
|
- name: Check for license issues
|
||||||
|
run: |
|
||||||
|
dotnet new tool-manifest
|
||||||
|
dotnet tool install --local liz.tool
|
||||||
|
dotnet liz "${{ env.solutionFile }}" --suppress-progressbar
|
||||||
|
|
||||||
|
checkVulnerabilities:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Check for vulnerabilities
|
||||||
|
uses: dependency-check/Dependency-Check_Action@main
|
||||||
|
id: depcheck
|
||||||
|
with:
|
||||||
|
project: ${{ env.projectName }}
|
||||||
|
path: "**/*.csproj"
|
||||||
|
format: "HTML"
|
||||||
|
out: "reports"
|
||||||
|
args: >
|
||||||
|
--failOnCVSS "7"
|
||||||
|
|
||||||
|
- name: Upload test results
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: Dependency Check Report
|
||||||
|
path: ${{github.workspace}}/reports
|
12
.github/workflows/dotnet.yml
vendored
12
.github/workflows/dotnet.yml
vendored
@ -24,18 +24,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
dotnet-version: |
|
dotnet-version: |
|
||||||
8.x.x
|
8.x.x
|
||||||
# 6.x.x
|
|
||||||
# - name: Check for vulnerabilities
|
|
||||||
# run: |
|
|
||||||
# VERSION=$(curl -s https://jeremylong.github.io/DependencyCheck/current.txt)
|
|
||||||
# curl -Ls "https://github.com/jeremylong/DependencyCheck/releases/download/v$VERSION/dependency-check-$VERSION-release.zip" --output dependency-check.zip
|
|
||||||
# unzip dependency-check.zip
|
|
||||||
# ./dependency-check/bin/dependency-check.sh -s "**/*.csproj" --project "${{ env.projectName }}" --failOnCVSS "7"
|
|
||||||
# - name: Check for license issues
|
|
||||||
# run: |
|
|
||||||
# dotnet new tool-manifest
|
|
||||||
# dotnet tool install --local liz.tool
|
|
||||||
# dotnet liz "${{ env.solutionFile }}" --suppress-progressbar
|
|
||||||
- name: Restore dependencies
|
- name: Restore dependencies
|
||||||
run: dotnet restore
|
run: dotnet restore
|
||||||
- name: Build
|
- name: Build
|
||||||
|
Loading…
Reference in New Issue
Block a user