{"record":{"id":"86d3631dc99cd9f4","repo":"paperclipai/paperclip","slug":"networkallowlist-index-must-be-a-hostname-hos","errorCode":null,"errorMessage":"networkAllowlist[${index}] must be a hostname, hostname:port, or origin URL.","messagePattern":"networkAllowlist\\[(.+?)\\] must be a hostname, hostname:port, or origin URL\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/adapter-utils/src/local-process-sandbox.ts","lineNumber":134,"sourceCode":"  const realCommand = await fs.realpath(command).catch(() => command);\n  paths.add(await nearestPackageRoot(realCommand));\n  return Array.from(paths);\n}\n\nfunction parseNetworkAllowlistEntry(entry: string, index: number): NetworkAllowlistRule {\n  const trimmed = entry.trim();\n  if (!trimmed) throw new Error(`networkAllowlist[${index}] must not be empty.`);\n  let hostname: string;\n  let port: string | null;\n  try {\n    const parsed = new URL(trimmed.includes(\"://\") ? trimmed : `https://${trimmed}`);\n    if (parsed.username || parsed.password || parsed.pathname !== \"/\" || parsed.search || parsed.hash) {\n      throw new Error(\"path\");\n    }\n    hostname = parsed.hostname.toLowerCase();\n    port = parsed.port || null;\n  } catch {\n    throw new Error(`networkAllowlist[${index}] must be a hostname, hostname:port, or origin URL.`);\n  }\n  if (!hostname || hostname === \"*\" || hostname.startsWith(\"*.\")) {\n    throw new Error(`networkAllowlist[${index}] must use an exact hostname; wildcards are not supported.`);\n  }\n  return { hostname, port };\n}\n\nexport function parseLocalProcessNetworkAllowlist(value: unknown): string[] {\n  if (!Array.isArray(value)) return [];\n  return value.map((entry, index) => {\n    if (typeof entry !== \"string\") throw new Error(`networkAllowlist[${index}] must be a string.`);\n    const rule = parseNetworkAllowlistEntry(entry, index);\n    return rule.port ? `${rule.hostname}:${rule.port}` : rule.hostname;\n  });\n}\n\nexport function parseLocalProcessNetworkScope(value: unknown): LocalProcessNetworkScope | null {\n  if (value == null || value === \"\") return null;","sourceCodeStart":116,"sourceCodeEnd":152,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/packages/adapter-utils/src/local-process-sandbox.ts#L116-L152","documentation":"parseNetworkAllowlistEntry could not parse the entry as a URL/hostname:port/origin (it had a path, credentials, or was malformed), so the allowlist rule is rejected.","triggerScenarios":"Thrown at packages/adapter-utils/src/local-process-sandbox.ts:134 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a hostname, hostname:port, or origin URL for networkAllowlist[${index}]."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}