Appwrite Backend Health Gate
Probe Appwrite's own database, cache, and clock health endpoints on a schedule, and alert Slack before a degraded subsystem turns into an outage.
Audit production GraphQL endpoints for unauthorized schema introspection, detect type exposure, and alert security teams on schema leakage.
Protect production GraphQL APIs against unauthorized schema discovery and reconnaissance by automatically auditing GraphQL introspection queries. While GraphQL schema introspection (__schema and __type) is essential during development, leaving it enabled in production exposes internal data structures, backend entity relationships, deprecated fields, and administrative queries to potential attackers. This sentinel workflow periodically probes your production GraphQL endpoints with native introspection queries, evaluates whether the server leaks type definitions, alerts security teams via Slack with discovered type counts, and halts execution when exposure policies are violated.
Schedule trigger periodically invokes the security sentinel on a 6-hour interval (shipped disabled by default).probe_introspection uses io.kestra.plugin.graphql.Request to dispatch an introspection query (query IntrospectionSecurityAudit { __schema { queryType { name } types { name kind } } }) to inputs.graphql_endpoint_url. With failOnGraphQLErrors: false and allowFailed: true, the task succeeds even when secure servers return HTTP 400 or GraphQL error objects (such as "GraphQL introspection is not allowed").evaluate_exposure (io.kestra.plugin.core.flow.If) inspects the response body:outputs.probe_introspection.body.__schema.types is populated, the endpoint is actively leaking its schema (EXPOSURE_DETECTED). The workflow posts a critical alert to Slack detailing the exposed endpoint and leaked type names, and conditionally triggers fail_security_gate (io.kestra.plugin.core.execution.Fail).log_introspection_locked records a clean SECURE status.log_audit_summary records compliance metrics for audit logs.errors handler catches network unreachable or TLS handshake failures.Manual penetration testing or periodic scripts often fail to catch temporary misconfigurations introduced during fast release cycles. Kestra provides declarative, observable orchestration with native GraphQL request handling, built-in retry and timeout management, secret handling, and instant Slack notifications. Rather than maintaining custom security scanners, your API security audits live as version-controlled code directly alongside your existing infrastructure pipelines.
GRAPHQL_AUTH_TOKEN: Bearer token or API key used in the Authorization header to authenticate against the GraphQL endpoint.SLACK_WEBHOOK_URL: Slack Incoming Webhook URL used to receive security alerts and probe failure notifications.SLACK_WEBHOOK_URL and GRAPHQL_AUTH_TOKEN).graphql_endpoint_url to your production GraphQL URL (e.g., https://api.yourdomain.com/graphql).SECURE.scheduled_security_audit trigger to enforce recurring automated protection.User, Admin, Payment) and escalate severity accordingly.io.kestra.plugin.pagerduty.notifications.PagerDutyAlert) for P1 security incident paging.