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

Pausing log file not thread safe #2717

Open
phillebaba opened this issue Jul 12, 2024 · 0 comments
Open

Pausing log file not thread safe #2717

phillebaba opened this issue Jul 12, 2024 · 0 comments
Labels
tech-debt 💳 Debt that the team has charged and needs to repay

Comments

@phillebaba
Copy link
Member

Describe what should be investigated or refactored

When printing credentials to the debug log the log file writer is paused temporarily to avoid writing the credentials to the log file. The way this is implemented is not thread safe, meaning the it is completely possible for the writer to be resumed if PrintCredentialTable is run in parallel.

Links to any relevant code

https://github.com/defenseunicorns/zarf/blob/eca0c530a04c3ed155c03761eb45bd16ba717b79/src/pkg/message/credentials.go#L31-L35

Additional context

N/A

@phillebaba phillebaba added the tech-debt 💳 Debt that the team has charged and needs to repay label Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech-debt 💳 Debt that the team has charged and needs to repay
Projects
Status: No status
Development

No branches or pull requests

1 participant