mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-18 08:36:13 +00:00
sec8: document Run() invariant — command must never come from user HTTP input
Establishes the constraint in godoc so future authors have a visible signal before passing user-supplied values to session.CombinedOutput. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
1cbca1e7cc
commit
6f488c2016
@@ -67,6 +67,9 @@ func (c *Client) getConfig() *ssh.ClientConfig {
|
||||
}
|
||||
|
||||
// Run executes a command on the remote host and returns the combined stdout and stderr.
|
||||
//
|
||||
// command MUST be a hardcoded shell literal or constructed entirely from
|
||||
// internal, service-controlled values — never from user-supplied HTTP input.
|
||||
func (c *Client) Run(command string) (string, error) {
|
||||
config := c.getConfig()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user