Skip to content

fix: skip unresolvable cpematch SWIDs - #135

Merged
himynamesdave merged 2 commits into
mainfrom
codex/skip-unresolvable-cpematch-swid
Aug 25, 2026
Merged

himynamesdave merged 2 commits into
mainfrom
codex/skip-unresolvable-cpematch-swid

Conversation

@himynamesdave

Copy link
Copy Markdown
Member

Summary
This change prevents cpematch runs from failing the entire Celery task when one match criterion references a CPE Name ID that NVD cannot resolve through the local dictionary or API refresh path.

What changed

  • catch ValueError per matchCriteriaId inside CpeMatchUpdateManager.relate_single
  • log the skipped matchCriteriaId and indicator name
  • continue processing the remaining matches for the same indicator
  • add a regression test covering one broken match and one good match

Why
Today one unresolvable SWID or cpeNameId can abort the whole cpematch task. This narrows the failure boundary to the single broken criterion while preserving the rest of the batch.

Testing
I could not run the full unit suite in this workspace because the local environment is missing the stix2arango dependency required by the test harness.

@himynamesdave
himynamesdave deployed to test_pipeline August 25, 2026 05:34 — with GitHub Actions Active
@himynamesdave
himynamesdave deployed to test_pipeline August 25, 2026 05:35 — with GitHub Actions Active
@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@himynamesdave
himynamesdave merged commit c06eecb into main Aug 25, 2026
2 checks passed
@himynamesdave
himynamesdave deleted the codex/skip-unresolvable-cpematch-swid branch August 25, 2026 05:48

This branch was successfully deployed

1 active deployment
test_pipeline — 5104843c Deployed Aug 25, 2026 by himynamesdave via test-pipeline #105
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant