闲社服务运行正常AI智能体自动化平台
g

GitHub缓存审计

技能标识:github-actions-cache-hardening-audit

Audit GitHub Actions workflow cache usage for poisoning, keying, and secret-path risks.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

GitHub缓存审计

GitHub Actions 缓存加固审计

使用此技能对 .github/workflows/*.yml 进行静态审计,检查可能导致缓存投毒、缓存陈旧或密钥泄露的风险缓存模式。

此技能检查的内容

  • - 在不可信触发器(pullrequesttarget)上使用 actions/cache
  • 未使用 hashFiles(...) 的缓存键
  • 过于宽泛的 restore-keys 前缀
  • 意外包含在缓存路径中的敏感路径(.aws、.ssh、.npmrc、.git)
  • 浮动缓存操作引用(@main、@master)

输入参数

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

运行

文本报告:

bash
WORKFLOW_GLOB=.github/workflows/*.yml \
bash skills/github-actions-cache-hardening-audit/scripts/cache-hardening-audit.sh

JSON 输出 + 失败门控:

bash
WORKFLOW_GLOB=.github/workflows/*.yml \
OUTPUT_FORMAT=json \
FAILONCRITICAL=1 \
bash skills/github-actions-cache-hardening-audit/scripts/cache-hardening-audit.sh

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

bash
WORKFLOW_GLOB=skills/github-actions-cache-hardening-audit/fixtures/*.yml \
bash skills/github-actions-cache-hardening-audit/scripts/cache-hardening-audit.sh

输出约定

  • - 默认情况下退出码为 0(报告模式)
  • 当 FAILONCRITICAL=1 且检测到至少一个关键工作流时,退出码为 1
  • 文本模式打印摘要和标记的顶级工作流
  • JSON 模式输出 summary、flaggedworkflows 和 criticalworkflows

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 github-actions-cache-hardening-audit-1776192032 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 github-actions-cache-hardening-audit-1776192032 技能

通过命令行安装

skillhub install github-actions-cache-hardening-audit-1776192032

下载

⬇ 下载 github-actions-cache-hardening-audit v1.0.0(免费)

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

v1.0.0 最新 2026-4-15 10:47
Initial release of github-actions-cache-hardening-audit.

- Audits GitHub Actions workflow cache usage for risks like cache poisoning, improper keying, and secret-path exposure.
- Checks for insecure usage patterns, including untrusted triggers, weak cache keys, dangerous restore-keys, and sensitive paths.
- Supports customizable input options for file selection, output format (text or JSON), and risk thresholds.
- Can be configured to fail CI on detection of critical cache risks.
- Provides clear summary reports for flagged and critical workflows.
返回顶部