harden-github-actions
Harden GitHub Actions CI/CD workflows for supply-chain security — SHA-pin actions, least-privilege token permissions, verified toolchain installs, OpenSSF Scorecard, and SLSA provenance. Use when adding or auditing GitHub Actions workflows, before making a repository public, when
供给资产档案
编程与开发 Agent
代码审查、仓库分析、测试、CI、GitHub、DevOps 与开发工作流 Skill。
场景
GitHub automation
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
适配 Agent
Claude Code + CLI + Codex
适用于 Codex、Claude Code、Cursor、CLI 或自定义 Agent。
安装
就绪
npx skills add jrjsmrtn/project-orchestration-skills --skill harden-github-actions
维护状态
新鲜
距上次推送 2 天
风险
需审查
Dependency or permission surface needs review
GitHub 质量
14
58/100 质量 · 67/100 信任
覆盖标签
审查说明
Dependency or permission surface needs review · Permission surface may require sandboxing
Agent 采用评分卡
一眼查看信任、审计与安装准备度
这些分数综合公开仓库元数据、OpenAgentSkill 审查信号、维护新鲜度与安装准备度。它用于候选筛选,不替代人工审查。
质量
有潜力有用的候选项,但采用前应与替代方案比较。
信任
Do not auto-installTrust Score v5 found insufficient evidence for agent installation. Treat this as discovery material, not an executable recommendation.
审计
需审查对安装准备度、安全元数据、维护情况与采用风险的机器可读审查。
OpenAgentSkill 信任评分 v5
安装前需人工审查
Choose a stronger alternative or inspect the source manually before any install attempt.
Stars
14 个 GitHub Stars
仓库活跃度
14 个 Star,0 个 Fork
维护状态
距上次推送 2 天
许可证
MIT
安装
npx skills add jrjsmrtn/project-orchestration-skills --skill harden-github-actions
安装安全性
标准软件包或运行时安装路径
权限范围
secrets or environment access, shell or command execution
Agent 结果
暂未有 Agent 结果数据
文档
README/SKILL.md 上下文充分
风险摘要
生产前审查
- Low GitHub adoption signal
- Quality score needs review
- Permission surface needs review: secrets or environment access, shell or command execution
- GitHub adoption: 14 GitHub stars
安装准备度
安装路径可用
- 安装路径可用
- 仓库证据可用
- 已声明许可证
- 暂无 Agent 验证结果证据
Agent 可读元数据
这个 Skill 的机器可读决策数据。
使用此区块或内嵌 JSON 判断 Agent 是否应安装该 Skill、选择替代方案,或先请求人工审查。
适用任务
- GitHub automation 工作流
- Claude Code 团队
- builders willing to evaluate younger projects
- Inspect repository metadata
适用 Agent
安装决策
- 命令
- npx skills add jrjsmrtn/project-orchestration-skills --skill harden-github-actions
- 策略
- 阻止
- 人工审查
- 是
信任与风险
- 信任
- 59/100
- 审计
- 73/100
- 风险级别
- 需审查
结果闭环
- 端点
- /api/agent/outcome
- 事件 ID
- resolve
- 结果
- 5
安装命令
npx skills add jrjsmrtn/project-orchestration-skills --skill harden-github-actions不适用场景
- 需要厂商支持 SLA 的团队
- production agents without a repository review
- Low GitHub adoption signal
- 高风险权限提示:Shell or command execution, Secrets or environment access
- Dependency or permission surface needs review
Agent 安全 v2
33/100 · 避免自动安装
This skill should not be selected by an agent without explicit human security review.
Do not auto-install. Inspect the source, dependencies, and permission surface first.
高
Shell 或命令执行
Skill 元数据引用了终端、CLI、Shell、子进程或命令执行工作流。
中
网络访问
Skill 可能访问远程页面、API、仓库或外部服务。
中
文件系统访问
Skill 可能读取或写入项目文件、文档、生成产物或本地工作区状态。
高
Secrets or environment access
Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.
- 高风险权限提示:Shell or command execution, Secrets or environment access
- Dependency or permission surface needs review
安装目标
在你的 Agent 工作流中安装此 Skill
通过公开安装端点获取命令、安全清单、目标提示词和该 Skill 的规范链接。
OpenAgentSkill CLI
Resolve policy, run the source installer safely, and report a verified install receipt.
$ npx --yes https://github.com/Leon-Drq/openagentskill/releases/download/cli-v0.2.1/openagentskill-0.2.1.tgz install jrjsmrtn-harden-github-actionsAgent 解析计划
让 Agent 在安装前验证匹配度。
Resolve API 返回首选 Skill、替代方案、安全策略、审计说明、安装目标和可直接执行的提示词,无需抓取此页面。
打开 JSON
/api/agent/resolve?task=Use%20harden-github-actions%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve 文本
/api/agent/resolve?task=Use%20harden-github-actions%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
安装交接
/api/skills/jrjsmrtn-harden-github-actions/install
Agent 应检查
- 从 Resolve API 检查任务匹配与替代方案。
- 检查审计评分、信任评分和安全策略警告。
- 检查 Codex、Claude Code、Cursor 或 CLI 的安装目标兼容性。
复制提示词
Task: Use harden-github-actions in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20harden-github-actions%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/jrjsmrtn-harden-github-actions/install
Install command: npx skills add jrjsmrtn/project-orchestration-skills --skill harden-github-actions
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent 交接
把安装路径交给 Agent,而不是再给一个目录页。
通过公开安装端点获取命令、安全清单、目标提示词和该 Skill 的规范链接。
安装交接
/api/skills/jrjsmrtn-harden-github-actions/install
LLM 文本格式
/api/skills/jrjsmrtn-harden-github-actions/install?format=text
寻找替代方案
/api/skills/search?q=harden-github-actions&limit=3
Agent 提示词
Use harden-github-actions for this task. Review https://www.openagentskill.com/api/skills/jrjsmrtn-harden-github-actions/install, then install with: npx skills add jrjsmrtn/project-orchestration-skills --skill harden-github-actionsRegistry 元数据
用于自动选择 Skill 的 Agent 可读档案。
本页通过 Registry API 提供相同的决策、信任、审计、场景和安装信号,让 Agent 无需抓取界面即可排序。
Agent 决策面板
Fallback candidate for GitHub automation
先用此 Skill 做原型验证,并保留备选方案。
栈中角色
备选候选
主要匹配
GitHub automation
信任标签
先做原型验证
安装路径
命令已就绪
适用场景
- GitHub automation 工作流
- Claude Code 团队
- builders willing to evaluate younger projects
证据
- 仓库近期活跃
- 已提供安装命令或 GitHub 仓库
- 58/100 质量档案
- 3 个 OpenAgentSkill 交互事件
先审查
- Low GitHub adoption signal
实施路径
- 1在沙盒 Agent 中安装它,并端到端完成一次GitHub automation任务。
- 2Compare output quality, latency, and failure behavior against at least one alternative.
- 3Promote it into production only after reviewing repository permissions, license, and maintenance signals.
信任档案
Do not auto-install
Trust Score v5 found insufficient evidence for agent installation. Treat this as discovery material, not an executable recommendation.
GitHub 采用度
修复14 个 GitHub Stars
Star/Fork 活跃度
修复14 个 Star,0 个 Fork; 当前元数据中没有议题活跃度信息
近期维护
通过距上次推送 2 天
许可证清晰度
通过MIT
积极信号
- AI 审查已通过
- 安装路径可用
- 仓库证据可用
- 近期维护的仓库
- 安装命令未发现明显高风险模式
- 结果闭环已就绪,但需要首次真实 Agent 运行
安装前审查
- Low GitHub adoption signal
- Quality score needs review
- Permission surface needs review: secrets or environment access, shell or command execution
- GitHub adoption: 14 GitHub stars
- Stars/forks activity: 14 stars, 0 forks; issue activity unavailable in current metadata
- Dependency/runtime risk: command execution surface, credential or environment access
- Permission surface: secrets or environment access, shell or command execution
- 暂未有真实 Agent 结果报告
- 无人值守安装前需要人工审查
建议操作
Choose a stronger alternative or inspect the source manually before any install attempt.
质量档案
有潜力 适用于 Agent 工作流的候选
有用的候选项,但采用前应与替代方案比较。
工作流匹配
在这些场景使用此 Skill
Manage repositories
GitHub automation
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Build and ship code
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Automate repeated work
Workflow automation
I need my agent to automate a repeated workflow across tools and files.
工作流匹配
加入完整工作流
Inspect, patch, and verify code
Coding review agent
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Turn skills into distribution
Content growth agent
A workflow for turning newly indexed skills into SEO briefs, social drafts, comparison pages, and reusable publishing workflows.
Operate and verify web apps
Browser QA agent
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
替代方案短名单
安装前对比
可能适合该任务的相近 Skill。
Wazuh
Wazuh - The Open Source Security Platform. Unified XDR and SIEM protection for endpoints and cloud workloads.
Maigret
🕵️♂️ Collect a dossier on a person by username from 3000+ sites
Nuclei
Nuclei is a fast, customizable vulnerability scanner powered by the global security community and built on a simple YAML-based DSL, enabling collaboration to tackle trending vulnerabilities on the internet. It helps you find vulnerabilities in your applications, APIs, networks, DNS, and cloud configurations.
Infisical
Infisical is the open-source platform for secrets, certificates, and privileged access management.
概览
--- name: harden-github-actions description: Harden GitHub Actions CI/CD workflows for supply-chain security — SHA-pin actions, least-privilege token permissions, verified toolchain installs, OpenSSF Scorecard, and SLSA provenance. Use when adding or auditing GitHub Actions workflows, before making a repository public, when a supply-chain review flags CI gaps, or when standardizing CI hardening across GitHub projects. GitHub-specific by design — GitLab CI and Forgejo Actions are out of scope. metadata: author: "Georges Martin <jrjsmrtn@gmail.com>" version: "0.1.34" license: MIT ---
# Harden GitHub Actions
Harden GitHub Actions CI/CD workflows against supply-chain attack: pin what runs, minimise what it can do, and verify what it fetches.
> **GitHub-specific by design.** Unlike most orchestration skills, this one is deliberately bound to > one forge. The hardening controls below are not portable concepts wearing GitHub syntax — they are > properties of the GitHub Actions execution model itself: third-party actions resolved by mutable > git ref, an ambient `GITHUB_TOKEN` with **repository-wide default scopes**, and OIDC-backed SLSA > provenance. It has a **sibling**, `harden-gitlab-ci`, which is not a translation of this skill: > GitLab's risks sit in different places (`include:`/CI-Catalog components, and a `CI_JOB_TOKEN` that > defaults to *own-project-only* — so there the work is keeping it scoped, the opposite posture from > here). Forgejo Actions is Actions-compatible in shape but resolves actions against its instance's > configured registry, so pinning guidance does not transfer unchanged (roadmap H9).
## When to Use
- When adding GitHub Actions workflows to a project (after `setup-git-hooks`) - When auditing existing `.github/workflows/` before making a repository public - When a supply-chain review (or the `supply-chain` skill) flags CI hardening gaps - When standardising CI hardening across GitHub projects
**Not for:** GitLab CI — use `harden-gitlab-ci`. Not for Forgejo/Gitea Actions — the controls do not carry over unchanged. Say so rather than approximating.
This skill *hardens* CI workflows. `validate-quality-config` only *reads* CI to confirm parity with local hooks — it does not check pinning, permissions, or provenance. The two are complementary.
## Required Inputs
1. **Workflow files** — the project's `.github/workflows/*.yml` 2. **Release model** — does the project publish artifacts/images/packages (needs provenance + signing), or is it internal-only? 3. **Repository visibility** — public or private (affects Scorecard `publish_results` and OSSF publishing)
## The Threat
A CI job runs third-party code (actions, installed tools) with a `GITHUB_TOKEN` and often OIDC. A mutable action tag (`@v4`) can be repointed to malicious code; an over-privileged token can push commits, publish packages, or exfiltrate secrets; an unverified `curl | sh` install can be swapped upstream. Hardening closes all three: **pin**, **least-privilege**, **verify**.
## Workflow
### Step 1: Inventory and triage
Find every workflow and the hardening gaps in it:
```bash ls .github/workflows/ # Mutable action refs (should be zero — all must be SHA-pinned): grep -rnE 'uses:.*@(v[0-9]|main|master|latest)' .github/workflows/ # Workflows missing a top-level permissions block: for f in .github/workflows/*.yml; do grep -q '^permissions:' "$f" || echo "no permissions: $f"; done # Floating tool versions: grep -rnE 'version:\s*latest|@latest' .github/workflows/ ```
Aim for a clean 3-way split: **`ci.yml`** (lint/test/build on push + PR), **`scorecard.yml`** (OpenSSF Scorecard on a schedule), and — only if the project ships artifacts — **`release.yml`** (SBOM + SLSA provenance + signing).
### Step 2: SHA-pin every action
Pin every `uses:` to a **full 40-character commit SHA** with a trailing `# vX.Y.Z` comment for readability. Never rely on a mutable tag.
```yaml # Good — immutable, human-readable, Dependabot-updatable - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 # v5.3.0 - uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
# Bad — mutable tag, can be repointed upstream - uses: actions/checkout@v4 ```
Resolve a tag to its commit SHA:
```bash gh api repos/actions/checkout/commits/v4.2.2 --jq '.sha' ```
Keep pins current automatically with a Dependabot `github-actions` update block (see `bootstrap-project` / the dependency-update config). Dependabot preserves the `# vX.Y.Z` comment when it bumps a SHA.
**The one sanctioned exception**: reusable workflows that verify their own release tag — notably `slsa-framework/slsa-github-generator` — **must** be referenced by semantic version tag, not SHA (see Step 7). Document the exception in an ADR and in a comment on the line.
### Step 3: Least-privilege token permissions
Set a read-only default at the top of every workflow, then elevate **per job** only where a job genuinely needs to write.
```yaml # top of the workflow permissions: contents: read ```
Elevate narrowly, in the specific job:
```yaml jobs: # OpenSSF Scorecard analysis: permissions: security-events: write # upload the SARIF result id-token: write # publish results to the OSSF API contents: read
# Release provenance / publish provenance: permissions: actions: read # read the workflow path id-token: write # mint the OIDC token for signing contents: write # attach provenance to the release # packages: write # add only if publishing to GHCR / a registry ```
Rule of thumb: default `contents: read`; add `id-token: write` only for OIDC signing/publish; add `contents: write` only for jobs that create releases/tags; add `packages: write` only for registry publish; add `security-events: write` only for SARIF upload.
### Step 4: Harden the checkout
On any workflow that runs with elevated permissions or handles releases (Scorecard, release), stop the checkout from leaving credentials on disk:
```yaml - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false ```
### Step 5: Verify what you install
Every tool a job installs is attack surface. In order of preference:
1. **SHA-pinned setup action** (best) — toolchains via pinned actions: ```yaml - uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 # v5.3.0 with: { distribution: temurin, java-version: "21" } - uses: xu-cheng/texlive-action@22c04326a5d855880f9d39bb955138bf11c6df80 # v3 ``` 2. **Pinned version + checksum verification** for a downloaded binary: ```yaml - run: | curl -fsSL -o tool.tar.gz "https://example.com/tool/v1.2.3/tool.tar.gz" echo "abc123... tool.tar.gz" | sha256sum -c - tar xzf tool.tar.gz ``` 3. **Pinned package version** for distro/language packages.
Anti-patterns to eliminate (all seen in real workflows):
```yaml - run: luarocks install luacheck # no version pin - run: apt-get install -y -qq pandoc # unversioned distro package with: { version: latest } # floating action release - run: curl -fsSL https://x/install.sh | sh # unverified remote script — never ```
Digest-pin any container image referenced in a `run`/service step (`image@sha256:…`, not `:latest`); base-image and artifact-checksum hardening for the images themselves belongs to `setup-container-security`.
### Step 6: OpenSSF Scorecard
Add a Scorecard workflow to continuously grade the repo's supply-chain posture. Canonical `scorecard.yml`:
```yaml name: Scorecard on: branch_protection_rule: schedule: - cron: "26 7 * * 1" # weekly, Mondays workflow_dispatch:
permissions: read-all
jobs: analysis: runs-on: ubuntu-latest permissions: security-events: write # upload the SARIF result id-token: write # publish results to the OSSF API contents: read steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false - uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3 with: results_file: results.sarif results_format: sarif publish_results: true # requires a PUBLIC repo; keep false while private - uses: github/codeql-action/upload-sarif@dd903d2e4f5405488e5ef1422510ee31c8b32357 # v3 with: sarif_file: results.sarif ```
On a **private** repo set `publish_results: false` — but note that several Scorecard *checks* also fail to run while private (`Resource not accessible by integration`); prefer gating the whole job on visibility so it self-activates at the public gate (see **Step 7b**).
**Scorecard grades the default branch — mind gitflow.** Scorecard's content analysis runs against the repository's **default branch** (a `workflow_dispatch` against another ref is refused with `only default branch is supported` — observed directly). If the project follows the gitflow that `bootstrap-project` sets up, `develop` is the default, so the published score describes the **integration** branch, not the `main` that releases are cut from — the repo is graded on a branch its consumers never fetch. The one documented exception is the **`Branch-Protection`** check, which evaluates a project's *default **and** release* branches (verified against the Scorecard docs); the content-analysis checks (`Pinned-Dependencies`, `Dangerous-Workflow`, `Token-Permissions`, …) do not. Two honest resolutions: accept that `develop` is graded and protect/harden it accordingly, or make `main` the default and treat `develop` as a long-lived branch. Pick one on purpose — this gap lives only where the gitflow recommendation and the Scorecard workflow meet, so neither skill alone would surface it.
### Step 7: Release provenance (if the project ships artifacts)
For projects that publish artifacts/images/packages, attach SLSA build provenance at release. Hash the build outputs, then hand off to the generator — referenced **by tag** (the sanctioned exception to Step 2):
```yaml provenance: # MUST run after the job that creates the release: with upload-assets:true the generator # creates the release itself when absent, racing publish and producing a bare, notesless one. needs: [build, publish] permissions: actions: read id-token: write contents: write # slsa-github-generator MUST be tag-pinned (it verifies its own release tag) — the # documented exception to the SHA-pin rule; record it in an ADR. uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.1.0 with: base64-subjects: ${{ needs.build.outputs.hashes }} upload-assets: true ```
Provenance, SBOM (syft), and keyless signing (cosign) at release time are owned by `wrapup-sprint`'s release step — this skill wires the workflow permissions and the tag-pin exception that make them safe. Note the `needs: [build, publish]` above: because `upload-assets: true` makes the generator *create* the release when it runs first, provenance must follow the job that publishes it with changelog notes — the idempotent create-release step is detailed in `wrapup-sprint`.
### Step 7b: Private repositories — gate visibility-sensitive controls
Several controls above behave differently while the repo is private, for **two distinct reasons** — *cannot run* and *should not run* — and neither is obvious until you run them (the failures arrive at the first scheduled Scorecard run and Dependabot's first PR). The honest default is to **self-activate them at the public gate** rather than leave a manual step to remember. Gate the job (or step) on visibility:
```yaml if: ${{ !github.event.repository.private }} # runs only when the repo is public ```
| Con
技术详情
- 版本
- 1.0.0
- 许可证
- MIT
- 最近更新
- 2026年8月21日
- 发布时间
- 2026年8月21日
决策摘要
备选候选
仓库近期活跃
Agent 验证证据
Agent 验证证据
来自解析、审查、安装和一次小范围运行后的结果报告。
- 成功率
- —
- 近期失败
- —
- 结果
- 0
- 输出质量
- —
- 失败
- 0
- 不相关
- 0
- 安装次数
- 0
- 风险拦截
- 0
- 需要配置
- 0
- 生产环境
- 0
暂时没有 Agent 结果数据。首次 Agent 执行可以通过 /api/agent/outcome 报告成功、需要设置、风险拦截、失败或不相关。
增长闭环
分享工具包
为 harden-github-actions 准备的场景化草稿,可手动发布到 X。
harden-github-actions: Harden GitHub Actions CI/CD workflows for supply-chain security — SHA-pin actions, least-priv... 14 stars https://www.openagentskill.com/skills/jrjsmrtn-harden-github-actions?ref=x
可选:带安装命令的回复
Listing + install path for harden-github-actions: https://www.openagentskill.com/skills/jrjsmrtn-harden-github-actions?ref=x Install: npx skills add jrjsmrtn/project-orchestration-skills --skill harden-github-actions
收录来源
Registry 收录
此列表来自公开来源,维护者认领获批前不会标记为官方。
- 创作者
- jrjsmrtn
- 收录方
- OpenAgentSkill 社区索引
归属链接指向公开仓库或创作者主页。创作者可认领列表以更新所有权信号。
认领此 Skill所有者认领
认领此 Skill 页面
这条 Registry 收录 列表归属于 jrjsmrtn,但尚未标记为官方。认领后可增加已验证所有者信号,使后续发布、安装和审计更新更值得信赖。
创作者外链工具包
将证据徽章加入你的 README
在开发者评估仓库的位置展示规范页面、当前信任与审计信号,以及真实的 Agent 验证证据。
[](https://www.openagentskill.com/skills/jrjsmrtn-harden-github-actions)
[](https://www.openagentskill.com/skills/jrjsmrtn-harden-github-actions)
[](https://www.openagentskill.com/skills/jrjsmrtn-harden-github-actions/audit)
[](https://www.openagentskill.com/skills/jrjsmrtn-harden-github-actions)作者
jrjsmrtn
@jrjsmrtn
平台适配
健康信号
- GitHub Stars
- 14
- 质量评分
- 32/100
- 最近 GitHub 推送
- 2026年8月21日
- 框架提示
- 未知
- OpenAgentSkill 浏览量
- 3
- 复制安装命令
- 0
- 跳转点击
- 0
社区信号
告诉我们这个 Skill 是否对你的 Agent 工作流有帮助。汇总反馈会持续改善排序。
信任与安全
Do not auto-install
- GitHub 采用度14 个 GitHub Stars修复
- Star/Fork 活跃度14 个 Star,0 个 Fork; 当前元数据中没有议题活跃度信息修复
- 近期维护距上次推送 2 天通过
- 许可证清晰度MIT通过
- README/SKILL.md 完整度元数据包含足够的用法与工作流上下文通过
- 依赖与运行时风险command execution surface, credential or environment access修复
相关 Skill
Wazuh
Wazuh - The Open Source Security Platform. Unified XDR and SIEM protection for endpoints and cloud workloads.
16.3K StarsMaigret
🕵️♂️ Collect a dossier on a person by username from 3000+ sites
32.9K StarsNuclei
Nuclei is a fast, customizable vulnerability scanner powered by the global security community and built on a simple YAML-based DSL, enabling collaboration to tackle trending vulnerabilities on the internet. It helps you find vulnerabilities in your applications, APIs, networks, DNS, and cloud configurations.
29.2K StarsInfisical
Infisical is the open-source platform for secrets, certificates, and privileged access management.
27.4K Stars