New to Kestra?
Use blueprints to kickstart your first workflows.
Detect Snowflake credential stuffing and brute-force attacks with Kestra.
Credential stuffing and brute-force attacks against Snowflake accounts are a leading cause of data breaches. Default Snowflake login monitoring requires manual log review. This sentinel automates that detection: every 15 minutes it queries SNOWFLAKE.ACCOUNT_USAGE.LOGIN_HISTORY for user/IP pairs with more failed attempts than the configured threshold and immediately dispatches a Slack security alert with the offending user names and source IPs.
query_failed_logins (io.kestra.plugin.jdbc.snowflake.Query) connects over JDBC and retrieves every user/IP combination that accumulated more than inputs.max_failed_attempts failed logins in the past hour.check_brute_force (io.kestra.plugin.core.flow.If) evaluates whether the result set contains any rows.alert_slack (io.kestra.plugin.slack.notifications.SlackIncomingWebhook) posts a formatted Slack alert listing each suspicious user name, source IP, and failure count.log_no_threats (io.kestra.plugin.core.log.Log) records a clean-check entry for the execution run.errors block fires a Slack notification if the JDBC query itself fails, ensuring no silent monitoring gaps.Schedule trigger is preconfigured for every 15 minutes and ships disabled by default.Snowflake does not natively push brute-force alerts. Setting up an external SIEM to poll the LOGIN_HISTORY view requires infrastructure, credentials management, and custom logic. Kestra handles all of that declaratively: JDBC connection, parameterised SQL, conditional branching, Slack dispatch, and secret management, with full execution history for compliance review.
SELECT on SNOWFLAKE.ACCOUNT_USAGE.LOGIN_HISTORY (requires the ACCOUNTADMIN or SECURITYADMIN role, or a custom role with the privilege granted).SNOWFLAKE_PASSWORD: Password for the Snowflake user in inputs.username.SLACK_WEBHOOK: Slack incoming webhook URL.SNOWFLAKE_PASSWORD and SLACK_WEBHOOK in your Kestra namespace secrets.account, username, and max_failed_attempts as needed.LOGIN_HISTORY.Schedule trigger for continuous 15-minute security monitoring.io.kestra.plugin.scripts.shell.Commands task to call the Snowflake REST API and disable a compromised user account automatically.then branch.DATEADD interval as an additional input.