fix: require auth when running goose on non loopback address (#6478)

This commit is contained in:
Michael Neale
2026-01-14 13:14:50 +11:00
committed by GitHub
parent 1d4e4b1281
commit d923b323f8
2 changed files with 275 additions and 226 deletions
+9 -1
View File
@@ -832,6 +832,13 @@ enum Command {
/// Authentication token for both Basic Auth (password) and Bearer token
#[arg(long, help = "Authentication token to secure the web interface")]
auth_token: Option<String>,
/// Allow running without authentication when exposed on the network (unsafe)
#[arg(
long,
help = "Skip auth requirement when exposed on the network (unsafe)"
)]
no_auth: bool,
},
/// Terminal-integrated session (one session per terminal)
@@ -1520,7 +1527,8 @@ pub async fn cli() -> anyhow::Result<()> {
host,
open,
auth_token,
}) => crate::commands::web::handle_web(port, host, open, auth_token).await,
no_auth,
}) => crate::commands::web::handle_web(port, host, open, auth_token, no_auth).await,
Some(Command::Term { command }) => handle_term_subcommand(command).await,
None => handle_default_session().await,
}