К основному содержанию
скилл CX Codex

fix · davepoon — скилл для Claude Code: что делает и как установить

Скилл fix собирает данные об уязвимости по её идентификатору и предлагает конкретные шаги обновления зависимостей для репозитория.

MIT ★ 3 785 обновлён 2026-10-25

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add davepoon/buildwithclaude --skill fix -a claude-code
Открыть на GitHub

Что делает fix

Скилл принимает идентификатор уязвимости вроде CVE и анализирует проект. Он определяет текущие версии пакетов по манифестам, lock-файлам или директориям окружения (node_modules, .venv), после чего подбирает безопасную целевую версию для обновления. Каждый вариант оценивается метрикой Safe Harbour от 0.00 до 1.00: чем меньше ломающих изменений и ближе патч, тем выше балл доверия.

Результаты оформляются в виде Markdown-отчётов и диаграмм Mermaid, отображающих цепочку обновления или путь по дереву зависимостей. Для сложных графиков скилл задействует uv с Python-библиотеками, сохраняя чарты в папку .vulnetix/.

История проверок и принятых решений сохраняется локально в файле .vulnetix/memory.yaml. Без доступа к Bash или файловой системе скилл не сможет сверить фактические версии установленных пакетов.

Какие задачи решает

  • подобрать безопасную версию пакета для закрытия уязвимости
  • построить дерево зависимостей с указанием проблемного модуля
  • оценить риск регрессий перед мажорным обновлением библиотеки
  • зафиксировать историю исправлений безопасности в .vulnetix/memory.yaml

Примеры запросов агенту

  • /fix CVE-2021-44228
  • Проверь уязвимость GHSA-j8xg-fqg3-523r в нашем проекте и предложи план обновления
  • /fix CVE-2023-4863

Как установить fix

1Через Skills CLI (Vercel)

npx skills add davepoon/buildwithclaude --skill fix -a claude-code

2Вручную: положить файлы

~/.claude/skills/fix/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/fix/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о fix

Как установить fix в Claude Code?

Выполните команду npx skills add davepoon/buildwithclaude --skill fix -a claude-code в терминале.

Что делает скилл fix?

Он запрашивает информацию об указанной уязвимости, находит затронутый пакет в репозитории и предлагает проверенную версию для исправления с оценкой риска.

Что показывает оценка Safe Harbour?

Это число от 0.00 до 1.00, отражающее уверенность в том, что исправление не сломает проект: патчи получают высокий балл, а мажорные обновления без тестов — низкий.

Исходный текст

SKILL.md · MIT
---
name: fix
description: Get fix intelligence for a vulnerability and propose concrete remediation for the current repository
argument-hint: <vuln-id>
user-invocable: true
allowed-tools: Bash, Read, Glob, Grep, Edit, Write, WebFetch
model: sonnet
---

# Vulnetix Fix Intelligence Skill

This skill fetches fix intelligence for a vulnerability and proposes concrete, actionable remediation steps for the current repository.

## Output & Analysis Guidelines

**Primary output format:** Markdown. All reports, tables, fix options, version diffs, and verification summaries MUST be presented as formatted markdown text directly — never generate scripts or programs to produce output that can be expressed as markdown.

**Visual data — use Mermaid diagrams** to display data visually when it aids comprehension. Mermaid renders natively in markdown and requires no external tools. Use it for:
- Dependency upgrade paths → `graph LR` showing current → target version with breaking change annotations
- Fix option comparison → `quadrantChart` plotting Safe Harbour confidence vs. version change magnitude
- Dependency tree showing vulnerable path → `graph TD` (root → parent → vulnerable dep)
- Post-fix verification status → `flowchart` (scan → tests → result)

Example — upgrade path:
````markdown
```mermaid
graph LR
    A[log4j-core 2.14.1] -->|patch| B[2.14.2]
    A -->|minor| C[2.17.1 ✓ fix]
    A -->|major| D[3.0.0]
    style A fill:#f66,stroke:#333
    style C fill:#6f6,stroke:#333
```
````

**If `uv` is available**, richer visualizations can be generated with Python (matplotlib, plotly) and saved to `.vulnetix/`:
```bash
command -v uv &>/dev/null && uv run --with matplotlib python3 -c '
import matplotlib.pyplot as plt
# ... generate chart ...
plt.savefig(".vulnetix/chart.png", dpi=150, bbox_inches="tight")
'
```
When Python charts are generated, display them inline and keep the Mermaid version as a text fallback.

**Data processing — tooling cascade (strict order):**

