jira-cve-extraction
БесплатноБез исполняемых скриптовНе проверенUse when `/compliance:analyze-cve` is invoked with `--jira=` or `--jql=` and needs the CVE ID, image name, branch, and enriched ticket context from a Jira…
от openshift-eng★ 123 звезды на GitHubОб этом скилле
Jira CVE Extraction
Fetches a Jira ticket and extracts three things:
- CVE ID — passed to Phase 1 (
cve-intelligence-gathering) - Image name — passed to Phase 0.7 via the
image-repo-mappingskill to resolve which repo to clone - Enriched context — CVSS, CWE, priority, target versions, workarounds — embedded in the Phase 3 report and used to seed the CVE profile
Key insight: Security tracking tickets (e.g.
OCPBUGSCVE trackers) follow a consistent summary format:CVE-YYYY-NNNNN <component>: <description> [<version>]. Parsing the summary is the most reliable single extraction path and should always be tried first — it typically yields the CVE ID, image name, and branch in one step.
When to Use This Skill
Use this skill when the user invokes /compliance:analyze-cve with --jira=PROJ-NNN or --jql="...".
Prerequisites
Preferred: Atlassian MCP
Use the Atlassian Rovo MCP tools bundled with the jira plugin (or an equivalent Atlassian MCP server configured for this Claude Code instance):
getJiraIssue— fetch a single ticketsearchJiraIssuesUsingJql— fetch a batch of tickets (Phase 0.3 / idempotency lookups)editJiraIssue— update labels (idempotency marker)
Fallback: jira-cli
If the MCP server is unavailable: jira issue get <TICKET> and jira issue edit <TICKET> --label ... (from go-jira). Requires ~/.jira.d/config.yml configured for the target Jira instance.
Credential rule: Never print, echo, or log any token, password, or key value — not in shell commands, not in model responses, not in debug output. Reference credentials only via environment variable names (e.g.
$JIRA_API_TOKEN).
Implementation Steps
Step 1: Validate Ticket Format
PROJECT-NNNNN e.g. OCPBUGS-12345, CNTRLPLANE-678
Pattern: ^[A-Z]+-[0-9]+$
- IF invalid → Return error: "Invalid Jira ticket format. Expected PROJECT-NNNNN."
- IF valid → Continue
Step 2: Fetch the Ticket
issue = executeRead(name="getJiraIssue", cloudId=CLOUD_ID,
inputs={"issueIdOrKey": "PROJ-12345", "view": "evidence"})
view: "evidence"is required forissuelinks(the default compact view drops them). Route throughexecuteReadbecause the primarygetJiraIssuetool's schema omitsviewand clients drop it silently.
Fallback (jira-cli):
jira issue get PROJ-12345
Error Handling:
- 404 / not found → "Ticket not found. Verify the key and your access."
- Auth failure → IF
AUTO_APPROVE=no, prompt user to authenticate and retry. IFAUTO_APPROVE=yes, exit with error — there is no credential to fix automatically. - Network down → IF
AUTO_APPROVE=no, ask the user to supply the CVE ID manually and skip the enrichment. IFAUTO_APPROVE=yes, exit with error (never gated — cannot fabricate ticket data).
Step 2.5: Idempotency Check — Already Processed?
Inspect the ticket's labels list from the response above. Check whether ai-cve-analyzed is present (case-sensitive exact match). This check always runs here regardless of entry point (--jira= direct or --jql= batch mode) — it is the authoritative guard against re-processing.
labels = issue["fields"]["labels"] # list of strings
if "ai-cve-analyzed" in labels:
# Already processed — exit immediately
IF label is present → Stop immediately and output:
⚠️ Skipping analysis — this ticket has already been processed by /compliance:analyze-cve.
Ticket: <JIRA_KEY>
Label: ai-cve-analyzed
To force a re-analysis, remove the label from the ticket and re-run.
Return status: skipped and exit. Do not proceed with analysis.
IF label is absent → Continue to Step 3.
Step 3: Extract CVE ID and Image Name from Summary
The ticket summary follows this common format:
CVE-YYYY-NNNNN <image-name>: <vulnerability description> [<branch-or-version>]
Example:
CVE-2024-45338 openshift4/ose-operator-sdk-rhel9: some-lib: vulnerability description [openshift-4.17]
Parse with:
^(CVE-\d{4}-\d{4,})\s+([\w/:\-\.@]+)\s*:.*\[([\w\.\-]+)\]
group 1 = CVE ID
group 2 = image name
group 3 = branch/version
This is the primary and most reliable extraction path. If this succeeds, groups 1 and 2 are immediately available — no further searching needed for CVE ID or image name.
- IF summary matches → set
CVE_ID,IMAGE_NAME,BRANCH→ skip to Step 5 - IF summary does not match → continue to Step 4
Step 4: Fallback Extraction (when summary doesn't match)
Try in order until both CVE_ID and IMAGE_NAME are found:
CVE ID fallbacks:
- A dedicated
CVE IDcustom field, if the project has one — always accurate when present - Labels — look for a label matching
CVE-\d{4}-\d{4,}exactly - Description body — scan for
CVE-\d{4}-\d{4,}pattern
Image name fallbacks:
pscomponent:label — parsepscomponent:<image-name>from the
Установить jira-cve-extraction в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл jira-cve-extraction?
Use when `/compliance:analyze-cve` is invoked with `--jira=` or `--jql=` and needs the CVE ID, image name, branch, and enriched ticket context from a Jira issue.
Как установить скилл jira-cve-extraction?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл jira-cve-extraction запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic