Skip to content

Conversation

Ansible-man
Copy link
Contributor

Description

This PR allows users to pass the --interactive flag to zarf tools registry login. This helps prevent credentials from being exposed to bash history and syslog. Fully backwards compatible with the existing flags the --interactive flag will only prompt the user for information they did not provide at command runtime.
...

Related Issue

#4003

Checklist before merging

@Ansible-man Ansible-man requested review from a team as code owners July 20, 2025 03:14
Copy link

netlify bot commented Jul 20, 2025

Deploy Preview for zarf-docs canceled.

Name Link
🔨 Latest commit 638cea3
🔍 Latest deploy log https://app.netlify.com/projects/zarf-docs/deploys/68bb8a10c602bd0008fb0548

@Ansible-man
Copy link
Contributor Author

Ansible-man commented Jul 20, 2025

I will figure out how to update the docs tomorrow

@brandtkeller
Copy link
Member

I will figure out how to update the docs tomorrow

make docs-and-schema should update the docs accordingly.

Copy link

codecov bot commented Jul 21, 2025

Codecov Report

❌ Patch coverage is 13.95349% with 74 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/cmd/crane.go 13.95% 73 Missing and 1 partial ⚠️
Files with missing lines Coverage Δ
src/cmd/crane.go 25.34% <13.95%> (-4.49%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@brandtkeller brandtkeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DCO, lint, and Docs and I believe this is in a good place. Functionality performs as expected for me locally.

craneCmd.Example = lang.CmdToolsRegistryLoginExample
craneCmd.Flags().BoolVar(&o.interactive, "interactive", false, lang.CmdToolsRegistryLoginFlagInteractive)

craneCmd.PreRunE = func(cmd *cobra.Command, args []string) error {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appreciative of this addition - while not strictly required - it is a great addition to this workflow from the Zarf UX perspective.

@cade-thomas
Copy link

cade-thomas commented Jul 21, 2025

I can get this done tonight hopefully - ansible-mans other account

@cade-thomas
Copy link

@brandtkeller Please let me know if there is anything else to be done here and I can get to it this week - ansible-man

@brandtkeller
Copy link
Member

Please let me know if there is anything else to be done here and I can get to it this week - @Ansible-man

DCO needs signing - typically git commit -s resolves this issue. I need to check on our signed commits requirement.

Otherwise the linting job has a few minor items that need to be adjusted otherwise this looks good to me.

Copy link
Member

@brandtkeller brandtkeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

linting feedback

src/cmd/crane.go Outdated
if err != nil {
return err
}
cmd.Flags().Set("username", uname)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linting flagged here for error check

Suggested change
cmd.Flags().Set("username", uname)
err := cmd.Flags().Set("username", uname)
if err != nil {
return err
}

src/cmd/crane.go Outdated
if err != nil {
return err
}
cmd.Flags().Set("password", pass)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linting flagged here

Suggested change
cmd.Flags().Set("password", pass)
err := cmd.Flags().Set("password", pass)
if err != nil {
return err
}

src/cmd/crane.go Outdated
}
cmd.Flags().Set("password", pass)
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

linting - remove this blank line

src/cmd/crane.go Outdated

}
return o.originalRunFn(cmd, args)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

linting - remove this blank line

Ansible-man and others added 19 commits September 5, 2025 20:10
Signed-off-by: Cade Thomas <[email protected]>
…v#4013)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Cade Thomas <[email protected]>
…-dev#4014)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Cade Thomas <[email protected]>
Signed-off-by: Allen Conlon <[email protected]>
Signed-off-by: Brandt Keller <[email protected]>
Co-authored-by: Brandt Keller <[email protected]>
Signed-off-by: Cade Thomas <[email protected]>
…o 28.3.2+incompatible (zarf-dev#4009)

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Austin Abro <[email protected]>
Signed-off-by: Cade Thomas <[email protected]>
…2.1 (zarf-dev#4015)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Cade Thomas <[email protected]>
…arf-dev#4020)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Cade Thomas <[email protected]>
…v#4017)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Cade Thomas <[email protected]>
…rf-dev#4019)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Cade Thomas <[email protected]>
…arf-dev#4018)

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Brandt Keller <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Brandt Keller <[email protected]>
Signed-off-by: Cade Thomas <[email protected]>
…f-dev#3932)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Cade Thomas <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Cade Thomas <[email protected]>
…arf-dev#4010)

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Brandt Keller <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Brandt Keller <[email protected]>
Signed-off-by: Cade Thomas <[email protected]>
…o 28.3.3+incompatible (zarf-dev#4025)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Cade Thomas <[email protected]>
…v#4027)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Cade Thomas <[email protected]>
…8.3.3+incompatible in the docker group across 1 directory (zarf-dev#4030)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Cade Thomas <[email protected]>
AustinAbro321 and others added 29 commits September 5, 2025 20:10
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Co-authored-by: Kit Patella <[email protected]>
Signed-off-by: Cade Thomas <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Cade Thomas <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Cade Thomas <[email protected]>
…-dev#4082)

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Brandt Keller <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Brandt Keller <[email protected]>
Signed-off-by: Cade Thomas <[email protected]>
…rf-dev#4088)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Cade Thomas <[email protected]>
…arf-dev#4089)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Cade Thomas <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Cade Thomas <[email protected]>
Signed-off-by: Brandt Keller <[email protected]>
Co-authored-by: Austin Abro <[email protected]>
Signed-off-by: Cade Thomas <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Brandt Keller <[email protected]>
Signed-off-by: Cade Thomas <[email protected]>
Signed-off-by: Chad Beaudin <[email protected]>
Signed-off-by: Cade Thomas <[email protected]>
zarf-dev#4099)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Cade Thomas <[email protected]>
Signed-off-by: Brandt Keller <[email protected]>
Signed-off-by: Cade Thomas <[email protected]>
…ev#4100)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Cade Thomas <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Cade Thomas <[email protected]>
)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Cade Thomas <[email protected]>
… 4.3.1 (zarf-dev#4106)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Cade Thomas <[email protected]>
Signed-off-by: Brandt Keller <[email protected]>
Signed-off-by: Cade Thomas <[email protected]>
…2.5 (zarf-dev#4101)

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Brandt Keller <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Brandt Keller <[email protected]>
Signed-off-by: Cade Thomas <[email protected]>
…-dev#4114)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Cade Thomas <[email protected]>
…v#4115)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Cade Thomas <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Cade Thomas <[email protected]>
Signed-off-by: Allen Conlon <[email protected]>
Signed-off-by: Cade Thomas <[email protected]>
Signed-off-by: Brandt Keller <[email protected]>
Co-authored-by: Maciej Szulik <[email protected]>
Signed-off-by: Cade Thomas <[email protected]>
Signed-off-by: Cade Thomas <[email protected]>
@Ansible-man Ansible-man force-pushed the interactive-registry-login branch from edfe951 to 638cea3 Compare September 6, 2025 01:10
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.

8 participants