MCPcopy Create free account
hub / github.com/github/gh-aw / normalizeSandboxWritablePattern

Function normalizeSandboxWritablePattern

pkg/workflow/claude_tools.go:382–391  ·  view source on GitHub ↗
(writablePath string)

Source from the content-addressed store, hash-verified

380}
381
382func normalizeSandboxWritablePattern(writablePath string) (string, bool) {
383 path := strings.TrimSpace(writablePath)
384 if path == "" || !strings.HasPrefix(path, "/") {
385 return "", false
386 }
387 if strings.ContainsAny(path, "*?[]{}") {
388 return path, true
389 }
390 return strings.TrimRight(path, "/") + "/*", true
391}
392
393func appendSafeOutputsTools(allowedTools []string, safeOutputs *SafeOutputsConfig) []string {
394 if safeOutputs == nil {

Callers 2

Calls

no outgoing calls

Tested by 1