Skip to content

High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.

security: add debug log for nil URLReader fallback and document session auth scope

Bosch5c315a4b6102
diff --git a/internal/bridge/bridge.go b/internal/bridge/bridge.go
index 0d0add0a..1ed0d35d 100644
--- a/internal/bridge/bridge.go
+++ b/internal/bridge/bridge.go
@@ -535,6 +535,7 @@ func (b *Bridge) ExecuteAction(ctx context.Context, kind string, req ActionReque
urlReader := b.URLReader
if urlReader == nil {
urlReader = defaultActionURLReader
+ slog.Debug("URLReader is nil, using default fallback (guard checks may be no-ops without chromedp context)")
}
var beforeURL string
if checkNav {
diff --git a/internal/config/config_load.go b/internal/config/config_load.go
index 161ff118..357b4d59 100644
--- a/internal/config/config_load.go
+++ b/internal/config/config_load.go
@@ -99,6 +99,17 @@ func Load() *RuntimeConfig {
},
// Session defaults
+ // NOTE: Agent sessions are enabled by default with mode "preferred".
+ // This means every instance accepts Authorization: Session tokens out of the box.
+ // Creating a session requires bearer auth first, but the default-on posture adds
+ // an auth surface that users may not be aware of. Consider setting Enabled: false
+ // if agent sessions are not needed.
+ //
+ // There is currently no per-agent authorization scoping on session management:
+ // any authenticated caller can create/list/revoke/rotate sessions for any agentId.
+ // This is acceptable in trusted single-operator environments but should be
+ // restricted (e.g. bearer-only or agent-scoped permissions) for multi-agent setups
+ // where one compromised agent could disrupt others.
Sessions: SessionsRuntimeConfig{
Agent: AgentSessionRuntimeConfig{
Enabled: true,
diff --git a/internal/dashboard/agent_session_api.go b/internal/dashboard/agent_session_api.go
index bb73ba55..c66a021a 100644
--- a/internal/dashboard/agent_session_api.go
+++ b/internal/dashboard/agent_session_api.go
@@ -11,6 +11,12 @@ import (
)
// AgentSessionAPI handles CRUD operations for agent sessions.
+//
+// SECURITY NOTE: There is no per-agent authorization scoping. Any authenticated
+// caller (bearer or cookie) can create sessions for any agentId, list all sessions,
+// revoke any agent's session, and rotate any agent's token. This is by design for
+// trusted single-operator environments. For multi-agent setups, consider restricting
+// session management to bearer-only auth or adding agent-scoped permissions.
type AgentSessionAPI struct {
store *agentsession.Store
}