-
-
Notifications
You must be signed in to change notification settings - Fork 580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#253 python packages #421
#253 python packages #421
Conversation
Signed-off-by: Philippe Ombredanne <[email protected]>
Signed-off-by: Philippe Ombredanne <[email protected]>
Signed-off-by: Philippe Ombredanne <[email protected]>
Signed-off-by: Philippe Ombredanne <[email protected]>
Signed-off-by: Philippe Ombredanne <[email protected]>
Signed-off-by: Philippe Ombredanne <[email protected]>
From reading the code, my understanding is that this relies on the meta-data specified as part of @pombredanne Are my statements correct? |
@sschuberth the goal of this PR (and of all the code in the
These two will be then injected in a What code in A. download packages from a thirdparty repository: there is code I have in an unpushed repo that is specifically dealing with this and also handles collecting the metadata as served by a package repository (which are in most cases --but not always-- the same as what is declared in the manifest). I will publish this sometimes in Q1 hopefully. B. resolve dependencies: the focus of scancode is on a purely static analysis that does not rely on any network access for running by design. To scan for actually used dependencies the process is to instead scan for an as-built or as-installed or as-deployed application where the dependencies have already been provisioned and installed and there scancode would detect these. I also have an unpushed prototype for a dynamic multi-package dependencies resolver that actually runs live the proper tool to resolve and collect dependencies (e.g. effectively running Maven, bundler, pip, npm, gradle, bower, go get/dep, etc). This will be a tool separate from scancode as this requires having several/all package managers installed (and possibly multiple versions) and does run things and accesses the network. It may be best exposed as a web service that can take in a manifest and package and run safely the dep resolution in an isolated environment (e.g. a chroot jail or docker container) and return the collected deps. C. match packages (and files) to actual repositories or registries, e.g. given a scan detecting packages actually looking them up in a remote package repository and then using A. and/or B. additionally if needed. I have unpushed code for this too that will eventually land on Github and handles also building an index of actual registries/repositories and matching using hashes and fingerprints. Now the goal of all is simple: detect a package, determine its deps, detect its asserted license (at the metadata level) and its actual licenses (at the scan level, and these may differ, conflict at times) So to finally answer your questions:
Correct. The assumption with ScanCode proper (aside of the other not-yet-published tools that I mentioned
Both the metadata and the file level licenses (such as a header comment or a
If the transitive dependencies have been resolved and their code present in the codebase, then they would be caught by a static ScanCode scan and eventually scanned both for package metadata or actual license detection. There are some caveats that would need to be dealt with of course as some tools (e.g. Maven) may not store locally (e.g. side-by-side with a given checkout) the corresponding artifacts/Jars and use instead a Beyond this, the goal is to use in the future the other tools that I mentioned above for actual dependency resolution of a single package or a complete manifest |
Thanks @pombredanne for the sophisticated write up. I believe it's too valuable to just sit here, so would you mind adding it to a |
@sschuberth good point! Will do today. |
@linexb I wonder if you could help there. The code needs some love and has many tests failing. |
@linexb Thanks.... Looking good! |
* following discussion with @sschuberth in #421 (comment) Signed-off-by: Philippe Ombredanne <[email protected]>
Add initial support to detect Python packages for #253