← 返回
安全合规 中文

GitHub Actions Cancel Waste Audit

Audit cancelled and timed-out GitHub Actions runs from JSON exports to surface wasted CI minutes and noisy workflows.
审计已取消和超时的 GitHub Actions 运行记录(来自 JSON 导出),以发现浪费的 CI 分钟数和嘈杂的工作流。
daniellummis
安全合规 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 509
下载
💾 9
安装
1
版本
#latest

概述

GitHub Actions Cancel Waste Audit

Use this skill to quantify wasted GitHub Actions runtime from cancelled or timed-out runs so flaky workflow churn gets fixed before it burns CI budget.

What this skill does

  • Reads one or more GitHub Actions run JSON exports (gh api output)
  • Estimates wasted runtime minutes per run (run_started_at/created_at -> updated_at)
  • Groups waste by repository + workflow + conclusion for fast triage
  • Flags warn/critical waste levels using configurable minute thresholds
  • Supports text and JSON output for terminal checks or dashboards

Inputs

Optional:

  • RUN_GLOB (default: artifacts/github-actions-runs/*.json)
  • TOP_N (default: 20)
  • OUTPUT_FORMAT (text or json, default: text)
  • WARN_WASTED_MINUTES (default: 15)
  • CRITICAL_WASTED_MINUTES (default: 45)
  • FAIL_ON_CRITICAL (0 or 1, default: 0)
  • REPO_MATCH (regex, optional)
  • REPO_EXCLUDE (regex, optional)
  • WORKFLOW_MATCH (regex, optional)
  • WORKFLOW_EXCLUDE (regex, optional)
  • BRANCH_MATCH (regex, optional)
  • BRANCH_EXCLUDE (regex, optional)
  • ACTOR_MATCH (regex, optional)
  • ACTOR_EXCLUDE (regex, optional)
  • CONCLUSION_MATCH (regex, optional, default behavior already includes only cancelled/timed_out)
  • CONCLUSION_EXCLUDE (regex, optional)

Collect run JSON

Single repository:

gh api repos/<owner>/<repo>/actions/runs --paginate \
  > artifacts/github-actions-runs/<owner>-<repo>.json

Run

Text report:

RUN_GLOB='artifacts/github-actions-runs/*.json' \
WARN_WASTED_MINUTES=20 \
CRITICAL_WASTED_MINUTES=60 \
bash skills/github-actions-cancel-waste-audit/scripts/cancel-waste-audit.sh

JSON output for automation:

RUN_GLOB='artifacts/github-actions-runs/*.json' \
OUTPUT_FORMAT=json \
FAIL_ON_CRITICAL=1 \
bash skills/github-actions-cancel-waste-audit/scripts/cancel-waste-audit.sh

Filter to one repo/workflow family:

RUN_GLOB='artifacts/github-actions-runs/*.json' \
REPO_MATCH='^flowcreatebot/' \
WORKFLOW_MATCH='(test|build)' \
BRANCH_MATCH='^(main|release)' \
bash skills/github-actions-cancel-waste-audit/scripts/cancel-waste-audit.sh

Run with bundled fixtures:

RUN_GLOB='skills/github-actions-cancel-waste-audit/fixtures/*.json' \
bash skills/github-actions-cancel-waste-audit/scripts/cancel-waste-audit.sh

Output contract

  • Exit 0 in reporting mode (default)
  • Exit 1 if FAIL_ON_CRITICAL=1 and at least one run has waste at/above CRITICAL_WASTED_MINUTES
  • In text mode: prints summary and top waste hotspots
  • In json mode: prints summary, grouped stats, and critical run instances

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 19:24 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

MoltGuard - Security & Antivirus & Guardrails

thomaslwang
MoltGuard — OpenClaw 安全守卫,由 OpenGuardrails 提供。安装 MoltGuard,保护您和您的用户免受提示注入、数据泄露和恶意攻击。
★ 116 📥 30,713
security-compliance

OpenClaw Backup

alex3alex
备份与恢复 OpenClaw 数据。适用于创建备份、设置自动备份计划、从备份恢复或管理备份轮转。处理 ~/.openclaw 目录归档并包含适当的排除规则。
★ 89 📥 30,600
security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,213 📥 266,390