{"record":{"id":"63c951c61ce8dbdf","repo":"JuliusBrussee/caveman","slug":"listen-address-q-is-not-loopback-standalone-prox","errorCode":null,"errorMessage":"listen address %q is not loopback; standalone proxy has no inbound authentication","messagePattern":"listen address %q is not loopback; standalone proxy has no inbound authentication","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"proxy/internal/config/config.go","lineNumber":131,"sourceCode":"\t\treturn Config{}, err\n\t}\n\treturn cfg, nil\n}\n\n// validateListen keeps standalone's unauthenticated BYOK proxy local to one\n// operator. Binding an empty, wildcard, or non-loopback host would expose every\n// configured provider credential to the network with no inbound authentication.\nfunc validateListen(listen string) error {\n\thost, port, err := net.SplitHostPort(strings.TrimSpace(listen))\n\tif err != nil || port == \"\" {\n\t\treturn fmt.Errorf(\"listen address %q must be loopback host:port\", listen)\n\t}\n\tif strings.EqualFold(host, \"localhost\") {\n\t\treturn nil\n\t}\n\tip := net.ParseIP(host)\n\tif ip == nil || !ip.IsLoopback() {\n\t\treturn fmt.Errorf(\"listen address %q is not loopback; standalone proxy has no inbound authentication\", listen)\n\t}\n\treturn nil\n}\n\nfunc (c Config) withDefaults() Config {\n\tif label := env.String(\"CAVEMAN_LABEL\", \"\"); label != \"\" {\n\t\tc.Label = label\n\t}\n\tif c.Label == \"\" {\n\t\tc.Label = \"local\"\n\t}\n\tif mode := env.String(\"CAVEMAN_MODE\", \"\"); mode != \"\" {\n\t\tc.Mode = mode\n\t}\n\tif listen := env.String(\"CAVEMAN_LISTEN\", \"\"); listen != \"\" {\n\t\tc.Listen = listen\n\t}\n\tif sub := env.String(\"CAVEMAN_SUBSCRIPTION_COMPRESS\", \"\"); sub != \"\" {","sourceCodeStart":113,"sourceCodeEnd":149,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/5184b3d11ac6a1acb7d44b9bfaa31698157cff97/proxy/internal/config/config.go#L113-L149","documentation":"validateListen rejects non-loopback hosts because the standalone proxy has no inbound authentication; binding 0.0.0.0 or a LAN IP would expose every configured provider key to the network. This is a security guard, not a formatting check.","triggerScenarios":"Thrown at proxy/internal/config/config.go:133 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Bind to 127.0.0.1 or localhost only","Put an authenticating reverse proxy in front if remote access is required","Use a tunnel (e.g. SSH port forward) for remote use"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5184b3d11ac6a1acb7d44b9bfaa31698157cff97","analyzedAt":"2026-08-18T03:14:35.516Z","contentChangedAt":"2026-08-18T03:14:35.516Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}