1. **jq / yq + bash builtins** (preferred) — `jq` for JSON (API responses, CycloneDX SBOMs, package manager output), `yq` for YAML (memory file). Pipe to `head`, `tail`, `cut`, `sed`, `grep`, `sort`, `uniq`, `wc` for shaping.
2. **uv** (for complex analysis or charts) — If dependency graph analysis, version comparison logic, or visualization beyond Mermaid are needed, check `uv` first:
   ```bash
   command -v uv &>/dev/null && uv run --with pandas,matplotlib python3 -c '...'
   ```
3. **python3 stdlib** (last resort) — Only if `uv` is unavailable. Use `json`, `csv`, `collections`, `statistics` modules — **no pip dependencies**:
   ```bash
   command -v python3 &>/dev/null && python3 -c 'import json, sys; ...'
   ```

**Never assume any runtime is available** — always check with `command -v` before use. If all programmatic tools are unavailable, analyze manually with the Read tool and present results as markdown with Mermaid diagrams.

**Package manager commands** (`npm install --dry-run`, `pip show`, `go mod tidy`, `cargo check`, etc.) are exempt — they are executed directly as part of the fix workflow, not for data analysis.

## Mandatory Reporting Requirements

**Every output and report from this skill MUST include the following version and provenance information for each affected package:**

### Package Version Reporting

All reports MUST display:

| Field | Description | Required |
|-------|-------------|----------|
| **Current Version** | The version currently installed/resolved | Always |
| **Version Source** | How the version was determined (see below) | Always |
| **Fix Target Version** | The patched version to upgrade to | When available |
| **Fix Source** | Registry, distro patch, or source commit hash | Always |
| **Safe Harbour Confidence** | Confidence score 0.00–1.00 (see below) | Always |

### Version Source Transparency

You MUST be transparent about how the current version was determined. Report one of:

- **User-supplied** — the user provided the version directly
- **Manifest** — read from a package manager manifest file (state which file)
- **Lockfile** — read from a lockfile (state which file)
- **Installed** — derived from the installed package on the filesystem:
  - npm/node: read `node_modules/<pkg>/package.json` (search parent directories too)
  - Python: run `pip show <pkg>` or read `site-packages/<pkg>/METADATA`
  - Go: read `go.sum` or run `go list -m <pkg>`
  - Rust: read `Cargo.lock` or run `cargo metadata`
  - System binaries: run `<binary> --version` or check `PATH` resolution
  - Ruby: run `gem list <pkg>` or read `Gemfile.lock`
  - Maven: read effective POM or local `.m2` cache
- **Context** — the version was already present in conversation context
- **Unknown** — version could not be determined (explain why)

If the user does not supply the version and it is not in conversation context, you MUST attempt to derive it from the filesystem before reporting "Unknown". Search outside the current working directory if needed — check parent directories, global package manager directories, and gitignored directories (e.g., `node_modules/`, `vendor/`, `.venv/`, `target/`, `__pycache__/`).

### Safe Harbour Confidence Score

Express the Safe Harbour score as a decimal between 0.00 and 1.00 where 1.00 = 100% confidence the fix resolves the vulnerability without introducing regressions or breaking changes.

**Confidence tiers:**
- **High confidence (> 0.90):** Patch-level bump in the same minor version, official registry release, well-tested fix, minimal API surface change
- **Reasonable confidence (0.35–0.90):** Minor version bump, distro-repackaged patch, source fix from upstream with commit hash, some API changes but backward-compatible
- **Low confidence (< 0.35):** Major version bump, unofficial patch, cherry-picked commit from development branch, significant API changes, no upstream release yet

**What factors adjust confidence:**
- Registry-published release with changelog: +0.15
- Distro-maintained patch (e.g., Debian, Ubuntu, RHEL): +0.10
- Upstream commit hash verified in release tag: +0.10
- CISA KEV listed (validated exploitation): +0.05 (urgency signal, not fix quality)
- Major version jump: −0.25
- No test suite in project to validate: −0.15
- Transitive dependency (indirect control): −0.10
- Built from source with untagged commit: −0.20

**Report format for each affected package:**

```
Package: <name>
Current Version: <version> (source: <version-source>)
Fix Target: <version> (source: <registry|distro <name> <version>|commit <hash>>)
Safe Harbour: <score> (<High|Reasonable|Low> confidence)
```

## Vulnerability Memory File (.vulnetix/memory.yaml)

