Loop icon
Download icon
Get icon
Script icon
If icon
SlackIncomingWebhook icon
Set icon
Schedule icon

Get Alerted When a Dependency Version You Pin Is Yanked or Deprecated

Check the dependency versions you pin on PyPI, npm and crates.io daily and alert in Slack when one is yanked or deprecated, with the reason and the fix.

Categories
Infrastructure

Maintainers yank or deprecate a release when it is broken or unsafe: requests 2.32.0 was yanked on PyPI because of a conflict with a CVE mitigation, tokio 1.39.0 was yanked on crates.io, and npm's request was deprecated as a whole. None of this fails your build. pip installs an exactly pinned yanked release with a warning, Cargo keeps yanked versions that are already in Cargo.lock, and npm prints deprecation notices in CI logs nobody reads. Vulnerability scanners only react when an advisory is published, and many yanks never get one.

This blueprint checks the exact versions you pin, every day, and tells the owning team the moment one of them is yanked or deprecated, with the maintainer's own reason and the latest release to move to. It also says when a version is restored.

Ecosystem Signal read API
pypi info.yanked, info.yanked_reason https://pypi.org/pypi/<name>/<version>/json
npm deprecated message of the version https://registry.npmjs.org/<name>/<version>
crates version.yanked, yank_message https://crates.io/api/v1/crates/<name>/<version>

How it works

For each entry in dependencies (Loop, four at a time):

  1. fetch_version downloads the metadata of the pinned version from its registry. The URL is chosen per ecosystem with a Pebble if.
  2. fetch_latest downloads the package's latest release.
  3. load_previous reads the status reported at the last run from the Kestra KV store.
  4. evaluate reads the flag and the reason and picks the latest stable release.
  5. if_changed skips Slack unless the status changed.
  6. alert_owner posts the status, the reason, the upgrade target and a registry link.
  7. remember_status stores the status, after the alert.

Each exact version has its own KV entry, so after you bump a pin, the new version starts with a clean history. A misspelled or deleted package fails only its own iteration, and the errors branch reports it.

Prerequisites

  • A Slack Incoming Webhook. The three registries are public and need no key. crates.io asks for a descriptive User-Agent, which the downloads send.

Secrets

  • SLACK_WEBHOOK_URL: Slack Incoming Webhook URL for alerts and failures.

In the open-source edition, secrets are environment variables on the Kestra container, prefixed with SECRET_ and base64-encoded. See how to manage secrets.

Inputs

  • dependencies (JSON): list of {"ecosystem", "name", "version", "owner"} objects. Start with the direct dependencies pinned in requirements.txt, package.json and Cargo.toml of your critical services. The defaults include real yanked and deprecated versions, so the first run shows what an alert looks like.

Quick start

  1. Add the Slack secret and list your pinned versions.
  2. Execute the flow. Versions that are already yanked or deprecated are posted once.
  3. Enable daily. When you bump a pin, update the list.

To feed the list from a repository instead, add a Clone task and a short step that turns your lockfile into this JSON, then pass it to the Loop.

Outputs

  • {{ outputs.evaluate.vars }} per iteration: status (ok, yanked or deprecated), reason, latest, advice, link.
  • KV entries yank_watch_<ecosystem>_<name>_<version>: the last status per pinned version.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.