Dependency Submission #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Dependency Submission | |
on: | |
workflow_dispatch: | |
#push: | |
permissions: | |
id-token: write | |
contents: write | |
jobs: | |
dependency-submission: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Create csproj from props | |
run: Copy-Item .\Directory.Packages.props -Destination .\Directory.Packages.csproj | |
- name: amend csproj | |
run: | | |
$file = Get-Content .\Directory.Packages.csproj | |
$file | ForEach-Object { | |
if($_.ReadCount -eq 1){ | |
$_ -replace '<Project>', '<Project Sdk="Microsoft.NET.Sdk">' | |
} else { | |
$_ | |
} | |
} | Set-Content .\Directory.Packages.csproj | |
- name: add csproj to a build-time temp solution | |
run: | | |
dotnet new sln --name cve-detection | |
dotnet sln .\cve-detection.sln add .\Directory.Packages.csproj | |
- name: Component detection | |
uses: advanced-security/[email protected] | |
with: | |
detectorsFilter: "Npm,NuGet" | |
filePath: "." | |