bug(sdk/go): gateways with host-derived names (containing dots) cannot be loaded
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 72/100
Línea de trabajo
Comienza con validateGatewayName en gateway/paths.go bajo sdk/go/openshell/v1/gateway y sigue cómo LoadConfig, NewClient (incluido el camino del gateway activo con nombre vacío) y ListGateways la invocan. Lee las pruebas existentes de validación de rutas para ver qué casos de traversal ya están cubiertos. Está terminado cuando los nombres con puntos como gw.example.com y los hosts IPv4 se cargan, se listan y se resuelven como activos, mientras que .. y los separadores de ruta siguen siendo rechazados.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
User Story
I use OpenShell and build automation against its SDKs. While reviewing sdk/ I hit this behavior and reproduced it with the minimal test below against main. Any gateway added by URL without --name is affected.
Problem Statement
openshell gateway add https://gw.example.com derives the gateway name from the host (gw.example.com). The CLI accepts any single path component as a name, but the Go SDK's validateGatewayName rejects any name containing a dot (gateway/paths.go).
Impact / Why This Matters
gateway.NewClient("gw.example.com") and gateway.LoadConfig fail with invalid gateway name: name must not contain dots; when that gateway is the active one, NewClient("") fails too, and ListGateways() silently omits it. Users must re-register gateways under a dot-free name to use the Go SDK.
Acceptance Criteria
- The Go SDK loads, lists and resolves (as active) any gateway name the CLI can create, including host-derived names such as
gw.example.comand IPv4 hosts. - Path traversal (
.., separators) is still rejected.
Reproduction Steps
openshell gateway add https://gw.example.com(or create$XDG_CONFIG_HOME/openshell/gateways/gw.example.com/metadata.jsonwith{"gateway_endpoint":"https://gw.example.com:443","auth_mode":"none"}andactive_gateway=gw.example.com).- Call
gateway.LoadConfig("gw.example.com"),gateway.LoadConfig(""),gateway.ListGateways().
Suggested UX (if applicable)
No response
Environment
- OpenShell:
main@ 82977e2 (2026-10-13) - SDK: Go (
sdk/go/openshell/v1/gateway) - Toolchain: Go 1.25.4 linux/amd64, Node 22
Logs
gateway: invalid gateway name: name must not contain dots
gateway: no active gateway: active_gateway contains invalid name "gw.example.com": gateway: invalid gateway name: name must not contain dots
ListGateways omits the CLI-registered gateway
- Lenguaje dominante
- Rust
- Estrellas
- 16.3k
- Forks
- 1.8k
- Merge medio
- 2 d 6 h
- PR fusionados (30 d)
- 399
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de NVIDIA/OpenShell
-
state:triage-needed
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
state:triage-needed
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
bug(sdk/go): browser login callback binds 127.0.0.1 but redirect_uri uses localhostQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertostate:triage-needed
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
NVIDIA/OpenShell#4518 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
state:triage-needed
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
bug(sdk/go): edge (Cloudflare Access) token is cached for the client lifetime and never reloadedAbiertostate:triage-needed
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
NVIDIA/OpenShell#4515 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de NVIDIA/OpenShell
Issues similares
-
Stack overflow in `check bans` with `include-dependencies = true` and a dev-dependency cycleAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
EmbarkStudios/cargo-deny#910 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
tursodatabase/turso#10054 ·
Los mantenedores suelen responder en 1 día
-
build: Update rust versionPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertodependencies
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
ibm-granite-community/granite-cli#229 ·
Los mantenedores suelen responder en 1 día
-
setTargetAtTime booked ahead of time starts its curve early (values blow up before start_time)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
orottier/web-audio-api-rs#658 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
aosama/astronomical#1318 ·
Los mantenedores suelen responder en 1 día