Monitor API Uptime in Parallel and Alert Slack with the Exact Status of Each Endpoint
Probe three endpoints in parallel every 30 minutes and post one Slack alert naming each site that did not answer HTTP 200.
Verify GraphQL APIs enforce query depth and complexity limits before release, preventing nested query denial-of-service vulnerabilities.
Prevent recursive query denial-of-service (DoS) vulnerabilities by validating that GraphQL APIs enforce query depth and complexity limiting middleware before code reaches production. In GraphQL, nested relationship graphs allow clients to send recursive queries (e.g. user { friends { friends { friends ... } } }) that force backend resolvers into expensive exponential database joins and CPU exhaustion. To protect servers, production APIs must implement query depth limiters that reject queries exceeding strict nesting thresholds (typically 5 to 7 levels). This gate dispatches an intentionally deep nested query against your candidate deployment, verifies that the server successfully rejects it, alerts SecOps if the query was processed without restriction, and fails deployment pipelines before vulnerable configurations go live.
Schedule trigger periodically invokes the security gate, or CI/CD pipelines trigger it before promoting staging builds.test_deep_nested_query uses io.kestra.plugin.graphql.Request to dispatch a 7-level nested introspection query to inputs.graphql_endpoint_url. With failOnGraphQLErrors: false and allowFailed: true, expected security rejection errors (such as "Query depth limit exceeded" or HTTP 400 Bad Request) are captured cleanly without crashing the task runner.evaluate_depth_protection (io.kestra.plugin.core.flow.If) inspects the response:VULNERABLE). The workflow sends an urgent Slack alert and invokes fail_deployment_gate (io.kestra.plugin.core.execution.Fail) to halt the release.log_depth_protection_verified confirms clean PROTECTED status.log_audit_summary emits structured compliance metrics for audit logs.errors handler catches network unreachable or TLS handshake failures.graphql-depth-limit, graphql-armor, or Apollo complexity plugins).Ad-hoc security scans or manual Postman testing are rarely integrated consistently into automated promotion gates. Kestra provides declarative, version-controlled execution with native GraphQL querying, conditional branching, secrets management, and automated failure handling. With Kestra, query depth verification functions as an observable, repeatable security contract that runs automatically across staging environments.
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 post security alerts and probe failure notifications.SLACK_WEBHOOK_URL and GRAPHQL_AUTH_TOKEN).graphql_endpoint_url with your staging GraphQL URL (e.g., https://staging-api.yourcompany.com/graphql).