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

Watch the OpenSSF Scorecard of Your Open-Source Dependencies and Get an AI Risk Note on Regressions

Track the OpenSSF Scorecard of your open-source dependencies and post a Slack alert with an AI risk note when a critical security check regresses.

Categories
AIInfrastructure

OpenSSF Scorecard scans more than a million open-source repositories every week and scores practices that predict supply-chain risk: is the project still maintained, are changes reviewed, are workflows safe from untrusted input, are tokens least-privilege. A dependency rarely becomes risky overnight, but these signals move first. This blueprint keeps a baseline of the Scorecard result of each project you depend on and alerts you when a critical check regresses or the overall score falls below your minimum, with a Gemini assessment of what it means for the way you use the project.

How it works

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

  1. fetch_scorecard downloads the latest result from the public Scorecard API (no key).
  2. load_previous reads the result seen at the last run from the Kestra KV store.
  3. compare finds checks whose score dropped. A drop is reported when the check is in critical_checks or fell by 3 points or more. It also detects the overall score crossing below min_score. Checks scored -1 (not applicable) are ignored.
  4. if_regressed skips the LLM and Slack when nothing regressed.
  5. assess_risk sends the regressed checks, their reasons and your usage note to Gemini and gets structured JSON back: risk (LOW, MEDIUM or HIGH), summary and action.
  6. alert_slack posts the scores and Scorecard's reasons, never from the model, plus the assessment and a link to the Scorecard viewer.
  7. remember_result stores the result as the next baseline.

The first run only records baselines. A repository that OpenSSF does not scan fails its own iteration, and the errors branch reports it.

Prerequisites

  • A Google AI Studio API key for Gemini (regressions are rare, so the free tier is plenty).
  • A Slack Incoming Webhook.

Secrets

  • GEMINI_API_KEY: Gemini API key used by assess_risk.
  • 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

  • projects (JSON): list of {"repo": "owner/name", "usage": "..."} objects for GitHub repositories.
  • critical_checks (JSON): checks whose drop is always reported. See the list of checks.
  • min_score (FLOAT, default 5.0): report a project once when it falls below this score.
  • model_name (STRING, default gemini-2.5-flash).

Quick start

  1. Add the two secrets and list the projects you depend on in projects. To check that a project is scanned, open https://api.securityscorecards.dev/projects/github.com/<owner>/<repo>.
  2. Execute the flow: baselines are stored and nothing is posted.
  3. Enable every_monday. From then on, Slack only hears about regressions.

Outputs

  • {{ outputs.compare.vars }} per iteration: score, previous_score, regressions, weakest.
  • {{ outputs.assess_risk.jsonOutput }}: the AI assessment for regressed projects.
  • KV entries scorecard_<repo>: the last result per project.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.