improvement(non-interactive): make UserInteractive prompt-gate the standard (docs + core-isolation)#104
Closed
Gumbees wants to merge 1 commit into
Closed
improvement(non-interactive): make UserInteractive prompt-gate the standard (docs + core-isolation)#104Gumbees wants to merge 1 commit into
Gumbees wants to merge 1 commit into
Conversation
…e standard The interactive branch must never be reachable in an unattended run. Gate it on `[Environment]::UserInteractive` so a missing/renamed/unseen RMM variable can't drop the script into Read-Host (which errors "NonInteractive mode" and loops). - Core-isolation enable/disable: add `-and [Environment]::UserInteractive` to the existing gate (bare $RMM left as-is per the earlier revert -- non-interactive part only). - CLAUDE.md: document the gate as the input-handling standard. - script-template-powershell.ps1: update the template gate to match. Checkpoint scripts (#100) and suspend-bitlocker (#101) already carry this gate. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.
Once credits are available, push a new commit or reopen this pull request to trigger a review.
Contributor
Author
|
Superseded by #105, which drops the RMM variable rather than keeping it as an optional override, and carries the CLAUDE.md + template standard update. |
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
Adopt
if ($env:RMM -ne "1" -and [Environment]::UserInteractive)as the standard input-handling gate, so a missing/renamed/unseen RMM variable can never leave a script stuck onRead-Host("Windows PowerShell is in NonInteractive mode") in an unattended NinjaRMM run.$env:RMM."-and [Environment]::UserInteractivepart; bare$RMMleft as-is per the earlier revert (Revert #97 (core-isolation $env: change) #98). These were the only scripts edited today still missing the guard.Checkpoint scripts (#100) and suspend-bitlocker (#101) already carry this gate.
Not changed
Core-isolation logic, exit codes, and their (reverted)
$RMMstyle are untouched apart from the guard.As always, merging does not update NinjaOne — deployed copies must be refreshed from
main.🤖 Generated with Claude Code