DotUtils.BuildChecks
0.0.6-beta
dotnet add package DotUtils.BuildChecks --version 0.0.6-beta
NuGet\Install-Package DotUtils.BuildChecks -Version 0.0.6-beta
<PackageReference Include="DotUtils.BuildChecks" Version="0.0.6-beta"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="DotUtils.BuildChecks" Version="0.0.6-beta" />
<PackageReference Include="DotUtils.BuildChecks"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add DotUtils.BuildChecks --version 0.0.6-beta
#r "nuget: DotUtils.BuildChecks, 0.0.6-beta"
#addin nuget:?package=DotUtils.BuildChecks&version=0.0.6-beta&prerelease
#tool nuget:?package=DotUtils.BuildChecks&version=0.0.6-beta&prerelease
DotUtils Custom BuildChecks
UntrustedLocationCheck
It is strongly recommended not to place MSBuild project files into locations where other logic have write access to the parent folders. That is because MSBuild (more specifically SDK common targets) hierarchically traverses folder structure for auto-importable msbuild logic. This Check flags attempts to build from Downloads folder.
EnvironmentVariableSecretsCheck
The UsedEnvironmentVariablesCheck is a custom MSBuild check that detects sensitive data and secrets in environment variables used during the build process. This check helps identify potential security risks by scanning environment variable values for common secrets, explicit secrets, and usernames. The check automatically monitors environment variable access during the build process.
When a secret is detected, it generates a build warning with the following information:
- Secret type (SubKind)
- Secret value (truncated based on verbose settings)
- Location in build files (file, line, column)
Example Output
warning DU0202: CommonSecret with value: 'APIKey123***' at project.props(12,5)
ImportedProjectsSecretsCheck
The ImportedProjectsSecretsCheck is a custom MSBuild check that scans imported project files for sensitive data and secrets during the build process. This security-focused check examines the content of imported .props and .targets files to identify potential security risks such as common secrets, explicit secrets, and usernames embedded in the project files.
The check automatically scans project files when they are imported during the build process. It respects the configured evaluation scope to determine which imported files should be analyzed.
When a secret is detected, it generates a build warning with the following information:
- Secret type (CommonSecrets, ExplicitSecrets, or Username)
- The detected secret value
- Precise location within the imported file (file path, line, column)
Example Output
warning DU0203: CommonSecret with value: 'SuperSecretToken123' at imported/custom.props(15,8)
Note: The check considers the evaluation scope configuration to determine which imported projects to analyze, helping to focus the security scanning on relevant project files within your build hierarchy.
UnexpectedNugetBuildLogic
TBD
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.0.6-beta | 74 | 11/5/2024 |
0.0.5-beta | 60 | 11/4/2024 |
0.0.4-beta | 59 | 10/22/2024 |
0.0.3-beta | 60 | 10/22/2024 |
0.0.2-beta | 123 | 10/18/2024 |