This skill maintains a `.vulnetix/memory.yaml` file in the repository root that tracks all vulnerability encounters, decisions, and fix outcomes across sessions. **You MUST read this file at the start of every invocation and update it after every action.**

### Schema

```yaml
# .vulnetix/memory.yaml
# Auto-maintained by Vulnetix Claude Code Plugin
# Do not remove — tracks vulnerability decisions, manifest scans, and fix history

schema_version: 1
manifests:                                # Tracked manifest files and SBOM scan history
  package.json:
    path: "package.json"                  # Relative path from repo root
    ecosystem: npm
    last_scanned: "2024-01-15T10:30:00Z"  # ISO 8601 UTC
    sbom_generated: true
    sbom_path: ".vulnetix/scans/package.json.20240115T103000Z.cdx.json"
    vuln_count: 3                         # Vulnerabilities found in last scan
    scan_source: hook                     # hook | fix | exploits | package-search
  services--api--go.mod:
    path: "services/api/go.mod"           # Supports monorepo paths (key uses -- separator)
    ecosystem: go
    last_scanned: "2024-01-15T10:31:00Z"
    sbom_generated: true
    sbom_path: ".vulnetix/scans/services--api--go.mod.20240115T103100Z.cdx.json"
    vuln_count: 0
    scan_source: hook
vulnerabilities:
  CVE-2021-44228:                       # Primary vuln ID (key)
    aliases:                             # Other IDs for the same vuln
      - GHSA-jfh8-c2jp-5v3q
    package: log4j-core
    ecosystem: maven
    discovery:
      date: "2024-01-15T10:30:00Z"      # ISO 8601 UTC
      source: manifest                   # manifest | lockfile | sbom | scan | user | hook
      file: pom.xml                      # The manifest where it was found
      sbom: .vulnetix/scans/pom.xml.cdx.json  # CycloneDX v1.7 SBOM (when produced by scan/hook)
    versions:
      current: "2.14.1"
      current_source: "lockfile: pom.xml"
      fixed_in: "2.17.1"
      fix_source: "registry: Maven Central"
    severity: critical                   # critical | high | medium | low | unknown
    safe_harbour: 0.82                   # 0.00–1.00 confidence score
    status: fixed                        # See VEX Status Mapping below
    justification: null                  # See VEX Justification Mapping below
    action_response: null                # See VEX Action Response Mapping below
    threat_model:                        # Populated by /vulnetix:exploits
      techniques: [T1190, T1059]         # MITRE ATT&CK IDs (internal only)
      tactics:                           # Developer-friendly descriptions (shown to user)
        - "Attackable from the internet"
        - "Can run arbitrary commands"
      attack_vector: network             # network | local | adjacent | physical
      attack_complexity: low             # low | high
      privileges_required: none          # none | low | high
      user_interaction: none             # none | required
      reachability: direct               # direct | transitive | not-found | unknown
      exposure: public-facing            # public-facing | internal | local-only | unknown
    cwss:                                # CWSS-derived priority (populated by /vulnetix:exploits)
      score: 87.5                        # 0-100 composite priority score
      priority: P1                       # P1 | P2 | P3 | P4
      factors:
        technical_impact: 100            # 0-100
        exploitability: 95               # 0-100
        exposure: 100                    # 0-100
        complexity: 90                   # 0-100
        repo_relevance: 70               # 0-100
    pocs:                                # PoC sources (from /vulnetix:exploits, never executed)
      - url: "https://exploit-db.com/exploits/12345"
        source: exploitdb
        type: poc
        local_path: ".vulnetix/pocs/CVE-2021-44228/exploit_12345.py"
        fetched_date: "2024-01-15T10:35:00Z"
        verified: true
        analysis: "RCE via JNDI lookup, network vector, no auth"
    dependabot:                          # Populated from GitHub Dependabot via gh CLI
      alert_number: 42                   # Dependabot alert number on this repo
      alert_state: fixed                 # open | dismissed | fixed | auto_dismissed
      alert_url: "https://github.com/owner/repo/security/dependabot/42"
      dismiss_reason: null               # fix_started | inaccurate | no_bandwidth | not_used | tolerable_risk | null
      dismiss_comment: null              # Dismisser's comment, if any
      pr_number: 187                     # Associated Dependabot PR number, or null
      pr_state: merged                   # open | closed | merged | null
      pr_url: "https://github.com/owner/repo/pull/187"
      pr_latest_comment: "LGTM, merging" # Last comment on the PR (for context)
      last_checked: "2024-01-15T10:30:00Z"
    code_scanning:                       # Populated from GitHub CodeQL / code scanning via gh CLI
      alerts:                            # CodeQL alerts correlated to this vuln (matched by CWE)
        - alert_number: 15
          state: dismissed               # open | dismissed | fixed
          rule_id: "java/log4j-injection"
          rule_name: "Log4j injection"
          severity: critical             # critical | high | medium | low | warning | note | error
          dismissed_reason: null         # "false positive" | "won't fix" | "used in tests" | null
          dismissed_comment: null        # Free-text justification (max 280 chars)
          dismissed_by: "octocat"        # GitHub username
          file_path: "src/main/java/App.java"
          start_line: 42
          url: "https://github.com/owner/repo/security/code-scanning/15"
      tool: CodeQL                       # CodeQL | semgrep | etc.
      tool_version: "2.15.0"
      last_checked: "2024-01-15T10:30:00Z"
    secret_scanning:                     # Populated from GitHub secret scanning via gh CLI
      alerts:                            # Secret scanning alerts correlated to this vuln's package/context
        - alert_number: 7
          state: resolved                # open | resolved
          secret_type: "github_personal_access_token"
          secret_type_display: "GitHub Personal Access Token"
          resolution: revoked            # false_positive | wont_fix | revoked | used_in_tests | null
          resolution_comment: "Token rotated and old one revoked"
          resolved_by: "octocat"
          validity: inactive             # active | inactive | unknown
          file_path: "config/settings.py"
          url: "https://github.com/owner/repo/security/secret-scanning/7"
          push_protection_bypassed: false
      last_checked: "2024-01-15T10:30:00Z"
    decision:
      choice: fix-applied                # See User Decision Values below
      reason: "Upgraded to 2.17.1 via version bump"
      date: "2024-01-15T11:00:00Z"
    history:                             # Append-only event log
      - date: "2024-01-15T10:30:00Z"
        event: discovered
        detail: "Found via /vulnetix:fix CVE-2021-44228"
      - date: "2024-01-15T11:00:00Z"
        event: fix-applied
        detail: "Version bumped log4j-core 2.14.1 → 2.17.1 in pom.xml"
```

### VEX Status Mapping (Internal → Developer Language)

Use VEX semantics internally but **always communicate to the user in developer-friendly language**. Never use raw VEX terminology with the user.

| VEX Status | Developer Language | When to use |
|---|---|---|
| `not_affected` | **Not affected** — this vuln doesn't apply to your project | Package not present, code path unreachable, or already mitigated |
| `affected` | **Vulnerable** — your project is exposed, action needed | Package is present at a vulnerable version |
| `fixed` | **Fixed** — a fix has been applied | Version bumped, patch applied, or dependency removed |
| `under_investigation` | **Investigating** — still evaluating the impact | User hasn't decided yet, or analysis is ongoing |

### VEX Justification Mapping (for `not_affected` status)

| VEX Justification | Developer Language | Example |
|---|---|---|
| `component_not_present` | **Package not in this project** | Manifest search found no match |
| `vulnerable_code_not_reachable` | **Vulnerable code path not used** | App imports only safe submodules |
| `vulnerable_code_cannot_be_controlled_by_adversary` | **Not exploitable in this deployment** | Internal-only service, no untrusted input |
| `inline_mitigations_already_exist` | **Already mitigated** | WAF rule, input validation, or config hardening in place |

### VEX Action Response Mapping (for `affected` status)

| VEX Action | Developer Language | When to use |
|---|---|---|
| `will_not_fix` | **Risk accepted** — won't fix, documented reason | User explicitly accepts the risk |
| `will_fix` | **Fix planned** — scheduled for later | User wants to fix but not right now |
| `update` | **Updating** — fix in progress | Actively applying a version bump or patch |

### User Decision Values

These are the `decision.choice` values recorded in the memory file, mapped from user feedback:

| Decision | Maps to VEX | Triggered by user saying |
|---|---|---|
| `fix-applied` | status: `fixed` | "Yes, apply the fix" / fix was successfully applied |
| `risk-accepted` | status: `affected`, action: `will_not_fix` | "We'll accept this risk" / "Won't fix" |
| `not-affected` | status: `not_affected` | "This doesn't affect us" / "Not relevant" |
| `investigating` | status: `under_investigation` | "Let me look into this" / "Need more info" |
| `deferred` | status: `affected`, action: `will_fix` | "We'll fix this later" / "Not now" |
| `mitigated` | status: `not_affected`, justification: `inline_mitigations_already_exist` | "We have a workaround" / "Already handled" |
| `inlined` | status: `fixed` | Dependency was replaced with first-party code |
| `risk-avoided` | status: `not_affected`, justification: `component_not_present` | "We removed the dependency" / "Feature disabled" / "Not deploying this" |
| `risk-transferred` | status: `not_affected`, justification: `vulnerable_code_cannot_be_controlled_by_adversary` | "Our WAF handles it" / "Platform mitigates this" / "Handled by infrastructure" |

### Dependabot Integration

When `gh` CLI is available, check GitHub Dependabot alerts and PRs for additional context. Dependabot state is a **supplementary signal** — it does not override user decisions recorded in the memory file, but it enriches context.

#### Checking gh CLI Availability

```bash
gh auth status 2>/dev/null
```

If this succeeds, the user has `gh` authenticated and you can query Dependabot. If it fails, skip Dependabot checks silently — do not prompt the user to authenticate.

#### Querying Dependabot Alerts

```bash
# Get the repo owner/name from git remote
gh api repos/{owner}/{repo}/dependabot/alerts --jq '[.[] | select(.security_advisory.cve_id == "'"$ARGUMENTS"'" or (.security_advisory.ghsa_id == "'"$ARGUMENTS"'") or (.security_advisory.identifiers[]? | select(.type == "CVE" and .value == "'"$ARGUMENTS"'") ) )] | first'
```

If the vuln ID is a GHSA, also match on `.security_advisory.ghsa_id`. If the vuln ID is a CVE, match on `.security_advisory.cve_id` and the identifiers array.

If no alert matches the exact vuln ID, also try aliases from the memory file entry.

#### Querying Dependabot PRs

```bash
# Find Dependabot PRs referencing this vulnerability or the affected package
gh pr list --author "app/dependabot" --state all --json number,title,state,url,comments --limit 50 | jq '[.[] | select(.title | test("'"$PACKAGE_NAME"'"; "i"))]'
```

For each matching PR, extract:
- PR number, state (open/closed/merged), URL
- The **latest comment** (last item in `.comments[]`): `gh pr view <number> --json comments --jq '.comments[-1].body'`

#### Dependabot Alert State → VEX Mapping

Map Dependabot states to VEX status and user decision values. **Always communicate to the user in developer-friendly language.**

| Dependabot Alert State | Dismiss Reason | VEX Status | Decision Choice | Developer Language |
|---|---|---|---|---|
| `open` | — | `under_investigation` | `investigating` | "Dependabot flagged this — still open, no action taken yet" |
| `dismissed` | `fix_started` | `affected` | `deferred` | "Dependabot dismissed — team started a fix" |
| `dismissed` | `inaccurate` | `not_affected` | `not-affected` | "Dependabot dismissed — team determined this is inaccurate" |
| `dismissed` | `no_bandwidth` | `affected` | `deferred` | "Dependabot dismissed — deferred, no bandwidth" |
| `dismissed` | `not_used` | `not_affected` | `not-affected` | "Dependabot dismissed — vulnerable code not used" |
| `dismissed` | `tolerable_risk` | `affected` | `risk-accepted` | "Dependabot dismissed — risk accepted as tolerable" |
| `fixed` | — | `fixed` | `fix-applied` | "Dependabot reports this as fixed" |
| `auto_dismissed` | — | `not_affected` | `not-affected` | "Dependabot auto-dismissed — no longer applicable" |

**When a Dependabot PR exists:**

| PR State | VEX Interpretation | Developer Language |
|---|---|---|
| `open` | `affected` + `will_fix` | "Dependabot PR #N is open — the team is working on this upgrade" |
| `merged` | `fixed` | "Dependabot PR #N was merged — fix applied via Dependabot" |
| `closed` (not merged) | Check latest PR comment for reason | "Dependabot PR #N was closed without merging — <reason from comments>" |

**For closed (not merged) PRs:** Read the latest comment on the PR to derive the justification. Common patterns:
- "superseded by ..." / "replaced by ..." → decision: `deferred`, reason: paraphrase the comment
- "not needed" / "false positive" → decision: `not-affected`, reason: paraphrase the comment
- "will handle manually" → decision: `deferred`, reason: "Team will handle manually"
- "breaking changes" / "can't upgrade" → decision: `deferred`, reason: paraphrase the comment
- No comments or unclear → decision: `investigating`, reason: "Dependabot PR closed without explanation"

#### When Dependabot and Memory File Disagree

