返回顶部
g

github-actions-cache-hardening-auditGitHub缓存审计

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

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

github-actions-cache-hardening-audit

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.

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

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

p2p_official_large
返回顶部