Schedule icon
Webhook icon
Get icon
WorkingDirectory icon
Clone icon
Script icon
Log icon
If icon
Loop icon
Search icon
Create icon
Comment icon
Request icon
Set icon

Track end-of-life runtimes in a repository as GitHub issues

Scan Dockerfiles, compose files, CI and version files for pinned runtimes, check them on endoflife.date, and track EOL versions as GitHub issues.

Categories
Infrastructure

Old runtimes rarely break anything on the day support ends. python:3.9 keeps building, postgres:12 keeps starting, and node:14 keeps serving traffic. They just stop getting security fixes, and nobody notices until a scanner or an auditor does. The versions are all written down in the repository already, in Dockerfiles, compose files, CI workflows and version files. This flow reads them, checks each one against endoflife.date, and keeps one GitHub issue open per version that is past or close to its end-of-life date.

It only speaks up when something changes. A version is reported once when it enters the warning window and once more when it actually reaches end of life. When a commit moves every file off that version, the flow closes the issue itself.

This blueprint was created by Sarcastic-Soul.

How it works

  1. read_state (io.kestra.plugin.core.kv.Get) loads the versions this flow already reported for the repository, with the status each one had. The first run starts from nothing.
  2. scan_repository (io.kestra.plugin.core.flow.WorkingDirectory) keeps the next two tasks in one directory.
  3. clone_repository (io.kestra.plugin.git.Clone) does a shallow checkout of branch.
  4. find_pinned_versions (io.kestra.plugin.scripts.python.Script) walks the checkout and reads:
    • FROM lines in Dockerfiles, skipping build stage names and scratch
    • image: lines in any YAML file, which covers compose files, Kubernetes manifests and Helm values
    • python-version, node-version and go-version in CI workflows
    • .python-version, .nvmrc, .node-version, .tool-versions and the go line in go.mod
    • Debian and Ubuntu codenames inside a tag, so eclipse-temurin:17-jre-focal is also reported as Ubuntu 20.04 Tags such as latest, lts or no tag at all are listed as floating, because there is no version to check.
  5. check_end_of_life (io.kestra.plugin.scripts.python.Script) calls the endoflife.date API once per product, matches each version to its release cycle (3.9.2 to Python 3.9, mysql:8 to the newest 8.x), and marks the cycle eol, eol_soon (inside warn_days) or supported. It compares the result with the saved state and picks the cycles that are new to the risk list or went from eol_soon to eol, worst first, up to max_issues. It reads inventory.json from the scan task's output files and writes eol-report.md, a table of every version it found.
  6. log_summary (io.kestra.plugin.core.log.Log) prints the full counts next to what this run handles.
  7. report_at_risk (io.kestra.plugin.core.flow.If) loops over the picked cycles with io.kestra.plugin.core.flow.Loop. In a dry run it logs the issue it would open. Otherwise it searches for an open issue with the same title (io.kestra.plugin.github.issues.Search), then opens one (io.kestra.plugin.github.issues.Create) or adds a comment about the new status (io.kestra.plugin.github.issues.Comment).
  8. close_cleared (io.kestra.plugin.core.flow.If) handles versions that no file pins any more. It comments on the open issue and closes it with a PATCH through io.kestra.plugin.core.http.Request, because plugin-github has no task that changes an issue's state.
  9. save_state (io.kestra.plugin.core.kv.Set) saves the new state last, so a failed run changes nothing and the next run reports the same versions again.

Two triggers start it: a weekly Schedule (shipped disabled) and a Webhook you can call from a GitHub push webhook or a CI step, so a change to a Dockerfile is checked as soon as it lands. concurrency.limit: 1 queues a webhook run that arrives during the weekly run, so two runs never write the saved state at the same time.

What you get

  • One GitHub issue per runtime cycle that is past or near end of life, titled End of life: <product> <cycle>, listing every file and line that pins it.
  • A comment on that issue when its status gets worse, and an automatic close when the version is gone from the repository.
  • eol-report.md, a Markdown table of every pinned version with its cycle, status, end-of-life date, days left and latest patch, plus the floating tags and the versions endoflife.date does not track.
  • Flow outputs eol_count, eol_soon_count, actionable_count and report for dashboards or a parent flow.

Who it's for

  • Platform and DevOps teams who own many Dockerfiles and compose files across services.
  • Maintainers who want "Node 18 is out of support" to show up in their issue tracker, not in an incident review.
  • Security and compliance teams who need proof that unsupported software is tracked.

Why orchestrate this with Kestra

The check is a small script. Kestra adds what turns it into a process: a schedule and a push webhook, the KV store as memory between runs so people are not told the same thing every week, a dry-run switch, a cap per run, a queue so overlapping runs do not race, and an execution history with the report attached to every run.

Prerequisites

  • A worker that can run Docker containers. Both script tasks use the public python:3.12-slim image and only the Python standard library.
  • Outbound HTTPS to github.com and endoflife.date. The endoflife.date API needs no key.
  • For live issues, a GitHub token with Issues: read and write on issue_repository (classic token scope repo, or public_repo for a public repository).

Secrets

  • GITHUB_TOKEN: searches, opens, comments on and closes issues. Only read when dry_run is false.
  • EOL_GUARD_WEBHOOK_KEY: the key part of the webhook URL. Only needed if you use the on_push trigger.

Inputs

  • repository (STRING, default docker/awesome-compose): repository to scan, as owner/repo.
  • branch (STRING, default master): branch to check out.
  • warn_days (INT, default 180): days before an end-of-life date when a version counts as eol_soon.
  • issue_repository (STRING, default your-org/your-repo): repository that receives the issues.
  • max_issues (INT, default 10): most new or escalated cycles handled in one run. The rest wait for the next run.
  • dry_run (BOOL, default true): log instead of calling GitHub.

Quick start

  1. Save the flow and execute it with the defaults. It scans docker/awesome-compose in dry-run mode and logs about ten issues it would open, such as End of life: python 3.9 and End of life: ubuntu 20.04.
  2. Open the Outputs tab and preview report (or outputs.check_end_of_life.outputFiles['eol-report.md']) to see every version it found.
  3. Execute it again. The first ten are now in the saved state, so this run reports the next batch, and a third run reports nothing new.
  4. Delete the runtime_eol_docker_awesome_compose_dry_run key in the namespace KV store to start over. Dry runs keep their own state key, so the first live run still opens every issue.
  5. Point repository, branch and issue_repository at your own code, add the GITHUB_TOKEN secret, set dry_run to false, and enable the weekly trigger.
  6. Optional: add EOL_GUARD_WEBHOOK_KEY and register https://<your-kestra-host>/api/v1/main/executions/webhook/company.team/runtime-end-of-life-guard/<key> as a push webhook in GitHub.

How to extend

  • Add images to IMAGE_PRODUCTS in find_pinned_versions for products your stack uses (endoflife.date tracks over 400). The key is the image name, the value is the product name in the endoflife.date URL.
  • Scan private repositories by adding username and password: "{{ secret('GITHUB_TOKEN') }}" to clone_repository.
  • Run it over many repositories with a parent flow that calls this one through io.kestra.plugin.core.flow.Subflow inside a Loop.
  • Send eol-report.md to Slack or email each week, or open Jira tickets instead of GitHub issues.
  • Turn floating tags into findings of their own if your policy says every image must be pinned.
  • Note that a Ubuntu LTS shows as eol when standard support ends, even if you pay for extended security updates.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.