Treat every point where data crosses a trust boundary — server to client, client to server, or internal module to external provider — as a security checkpoint, not a pass-through.
sessionToken, API keys) must be stripped before serializing create/list/detail/update responses, even though the raw value stays available internally for signing requests. Centralize this in a single serializer so every endpoint benefits:
function toProviderConnectionResponse(connection) {
const { sessionToken, ...safe } = connection.providerSpecificData ?? {};
return { ...connection, providerSpecificData: safe };
}
external_web_access: false) rather than silently rerouting the request through a broader-scoped path; when such a flag is present, bypass the feature entirely instead of weakening the guarantee.Add a regression test for each boundary-crossing fix (e.g. asserting a secret is absent from every response, or that reserved names can’t be hijacked) so these protections can’t silently regress.</description> </invoke>