Schedule icon
Webhook icon
Get icon
Script icon
Docker icon
Log icon
If icon
SlackIncomingWebhook icon
Set icon

Detect Dependency Relicensing with deps.dev and Slack Alerts

Watch pinned dependencies for relicensing to BUSL, SSPL, Elastic or AGPL using deps.dev, find the first flipped version, and alert Slack once.

Categories
BusinessInfrastructure

A dependency can change license between the version you pinned and the one you will upgrade to, as Terraform did with BUSL and Elasticsearch with SSPL. This flow compares the license of each pinned version with its latest release on deps.dev, flags moves into restrictive terms, and names the first version where the license changed.

How it works

  1. weekdays runs at 08:00, or dependency_change runs when CI POSTs a packages array.
  2. read_alert_state (io.kestra.plugin.core.kv.Get) loads the license set already reported per package.
  3. audit_licenses queries the deps.dev v3 API per system:name@version, classifies the change as CRITICAL, WARNING or INFO, and bisects the version history for the first different license.
  4. alert (io.kestra.plugin.core.flow.If) posts one Slack message for new CRITICAL and WARNING findings, or logs it in dry run.
  5. record_alert_state stores the reported license sets last, so a failed alert is repeated, not lost.

What you get

  • One alert per new flip, with pinned and latest licenses and the first flipped version.
  • A full verdict table in the logs, including unknown and unresolved packages, which are never shown as clean.
  • A failed run when deps.dev cannot resolve any package.

Who it's for

  • Platform and open-source program teams who must catch relicensing before an upgrade.
  • Engineers who want a CI hook that audits new dependencies.

Why orchestrate this with Kestra

Reporting each flip once needs memory. Kestra's KV store holds it, the schedule and webhook share one flow, and the state advances only after Slack succeeded.

Prerequisites

  • A worker with Docker access, using the public python:3.12-slim image.
  • Outbound HTTPS to api.deps.dev. No API key is needed.

Secrets

  • SLACK_WEBHOOK_URL: used by notify_slack, only read when dry_run is false.
  • LICENSE_RADAR_WEBHOOK_KEY: key for the dependency_change webhook.

Quick start

  1. Execute the flow with the defaults to see the verdict table in dry run.
  2. Replace packages with your own pins and adjust restricted_licenses.
  3. Add the secrets, set dry_run to false, and let the schedule run.

How to extend

  • Generate packages from a lockfile in CI and POST it to the webhook.
  • Replace Slack with a Jira or GitHub issue, or fail a release job on CRITICAL.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.