Using a connection in a tool
Tools receive declared connections through theirToolContext:
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 fromuseSecret()/bearer(); literals are the build errorZAP_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.
