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

ImportedProjectEvent is visible for build check if /bl is specified #10935

Closed
YuliiaKovalova opened this issue Nov 5, 2024 · 2 comments
Closed
Assignees
Labels
Area: BuildCheck Area: Logging Priority:2 Work that is important, but not critical for the release triaged

Comments

@YuliiaKovalova
Copy link
Member

Issue Description

ImportedProjectEvent is visible for build check if /bl is specified.
If no /bl, the events are not visible to BuildCheck.

Steps to Reproduce

Demo_secrets.zip
1.Unpack the project
2. Build the project using the latest msbuild
.\dotnet build C:\Users\ykovalova\ProjectWithSecrets\ProjectWithSecrets.csproj -check
3. No imported events are caught by the custom check
4. Build the project using the latest msbuild
.\dotnet build C:\Users\ykovalova\ProjectWithSecrets\ProjectWithSecrets.csproj -check /bl

Expected Behavior

ImportedProject events are visible to BuildCheck

Actual Behavior

only if /bl switch is specified, the custom check works.

Analysis

No response

Versions & Configurations

No response

@maridematte maridematte added Area: Logging triaged Priority:2 Work that is important, but not critical for the release labels Nov 12, 2024
@JanKrivanek
Copy link
Member

The event needs to be added to BuildCheckForwardingLogger

@JanKrivanek
Copy link
Member

> .\dotnet.exe build .\ProjectWithSecrets.csproj -check -restore
Restore complete (1.2s)
You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
C:\test\imports\ProjectWithSecrets.csproj(15,27): error DU0203: Detected secret: CommonSecrets with value: 'UMe8Q~1Ly5d.K.bjFek.RTto_gfgf.gr.cp.gRTI'
C:\test\imports\ProjectWithSecrets.csproj(16,23): error DU0203: Detected secret: CommonSecrets with value: 'ghs_QhbXVlJpnmSLfnff31a8JvTcHq3tQf02oQdM'
C:\test\imports\ProjectWithSecrets.csproj(11,26): error DU0203: Detected secret: Username with value: 'jankrivanek'
  ProjectWithSecrets succeeded (3.0s) → bin\Debug\net9.0\ProjectWithSecrets.dll

Build failed with 3 error(s) in 7.0s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: BuildCheck Area: Logging Priority:2 Work that is important, but not critical for the release triaged
Projects
None yet
Development

No branches or pull requests

3 participants