Rules
- No mutating API calls without confirmation.
gh api GET requests are allowed freely. Any call using -X POST, -X PUT, -X PATCH, or -X DELETE must be shown to the user and approved before execution.
- Never force-push, delete branches, or delete repositories.
- Only modify files under
.github/. Do not touch application code, scripts, or configuration outside of workflow files.
- Show a diff and get confirmation before handing off for commit.
- All PRs must be created as drafts.
- Flag uncertainty. If a finding is ambiguous or a fix could break a workflow, stop and ask rather than guessing.
Step 1: Confirm Audit Findings
Before proceeding, verify that the user has audit findings to act on. These should come from a prior run of the action-audit skill. Confirm:
- Which repos to remediate (all, a subset, or specific ones)
- The remediation approach:
- pin to main — for internal
bitwarden/ actions: change the ref to @main
- pin update — for external actions: update to a verified 40-character SHA with an inline version comment
- replace — swap to a different action entirely
- The target SHA, replacement action, or confirmation that
@main is the fix
If any of this is unclear, ask the user before continuing.
Step 2: Apply Fixes Per Repo
For each selected repo:
Ask the user for the base directory where their repos are cloned (if not already known). Check if a local clone exists at <base-dir>/<repo>. If not, inform the user and skip that repo.
Create a fix branch:
git checkout -b fix/action-remediation-<action-name-slug>
Apply the fix to each affected file based on the remediation approach:
- Pin to main (internal
bitwarden/ actions): Replace the ref with @main — e.g., uses: bitwarden/gh-actions/action@v1 → uses: bitwarden/gh-actions/action@main. No SHA resolution needed.
- Pin update (external actions): Replace the
uses: line with uses: <action>@<sha> # <original-ref>
- Replace: Before applying, verify the replacement action is on Bitwarden's approved actions list in
bitwarden/workflow-linter. Then swap uses: <old-action>@<ref> with uses: <new-action>@<sha> # <tag>
Show a git diff of changes in this repo and get confirmation before proceeding.
Step 3: Commit, Push, and Create PRs
Do not run the staging, commit, or push commands yourself. For each repo, present the block below for the user to run manually as a suggestion:
git add .github/
git commit -m "Remediate <action-name> action usage"
git push -u origin fix/action-remediation-<action-name-slug>
Once the user confirms the push, create the draft PR:
gh pr create \
--title "Remediate <action-name> action usage" \
--body "$(cat <<'EOF'
## Summary
Remediates usage of `<action-name>` across this repository.
**Action taken:** <pin updated to `<sha>` / replaced with `<new-action>`>
**Reason:** <compromised action / deprecated action / unpinned reference>
EOF
)" \
--draft
Step 4: Final Summary
Output a summary of all actions taken:
| Repo |
Files Changed |
PR Created |
Notes |
| ... |
... |
... |
... |
Remind the user that code search results may have a lag and to verify no repos were missed by checking manually if this is a security incident.
1---2name: action-remediate3description: >4 Remediate GitHub Actions action findings identified by the action-audit skill. Applies the5 appropriate fix per action type — `@main` ref for internal `bitwarden/` actions, full SHA with6 inline version comment for external actions, or full replacement — across selected repos and7 creates draft PRs. Run the action-audit skill first to identify findings before using this skill.89 <example>10 User: Go ahead and fix the unpinned actions from the audit11 Action: Trigger action-remediate to apply fixes and create PRs12 </example>1314 <example>15 User: Replace tj-actions/changed-files with the safe version across those repos16 Action: Trigger action-remediate to swap the action and create PRs17 </example>18allowed-tools: Read, Edit, Glob, Grep, Bash(gh pr create:*), Bash(git checkout:*), Bash(git diff:*)19metadata:20 source: https://skillmd.com/skills/bitwarden/action-remediate21---2223## Rules2425- **No mutating API calls without confirmation.** `gh api` GET requests are allowed freely. Any call using `-X POST`, `-X PUT`, `-X PATCH`, or `-X DELETE` must be shown to the user and approved before execution.26- **Never force-push, delete branches, or delete repositories.**27- **Only modify files under `.github/`.** Do not touch application code, scripts, or configuration outside of workflow files.28- **Show a diff and get confirmation before handing off for commit.**29- **All PRs must be created as drafts.**30- **Flag uncertainty.** If a finding is ambiguous or a fix could break a workflow, stop and ask rather than guessing.3132## Step 1: Confirm Audit Findings3334Before proceeding, verify that the user has audit findings to act on. These should come from a prior run of the `action-audit` skill. Confirm:3536- Which repos to remediate (all, a subset, or specific ones)37- The remediation approach:38 - **pin to main** — for internal `bitwarden/` actions: change the ref to `@main`39 - **pin update** — for external actions: update to a verified 40-character SHA with an inline version comment40 - **replace** — swap to a different action entirely41- The target SHA, replacement action, or confirmation that `@main` is the fix4243If any of this is unclear, ask the user before continuing.4445## Step 2: Apply Fixes Per Repo4647For each selected repo:48491. Ask the user for the base directory where their repos are cloned (if not already known). Check if a local clone exists at `<base-dir>/<repo>`. If not, inform the user and skip that repo.50512. Create a fix branch:5253 ```bash54 git checkout -b fix/action-remediation-<action-name-slug>55 ```56573. Apply the fix to each affected file based on the remediation approach:58 - **Pin to main (internal `bitwarden/` actions):** Replace the ref with `@main` — e.g., `uses: bitwarden/gh-actions/action@v1` → `uses: bitwarden/gh-actions/action@main`. No SHA resolution needed.59 - **Pin update (external actions):** Replace the `uses:` line with `uses: <action>@<sha> # <original-ref>`60 - **Replace:** Before applying, verify the replacement action is on Bitwarden's approved actions list in `bitwarden/workflow-linter`. Then swap `uses: <old-action>@<ref>` with `uses: <new-action>@<sha> # <tag>`61624. Show a `git diff` of changes in this repo and get confirmation before proceeding.6364## Step 3: Commit, Push, and Create PRs6566Do not run the staging, commit, or push commands yourself. For each repo, present the block below for the user to run manually as a suggestion:6768```bash69git add .github/70git commit -m "Remediate <action-name> action usage"71git push -u origin fix/action-remediation-<action-name-slug>72```7374Once the user confirms the push, create the draft PR:7576```bash77gh pr create \78 --title "Remediate <action-name> action usage" \79 --body "$(cat <<'EOF'80## Summary8182Remediates usage of `<action-name>` across this repository.8384**Action taken:** <pin updated to `<sha>` / replaced with `<new-action>`>8586**Reason:** <compromised action / deprecated action / unpinned reference>87EOF88)" \89 --draft90```9192## Step 4: Final Summary9394Output a summary of all actions taken:9596| Repo | Files Changed | PR Created | Notes |97| ---- | ------------- | ---------- | ----- |98| ... | ... | ... | ... |99100Remind the user that code search results may have a lag and to verify no repos were missed by checking manually if this is a security incident.