feat(cli): support file or stdin input for registry credentials - #2105
bodapatisaikrishna wants to merge 1 commit into
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: NVIDIA/nvcf/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe registry credential add command now accepts base64 secrets from a file or standard input. It validates credential sources, rejects conflicting methods, and documents the new option. ChangesRegistry Credential Input
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Merge Risk: ⚪ Minimal · up to The new file and stdin credential paths appear correctly connected. No actionable merge-blocking risk remains after normal checks. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Add --secret-file flag to nvcf-cli registry-credential add to allow reading base64 credentials from a file or stdin (-). Signed-off-by: bodapatisaikrishna <saikrishnabodapati@gmail.com>
6a49c02 to
112dd4d
Compare
TL;DR
Adds
--secret-filetonvcf-cli registry-credential add(accepting a file path or-for stdin) so sensitive credentials don't have to be passed directly in process arguments.Additional Details
Reads base64 credentials from a file or stdin, trims trailing line endings while preserving formatting, validates base64 format, and rejects conflicting authentication flags.
For the Reviewer
The main logic is in
src/clis/nvcf-cli/cmd/registry.goand accompanying unit tests inregistry_test.go.For QA
Ran unit tests covering file/stdin reading, line ending trimming, base64 validation, and mutual exclusivity via
go test ./cmd.Issues
Closes #2028
Checklist
Summary by CodeRabbit
CONTAINERartifact type.