mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-08-31 01:54:53 +00:00
security: fix command injection in cline auth via remote env var expansion (#1473)
All 9 cline.sh scripts embedded OPENROUTER_API_KEY directly into the
cloud_run command string, allowing shell metacharacter injection on the
remote server. Fix by escaping the dollar sign (\${OPENROUTER_API_KEY})
so the variable is expanded on the remote machine where it's already
set via agent_env_vars()/generate_env_config, not locally before being
passed to cloud_run.
Agent: security-auditor
Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
e2d6aa1444
commit
d8785c3d0b
9 changed files with 9 additions and 9 deletions
|
|
@ -20,7 +20,7 @@ agent_env_vars() {
|
|||
}
|
||||
agent_configure() {
|
||||
log_step "Authenticating Cline with OpenRouter..."
|
||||
cloud_run "source ~/.zshrc && cline auth -p openrouter -k \"${OPENROUTER_API_KEY}\""
|
||||
cloud_run "source ~/.zshrc && cline auth -p openrouter -k \"\${OPENROUTER_API_KEY}\""
|
||||
}
|
||||
agent_launch_cmd() { echo 'source ~/.zshrc && cline'; }
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ agent_env_vars() {
|
|||
|
||||
agent_configure() {
|
||||
log_step "Authenticating Cline with OpenRouter..."
|
||||
cloud_run "source ~/.zshrc && cline auth -p openrouter -k \"${OPENROUTER_API_KEY}\""
|
||||
cloud_run "source ~/.zshrc && cline auth -p openrouter -k \"\${OPENROUTER_API_KEY}\""
|
||||
}
|
||||
|
||||
agent_launch_cmd() {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ agent_env_vars() {
|
|||
}
|
||||
agent_configure() {
|
||||
log_step "Authenticating Cline with OpenRouter..."
|
||||
cloud_run "source ~/.zshrc && cline auth -p openrouter -k \"${OPENROUTER_API_KEY}\""
|
||||
cloud_run "source ~/.zshrc && cline auth -p openrouter -k \"\${OPENROUTER_API_KEY}\""
|
||||
}
|
||||
agent_launch_cmd() { echo 'source ~/.zshrc && cline'; }
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ agent_env_vars() {
|
|||
|
||||
agent_configure() {
|
||||
log_step "Authenticating Cline with OpenRouter..."
|
||||
cloud_run "source ~/.zshrc && cline auth -p openrouter -k \"${OPENROUTER_API_KEY}\""
|
||||
cloud_run "source ~/.zshrc && cline auth -p openrouter -k \"\${OPENROUTER_API_KEY}\""
|
||||
}
|
||||
|
||||
agent_launch_cmd() {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ agent_env_vars() {
|
|||
}
|
||||
agent_configure() {
|
||||
log_step "Authenticating Cline with OpenRouter..."
|
||||
cloud_run "source ~/.zshrc && cline auth -p openrouter -k \"${OPENROUTER_API_KEY}\""
|
||||
cloud_run "source ~/.zshrc && cline auth -p openrouter -k \"\${OPENROUTER_API_KEY}\""
|
||||
}
|
||||
agent_launch_cmd() { echo 'source ~/.zshrc && cline'; }
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ agent_env_vars() {
|
|||
}
|
||||
agent_configure() {
|
||||
log_step "Authenticating Cline with OpenRouter..."
|
||||
cloud_run "source ~/.zshrc && cline auth -p openrouter -k \"${OPENROUTER_API_KEY}\""
|
||||
cloud_run "source ~/.zshrc && cline auth -p openrouter -k \"\${OPENROUTER_API_KEY}\""
|
||||
}
|
||||
agent_launch_cmd() { echo 'source ~/.zshrc && cline'; }
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ agent_env_vars() {
|
|||
|
||||
agent_configure() {
|
||||
log_step "Authenticating Cline with OpenRouter..."
|
||||
cloud_run "source ~/.zshrc 2>/dev/null; cline auth -p openrouter -k \"${OPENROUTER_API_KEY}\""
|
||||
cloud_run "source ~/.zshrc 2>/dev/null; cline auth -p openrouter -k \"\${OPENROUTER_API_KEY}\""
|
||||
}
|
||||
|
||||
agent_launch_cmd() {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ agent_env_vars() {
|
|||
}
|
||||
agent_configure() {
|
||||
log_step "Authenticating Cline with OpenRouter..."
|
||||
cloud_run "source ~/.zshrc && cline auth -p openrouter -k \"${OPENROUTER_API_KEY}\""
|
||||
cloud_run "source ~/.zshrc && cline auth -p openrouter -k \"\${OPENROUTER_API_KEY}\""
|
||||
}
|
||||
agent_launch_cmd() { echo 'source ~/.zshrc && cline'; }
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ agent_env_vars() {
|
|||
|
||||
agent_configure() {
|
||||
log_step "Authenticating Cline with OpenRouter..."
|
||||
cloud_run "source ~/.zshrc && cline auth -p openrouter -k \"${OPENROUTER_API_KEY}\""
|
||||
cloud_run "source ~/.zshrc && cline auth -p openrouter -k \"\${OPENROUTER_API_KEY}\""
|
||||
}
|
||||
|
||||
agent_launch_cmd() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue