Merge pull request #35408 from xilabao/add-secret-to-pflag
Automatic merge from submit-queue (batch tested with PRs 35408, 41915, 41992, 41964, 41925) add secret option to flag To resolve the issue of security(pr #35030 ), > @smarterclayton commented 5 days ago > This is unfortunately not all flags that could be secrets. The best option would be to add support in spf13/pflag to tag a flag as a secret, and then use that bit to determine the list. > > Also, Command() could be used in contexts that need exact parameters (for subshell execution), so we would need to add a new method or extend the signature here to allow exact flags to be retrieved. we could add a secret option to the flags.
This commit is contained in:
@@ -184,7 +184,7 @@ func (o AnnotateOptions) RunAnnotate(f cmdutil.Factory, cmd *cobra.Command) erro
|
||||
return err
|
||||
}
|
||||
|
||||
changeCause := f.Command()
|
||||
changeCause := f.Command(cmd, false)
|
||||
|
||||
mapper, typer, err := f.UnstructuredObject()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user