Skip to content

Conversation

@warrior-hub
Copy link

🏆 Goal

Extract and centralize duplicated PURL filtering logic from multiple importers into a single reusable helper function.

📂 Changes

  • Created a common filter_purls helper function in vulnerabilities/importers/utils.py.
  • Updated all importers to use the new helper, removing duplicate PURL filtering code.
  • No changes to existing behavior; return types, empty input handling, and order remain unchanged.

✅ Benefits

  • Reduces code duplication across importers.
  • Improves maintainability and readability.
  • Prepares for future importer enhancements with a consistent PURL filtering approach.

🔒 Safety

  • Functionality is identical to previous logic.
  • Thoroughly tested with existing test cases to ensure behavior remains unchanged.

@warrior-hub warrior-hub force-pushed the refactor-importer-purl branch from abde34c to 96264b1 Compare December 21, 2025 10:41
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