MCPcopy Index your code
hub / github.com/docker/docker-agent / failClosed

Function failClosed

pkg/hooks/executor.go:400–402  ·  view source on GitHub ↗

failClosed reports whether a hook failure on event must deny the event. PreToolUse (both lanes) is a hard security boundary: a crashed safety hook must not silently allow the call through. Every other event surfaces failures as warnings unless the hook opts into ErrorPolicyBlock.

(event EventType)

Source from the content-addressed store, hash-verified

398// Every other event surfaces failures as warnings unless the hook
399// opts into ErrorPolicyBlock.
400func failClosed(event EventType) bool {
401 return event == EventPreToolUse || event == EventPreToolUsePreYolo
402}
403
404// stdoutAsContext reports whether plain stdout (non-JSON, exit 0)
405// from a hook should be routed into Result.AdditionalContext. It is

Callers 1

aggregateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected