Skip to content
Skills Library
Security · Automation

arn-code-batch-cve-fix

/arn-code-batch-cve-fix

This skill should be used when the user says "fix CVEs", "patch vulnerabilities", "apply security patches", "batch CVE fix", "remediate CVEs", "arness CVE fix", "arn-code-batch-cve-fix", "fix all open CVE tickets", "cleanup resolved CVE proposals", or wants Arness to apply per-group dependency bumps for CVEs already triaged by arn-code-batch-cve-scan and open one human-reviewed PR per group against the configured Security branch. Interactive only.

Repository
arness ↗
Licence
MIT
Last repository change
25.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
7
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 25.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

This skill should be used when the user says "fix CVEs", "patch vulnerabilities", "apply security patches", "batch CVE fix", "remediate CVEs", "arness CVE fix", "arn-code-batch-cve-fix", "fix all open CVE tickets", "cleanup resolved CVE proposals", or wants Arness to apply per-group dependency bumps for CVEs already triaged by arn-code-batch-cve-scan and open one human-reviewed PR per group against the configured Security branch. Interactive only.

Triggers from the description

fix CVEspatch vulnerabilitiesapply security patchesbatch CVE fixremediate CVEsarness CVE fixarn-code-batch-cve-fixfix all open CVE tickets

Arguments

/arn-code-batch-cve-fix [--proposal-path=<path>]
Original author description

This skill should be used when the user says "fix CVEs", "patch vulnerabilities", "apply security patches", "batch CVE fix", "remediate CVEs", "arness CVE fix", "arn-code-batch-cve-fix", "fix all open CVE tickets", "cleanup resolved CVE proposals", or wants Arness to apply per-group dependency bumps for CVEs already triaged by arn-code-batch-cve-scan and open one human-reviewed PR per group against the configured Security branch. Interactive only.

How it works

  1. Step 0: Ensure Configuration
  2. Step 1: Ingest Scan Output
  3. Step 2: Form Groups
  4. Step 3: Apply Auto-Apply Boundary
  5. Step 4: Pre-flight Summary
  6. Step 5: Dispatch Parallel Workers
  7. Step 6: Track Progress
  8. Step 7: Post-fix Cleanup of Resolved Past Proposals
  9. Step 8: Final Summary
Original SKILL.md headings · 189 lines, 1,588 words
SKILL.md preview
---
name: arn-code-batch-cve-fix
description: >-
  This skill should be used when the user says "fix CVEs", "patch vulnerabilities",
  "apply security patches", "batch CVE fix", "remediate CVEs",
  "arness CVE fix", "arn-code-batch-cve-fix", "fix all open CVE tickets",
  "cleanup resolved CVE proposals", or wants Arness to apply per-group dependency
  bumps for CVEs already triaged by arn-code-batch-cve-scan and open one
  human-reviewed PR per group against the configured Security branch.
  Interactive only.
version: 1.0.0
argument-hint: "[--proposal-path=<path>]"
disable-model-invocation: true
---

# Arness Batch CVE Fix

Apply per-group fixes for previously-triaged CVEs, open per-group pull requests targeting the configured `Security branch:`, and optionally archive fully-resolved past CVE proposals. This skill consumes the triage records, sub-issue numbers, and parent-issue handle produced by `arn-code-batch-cve-scan` and dispatches one worker per group inside a pre-created git worktree.

**Key architectural constraint:** This skill is a sequencer — it MUST NOT duplicate sub-reference logic. All procedural detail lives in `references/`. Worker isolation (worktree setup, isolation check, cleanup-on-failure) is INHERITED from `arn-code-batch-implement/references/worker-instructions.md` — this skill's own `worker-instructions.md` DELEGATES to that source-of-truth and documents only the per-group fix scope.

**Interactive-only**. There is no `--mode=` argument. There is no proposal artifact. There is no headless / scheduled fix path. Every PR is human-reviewed at creation time; every past-plan archive is confirmed via `AskUserQuestion`. The auto-apply boundary (see `references/auto-apply-boundary.md`) controls whether the worker drives the dependency bump itself (when all 5 conditions are met) or pauses for human application — the worker still always opens a PR for review.

Pipeline position:

```
arn-code-batch-cve-scan (triage records + parent + sub-issues)
                  │
                  ▼
        **arn-code-batch-cve-fix**
        ┌─────────┴────────────┐
        │ form groups          │
        │ apply auto-apply gate│
        │ dispatch workers     │
        │ open per-group PRs   │
        │ post-fix cleanup     │
        └──────────────────────┘
                  │
                  ▼
        Per-group PRs targeting <Security branch>
        (each PR contains `Closes #N` per sub-issue)
                  │
                  ▼ (after merge — polled or --cleanup-resolved)
        Past-plan cleanup (interactive archive of resolved CVE_<ts>/)
```

---

## Step 0: Ensure Configuration

Read `${CLAUDE_PLUGIN_ROOT}/skills/arn-code-ensure-config/references/step-0-fast-path.md` and follow its instructions. This guarantees `## Arness` is configured with Arness Code fields.

After ensure-config completes, extract from `## Arness`:

- **Security scanning** — `enabled | none | skip`. If `none` or `skip`, inform the user: "Security scanning is set to `<value>`. Update the `Security scanning:` field in `## Arness` to `enabled` to run this skill." STOP.
- **Security branch** — branch name or `auto`. If `auto`, resolve via `git symbolic-ref --short refs/remotes/origin/HEAD`. This branch is used in THREE places throughout the skill:
  1. Worker worktree baseline: `git worktree add <path> <security-branch>`
  2. Auto-apply gate CI baseline check: `gh run list --branch <security-branch>` (see `references/auto-apply-boundary.md`)
  3. PR target: `gh pr create --base <security-branch>` (see `references/pr-body.md`)
- **Plans directory** — base path for locating past CVE proposals during cleanup.
- **Issue tracker** — `github | jira | none`. Drives `Closes #N` syntax (GitHub) vs. Jira issue-link payload.
- **Platform** — `github | jira | none`. Drives `gh` vs. Atlassian-MCP for PR creation.
- **Git** — must be `yes`. If `no`, inform the user: "Batch CVE fix requires git for worktree-based parallel execution. Set `Git: yes` in `## Arness` or apply fixes manually." STOP.

If `Security branch:` is missing, Layer 2c will have prompted the user via `AskUserQuestion` and written the chosen value. This skill consumes the field — it does not write it.

Resolve a worker count cap: mirror `arn-code-batch-implement`'s `≤5 concurrent workers` policy. If more than 5 groups are formed, batch them into successive waves of 5.

---

## Step 1: Ingest Scan Output

The fix skill consumes the handoff produced by `arn-code-batch-cve-scan`. Two equivalent intake paths are supported (whichever is present wins; if both, the explicit invocation argument wins):

- **JSON file on disk** — default path: the most-recent `CVE_SCAN_PROPOSAL.json` under `<Plans directory>/CVE_*/` (excluding the archive subdirectory — see `references/cleanup-resolved.md` for the archive location convention). The proposal contains the parent-issue handle, the sub-issue numbers, and the full triage records per CVE.
- **Invocation argument** — explicit `--proposal-path=<absolute-path-to-CVE_SCAN_PROPOSAL.json>`. Overrides auto-discovery.

If no proposal is found and none is supplied, inform the user: "No CVE scan proposal found under `<Plans directory>/CVE_*/`. Run `/arn-code-batch-cve-scan` first to discover and triage CVEs." STOP.

Validate the proposal:

- The proposal's `parentIssue` field must be a still-open issue (query via `gh issue view <N> --json state` or Jira MCP equivalent). If closed, inform the user and ask whether to proceed against the closed parent (`AskUserQuestion`).
- The proposal's `subIssues[]` entries each carry the sub-issue number and the associated triage record. Sub-issues already in `closed` state are skipped (they were resolved out-of-band).

The triage records, sub-issue numbers, and parent-issue handle are now in memory for the rest of the skill.

---

## Step 2: Form Groups

Read `${CLAUDE_PLUGIN_ROOT}/skills/arn-code-batch-cve-fix/references/grouping.md` and follow its grouping procedure. Inputs: the open triage records + sub-issue numbers from Step 1. Outputs: an ordered list of groups, each carrying:

