scancode.io icon indicating copy to clipboard operation
scancode.io copied to clipboard

Created importers for detailed scan results

Open Premkumar-2004 opened this issue 10 months ago • 0 comments

I implemented a pluggable scan results import system for ScanCode.io that extends the existing LoadInventory pipeline to automatically detect and import data from three external security tools: VulnerableCode for vulnerability data, PurlDB for package metadata enrichment, and MatchCode.io for fingerprint-based package matching. The implementation uses a strategy pattern with automatic tool detection based on JSON structure analysis, followed by specialized importer functions that handle database operations efficiently using bulk updates and PURL-based matching. I added production code across two core files in the scanpipe/pipes/input.py and scanpipe/pipelines/load_inventory.py modules, created three JSON test fixtures, and wrote four comprehensive unit tests to validate the tool detection logic and each importer's database operations. The architecture is extensible, idempotent, and follows Django best practices, allowing users to simply drop JSON exports from these tools into their project's input directory and have the pipeline automatically process them without any manual configuration.

Premkumar-2004 avatar Jan 13 '26 16:01 Premkumar-2004