Skip to content

scanpipe as stand-alone library #2179

Description

@JonoYang

In the purldb, I want to be able to match resources/directories in a codebase to see if they are part of an indexed package. I am getting the codebase from a scancode.io scan where fingerprints have been computed for the directories and resources.

Currently, I do this by creating a separate django project with scanpipe in it and import all the scancode.io settings (https://github.com/aboutcode-org/purldb/tree/main/matchcode_project), and run it in the same docker compose file as purldb. This setup is untenable and I want to make it work better. I am wondering if it's reasonable to have scanpipe as a django app that I can add to a django project, and create a codebase and run pipelines without having to instantiate the entirety of scancode.io.

I want (from my purldb django app) to be able to create a scanpipe project (instantiate codebase, resources, packages, dependencies) from this codebase scan and run a pipeline that checks fingerprints against the purldb using the django orm.

The aboutcode.pipelines library provides the framework for the pipelines and execution, but does not have the other stuff for dealing with codebases, resources, and packages.

Alternatively, is there a way to run scancode.io in such a way that I can:

  • Add purldb to DATABASES in scancode.io settings
  • Query the purldb using the django orm from scancode.io without scancode.io trying to manage the model or having to declare purldb as an app in scancode.io

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions