Repository navigation
fix(config): the audit-keys alert names the removal commands - #2663
Merged
Merged
Conversation
Plans #2513. The change folder holds the proposal with its feasibility check, the design, the spec delta for config-commands and the tasks.
The alert of `devops config audit-keys` named `devops config set <key> <val>`. That command stores a credential in the keyring and writes no config file, so the plaintext value stayed and the audit failed again. A plain `devops config unset <key>` edits only the active file, so it could not remove a leak in the global file while a project file was active. The alert now names `devops config set <key>`, which asks for the value at a hidden prompt, and `DEVOPS_CLI_CONFIG=<file> devops config unset <key>`, which removes the value from the file of the leak. The same command is in the help of `audit-keys`, in the help of `unset` and in the generated documents. The tests follow the alert and check that the next audit passes. Fixes #2513
A section name or a path such as `[/x]` is markup for the terminal. The alert of a plaintext secret and the line of an unaudited file printed it without a guard, so Rich raised a MarkupError and no alert showed. Both lines now print with `safe=True`, as `devops config unset` does.
The review of the alert found four defects in its text. - Step 1 named `devops config set <key>`. Its prompt reads one line, so a PEM key kept only its first line, and step 2 then removed the only complete copy from the file. The alert now adds `--from-file <path>` for a multi-line credential. - The alert did not say to quote the file and the key. A section name with shell syntax ran when a person pasted the command. It now says to quote both values. - The removal keeps a copy of the file that still holds the value, and the audit does not scan the copy. The alert now says to delete the copy by hand. The fix of the copy is #2645. - The help, the generated documents and the knowledge base name the same steps. The design records the limit of the command: a key that a YAML merge key gives is #2656. The text of the change and of the help is shorter, in ASD-STE100 sentences.
Archives the change folder of #2513 and merges its spec delta into the config-commands capability.
Owner
Author
|
Test results at the head of this branch (rebased on origin/main ca9c1ad).
|
dan-petty
marked this pull request as ready for review
October 29, 2026 14:59
dan-petty-release Bot
added a commit
that referenced
this pull request
Oct 29, 2026
🤖 I have created a release *beep* *boop* --- ## [0.16.5](v0.16.4...v0.16.5) (2026-10-29) ### Bug Fixes * **ai:** name benchmark servers and models by host and port ([#2666](#2666)) ([8a08031](8a08031)), closes [#2481](#2481) * **config:** the audit-keys alert names the removal commands ([#2663](#2663)) ([3eb138d](3eb138d)), closes [#2513](#2513) * **k8s:** the MCP tool k8s_logs takes no Loki URL ([#2668](#2668)) ([39fae85](39fae85)), closes [#2635](#2635) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
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.
devops config audit-keysfound a plaintext secret in a config file but named no command that removes it. The alert told the person to rundevops config set <key> <val>. That command stores a credential in the keyring and writes no config file, so the plaintext value stayed and the audit failed again. A plaindevops config unset <key>edits only the active file, so it could not remove a leak in another file.The alert now gives two steps for each leak. Step 1 is
devops config set <key>, with--from-file <path>for a multi-line credential, such as a PEM key. Step 2 isDEVOPS_CLI_CONFIG=<file> devops config unset <key>, which edits the file of the leak. This command already worked. No text named it, and the error of an unknown key already used it, so the change adds no option.The alert also says to quote the file and the key. It says that step 2 keeps a copy
<file>.bak-<time>that still holds the value, and that a person deletes the copy by hand. The alert and the line of an unaudited file print withsafe=True, so a name such as[/x]does not stop the print. The help, the generated documents and the knowledge base name the same commands.Follow-up items: #2645 (the copy holds the removed secret), #2656 (
unsetfails for a key from a YAML merge key), #2511 (nested secret keys).Change: openspec/changes/archive/2026-10-29-2513-audit-keys-names-unset-command/
Closes #2513