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

Update Checking-NuGet-package-vulnerabilities-with-OWASP-SafeNuGet.ma… #95

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@ When a library referencing a potential unsafe package is built using MyGet Build

![MyGet Build Services using OWASP SafeNuGet](Images/build-services-owasp.png)

## Can my build fail when such packages are consumed?
## Does my build fail when such packages are consumed?

It would be great if the build would fail entirely when such package is found. This can be done with simple configuration parameter for the SafeNuGet package. Find the *SafeNuGet.targets* file and update its contents to:

<Project ToolsVersion="4.0" xmlns="https://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask AssemblyFile="SafeNuGet.dll" TaskName="SafeNuGet.AreNuGetPackagesSafe" />
<Target Name="AfterBuild">
<AreNuGetPackagesSafe ProjectPath="$(MSBuildProjectDirectory)"
CacheTimeInMinutes="10" DontBreakBuild="false" />
</Target>
</Project>
By default, the build will fail when such a package is found. If you only want warnings, find the *SafeNuGet.targets* file and change the setting `DontBreakBuild` to `true`.