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

vex-generation — правило для Claude Code: создание VEX-отчётов

Правило vex-generation задаёт требования к доказательствам, уровням уверенности и статусам при подготовке VEX-документов. Оно пригодится для анализа CVE с участием ИИ.

MIT ★ 1 627 обновлён 2026-10-25

Установить в GitHub Copilot · Вручную: положить файлы Все способы и платформы ↓
.github/instructions/vex-generation.instructions.md
Открыть на GitHub

Что делает vex-generation

Правило направляет агента при подготовке VEX-отчётов: каждое решение о статусе должно опираться на доказательства, а до составления заявления нужно отнести находку к одному уровню уверенности. Если достижимость или возможность эксплуатации неясны, допустим только статус under_investigation. Для низкого уровня уверенности запрещён статус not_affected; при низком и среднем уровнях агент должен задавать вопросы проверяющему.

Отчёт строится из краткого резюме, технических сведений по каждой CVE и документа OpenVEX в JSON. В технической части нужны данные о пакете, диапазоне версий, достижимости кода, источниках доказательств и рекомендуемом статусе. Для OpenVEX требуется проверка по схеме v0.2.0. Человек утверждает выводы и становится автором записи; агент не должен выдавать себя за автора. Правило также задаёт, как искать записи по идентификаторам и учитывать лицензии источников. Для справки по схеме OpenVEX оно отсылает к скиллу vex и его файлу SKILL.md.

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

  • подготовить VEX-отчёт по найденным CVE
  • обосновать статус уязвимости доказательствами
  • отправить находки со средней или низкой уверенностью на проверку человеку
  • сопоставить CVE и идентификаторы из баз уязвимостей
  • сформировать OpenVEX JSON по требованиям правила

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

  • Разбери найденные CVE и подготовь VEX-отчёт с обоснованиями статусов.
  • Проверь, достаточно ли доказательств для статуса not_affected по каждой находке.
  • Составь OpenVEX JSON и добавь вопросы для проверки находок с низкой уверенностью.

Как установить vex-generation

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

.github/instructions/vex-generation.instructions.md

Поле applyTo задаёт, к каким файлам применять

По шагам, с командами для каждой платформы: AGENTS.md и CLAUDE.md: что это, кто читает и какой выбрать

Вопросы о vex-generation

Как установить vex-generation в Claude Code?

Добавьте файл правила по пути .claude/rules/vex-generation.md.

Что делает правило vex-generation?

Оно задаёт агенту требования к доказательствам и уверенности при подготовке VEX, а также структуру отчёта и правила авторства.

Какой статус использовать, если достижимость CVE неясна?

Правило требует выбрать under_investigation. Статус not_affected запрещён для низкого уровня уверенности.

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

vex-generation.instructions.md · MIT
---
description: "VEX generation rules: evidence requirements, confidence routing, forbidden transitions, report templates, and licensing posture for AI-assisted vulnerability triage - Brought to you by microsoft/hve-core"
applyTo: '**/.github/agents/security/sssc-reviewer.agent.md, **/.github/agents/security/subagents/cve-*.agent.md'
---

# VEX Generation Instructions

Rules governing AI-assisted VEX document generation. Agents producing or editing OpenVEX documents
must follow these instructions. For OpenVEX schema details, see the
`vex` skill (read its `SKILL.md`).

## Evidence requirements, confidence routing, and forbidden transitions

The canonical definitions for justification codes, evidence requirements per status,
confidence-routing bands, and forbidden transitions live in the `vex` skill reference
`references/vex-status-logic.md`.

Agents must follow the decision tree, evidence thresholds, and band routing defined in that
reference. The behavioral rules below supplement that reference with agent-specific constraints.

### Agent behavioral rules

* Every VEX status determination must be supported by evidence proportional to its assertion
  strength. Stronger assertions (especially `not_affected`) require stronger evidence.
* The agent must classify each finding into exactly one confidence band before drafting a VEX
  statement.
* When reachability or exploitability is uncertain, the only valid status is
  `under_investigation`.
* The agent is **forbidden** from drafting `not_affected` in the Low confidence band.
* In the Medium and Low bands, the agent must include structured questions for the human
  reviewer.

## Author-of-record contract

VEX documents require an accountable author for trust purposes.

| Role             | Description                                                                                                                                     |
|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|
| Drafter          | the AI agent. No trust requirement; the agent performs analysis and drafts the document.                                                        |
| Reviewer         | CODEOWNERS-required human approver who validates evidence and status determinations.                                                            |
| Author of record | the merge commit author (the human approver). This is the accountable identity.                                                                 |
| Trust anchor     | Sigstore identity of the reusable VEX attestation workflow, microsoft/hve-core/.github/workflows/vex-attest.yml, that attests the VEX document. |

The agent must never represent itself as the author of record. The `author` field in OpenVEX
documents must identify the maintainer team or organization, not the agent.

## Licensing posture

When drafting VEX content, follow these rules for external data:

| Source             | License                           | Permitted use                                                                                                                                  |
|--------------------|-----------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------|
| OSV.dev            | Mixed (varies by upstream source) | Check record provenance before paraphrasing. Only paraphrase CC0 or public domain records. Write original prose for CC-BY-4.0 sourced records. |
| NVD API 2.0        | US Gov public domain              | Use for CVSS vectors and CWE classification.                                                                                                   |
| GitHub Advisory DB | CC-BY-4.0                         | Identifiers, aliases, CVSS, severity, and affected ranges (factual metadata) plus reference URLs. Do not quote or closely paraphrase prose.    |

OSV.dev aggregates records from multiple databases. Check the record `id` prefix (`GHSA-` = CC-BY-4.0,
`RUSTSEC-` = CC0, `CVE-` from NVD = public domain) to determine the upstream license. When the
upstream license is unclear, write original prose and cite the record URL as a reference.

Write original remediation and impact prose. Do not copy from any external source.

## Identifier resolution and alias fallback

Each data source is keyed by a different identifier, so a single-id lookup misses records that exist
under an alias. OSV.dev and the GitHub Advisory Database are keyed by the native advisory id
(`GHSA-`, `PYSEC-`, and similar) and return `404` for a `CVE-` query; NVD is keyed by the `CVE-` id.

For each finding:

1. Collect every identifier: the scanner's primary id plus all `aliases`.
2. Query each source by the id it is keyed on (GitHub Advisory DB and OSV.dev by `GHSA-`/`PYSEC-`/native id; NVD by `CVE-`), and walk the aliases until a source resolves. The OSV package query resolves by package and version regardless of id.
3. Keep the first authoritative value per field (NVD for CVSS and CWE; OSV for affected ranges).
4. Treat advisory data as unavailable only after every identifier has been tried against every reachable source.

The GitHub Advisory Database (`api.github.com`) is reachable in the gh-aw sandbox by default, while
`api.osv.dev` and `services.nvd.nist.gov` require entries in the workflow `network:` allowlist. When
OSV.dev and NVD are unreachable, fall back to the GitHub Advisory Database for the CVE alias, CVSS
vector, severity, and affected packages.

## Report templates

Agent-generated VEX triage output consists of three sections.

### Executive summary

Brief overview for human reviewers. Include:

* Total CVEs analyzed.
* Counts by status (`not_affected`, `affected`, `fixed`, `under_investigation`).
* Counts by confidence band.
* Highlight any `affected` findings requiring immediate action.

### Technical report

Per-CVE detailed findings. For each CVE include:

* CVE identifier, severity (CVSS score and vector), and CWE classification.
* Affected package and version range.
* Confidence band assignment with rationale.
* Reachability analysis: call path trace or explanation of why code is unreachable.
* Evidence citations (file paths, line ranges, dependency tree output).
* Recommended VEX status and justification code.
* Structured questions for human reviewer (Medium and Low confidence only).

### OpenVEX JSON

The generated `hve-core.openvex.json` document containing all VEX statements. Must:

* Validate against the OpenVEX v0.2.0 schema (see `openvex-schema.md` reference).
* Increment the document `version` field.
* Set `timestamp` and `last_updated` to the current UTC issuance time for every content-changing
  revision. Before advancing the document timestamp, preserve the prior effective timestamp on
  every unchanged statement that inherited it from the document.
* Set the `tooling` field to record document provenance: the drafting agent, the human-reviewed merge, and the reusable VEX attestation workflow's Sigstore identity.
* Preserve existing statements that were not re-analyzed.
* Use PURL format for all product identifiers.

## SBOM input precedence

When multiple scan sources are available, prefer them in this order:

1. Trivy JSON output (richest vulnerability metadata).
2. OSV-Scanner JSON output.
3. SPDX-JSON SBOM (dependency list only, requires separate vulnerability lookup).

## Maturity

All VEX generation artifacts ship at `experimental` maturity. Promote to `stable` after validation
across three or more codebases with a false-positive rate of 5% or less on `not_affected`
determinations.

© microsoft · MIT · microsoft/hve-core

Похожие правила IDE

Все правила IDE по теме «Безопасность» →
security-auditor официальный Anthropic Субагент security-auditor для Claude Code проводит враждебный аудит безопасности кодовой базы. Он ищет инъекции, утечки секретов и уязвимости из OWASP Top 10 перед модернизацией систем. CX Codex 10 718установок security-review официальный github Скилл security-review проверяет код и зависимости на уязвимости, секреты и ошибки контроля доступа. Нужен перед релизом или при аудите отдельного пути. CX Codex +1 5 500установок security-scan codewithmukesh Скилл security-scan для Claude Code проводит статический аудит .NET-проекта по шести слоям: пакеты, секреты, OWASP-паттерны, авторизация, CORS и защита данных. Находки получают уровень критичности и код исправления. CX Codex +1 4 000установок threat-model официальный anthropics Строит модель угроз кодовой базы и записывает результат в THREAT_MODEL.md. Запускается в трёх режимах: интервью с владельцем, анализ кода по CVE и git-истории, или оба подряд. CX Codex +1 1 300установок sparkfinderoven-claude-security-compliance-suite reason-machines Скилл sparkfinderoven-claude-security-compliance-suite для Claude Code ищет уязвимости по OWASP, проверяет зависимости на CVE, аудирует права IAM и оценивает комплаенс GDPR или SOC2. CX Codex +1 729установок finding-triage briiirussell Скилл finding-triage помогает разобрать одну уязвимость из отчёта сканера или аудита, перепроверить её реальность, откалибровать критичность и составить план устранения. CX Codex +1 480установок

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

Весь набор →
rust-tests Правило rust-tests для Claude Code задаёт структуру и стиль тестов Rust: размещение модульных и интеграционных тестов, именование, фикстуры и изоляцию HTTP-запросов. Унифицирует тесты проекта. CX Codex +1 ★ 1 627звёзд репо CVE Analyzer Субагент CVE Analyzer для глубокого анализа CVE: проверяет достижимость уязвимого кода в проекте и возвращает статус VEX с доказательствами. CX Codex +1 ★ 1 627звёзд репо python-script Правило python-script задаёт стандарты написания утилит автоматизации на Python 3.11+ для Claude Code: управление пакетами через uv, строгие типы и единая структура CLI. CX Codex +1 ★ 1 627звёзд репо hve-artifact-authoring Скилл hve-artifact-authoring для Claude Code помогает создавать и проверять агентов, промпты, инструкции и скиллы для HVE Core. Помогает подготовить артефакт и проверить его в репозитории. CX Codex +1 ★ 1 627звёзд репо dataops Справочник Microsoft по DataOps и DS/MLOps-тестированию: где проверять данные, как писать тесты пайплайнов и что считать дрифтом, а что — ошибкой валидации. CX Codex +1 ★ 1 627звёзд репо session-log-canvas-update Скилл session-log-canvas-update сверяет схемы событий сессий Copilot с базовой структурой канваса. Помогает адаптировать парсер, тесты и отображение к новым релизам. CX Codex +1 ★ 1 627звёзд репо Backlog Grooming Субагент Backlog Grooming проверяет открытые GitHub issues, сопоставляет их с кодом и историей репозитория и выдаёт отчёт для поддержки бэклога. CX Codex +1 ★ 1 627звёзд репо git-commit Скилл git-commit для Claude Code пошагово уточняет пути для коммита, стейджит только их и создаёт один локальный коммит в формате Conventional Commits или готовит текст сообщения без коммита. CX Codex +1 ★ 1 627звёзд репо

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

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