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

SECURITY: Secrets are not redacted for generated tools #1504

Closed
Droppers opened this issue Jan 8, 2025 · 2 comments
Closed

SECURITY: Secrets are not redacted for generated tools #1504

Droppers opened this issue Jan 8, 2025 · 2 comments
Labels
Milestone

Comments

@Droppers
Copy link

Droppers commented Jan 8, 2025

Usage Information

9.0.3

Description

Since Nuke version 9 secrets in ArgumentStringHandler are not redacted:

DotNet($"--secret {"should-be-redacted":r}");

// dotnet --secret should-be-redacted

FTR, the fluent API is NOT affected, and works as expected:

DotNetNuGetPush(_ => _
   .SetApiKey("secret"));

// dotnet nuget push --api-key [REDACTED]

Reproduction Steps

Arguments are converted to string, but the output filter is never applied. See the following method, I think 'arguments.GetFilter()' should be passed as the last parameter, but is currently not present.

https://github.com/nuke-build/nuke/blame/5b4f3ca9865f11168e9ab7f81bc93716c02c9c53/source/Nuke.Tooling/ToolTasks.Run.cs#L59

Expected Behavior

Output filter is applied and secrets are filtered.

Actual Behavior

Secrets are not filtered.

Regression?

Worked fine is version 8

Known Workarounds

None

Could you help with a pull-request?

No

@Droppers Droppers added the bug label Jan 8, 2025
@matkoch matkoch added this to the v9.0.4 milestone Jan 8, 2025
@matkoch
Copy link
Member

matkoch commented Jan 8, 2025

thanks for spotting this

@matkoch matkoch closed this as completed Jan 8, 2025
@matkoch matkoch pinned this issue Jan 8, 2025
@matkoch matkoch changed the title Secrets are not redacted for generated tools SECURITY: Secrets are not redacted for generated tools Jan 8, 2025
@Droppers
Copy link
Author

When will the new version be released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants