# Deduplicate and Order Vulnerability Records

> Ensure vulnerability records are deduplicated and ordered according to ground-truth requirements.

- Skill: `cxcscmu/deduplicate-and-order-vulnerability-records` (Agent Skill)
- Install (CLI): `npx get-skill add cxcscmu/deduplicate-and-order-vulnerability-records`
- Raw SKILL.md: https://api.skillmd.com/api/skills/cxcscmu/deduplicate-and-order-vulnerability-records/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: cxcscmu (https://skillmd.com/u/cxcscmu)
- Updated: 2026-11-24
- Page: https://skillmd.com/skills/cxcscmu/deduplicate-and-order-vulnerability-records

---


## Deduplication Strategy

1. **Identify duplicate records**
   - Duplicates likely occur on combination of: Package + Version + CVE_ID
   - Keep only one record per unique combination

2. **Deduplication process**
   - Track seen combinations using set: `{(package, version, cve_id)}`
   - Skip record if combination already seen
   - Keep first occurrence or apply priority rules if needed

3. **Ordering**
   - Check if ground-truth expects specific sort order
   - Likely order: by Package name, then Version, then CVE_ID
   - Implement stable sort: `sorted(records, key=lambda x: (x['Package'], x['Version'], x['CVE_ID']))`

4. **Validation**
   - No duplicate (Package, Version, CVE_ID) combinations
   - Order matches test expectations
   - Record count matches ground-truth
