360 Secure SkillHub
360 安全技能中心

GitHub Actions Incident Timeline Audit

核心功能:读取GitHub Actions运行JSON导出,筛选失败/取消/超时运行,按仓库聚类为事件窗口,通过可配置阈值对事件评分,输出文本或JSON结果。典型场景:CI可靠性评审时快速梳理故障,生成审查文档、运维看板数据或触发CI失败闸门。输入为可选配置参数,支持按工作流/仓库匹配或排除,可设置关键事件触发退出码1。

daniellummis
daniellummis
热度 51.48
最近更新 2026-05-11 17:29:17
分类:数据依赖:代码执行 / 读写文件应用场景:DevOps / 数据处理 / 报告撰写

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add github-actions-incident-timeline-audit
Metadata
name
github-actions-incident-timeline-audit
description
Cluster failed GitHub Actions runs into incident windows by repo to expose outage duration, impact scope, and escalation severity.
version
1.0.0
metadata
{"openclaw":{"requires":{"bins":["bash","python3"]}}}

GitHub Actions Incident Timeline Audit

Use this skill to convert noisy failed run exports into incident windows you can triage quickly during CI reliability reviews.

What this skill does

  • Reads GitHub Actions run JSON exports
  • Keeps only failed/cancelled/timed-out style outcomes
  • Groups failures by repository into incident windows using a configurable gap threshold
  • Scores each incident using failed-run and duration thresholds
  • Emits text or JSON output for review docs, ops dashboards, and CI fail gates

Inputs

Optional:

  • RUN_GLOB (default: artifacts/github-actions/*.json)
  • TOP_N (default: 20)
  • OUTPUT_FORMAT (text or json, default: text)
  • INCIDENT_GAP_MINUTES (default: 45)
  • WARN_FAILED_RUNS (default: 2)
  • CRITICAL_FAILED_RUNS (default: 4)
  • WARN_DURATION_MINUTES (default: 20)
  • CRITICAL_DURATION_MINUTES (default: 60)
  • WORKFLOW_MATCH (regex, optional)
  • WORKFLOW_EXCLUDE (regex, optional)
  • REPO_MATCH (regex, optional)
  • REPO_EXCLUDE (regex, optional)
  • FAIL_ON_CRITICAL (0 or 1, default: 0)

Collect run JSON

gh run view <run-id> --json databaseId,workflowName,event,conclusion,headBranch,createdAt,updatedAt,startedAt,url,repository \
  > artifacts/github-actions/run-<run-id>.json

Run

Text report:

RUN_GLOB='artifacts/github-actions/*.json' \
INCIDENT_GAP_MINUTES=45 \
bash skills/github-actions-incident-timeline-audit/scripts/incident-timeline-audit.sh

JSON output with fail gate:

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

Run with bundled fixtures:

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

Output contract

  • Exit 0 in report mode (default)
  • Exit 1 when FAIL_ON_CRITICAL=1 and one or more incidents are critical
  • Text mode prints summary + ranked incident windows
  • JSON mode prints summary + incidents + critical incident details