- `groupId`: deterministic SHA-256 hash of the sorted advisory-id list
- `cves[]`: one or more triage records
- `subIssues[]`: one or more sub-issue numbers
- `kind`: `critical-singleton` | `breaking-singleton` | `bundled`

Critical-severity or breaking-change CVEs land in singleton groups (one CVE per PR). Other CVEs bundle with independence checks, capped at 8 per group for reviewability.

---

## Step 3: Apply Auto-Apply Boundary

Read `${CLAUDE_PLUGIN_ROOT}/skills/arn-code-batch-cve-fix/references/auto-apply-boundary.md` and follow its 5-condition AND-gate. For each group:

- All 5 conditions TRUE → mark the group `auto-apply: true`. The worker will drive the dependency bump itself.
- Any condition FALSE → mark the group `auto-apply: false`. The worker still opens a PR, but it pauses to surface the bump for human application before committing — the PR body explicitly notes "Human-applied" instead of "Auto-applied".

The CI baseline check inside the auto-apply gate uses the configured `Security branch:` (NEVER hardcoded `main`).

If the configured `Security branch:` CI is currently red OR the project's test command is missing, ABORT auto-apply for the entire batch and force `auto-apply: false` on every group. Workers will still run; PRs will still open; but no auto-apply marker will appear in any PR body.

---

## Step 4: Pre-flight Summary

Present the planned groups as a table, similar to `arn-code-batch-implement`'s pre-flight:

```
Batch CVE Fix Pre-flight:

| # | Group ID (first 8) | CVEs | Severity | Auto-apply? | Sub-issues |
|---|--------------------|------|----------|-------------|------------|
| 1 | a3f9bc01           | 1    | critical | yes         | #123       |
| 2 | b71d2ef8           | 5    | high     | no          | #124..#128 |
| 3 | 9e8a4c20           | 8    | medium   | yes         | #129..#136 |
```

Inform the user about worktree location: "Workers run in pre-created worktrees at `.claude/worktrees/arn-batch-cve-<groupId-prefix>/` baselined off `<security-branch>`. Worktrees are preserved until the corresponding PR is merged; cleanup follows the same semantics as `arn-code-batch-implement`."

Inform the user about PR target: "Each PR targets `<security-branch>`. Sub-issues are auto-closed by `Closes #N` lines in the PR body."

Ask (using `AskUserQuestion`):

> **Launch [N] parallel CVE fix workers?**
> 1. Launch all
> 2. Select subset
> 3. Cancel

- **Launch all** — proceed with all groups.
- **Select subset** — present a multi-select (using `AskUserQuestion` with `multiSelect: true`) listing each group by `groupId` prefix + summary. Proceed with selected groups only.
- **Cancel** — exit.

---

## Step 5: Dispatch Parallel Workers

Read `${CLAUDE_PLUGIN_ROOT}/skills/arn-code-batch-cve-fix/references/worker-instructions.md` and follow its dispatch procedure. The worker-instructions file DELEGATES to `${CLAUDE_PLUGIN_ROOT}/skills/arn-code-batch-implement/references/worker-instructions.md` for worktree setup, isolation enforcement, and cleanup-on-failure semantics — this skill never reimplements that logic. The fix-specific reference adds only:

- The per-group fix scope (single CVE for critical/breaking; bundled cap 8 for others).
- Worktree creation baseline: `git worktree add <path> <security-branch>` (NOT a hardcoded base branch).
- PR target: `gh pr create --base <security-branch>`.
- Verification mode selection per `references/verification.md`.
- PR body composition per `references/pr-body.md`.

Spawn workers in parallel per the batch-implement convention. Cap at 5 concurrent workers; batch into waves of 5 if more groups exist.

---

## Step 6: Track Progress

As workers complete, collect their final messages. Each worker should end with `PR: <url>` or `PR: none -- <reason>`. Present a status table as workers finish:

```
| Group ID (first 8) | CVEs | Status | PR | Duration |
|--------------------|------|--------|----|----------|
| a3f9bc01           | 1    | done   | https://github.com/.../pull/501 | 2m 14s |
| b71d2ef8           | 5    | failed -- verification | n/a | 1m 02s |
```

If a worker fails: report the failure, continue tracking other workers, include the failed group in the summary. Cleanup-on-failure semantics (worktree teardown, branch teardown) are inherited from the batch-implement worker-instructions and run automatically inside the worker.

When all workers in the current wave complete, present the summary: **"[N/M] CVE groups fixed successfully."** If additional waves are queued (>5 groups), launch the next wave and repeat.

---

## Step 7: Post-fix Cleanup of Resolved Past Proposals

After all workers complete and PRs are open, invoke the post-fix cleanup sub-step. Read `${CLAUDE_PLUGIN_ROOT}/skills/arn-code-batch-cve-fix/references/cleanup-resolved.md` and follow its procedure.

Trigger paths:

- **Automatic post-merge polling** (default) — for each PR opened in this run, poll `gh pr view --json mergedAt` with a configurable timeout (default 30 days). When a PR transitions to merged, the cleanup-resolved procedure runs against the past-plan directory. Users who never merge see no auto-cleanup — the polling simply expires.
- **Manual invocation** — re-run this skill with `--cleanup-resolved` to skip directly to the cleanup sub-step against the current scan output, regardless of PR merge status.

The cleanup procedure enforces a **two-axis evidence gate** (both axes required) and is INTERACTIVE-ONLY — `AskUserQuestion` confirms every archive move. Archive uses `git mv` (preserving git history); `rm` is NEVER used. See `references/cleanup-resolved.md` for the full procedure including the archive destination path convention.

---

## Step 8: Final Summary

Print the closing summary:

- Per-group status (done | failed)
- PR URLs (or `none -- <reason>`)
- Sub-issues that will be auto-closed on PR merge (the `Closes #N` linkage)
- Parent-issue handle (still open; reviewer-facing context for the merge ceremony)
- Cleanup status (number of past proposals archived, if any)

Inform the user: "Per-group PRs target `<security-branch>`. Review and merge per your team's normal security-branch ceremony. Run `/arn-code-batch-cve-scan` again post-merge to confirm CVE inventory is cleared."

Exit cleanly.
Files in this package (7)
  • SKILL.md 12 KB
  • references/auto-apply-boundary.md 10 KB
  • references/cleanup-resolved.md 13 KB
  • references/grouping.md 6 KB
  • references/pr-body.md 8 KB
  • references/verification.md 7 KB
  • references/worker-instructions.md 10 KB

Versions

The database has no other skills named arn-code-batch-cve-fix.

Database snapshot: 13.11.2026 · package version f08561f71250 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100arn-code-batch-cve-scan
    This skill should be used when the user says "scan for CVEs", "CVE scan", "check for vulnerabilities", "dependabot triage", "audit dependencies", "security scan", "arness CVE scan", "arn-code-batch-cve-scan", "run a scheduled CVE scan", "finalize a CVE proposal", or wants Arness…
  • 100cve-fix
    Scan and repair CVEs in Go repositories with Grype, verify dependency updates, and prepare PR commands. Use when the user asks to scan for vulnerabilities or fix CVE/GHSA findings. Repository and branch arguments are optional and order-independent.
  • 98cve-remediation
    Scan dependency manifests against known CVEs and remediate by upgrading vulnerable dependencies to patched versions, then rebuild and re-scan to confirm. Self-contained scan→fix→verify loop for any project with a dependency manifest. Use when: a cve-remediation task is…
  • 95cve-fix
    Automatically fix CVE vulnerabilities in Python dependencies for downstream projects. Queries Jira for unresolved CVEs, filters already-fixed issues, updates Pipfile and Pipfile.lock using container-based pipenv lock, creates MRs, and updates Jira. Use when the user mentions…
  • 90cve-research
    Use when checking a specific dependency or package version for known CVEs and security advisories.
  • 100fix-cve
    Patch a Go dependency to fix a CVE using the appropriate strategy based on Go version compatibility. Use when the user wants to fix a CVE by updating a Go module, replacing it with a patched fork, or applying a security patch across all go.mod files in a Go project. Triggers on:…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.