Skip to content

Replace mitchellh/cli With Internal CLI Package - #405

Open
o-t-reilly wants to merge 5 commits into
release/0.5.xfrom
o-t-reilly/CORI2-3216
Open

Replace mitchellh/cli With Internal CLI Package#405
o-t-reilly wants to merge 5 commits into
release/0.5.xfrom
o-t-reilly/CORI2-3216

Conversation

@o-t-reilly

@o-t-reilly o-t-reilly commented Aug 3, 2026

Copy link
Copy Markdown

[CORI2-3216]

mitchellh/cli is archived and pulls in a transitive dependency with a known vulnerability: GO-2026-5932 via posener/complete → golang.org/x/crypto/openpgp. No fixed version of mitchellh/cli exists.

This PR removes the dependency entirely and replaces its functionality with an internal package at internal/cli, preserving all existing logic and signatures.

PCI review checklist

  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.

  • If applicable, I've worked with GRC to document the impact of any changes to security controls.

    Examples of changes to controls include access controls, encryption, logging, etc.

  • If applicable, I've worked with GRC to ensure compliance due to a significant change to the in-scope PCI environment.

    Examples include changes to operating systems, ports, protocols, services, cryptography-related components, PII processing code, etc.

@o-t-reilly
o-t-reilly requested a review from a team as a code owner August 3, 2026 19:17
Match mitchellh/cli behavior by displaying help when an unknown
command is encountered, instead of silently returning exit code 127.

- Add help output in CLI.Run() when command lookup fails
- Add test to verify HelpFunc is called for unknown commands
- Improves user experience with immediate feedback on typos
@o-t-reilly
o-t-reilly force-pushed the o-t-reilly/CORI2-3216 branch from aa485a3 to 2dfc20e Compare August 6, 2026 18:06
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