dns ca: escalate itself for the system store, like dns enable; never advise sudo moshcode - #522
Merged
Merged
Conversation
…advise sudo moshcode bonita: sudo moshcode dns ca → sudo: 'moshcode': command not found, because moshcode lives in the operator's PATH, not root's. The verb now escalates this one command from inside (escalateSelf, which carries the path and lets operatorHome find the person behind sudo) and falls back to the browser store alone with a note when no sudo is on offer; --user-only skips the prompt on purpose. The two skipped-step hints that said sudo moshcode dns ca now say to run moshcode dns ca from a terminal. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
ThreatCrush Security Scan8 finding(s) in the 3 file(s) this pull request changes. HIGH/CRITICAL: 1 | MEDIUM: 7
93 pre-existing finding(s) elsewhere in the repository — **HIGH/CRITICAL**: 7 | **MEDIUM**: 75 | **LOW**: 11Not introduced by this pull request. The full set is in the Security tab.
…and 73 more. Full results in the Security tab. Snippets are redacted; ThreatCrush never prints matched credential material. |
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.
What
moshcode dns caescalates itself for the system-store half, the waydns enablealready does, and never advisessudo moshcode ….Why
On bonita, following the hint the CLI printed:
moshcodeis installed in the operator's PATH (~/.local/bin), not root's.dns enablesolved this long ago by escalating the one command from inside (escalateSelf, which carries the path and letsoperatorHome()find the person behind sudo);dns cadid not, and its skipped-step hint pointed at the exact command that fails.Change
dns ca(and--remove): when not root and not--user-only, escalate viaescalateSelf; if that ran, return its code. If no sudo or tty is available, continue with the browser store only and say so.--user-onlykeeps it to the browser store with no prompt, for a machine where sudo is not on offer.trust.mjsnow say to runmoshcode dns ca(or--remove) from a terminal, which asks for sudo itself.Verified
node --test test/trust-registry.test.mjs test/trust.test.mjs test/dns*.test.mjs: 488 pass, 0 fail.node --checkon the three files.🤖 Generated with Claude Code