Deduplicate and Order Vulnerability Records

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

cxcscmu Updated

File contents

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

cxcscmu/SkillLearnBench commit 8f29063da4

Frequently asked questions

npx get-skill add cxcscmu/deduplicate-and-order-vulnerability-records