Webhook icon
WorkingDirectory icon
Clone icon
Commands icon
Docker icon
Script icon
Process icon
If icon
AIAgent icon
GoogleGemini icon
Create icon
SlackIncomingWebhook icon
Log icon

OpenSSF Security Scorecard Audit and AI Remediation

Automate supply chain security audits with OpenSSF Scorecard, evaluate risk scores, generate AI remediation advice with Gemini, and alert via GitHub & Slack.

Categories
Infrastructure

Secure open-source software supply chains by automatically auditing code repositories against OpenSSF (Open Source Security Foundation) Scorecard standards. This blueprint clones a target repository, runs the official OpenSSF Scorecard CLI container to evaluate supply chain security practices (such as branch protection, dependency updates, binary artifacts, and SAST checks), parses the score report, and uses AI to generate step-by-step remediation plans when security thresholds are breached.

How it works

  1. on_security_audit_webhook (io.kestra.plugin.core.trigger.Webhook): Accepts inbound webhook calls from CI/CD systems or GitHub webhooks to trigger an audit on demand or on push.
  2. workspace (io.kestra.plugin.core.flow.WorkingDirectory): Prepares a shared execution environment for cloning and container execution.
  3. clone_repository (io.kestra.plugin.git.Clone): Clones the specified repository and branch using GITHUB_TOKEN.
  4. run_openssf_scorecard (io.kestra.plugin.scripts.shell.Commands via io.kestra.plugin.scripts.runner.docker.Docker): Executes the gcr.io/openssf/scorecard:v4.13.0 scanner container against the repository, writing detailed findings to scorecard-report.json.
  5. parse_scorecard_results (io.kestra.plugin.scripts.python.Script): Analyzes the JSON output, extracts overall risk ratings and failing checks, and outputs summary metadata.
  6. check_security_threshold (io.kestra.plugin.core.flow.If): Evaluates whether the overall score fell below min_score_threshold (e.g. 7.0) or if critical checks failed.
  7. generate_ai_remediation (io.kestra.plugin.ai.agent.AIAgent): Grounded in OpenSSF best practices, Google Gemini generates step-by-step instructions to fix the failing checks.
  8. create_github_security_issue (io.kestra.plugin.github.issues.Create) & notify_slack_security_channel (io.kestra.plugin.slack.notifications.SlackIncomingWebhook): File an issue with the remediation plan and notify the security team.

What you get

  • Automated supply chain security auditing adhering to Linux Foundation / OpenSSF standards.
  • Containerized, hermetic scan execution with zero local tooling setup required.
  • AI-generated remediation guidance specifically tailored to your failing OpenSSF checks.
  • Multi-channel notification pipeline (GitHub Issues & Slack webhooks).

Who it's for

  • DevSecOps and Platform Engineering teams standardizing repository security standards.
  • Open source maintainers ensuring compliance with OpenSSF security scorecards.
  • Security operations teams needing automated triage and remediation advice for code risk.

Why orchestrate this with Kestra

Bare scanner CLI tools generate complex JSON outputs but lack workflow orchestration, state management, and multi-channel alerting logic. Kestra bridges this gap by containerizing the OpenSSF scanner, orchestrating threshold checks with conditional logic (If), generating AI-driven remediation guidance (AIAgent), and posting findings directly into operational channels like GitHub and Slack.

Prerequisites

  • A Docker-enabled Kestra worker node to execute the OpenSSF Scorecard container.
  • A GitHub Personal Access Token (GITHUB_TOKEN) with repo read/write access.
  • A Google Gemini API key (GEMINI_API_KEY) for AI remediation generation.
  • A Slack Incoming Webhook URL (SLACK_WEBHOOK_URL).

Secrets

  • GITHUB_TOKEN: GitHub access token for repository access and issue creation.
  • GEMINI_API_KEY: API key for Google Gemini AI agent.
  • SLACK_WEBHOOK_URL: Slack channel incoming webhook.
  • OPENSSF_AUDIT_WEBHOOK_KEY: Secret key guarding the flow execution webhook.

Quick start

  1. Add required secrets to your Kestra namespace settings.
  2. Import this blueprint into your Kestra instance.
  3. Execute the flow manually with your repository input or configure your GitHub repository webhook.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.