360 Secure SkillHub
360 安全技能中心

GitHub Actions Incident Timeline Audit

读取导出的 GitHub Actions 运行 JSON,筛选失败/取消/超时结果,按仓库与可配置时间间隔聚合成 incident 时间窗,依据失败次数和持续时长阈值评级,输出文本或 JSON 报告,并可选在存在严重 incident 时以非零退出码阻断。

daniellummis
daniellummis
热度 51.31
最近更新 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