-
Notifications
You must be signed in to change notification settings - Fork 319
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
Include unlicensed files in scanner results #9435
Comments
The list of all files is already included, but not under |
Couldn't the fix be as simple as for license findings curations to allow the matcher for |
Yes, this is a simpler solution and does the job. I meant the addition of a configuration option to avoid breaking existing semantics. Essentially, @sschuberth yes, that is the same semantics I proposed but cleaner! :) |
This was implemented by #9487. |
What is the existing functionality and how should it be enhanced?
Currently, the scanner does not include files without licenses.
Problems
Improvement
To make sure that all files are considered in the scanning phase, and that those can potentially be curated, I propose:
include-unlicensed: boolean
) to the scan phase to include in the objectscan_results.summary.licenses
all files that were found to NOT have a license. Since this happens when calling the scan phase, these results should be recorded in thescan-result.json
file.NONE
(or whatever is the default for an unknown license)What is the use-case for your enhancement?
Source SBOMs may need to include all files in a repo. At the moment, generation of SBOM includes also the files without license, but one cannot have the option to curate files that should have a specific license. By adding the flag
include-unlicensed: true
, the scanner includes unlicensed files in ORT scanning result and gives the possibility to developers to curate those files, if needed.As an example, projects with a single license at the top can enable this to include all files with
NONE
license, and apply a curation to all files that should have MIT license.I believe this is a quite common case, examples include the Elixir programming language (https://github.com/elixir-lang/elixir), Gleam
(https://github.com/gleam-lang/gleam), Django Web Framework (this shows an example of a file without license, so no license applied AFAIK), Rails Web Framework (Rails) where each folder contains the expected license that applies
Alternatives you have considered
I have a script that parses ORT scanner for files with licenses and all files with SHA1. Takes the set difference and adds the missing files to the corresponding scanner field with license
NONE
. This works, but I am not sure how maintainable it is in the future. It means I need to run ORT analysis and scanner, then run a custom script, then run the evaluator to get some results and apply curations.Additional context
--
The text was updated successfully, but these errors were encountered: