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

refactor: move table printing out of pkg #2942

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

phillebaba
Copy link
Member

Description

This change moves table printing out of pkg and into cmd. Any table printing should be specific to the CLI and should not be a concern for the exported library.

Related Issue

Depends on #2941
Relates to #2576

Checklist before merging

@phillebaba phillebaba requested review from a team as code owners August 29, 2024 14:26
Copy link

netlify bot commented Aug 29, 2024

Deploy Preview for zarf-docs canceled.

Name Link
🔨 Latest commit e3e9689
🔍 Latest deploy log https://app.netlify.com/sites/zarf-docs/deploys/66d823da665dab0008275b72

Copy link

codecov bot commented Aug 29, 2024

Codecov Report

Attention: Patch coverage is 2.54777% with 153 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/cmd/common/table.go 0.00% 112 Missing ⚠️
src/pkg/packager/deploy.go 0.00% 11 Missing ⚠️
src/cmd/tools/zarf.go 0.00% 10 Missing ⚠️
src/cmd/package.go 0.00% 9 Missing ⚠️
src/cmd/initialize.go 0.00% 8 Missing ⚠️
src/pkg/packager/common.go 0.00% 2 Missing ⚠️
src/cmd/connect.go 0.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/pkg/cluster/state.go 62.90% <100.00%> (ø)
src/pkg/message/message.go 11.40% <ø> (+1.32%) ⬆️
src/cmd/connect.go 0.00% <0.00%> (ø)
src/pkg/packager/common.go 52.00% <0.00%> (-1.07%) ⬇️
src/cmd/initialize.go 0.00% <0.00%> (ø)
src/cmd/package.go 0.00% <0.00%> (ø)
src/cmd/tools/zarf.go 0.00% <0.00%> (ø)
src/pkg/packager/deploy.go 9.46% <0.00%> (+0.39%) ⬆️
src/cmd/common/table.go 0.00% <0.00%> (ø)

Signed-off-by: Philip Laine <philip.laine@gmail.com>
@phillebaba phillebaba force-pushed the refactor/printing-tables branch 2 times, most recently from 3a67536 to e3e9689 Compare September 4, 2024 09:09
Signed-off-by: Philip Laine <philip.laine@gmail.com>
@phillebaba
Copy link
Member Author

I need to figure out how to pause log output for credentials in a proper way before this can be merged.

switch strings.ToLower(componentName) {
case cluster.GitKey:
message.Notef("Git Server push password (username: %s):", state.GitServer.PushUsername)
fmt.Println(state.GitServer.PushPassword)

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information High

Sensitive data returned by an access to PushPassword
flows to a logging call.
fmt.Println(state.GitServer.PushPassword)
case cluster.GitReadKey:
message.Notef("Git Server (read-only) password (username: %s):", state.GitServer.PullUsername)
fmt.Println(state.GitServer.PullPassword)

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information High

Sensitive data returned by an access to PullPassword
flows to a logging call.
fmt.Println(state.ArtifactServer.PushToken)
case cluster.RegistryKey:
message.Notef("Image Registry password (username: %s):", state.RegistryInfo.PushUsername)
fmt.Println(state.RegistryInfo.PushPassword)

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information High

Sensitive data returned by an access to PushPassword
flows to a logging call.
fmt.Println(state.RegistryInfo.PushPassword)
case cluster.RegistryReadKey:
message.Notef("Image Registry (read-only) password (username: %s):", state.RegistryInfo.PullUsername)
fmt.Println(state.RegistryInfo.PullPassword)

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information High

Sensitive data returned by an access to PullPassword
flows to a logging call.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant