Repository navigation
ktms CLI: a named context wins over the environment - #109
Merged
Merged
Conversation
A context named with --context or KTMS_CONTEXT no longer mixes with KTMS_ADDR or KTMS_ADMIN_KEY from the shell. Private files are written through a fresh temporary file, keychain writes are read back since security -i exits 0 on failure, and KTMS_TLS must be a boolean.
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #108, from the review of the same code in light-tokenmeter (ai-process/light-tokenmeter#23):
--contextorKTMS_CONTEXTwins overKTMS_ADDR,KTMS_TLS,KTMS_HTTP,KTMS_ADMIN_KEYandKTMS_API_KEY, so its keys never go to an address left in the shell (and the shell's key never goes to its address). Flags still win.writePrivategoes throughos.CreateTemp+Chmod 0600+ rename: a leftover or planted.tmpfile can no longer set the mode.security -iexits 0 when its command fails (checked), so a keychain write is read back.KTMS_TLSis parsed withstrconv.ParseBool; anything else is a usage error instead of silent plaintext.