Skip to content
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

Display scan summary data on project pages #411

Closed
JonoYang opened this issue Mar 17, 2022 · 0 comments
Closed

Display scan summary data on project pages #411

JonoYang opened this issue Mar 17, 2022 · 0 comments
Assignees

Comments

@JonoYang
Copy link
Member

We are overhauling how the --summary plugin works in scancode-toolkit by updating how license clarity scoring works (aboutcode-org/scancode-toolkit#2861), and changing the output of the --summary plugin to show a primary license expression and the license clarity score. The new version of the --summary plugin is available on the develop branch of scancode-toolkit as --summary2. It would be nice to be able to show the new summary information on a scancode.io project page.

Since scanning a codebase in scancode-toolkit is different than scanning a codebase in scancode.io, we cannot directly use the scancode-toolkit plugins in scancode.io. We'll have to port the --classify, --license-clarity-score, and --summary2 plugins so they work in a scancode.io context.

@JonoYang JonoYang self-assigned this Mar 17, 2022
JonoYang added a commit that referenced this issue Mar 24, 2022
Reference: #411

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Mar 24, 2022
    * Update help text

Reference: #411

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Mar 26, 2022
    * Add fontawesome v 5.13.0

Reference: #411

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Mar 29, 2022
Reference: #411

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Mar 29, 2022
Reference: #411

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Mar 30, 2022
Reference: #411

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 21, 2022
Reference: #411

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 21, 2022
    * Update help text

Reference: #411

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 21, 2022
    * Add fontawesome v 5.13.0

Reference: #411

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 21, 2022
Reference: #411

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 21, 2022
Reference: #411

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 21, 2022
Reference: #411

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 21, 2022
Reference: #411

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 21, 2022
Reference: #411
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 21, 2022
Reference: #411
Signed-off-by: Jono Yang <jyang@nexb.com>
tdruez added a commit that referenced this issue May 2, 2022
Signed-off-by: Thomas Druez <tdruez@nexb.com>
JonoYang added a commit that referenced this issue May 5, 2022
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue May 6, 2022
    * Remove create_discovered_packages2 and create_codebase_resources2

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue May 6, 2022
    * Normalize package_uids before comparing results in tests
    * Update expected test results

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue May 6, 2022
    * Normalize package_uids before comparing results in tests
    * Update expected test results

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue May 6, 2022
    * Normalize package_uids before comparing results in tests
    * Update expected test results

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue May 6, 2022
    * Create functions to process dependencies from scans
    * Modify DiscoveredPackages so we can relate DiscoveredDependencies to it

Signed-off-by: Jono Yang <jyang@nexb.com>
tdruez added a commit that referenced this issue May 9, 2022
Signed-off-by: Thomas Druez <tdruez@nexb.com>
tdruez added a commit that referenced this issue May 9, 2022
Signed-off-by: Thomas Druez <tdruez@nexb.com>
JonoYang added a commit that referenced this issue May 9, 2022
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue May 9, 2022
    * Remove create_discovered_packages2 and create_codebase_resources2

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue May 9, 2022
    * Normalize package_uids before comparing results in tests
    * Update expected test results

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue May 10, 2022
    * Mark ProjectCodebase tests with expectedFailure
    * We will revisit ProjectCodebase and update it to fit our current models

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue May 10, 2022
    * We are using a scancode scan results for tests since asgiref-3.3.0_scan.json is not exactly the same format as scancode's json output

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jun 13, 2022
Signed-off-by: Jono Yang <jyang@nexb.com>31.0.0rc1
JonoYang added a commit that referenced this issue Jun 13, 2022
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jun 14, 2022
    * In the LoadInventory pipeline, create the DiscoveredPackages from a scan before creating the CodebaseResources

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jun 14, 2022
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jun 14, 2022
Signed-off-by: Jono Yang <jyang@nexb.com>
tdruez added a commit that referenced this issue Jun 14, 2022
Signed-off-by: Thomas Druez <tdruez@nexb.com>
tdruez added a commit that referenced this issue Jun 14, 2022
Signed-off-by: Thomas Druez <tdruez@nexb.com>
tdruez added a commit that referenced this issue Jun 14, 2022
Signed-off-by: Thomas Druez <tdruez@nexb.com>
tdruez added a commit that referenced this issue Jun 14, 2022
Signed-off-by: Thomas Druez <tdruez@nexb.com>
tdruez added a commit that referenced this issue Jun 14, 2022
* Upgrade scancode-toolkit to latest beta release #411

Signed-off-by: Thomas Druez <tdruez@nexb.com>

* Add a test class to regen test data #411

Signed-off-by: Thomas Druez <tdruez@nexb.com>

* Upgrade container_inspector to latest 31.0.0 version #411

Signed-off-by: Thomas Druez <tdruez@nexb.com>

* Handle new scan format in scancode pipes #411

Signed-off-by: Jono Yang <jyang@nexb.com>

* Handle package_uids for DiscoveredPackages #411

    * Remove create_discovered_packages2 and create_codebase_resources2

Signed-off-by: Jono Yang <jyang@nexb.com>

* Update deprecated code #411

    * Normalize package_uids before comparing results in tests
    * Update expected test results

Signed-off-by: Jono Yang <jyang@nexb.com>

* Regenerate asgiref 3.3.0 test data #411

    * Mark ProjectCodebase tests with expectedFailure
    * We will revisit ProjectCodebase and update it to fit our current models

Signed-off-by: Jono Yang <jyang@nexb.com>

* Add asgiref-3.3.0_scancode_scan.json #411

    * We are using a scancode scan results for tests since asgiref-3.3.0_scan.json is not exactly the same format as scancode's json output

Signed-off-by: Jono Yang <jyang@nexb.com>

* Add asgiref-3.3.0_walk_test_fixtures.json #411

    * Update regen_test_data.py to generate asgiref-3.3.0_walk_test_fixtures.json

Signed-off-by: Jono Yang <jyang@nexb.com>

* Signed-off-by: Jono Yang <jyang@nexb.com>

* Update make_results_summary() #411

    * No need to explicity get license_clarity_score in make_results_summary()
    * Update expected test results

Signed-off-by: Jono Yang <jyang@nexb.com>

* Exclude system_environment from diff #411

    * Add .vscode to .gitignore

Signed-off-by: Jono Yang <jyang@nexb.com>

* Upgrade scancode-toolkit and extractcode to latest version #411

Signed-off-by: Thomas Druez <tdruez@nexb.com>

* Update package_getter #434 #438

    * Adapt code from previous version of scancode-toolkit for use in the debian pipeline

Signed-off-by: Jono Yang <jyang@nexb.com>

* Allow packages to be created without versions #438

    * Update DiscoveredPackage.create_from_data to create packages without a version

Signed-off-by: Jono Yang <jyang@nexb.com>

* Update expected test results

Signed-off-by: Jono Yang <jyang@nexb.com>

* Report DiscoveredPackage correctly in summary #411

    * Ensure that DiscoveredPackages are reported one time in the scan_package pipeline summary
   * Add test to check key_file_packages field in the summary output

Signed-off-by: Jono Yang <jyang@nexb.com>

* Add test for docker pipeline for alpine #411

Signed-off-by: Jono Yang <jyang@nexb.com>

* Add docker pipeline test for rpm images #411

Signed-off-by: Jono Yang <jyang@nexb.com>

* Track package_uids in make_results_summary #435

    * Avoid checking if package_data dictionary is already in the key_files_packages list
    * Keep track of package_uids instead

Signed-off-by: Jono Yang <jyang@nexb.com>

* Add truncated ubuntu docker image for testing #435

Signed-off-by: Jono Yang <jyang@nexb.com>

* Bump scancode and commoncode versions #435

Signed-off-by: Jono Yang <jyang@nexb.com>

* Update docker pipeline #435

    * We now run scancode-toolkit on the docker image resources using the new --system-package option
    * This gives us the installed system packages in the returned scan
    * We use the scan to create the DiscoveredPackages and CodebaseResources
    * The rest of the pipeline is unchanged

Signed-off-by: Jono Yang <jyang@nexb.com>

* Fix code validity #411

Signed-off-by: Thomas Druez <tdruez@nexb.com>

* Simplify the filtering of key_files_packages using a QuerySet #411

Signed-off-by: Thomas Druez <tdruez@nexb.com>

* Remove copied code from docker.py #411 #435

    * Create Docker pipeline from combining the rootfs pipeline and scan_package pipeline

Signed-off-by: Jono Yang <jyang@nexb.com>

* Update alpine test image and results #411 #435

    * TODO: create smaller test images for ubuntu and redhat docker image tests

Signed-off-by: Jono Yang <jyang@nexb.com>

* Properly create multiple package instances #411

    * Do not attempt to combine multiple instances of the same package
    * Store package_uid in extra data by itself
    * Add test for multiple package instances

Signed-off-by: Jono Yang <jyang@nexb.com>

* Sort packages in JSON output by type and name #411

    * Normalize package_uid in extra_data fields

Signed-off-by: Jono Yang <jyang@nexb.com>

* Get file info and packages in initial scan #438

    * Remove step for scanning application packages

Signed-off-by: Jono Yang <jyang@nexb.com>

* Revert changes to docker pipes and pipeline #438

    * Check for existence of installed_file attribute before using it

Signed-off-by: Jono Yang <jyang@nexb.com>

* Use generic package_getter for all distros #438

    * Ensure both installed_file and codebase_resource have the same checksum field before comparing them

Signed-off-by: Jono Yang <jyang@nexb.com>

* Use get_path() with strip_root to get paths #438

    * Update mappings_keys_by_fieldname
    * Look for package data in package_data field instead of packages in save_scan_package_results

Signed-off-by: Jono Yang <jyang@nexb.com>

* Remove distro specific pipes #438

    * Move get_installed_packages to rootfs.py
    * Use get_package_data instead of get_package_info
    * Rename all instances of packages to package_data when scanning for application packages
    * Update test docker images and test results
    * Add test for basic rootfs

Signed-off-by: Jono Yang <jyang@nexb.com>

* Use list comprehension for key_file_packages #438

Signed-off-by: Jono Yang <jyang@nexb.com>

* Add package_uid field to DiscoveredPackage #411

    * Update expected test results

Signed-off-by: Jono Yang <jyang@nexb.com>

* Add test docker image for Ubuntu #438

    * Update expected test results
    * Remove old ubuntu.tar

Signed-off-by: Jono Yang <jyang@nexb.com>

* Update formatting #411 #438

Signed-off-by: Jono Yang <jyang@nexb.com>

* Use smaller rpm docker image for testing #438

Signed-off-by: Jono Yang <jyang@nexb.com>

* Replace ubuntu docker test image #438

Signed-off-by: Jono Yang <jyang@nexb.com>

* Use purl data in update_or_create_packages #438

    * Add package_uid to test package data
    * Update expected test result

Signed-off-by: Jono Yang <jyang@nexb.com>

* Bump scancode version to v31.0.0rc1 #438 #411

Signed-off-by: Jono Yang <jyang@nexb.com>

* Consider all PURL fields when ordering Packages #411 #438

Signed-off-by: Jono Yang <jyang@nexb.com>

* Create Packages before Resources  #411 #438

    * In the LoadInventory pipeline, create the DiscoveredPackages from a scan before creating the CodebaseResources

Signed-off-by: Jono Yang <jyang@nexb.com>

* Add test for load_inventory pipeline #411

Signed-off-by: Jono Yang <jyang@nexb.com>

* Code cleanups and formatting #411

Signed-off-by: Thomas Druez <tdruez@nexb.com>

* Upgrade dependencies #411

Signed-off-by: Thomas Druez <tdruez@nexb.com>

* Refactor create_inventory_from_scan to remove duplicated code #411

Signed-off-by: Thomas Druez <tdruez@nexb.com>

* Add changelog entry #411

Signed-off-by: Thomas Druez <tdruez@nexb.com>

Co-authored-by: Thomas Druez <tdruez@nexb.com>
JonoYang added a commit that referenced this issue Jun 17, 2022
Reference: #411

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jun 17, 2022
    * Update help text

Reference: #411

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jun 17, 2022
    * Add fontawesome v 5.13.0

Reference: #411

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jun 17, 2022
Reference: #411

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jun 17, 2022
Reference: #411

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jun 17, 2022
Reference: #411

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jun 17, 2022
Reference: #411

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jun 17, 2022
Reference: #411
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jun 17, 2022
Reference: #411

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jun 17, 2022
    * Update help text

Reference: #411

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jun 17, 2022
    * Add fontawesome v 5.13.0

Reference: #411

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jun 17, 2022
Reference: #411

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jun 17, 2022
Reference: #411

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jun 17, 2022
Reference: #411

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jun 17, 2022
Reference: #411

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jun 17, 2022
Reference: #411
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jul 14, 2022
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Jul 15, 2022
    * Clean logic in get_license_clarity_data

Signed-off-by: Jono Yang <jyang@nexb.com>
tdruez pushed a commit that referenced this issue Jul 19, 2022
…tails view #411

Signed-off-by: Thomas Druez <tdruez@nexb.com>
@tdruez tdruez closed this as completed Jul 19, 2022
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

No branches or pull requests

2 participants