/mainframe-natural-adabas:github-actions-hardeningfrom mainframe-natural-adabas
Reviews, audits, and hardens GitHub Actions workflows against CI/CD-specific threats including script injection, trigger escalation, token over-scoping, and mutable action references.
Ships in mainframe-natural-adabas. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Review workflow YAML through the GitHub Actions threat model: trigger privilege, expression interpolation, token scopes, action supply chain, secret handling, and runner exposure.
${{ <expr> }} is expanded by the runner into the script before the shell executes it. In a step like run: echo "Title: ${{ github.event.issue.title }}", attacker-controlled issue text is pasted directly into the shell command. Treat every ${{ }} expression containing outside-contributor-controlled data as a code-injection sink unless it is passed through a safe intermediate environment variable or equivalent safe pattern.
on: trigger and classify the workflow privilege using references/triggers-and-privilege.md.run: block, actions/github-script script:, and custom action input for ${{ }} expressions containing attacker-controlled fields.pull_request_target and workflow_run workflows do not check out PR or fork code with ref: ${{ github.event.pull_request.head.sha }} and then run build, test, install scripts, npm install lifecycle scripts, or other untrusted code under privileged tokens.permissions: for least privilege. Missing permissions inherit repository defaults; prefer top-level permissions: {} or contents: read, then grant minimum scopes per job such as pull-requests: write only where comments are posted.uses: reference for mutable tags or branches. Third-party actions must be pinned to a full 40-character commit SHA, with a trailing comment for the human-readable version such as uses: foo/bar@<sha> # v2.1.0.$GITHUB_ENV, $GITHUB_OUTPUT, set -x, bash -x, actions/checkout persist-credentials, OIDC setup, artifact/cache poisoning, and self-hosted runner exposure.references/report-format.md; never auto-apply changes.| Trigger | Trust level | Review rule |
|---|---|---|
push | Repository-controlled | Still check token scopes, secrets, and supply chain. |
pull_request from same repo | Contributor has repository trust | Check standard injection and permissions risks. |
pull_request from a fork | Read-only token and no secrets | Do not call this dangerous merely because it runs untrusted code. |
pull_request_target | Base repo context with read/write token and secrets, triggerable by outsiders | CRITICAL if it checks out and runs fork code. |
workflow_run | Privileged follow-up context | Must consume artifacts safely and never trust unvalidated upstream output. |
issue_comment, issues | Outside contributors can trigger text-controlled workflows | High-risk for ${{ github.event.* }} injection. |
Check github.event.issue.title, github.event.issue.body, github.event.pull_request.title, github.event.pull_request.body, .head.ref, .head.label, github.event.comment.body, github.event.review.body, github.event.pages.*.page_name, github.event.commits.*.message, github.event.head_commit.*, github.head_ref, and any github.event.* field a fork author can set.
| Severity | Meaning | Example |
|---|---|---|
| CRITICAL | Token/secret theft or RCE reachable by an outside contributor | pull_request_target checking out and running fork code; privileged ${{ github.event.* }} in run: |
| HIGH | Exploitable supply-chain or scope issue | Third-party action on mutable tag/branch; write-all; injection sink on issue_comment |
| MEDIUM | Risk under conditions or chaining | Missing permissions:; secret reachable by non-fork PR author |
| LOW | Hardening gap with low direct risk | First-party action not SHA-pinned; persist-credentials default on non-privileged job |
| INFO | Observation, not a vulnerability | Version comment missing next to pinned SHA |
references/triggers-and-privilege.md: trust matrix, pull_request_target, workflow_run, issue_comment, fork secrets, read-only token, and trust boundary.references/injection.md: script injection, github.event, head_ref, issue title, env, intermediate variable, run, github-script, and action input safe patterns.references/permissions-and-tokens.md: GITHUB_TOKEN, permissions, write-all, contents: read, id-token, OIDC, and least privilege.references/supply-chain.md: SHA pinning, uses, mutable tag, Dependabot, download-artifact, cache, and self-hosted runner guidance.references/report-format.md: report, finding, summary, remediation, before, and after format.## GitHub Actions hardening — <workflow path>
| Severity | Count |
| --- | ---: |
| CRITICAL | <count> |
| HIGH | <count> |
| MEDIUM | <count> |
| LOW | <count> |
| INFO | <count> |
### Findings
#### <issue type>
**Severity:** CRITICAL | HIGH | MEDIUM | LOW | INFO
**Location:** `<workflow>:<line>`
**Evidence:**
```yaml
<offending YAML>
Risk: Fix:
<corrected YAML>
## Quality gate
- [ ] Every workflow trigger was classified by trust level.
- [ ] Every `run:`, `actions/github-script` `script:`, and custom action input was checked for unsafe `${{ }}` interpolation.
- [ ] Privileged triggers do not run untrusted fork or PR code.
- [ ] `permissions:` is least-privilege and no unjustified `write-all` remains.
- [ ] Third-party `uses:` references are pinned to full 40-character SHAs or reported.
- [ ] `$GITHUB_ENV`, `$GITHUB_OUTPUT`, secrets, OIDC, artifacts, caches, and self-hosted runners were reviewed.
- [ ] Every CRITICAL or HIGH finding has corrected YAML and no change was applied automatically.
What SKILL.md sets; muted values are Claude Code's defaults
26 skills in this plugin
/adabas-postgresql-migrationModel Adabas files, DDM and FDT definitions, MU and PE structures, packed and unpacked numerics, descriptors, and ISN identity as a PostgreSQL schema, then prove equivalence with recorded reconciliation numbers. Use when designing or reviewing an Adabas to PostgreSQL data migration, mapping legacy field formats to column types, deciding child-table versus array storage, or verifying that migrated data matches the legacy source./code-modernizationUse this skill when the user asks to modernize legacy code with a disciplined GitHub Copilot workflow: brief, assess, map, extract business rules, reimagine architecture, transform modules, and harden with tests and security review. Trigger for COBOL, JCL, legacy Java, .NET, C++, classic ASP, monolith modernization, behavior-preserving rewrite, business-rule extraction, modernization assessment, or legacy-to-modern transformation./create-architectural-decision-recordCreate an Architectural Decision Record (ADR) as a structured Markdown document with front matter, coded consequences, alternatives, implementation notes, and references. Use when the user asks to document an architecture decision, create an ADR, capture alternatives and trade-offs, or save a decision under docs/adr.npx claudepluginhub gbb-acelerators/awesome-harness-primitives --plugin mainframe-natural-adabasOther plugins' skills for the same job