github-actions-permission-scope-audit

Audit GitHub Actions workflow permission scope drift to enforce least-privilege token access.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "github-actions-permission-scope-audit" with this command: npx skills add daniellummis/github-actions-permission-scope-audit

GitHub Actions Permission Scope Audit

Use this skill to detect over-broad GITHUB_TOKEN permissions and scope drift across GitHub Actions workflows.

What this skill does

  • Reads workflow YAML files
  • Detects explicit broad permission grants (write-all, contents: write, etc.)
  • Flags risky patterns like pull_request_target workflows with write permissions
  • Identifies workflows with no explicit permissions policy
  • Emits text or JSON for CI triage and policy gates

Inputs

Optional:

  • WORKFLOW_GLOB (default: .github/workflows/*.y*ml)
  • TOP_N (default: 20)
  • OUTPUT_FORMAT (text or json, default: text)
  • WARN_SCORE (default: 2)
  • CRITICAL_SCORE (default: 5)
  • FLAG_MISSING_PERMISSIONS (0 or 1, default: 1)
  • FLAG_WRITE_ALL (0 or 1, default: 1)
  • FLAG_WRITE_SCOPES (0 or 1, default: 1)
  • WORKFLOW_FILE_MATCH / WORKFLOW_FILE_EXCLUDE (regex, optional)
  • EVENT_MATCH / EVENT_EXCLUDE (regex, optional)
  • PERMISSION_MATCH / PERMISSION_EXCLUDE (regex, optional)
  • FAIL_ON_CRITICAL (0 or 1, default: 0)

Run

Text report:

WORKFLOW_GLOB='.github/workflows/*.yml' \
bash skills/github-actions-permission-scope-audit/scripts/permission-scope-audit.sh

JSON output + fail gate:

WORKFLOW_GLOB='.github/workflows/*.yml' \
OUTPUT_FORMAT=json \
FAIL_ON_CRITICAL=1 \
bash skills/github-actions-permission-scope-audit/scripts/permission-scope-audit.sh

Run against bundled fixtures:

WORKFLOW_GLOB='skills/github-actions-permission-scope-audit/fixtures/*.yml' \
bash skills/github-actions-permission-scope-audit/scripts/permission-scope-audit.sh

Output contract

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

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Security

Auto Security Audit

一键自动化安全审计:nmap 端口扫描 + nuclei 12000+ CVE 漏洞检测(内外网双扫)+ SSL/TLS 检查 + SSH/防火墙/fail2ban 系统审计 + Markdown 报告生成。支持 cron 定时扫描 + 飞书推送。

Registry SourceRecently Updated
Security

web-recon

Website vulnerability scanner and security audit toolkit. Scan any website for security issues: open ports (nmap), exposed secrets, subdomain enumeration, di...

Registry SourceRecently Updated
1262
Profile unavailable
Security

Trent OpenClaw Security

Audit your OpenClaw deployment for security risks using Trent AppSec Advisor

Registry SourceRecently Updated
0218
Profile unavailable