Skip to main content
Connections are the only way an agent reaches the network. Each one declares an HTTPS origin, an allowed method list, a path prefix, and headers built from write-only secret references.

Using a connection in a tool

Tools receive declared connections through their ToolContext:

Enforcement

  • Relative paths only — absolute URLs fail with CONNECTION_ABSOLUTE_URL.
  • Requests outside the method allowlist fail with CONNECTION_METHOD_DENIED; outside the path prefix, CONNECTION_PATH_DENIED.
  • Sensitive headers (Authorization, Cookie, X-API-Key) must come from useSecret() / bearer(); literals are the build error ZAP_BUILD_SECRET_LITERAL.
  • Origins must be HTTPS (ZAP_BUILD_ORIGIN_NOT_HTTPS).
  • Secret values resolve immediately before the request, attach only to that request, and are discarded. They never appear in any artifact.
Set values per agent and environment with the CLI: