360 Secure SkillHub
360 安全技能中心

github-actions

面向 GitHub Actions,按项目语言生成 CI/CD 工作流模板,并审计现有工作流中的 action 固定、权限、缓存、并发、版本与迁移漂移等问题;默认只报告,按需修复或生成。

分类:开发
tartinerlabs
热度 0.00
最近更新 2026-12-03 05:25:07

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add tartinerlabs/skills/github-actions
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
github-actions
description
Use when adding CI/CD, creating workflows, auditing GitHub Actions, or fixing action pinning. Creates and audits workflows for SHA pinning and permissions.
license
MIT
allowed-tools
Read Glob Grep Edit Write Bash(gh:*)
model
sonnet
effort
high
context
fork
agent
general-purpose
compatibility
Targets GitHub Actions (GitHub-native); uses gh for SHA lookups; auto-detects project language (Node/JS-TS, Go, Python, Rust, Ruby)
metadata
{"short-description":"Create and audit CI workflows."}

Mode Detection

Audit and report by default. Generate workflows only when asked to create, add, or set up CI — and never merely because .github/workflows/ is absent; report that none were found instead. Apply fixes only when asked to fix or pin. When the ask is unclear, report and offer to apply the fixes.

Create Mode

1. Detect the Language

Read the project's manifest and load only the matching template guide:

Language Detected by Template
JS/TS with pnpm pnpm detected per rules/package-manager.md references/pnpm.md
JS/TS, other managers package.json references/js.md
Go go.mod references/go.md
Python requirements.txt / pyproject.toml / setup.py references/python.md
Rust Cargo.toml references/rust.md
Ruby Gemfile references/ruby.md

2. Generate Workflow

Read each rule file in rules/ and apply all of them when generating workflows — every template applies the same rules (action pinning, permissions, concurrency).

Pin every action per rules/action-pinning.md before writing the workflow, including GitHub-owned actions/*. Resolve each to a full commit SHA and keep the release or source ref in a comment, as the rule describes.

When the project commits migrations from a migration tool, also add a separate migration-drift job per rules/migration-drift.md, and tell the user to make it a required status check.

Audit Mode

1. Scan Workflows

Read all .yml and .yaml files in .github/workflows/ and audit against every rule in the rules/ directory.

2. Report Format

Report each finding as path:line — what is wrong → the fix, grouped by severity, and close with per-severity counts and the number of files scanned.

Report all rule violations found, not just pinning and permissions — migration drift, concurrency, node version, caching, triggers, matrix, and parallel steps too.

3. Auto-Fix

When fixing, look up commit SHAs for pinning as rules/action-pinning.md describes.

Rules

Rule Impact File
Action pinning HIGH rules/action-pinning.md
Permissions HIGH rules/permissions.md
Migration drift HIGH rules/migration-drift.md
Package manager HIGH rules/package-manager.md
Concurrency MEDIUM rules/concurrency.md
Node version MEDIUM rules/node-version.md
Caching MEDIUM rules/caching.md
Triggers LOW rules/triggers.md
Matrix strategy LOW rules/matrix.md
Parallel steps LOW rules/parallel-steps.md