If the memory file has a user decision but Dependabot shows a different state:
- **User decision takes precedence** — it represents a deliberate human choice
- **Flag the discrepancy** to the user: "Note: Dependabot shows this as <state>, but you previously marked it as <decision>. The Dependabot state may be out of sync."
- **Update the `dependabot` section** in the memory file to reflect current Dependabot state regardless — it's a factual record of what GitHub shows

### Code Scanning (CodeQL) Integration

When `gh` CLI is available, query GitHub code scanning alerts for findings that correlate with the current vulnerability. CodeQL alerts are correlated by **CWE match** — if the vulnerability's CWE (from VDB data) matches a CodeQL rule's tags or the rule directly references the vulnerability.

#### Querying Code Scanning Alerts

```bash
# List all open code scanning alerts
gh api repos/{owner}/{repo}/code-scanning/alerts?state=open --jq '[.[] | select(.rule.tags[]? | test("cwe-"; "i"))]'

# Check for alerts matching a specific CWE (extracted from vuln context in Step 2)
gh api repos/{owner}/{repo}/code-scanning/alerts --jq '[.[] | select(.rule.tags[]? | test("CWE-<NUMBER>"; "i"))]'

# Also check dismissed and fixed alerts for prior decisions
gh api repos/{owner}/{repo}/code-scanning/alerts?state=dismissed --jq '[.[] | select(.rule.tags[]? | test("CWE-<NUMBER>"; "i"))]'
gh api repos/{owner}/{repo}/code-scanning/alerts?state=fixed --jq '[.[] | select(.rule.tags[]? | test("CWE-<NUMBER>"; "i"))]'
```

If the repository does not have code scanning enabled, these calls return 403 or 404 — skip silently.

#### Checking Default Setup Status

```bash
gh api repos/{owner}/{repo}/code-scanning/default-setup --jq '{state, languages, query_suite}'
```

If `state` is `not-configured`, note this to the user: "CodeQL is not enabled on this repository. Consider enabling it to catch similar issues in code."

#### Code Scanning Alert State → VEX Mapping

| Code Scanning State | Dismissed Reason | VEX Status | Decision Choice | Developer Language |
|---|---|---|---|---|
| `open` | — | `under_investigation` | `investigating` | "CodeQL flagged this pattern — still open" |
| `dismissed` | `false positive` | `not_affected` | `not-affected` | "CodeQL alert dismissed — false positive" |
| `dismissed` | `won't fix` | `affected` | `risk-accepted` | "CodeQL alert dismissed — risk accepted" |
| `dismissed` | `used in tests` | `not_affected` | `not-affected` | "CodeQL alert dismissed — only in test code" |
| `fixed` | — | `fixed` | `fix-applied` | "CodeQL reports the code pattern is fixed" |

**Enriching vulnerability context with CodeQL findings:**

When a CodeQL alert matches the vulnerability's CWE:
- The `most_recent_instance.location` tells you **exactly which file and line** the vulnerable pattern appears — include this in the fix report
- The `rule.full_description` provides CodeQL's analysis of the weakness — quote relevant parts
- If multiple instances exist, list the affected files so the user knows everywhere the pattern occurs
- If the alert is `fixed`, this is strong evidence the code-level vulnerability has been addressed (complements a dependency version bump)
- Use `dismissed_comment` as the justification text when surfacing prior decisions

#### Autofix Integration (CodeQL AI Suggestions)

If a CodeQL alert has an autofix available, check its status:

```bash
gh api repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix --jq '{status}'
```

| Autofix Status | What to tell the user |
|---|---|
| `success` | "CodeQL has an AI-suggested fix for this code pattern — review it on GitHub" |
| `pending` | "CodeQL is generating an AI fix suggestion — check back later" |
| `error` | "CodeQL autofix failed for this alert" |
| `outdated` | "CodeQL's autofix is outdated — the code has changed since it was generated" |

If autofix status is `success`, suggest the user review it alongside any dependency fix — code-level fixes and dependency upgrades are complementary.

### Secret Scanning Integration

When `gh` CLI is available, query GitHub secret scanning alerts. Secret scanning findings relate to vulnerability management when:
- A leaked secret could be used to exploit the vulnerability (e.g., leaked API key + RCE = worse impact)
- The vulnerability is in credential handling code (CWE-798, CWE-321, CWE-259)
- The fix involves rotating secrets that may have been exposed

#### Querying Secret Scanning Alerts

```bash
# List all open secret scanning alerts
gh api repos/{owner}/{repo}/secret-scanning/alerts?state=open

# List resolved alerts (to check for prior decisions)
gh api repos/{owner}/{repo}/secret-scanning/alerts?state=resolved
```

If the repository does not have secret scanning enabled, these calls return 403 or 404 — skip silently.

**Correlation with vulnerability context:**
- If the vulnerability's CWE relates to credential handling (CWE-798 hard-coded credentials, CWE-321 hard-coded cryptographic key, CWE-259 hard-coded password, CWE-200 information exposure), check for secret scanning alerts in the same files
- If the vulnerable package handles authentication/secrets (e.g., `jsonwebtoken`, `bcrypt`, `passport`, `oauth2`), check for leaked secrets that might need rotation after fixing

#### Secret Scanning Alert State → VEX Mapping

| Secret Scanning State | Resolution | VEX Status | Decision Choice | Developer Language |
|---|---|---|---|---|
| `open` | — | `under_investigation` | `investigating` | "Exposed secret detected — still open, needs rotation" |
| `resolved` | `revoked` | `fixed` | `fix-applied` | "Secret was rotated and old one revoked" |
| `resolved` | `false_positive` | `not_affected` | `not-affected` | "Secret alert dismissed — false positive" |
| `resolved` | `wont_fix` | `affected` | `risk-accepted` | "Secret alert dismissed — risk accepted" |
| `resolved` | `used_in_tests` | `not_affected` | `not-affected` | "Secret alert dismissed — only used in test fixtures" |
| `resolved` | `pattern_edited` | `not_affected` | `not-affected` | "Secret scanning pattern was updated — no longer matches" |
| `resolved` | `pattern_deleted` | `not_affected` | `not-affected` | "Secret scanning pattern was removed" |

**Push protection context:**
If `push_protection_bypassed` is `true`, note this to the user — it means someone deliberately pushed a secret past GitHub's push protection. Include the bypasser's username and their comment (if any) for audit trail:
```
Secret push protection was bypassed by <user>: "<comment>"
```

**Secret validity:**
If `validity` is `active`, flag urgently: "This secret is still active — rotate it immediately." If `inactive`, note: "Secret has been deactivated." If `unknown`, note: "Secret validity could not be verified — recommend rotating as a precaution."

#### When GHAS and Memory File Disagree

Same principle as Dependabot:
- **User decision takes precedence** over GitHub alert state
- **Flag discrepancies** to the user
- **Always update** the `code_scanning` and `secret_scanning` sections to reflect current GitHub state — they are factual records

### Reading and Interpreting Prior State

When the memory file contains an entry for the current vuln ID (or any of its aliases):

1. **Show the user what's known** — previous status, decision, and when it was last updated
2. **Show GitHub security context** — surface all available GHAS data:
   - Dependabot: "Dependabot alert #N: <state>. PR #N: <state>."
   - CodeQL: "CodeQL alert #N (<rule_id>): <state> in <file>:<line>"
   - Secret scanning: "Secret scanning alert #N (<secret_type>): <state>, validity: <active|inactive|unknown>"
3. **Highlight changes** — if the vulnerability context has changed (new severity, new fix available, CISA KEV listing added, any GHAS alert state changed), flag this to the user
4. **Respect prior decisions** — if the user previously marked a vuln as "Risk accepted" or "Not affected", remind them of that decision and ask if they want to reassess rather than re-proposing the same fix
5. **Update, don't duplicate** — update the existing entry rather than creating a new one

## Workflow

### Step 0: Load Vulnerability Memory and Prior SBOMs

Before anything else:

**0a. Load memory file:**
1. Use **Glob** to search for `.vulnetix/memory.yaml` in the repo root
2. If it exists, use **Read** to load it
3. Check if the current vuln ID (from `$ARGUMENTS`) or any known aliases appear in the file
4. If a prior entry exists:
   - Display to the user: `Previously seen: <vulnId> — Status: <developer-friendly status> (as of <date>). Reason: <decision reason>`
   - If `cwss` data exists from a prior `/vulnetix:exploits` analysis, display: `Priority: <P1/P2/P3/P4> (<score>) — "<priority description>"` and use the threat model context to inform fix urgency.
   - If status is `fixed` and no new information contradicts it, confirm the fix is still in place by checking the current installed version. If the version has regressed, update the status to `affected` and proceed with the fix workflow.
   - If status is `risk-accepted` or `not-affected`, ask: "You previously marked this as <status>. Has anything changed, or would you like to reassess?"
   - If status is `investigating` or `deferred`, proceed with the fix wo...

© davepoon · MIT · davepoon/buildwithclaude

Похожие скиллы

Все скиллы по теме «Безопасность» →

Сначала — fix от других авторов.

fix react Скилл fix для Claude Code исправляет форматирование и помогает разбирать ошибки линтера. Его запускают перед коммитом, чтобы проверить готовность к CI. CX Codex +1 2 300установок fix Alireza Rezvani Скилл fix для Claude Code разбирает падающий или нестабильный Playwright-тест по категориям и исправляет его, чтобы добиться стабильного прохождения в CI. CX Codex +1 1 638установок fix parcadei Скилл fix для Claude Code: разбирает баг по цепочке от диагностики до коммита. Стартует с вопросов — что чинить, насколько глубоко копать, нужен ли тест и коммит. CX Codex +1 488установок fix buiducnhat Скилл fix помогает найти причину конкретной ошибки, внести небольшое исправление и проверить результат. Он рассчитан на задачи с понятным воспроизведением и ограниченным риском. CX Codex +1 280установок fix TakaGoto Скилл fix для Claude Code диагностирует сбои в готовом RAG-пайплайне и правит код без теории. Разбирает мусорную выдачу и галлюцинации модели. CX Codex +1 ★ 30звёзд репо sonatype-guide sonatype Подключает MCP-сервер Sonatype Guide и проверяет зависимости на уязвимости, лицензионные нарушения и политики безопасности. Срабатывает автоматически при установке или обновлении пакетов. ★ 4звёзд репо osv-advisory-mcp-server cyanheads MCP-сервер osv-advisory-mcp-server проверяет пакеты и зависимости на уязвимости через базу OSV.dev. Работает без ключа API. CX Codex +1 432установок security-disclosure-triage superagent-ai Скилл security-disclosure-triage для Claude Code проверяет, реальна ли уязвимость в репозитории и насколько она серьёзна. Запускается при триаже GHSA, отчёта сканера или черновика исследователя. CX Codex +1 138установок fix-finding официальный OpenAI Скилл fix-finding для Codex и других платформ исправляет и верифицирует уязвимости безопасности. Запускается по явному запросу для устранения конкретной бреши. CX Codex GP ChatGPT +1 27установок verify-fix официальный OpenAI Скилл verify-fix для Codex проверяет, исправлена ли уязвимость в коде. Агент запускает проверку по явному запросу пользователя для верификации фикса безопасности. CX Codex GP ChatGPT +1 2установок sca-audit OWASP Скилл sca-audit проверяет зависимости проекта на известные CVE, оценивает заброшенные пакеты и даёт команды для устранения уязвимостей. CX Codex +1 358установок

Из того же набора235

Весь набор →
implement-graphql-api Команда implement-graphql-api проводит агента по шагам сборки GraphQL API: сервер, схема, типы, курсорная пагинация и корневые Query с Mutation. CX Codex +1 ★ 3 785звёзд репо gsd-debugger Субагент gsd-debugger ищет первопричину багов через проверяемые гипотезы, ведёт журнал отладки и запрашивает подтверждения на контрольных точках. CX Codex ★ 3 785звёзд репо gsd-planner Субагент gsd-planner разбивает фазу разработки на исполнимые планы, учитывает зависимости и проверяет задачи от цели назад. Запускается через /gsd:plan-phase. CX Codex ★ 3 785звёзд репо production-fast-api-template Скилл production-fast-api-template для Claude Code задаёт правила и структуру единого production-ready бэкенда на FastAPI с RAG и агентским ИИ на AWS ECS Fargate. CX Codex +1 ★ 3 785звёзд репо setup-rate-limiting Команда setup-rate-limiting помогает спроектировать и добавить ограничение частоты запросов к API. Она пригодится при настройке лимитов для пользователей и отдельных эндпоинтов. CX Codex +1 ★ 3 785звёзд репо ops-marketing Скилл ops-marketing для Claude Code и Cursor собирает метрики со всех каналов маркетинга в одну панель: email-кампании из Klaviyo, расходы на объявления Meta и Google, аналитику GA4, поисковую видимость и соцсети. CX Codex +1 ★ 3 785звёзд репо setup Скилл setup для Claude Code запускает пошаговую настройку плагина claude-ops: устанавливает CLI, связывает каналы уведомлений и сохраняет параметры проекта в локальный реестр. CX Codex +1 ★ 3 785звёзд репо baizhi-agent-toolkit Подключает Baizhi Agent Toolkit через удалённый MCP-сервер и добавляет отдельный скилл для исследований с лимитом вызовов. Нужны аккаунт Baizhi и API-ключ. ★ 3 785звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой