CNNVD/CVE Vulnerability Report Generator
Generate standardized vulnerability reports for CNNVD (中国国家信息安全漏洞库) and CVE from audit data, reproduction scripts, or code analysis.
When to Use This Skill
- User has security audit results (reports, findings, code review outputs) and needs to file them with CNNVD or CVE
- User mentions 漏洞填报, CVE, CNNVD, 安全公告, vulnerability report, security advisory
- User provides vulnerability analysis data and asks to generate structured reports
- User wants batch generation of reports for multiple findings from one audit
Workflow
Step 1: Detect Input Type
Determine what the user has provided:
| Input Type | What to Extract |
|---|
| ------------ | ---------------- |
| Audit report (.md) | All vulnerability fields directly from the report |
| Reproduction script | Vulnerability type, attack steps, affected component |
| Source code analysis | Code location, vulnerability pattern, impact |
| Mixed (report + scripts) | Cross-reference all sources for completeness |
Step 2: Confirm Scope
Ask the user (unless already clear):
- Which vulnerability to report (single or batch from multi-vuln audit)
- Output mode: CNNVD only, CVE only, or both
- Language preference for CVE descriptions (English default, Chinese if requested)
Step 3: Extract Vulnerability Information
For each vulnerability, collect these fields from the input data:
Mandatory fields:
- Vulnerability title (漏洞名称)
- CWE type and number
- CVSS score (if available, otherwise estimate from description)
- Affected software: vendor, product name, version
- Vulnerable code location (file:line)
- Attack vector and scenario
- Impact description
- Reproduction/verification steps
Optional fields (fill if available):
- CVE number (if already assigned)
- Download link for affected software
- Network asset fingerprint
- Disclosure timeline
Step 4: Read Reference Templates
Before generating, read the appropriate reference file:
- For CNNVD: read
references/cnnvd-template.md - For CVE: read
references/cve-template.md - For both: read both files
Step 5: Generate Reports
CNNVD Report Generation
Follow the CNNVD template structure. Key rules:
- 漏洞名称: Concise, includes product name and vulnerability type. Format:
[产品名] [漏洞类型]漏洞 - 漏洞类型: Use standard CWE mapping (CWE-xxx)
- 漏洞自评级: Map CVSS to Chinese severity: HIGH(7.0-10.0)=高危, MEDIUM(4.0-6.9)=中危, LOW(0.1-3.9)=低危
- 受影响实体: Include vendor, product, specific version range
- 漏洞描述或简介: 2-4 sentences explaining what the vulnerability is and why it exists
- 漏洞影响描述: Concrete impact scenarios — what an attacker can achieve
- 漏洞定位: Exact file path and line numbers from the source code
- 漏洞触发条件: Precise conditions needed to trigger (configuration, user action, prerequisites)
- 验证过程: Step-by-step reproduction with commands (auto-generated from input data)
Verification Steps Generation
Auto-generate verification procedures based on:
- From audit report: If the report already contains verification data (commands, outputs, screenshots), use those directly — adapt format but preserve the exact commands and expected outputs
- From reproduction scripts: Extract the key commands, environment setup, and expected results
- Inferred from vulnerability type: If no verification data exists, generate based on CWE class:
| CWE Category | Verification Approach |
|---|
| -------------- | ---------------------- |
| CWE-214 (Process exposure) | Start service with sensitive params → read /proc/pid/cmdline |
| CWE-522 (Credential exposure) | Start service → check process listing for plaintext creds |
| CWE-94 (Code injection) | Craft malicious input → execute → verify injection |
| CWE-20 (Input validation) | Send crafted input → observe unexpected behavior |
| CWE-306 (Missing auth) | Attempt access without authentication → verify success |
| CWE-754 (Error handling) | Trigger error condition → verify improper handling |
- Format verification steps as:
- Prerequisites (环境要求)
- Step-by-step commands (验证步骤)
- Expected output (预期结果)
- Evidence of vulnerability (漏洞确认)
CVE Description Generation
Follow standard CVE format:
- Title: Same as CNNVD or English equivalent
- Description: Technical description of the vulnerability, including the specific flaw and its consequence
- Affected Versions: Precise version range
- Impact: What an attacker can achieve
- References: Link to audit report or advisory
- CWE Mapping: CWE-xxx
Step 6: Output
Save generated reports to the same directory as the input files, with naming:
- CNNVD:
cnnvd-[vuln-id].md (e.g., cnnvd-VULN-001.md) - CVE:
cve-[vuln-id].md (e.g., cve-VULN-001.md)
For batch mode, save as:
cnnvd-all.md (all vulnerabilities in one file)cve-all.md
Output Quality Guidelines
- Accuracy over completeness — if a field cannot be reliably inferred from the input, mark it as
[待补充] (to be filled) rather than guessing - Use source code evidence — always reference specific file paths and line numbers
- Reproduction steps must be runnable — include exact commands, not descriptions of commands
- Impact must be concrete — "attacker can read SSH passwords" not "security risk"
- Chinese for CNNVD fields — the CNNVD form is in Chinese; fill all fields in Chinese
- Language for CVE — default to English; if user requests Chinese, use Chinese
Handling Multiple Vulnerabilities
When processing an audit report with multiple findings:
- List all findings first, let user select which to generate
- For batch mode, generate a table of contents at the top of each output file
- Each vulnerability gets its own section with consistent formatting
- Cross-references between related vulnerabilities (e.g., attack chains) should be noted
Common Patterns in Input Data
These patterns appear frequently in security audit reports — recognize and extract them:
CWE: CWE-xxx (Description) → extract CWE number and typeCVSS: x.x → extract scoreLocation: file:line → extract code locationAttack: or Attack Scenario: → extract attack vectorImpact: → extract impact descriptionFix: → extract recommended fix (useful for CVE references)- Code blocks with ```
typescript or ```python → extract vulnerable code snippets ps aux, cat /proc/, curl, ssh commands → extract as verification steps