MCPcopy Create free account
hub / github.com/anomalyco/opencode / safeHost

Function safeHost

packages/opencode/src/util/repository.ts:83–85  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

81}
82
83function safeHost(input: string) {
84 return Boolean(input) && !input.startsWith("-") && !/[\s/\\]/.test(input)
85}
86
87function safeSegment(input: string) {
88 return input !== "." && input !== ".." && !input.includes(":") && !/[\s/\\]/.test(input)

Callers 1

buildRemoteReferenceFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected