Schedule icon
Request icon
TransformValue icon
Loop icon
Sleep icon
Get icon
If icon
SlackIncomingWebhook icon
Set icon

Check Rust Crates from a Cargo.lock for Yanked, Outdated and Stale Versions

Read a Cargo.lock, check each crate on crates.io for yanked, outdated or stale versions and get a Slack message only when something changes.

Categories
Infrastructure

Sometimes a Rust dependency has a problem and nobody notices. The exact version you use can be yanked because it is broken or unsafe, or the crate can go a year without a new release. This flow reads your Cargo.lock, asks crates.io about each crate, and tells you about the ones that need attention, but only when the report is different from last time.

How it works

  1. weekly (io.kestra.plugin.core.trigger.Schedule) runs the flow every Monday at 08:00 UTC. It is disabled by default.
  2. fetch_cargo_lock (io.kestra.plugin.core.http.Request) downloads the lock file from cargo_lock_url.
  3. list_crates (io.kestra.plugin.transform.jsonata.TransformValue) gets the crates from crates.io and keeps the first max_crates.
  4. check_crates (io.kestra.plugin.core.flow.Loop) checks one crate at a time. fetch_crate calls crates.io, assess gives it a status (YANKED, UNKNOWN_VERSION, STALE, OUTDATED or OK) and pause_for_rate_limit waits one second. A crate is only OUTDATED when there is a new major version. You can change this with outdated_threshold.
  5. summarize writes one message with the crates that are not OK.
  6. previous_report (io.kestra.plugin.core.kv.Get) gets the last report. alert_if_new (io.kestra.plugin.core.flow.If) sends the Slack message only if there is a problem and the report is different. remember_report saves it.
  7. The errors block sends a message if the check itself fails.

What you get

  • A weekly check of whether any of your crates is yanked, outdated or not maintained.
  • No repeated messages: the same problems are sent only once.
  • A different message when the lock file or crates.io cannot be reached.

Who it's for

  • Rust teams that keep a Cargo.lock in their repository.
  • Platform engineers who want a simple dependency check.

Why orchestrate this with Kestra

With a cron script you have to build the schedule, the rate limit, the saved state and the error handling yourself. Kestra gives you these and keeps the history of every run.

Prerequisites

  • Access to crates.io and to your Cargo.lock over HTTPS.
  • A Slack incoming webhook.

Secrets

  • SLACK_WEBHOOK_URL: the Slack incoming webhook that receives the messages (required).

Quick start

  1. Add the SLACK_WEBHOOK_URL secret to your namespace.
  2. Set cargo_lock_url to the raw URL of your Cargo.lock and user_agent to your project name and a contact URL or email.
  3. Click Execute once and look at the summarize output.
  4. Enable the weekly trigger.

How to extend

  • Raise max_crates to check the whole lock file.
  • Send the message by email or Teams instead of Slack.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.