返回顶部
g

github-actions-self-hosted-risk-audit自托管运行器审计

Audit GitHub Actions workflows that use self-hosted runners for untrusted trigger and credential-hardening risks.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
244
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

github-actions-self-hosted-risk-audit

GitHub Actions 自托管风险审计

使用此技能来标记在自托管 GitHub Actions 运行器上执行作业时的风险工作流模式。

此技能的功能

  • - 扫描工作流 YAML 文件(默认路径为 .github/workflows/*.yml)
  • 检测引用 self-hosted 运行器的工作流
  • 标记高风险触发器组合(pullrequesttarget、pullrequest、issuecomment)
  • 标记宽泛/仅自托管运行器选择(无额外路由标签)
  • 标记在自托管上下文中具有写入权限的工作流
  • 标记未设置 persist-credentials: false 的 actions/checkout 步骤
  • 支持文本/JSON 输出和 CI 失败门控

输入参数

可选参数:
  • - WORKFLOWGLOB(默认值:.github/workflows/.yml)
  • TOPN(默认值:20)
  • OUTPUTFORMAT(text 或 json,默认值:text)
  • WARNSCORE(默认值:4)
  • CRITICALSCORE(默认值:8)
  • WORKFLOWFILEMATCH / WORKFLOWFILEEXCLUDE(正则表达式,可选)
  • FAILON_CRITICAL(0 或 1,默认值:0)

运行

文本报告:

bash
WORKFLOW_GLOB=.github/workflows/*.yml \
WARN_SCORE=4 \
CRITICAL_SCORE=8 \
bash skills/github-actions-self-hosted-risk-audit/scripts/self-hosted-risk-audit.sh

JSON 输出 + 失败门控:

bash
WORKFLOW_GLOB=.github/workflows/.yml \
OUTPUT_FORMAT=json \
FAILONCRITICAL=1 \
bash skills/github-actions-self-hosted-risk-audit/scripts/self-hosted-risk-audit.sh

针对捆绑的测试用例运行:

bash
WORKFLOW_GLOB=skills/github-actions-self-hosted-risk-audit/fixtures/.yml \
bash skills/github-actions-self-hosted-risk-audit/scripts/self-hosted-risk-audit.sh

输出约定

  • - 报告模式下退出码为 0(默认)
  • 当 FAILONCRITICAL=1 且存在一个或多个关键工作流时,退出码为 1
  • 文本模式输出摘要 + 标记的顶级工作流
  • JSON 模式输出摘要 + 标记的工作流 + 关键工作流

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 github-actions-self-hosted-risk-audit-1776192243 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 github-actions-self-hosted-risk-audit-1776192243 技能

通过命令行安装

skillhub install github-actions-self-hosted-risk-audit-1776192243

下载

⬇ 下载 github-actions-self-hosted-risk-audit v1.0.0(免费)

文件大小: 5.72 KB | 发布时间: 2026-4-15 12:10

v1.0.0 最新 2026-4-15 12:10
Initial release of github-actions-self-hosted-risk-audit.

- Scans GitHub Actions workflows for use of self-hosted runners and flags risky configurations.
- Detects dangerous trigger combinations, privilege escalation, overly broad runner selection, and insecure checkout steps.
- Supports customizable input options including file glob, output format (text/json), scoring thresholds, and CI fail gating.
- Outputs either a summary report or detailed JSON, and can fail CI on critical findings.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部