diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c9507e4e512..c80923a1a6e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -14,7 +14,7 @@ v33.0.0 (next next, roadmap) - Dependencies for - Support for copyright detection objects. -- We can now collect packages from a Go binary using go-inspector (Linux-only) +- We can now collect packages from a Rust binary using rust-inspector (Linux-only) - A new field in packages with the license category for the detected license expression and also an API function to @@ -89,6 +89,9 @@ Changes in Output Data Structure: - Drop python 3.8 support as this is end of life. Please use older releases if you are using python 3.8 but this is not recommended. +- We can now collect packages from a Go binary using go-inspector (Linux-only) + See https://github.com/aboutcode-org/scancode-toolkit/pull/3894 + v32.2.1 - 2024-07-02 --------------------- diff --git a/docs/source/reference/available_package_parsers.rst b/docs/source/reference/available_package_parsers.rst index eb593d62856..ca35c9c2acd 100644 --- a/docs/source/reference/available_package_parsers.rst +++ b/docs/source/reference/available_package_parsers.rst @@ -14,48 +14,55 @@ parsers in scancode-toolkit during documentation builds. .. list-table:: Supported Package Parsers - :widths: 10 10 20 10 10 2 + :widths: 10 10 20 10 10 10 2 :header-rows: 1 * - Description - Path Patterns - Package type + - Supported OS for detection - Datasource ID - Primary Language - Documentation URL * - AboutCode ABOUT file - ``*.ABOUT`` - ``about`` + - ``linux``, ``win``, ``mac`` - ``about_file`` - None - https://aboutcode-toolkit.readthedocs.io/en/latest/specification.html * - Alpine Linux .apk package archive - ``*.apk`` - ``alpine`` + - ``linux``, ``win``, ``mac`` - ``alpine_apk_archive`` - None - https://wiki.alpinelinux.org/wiki/Alpine_package_format * - Alpine Linux APKBUILD package script - ``*APKBUILD`` - ``alpine`` + - ``linux``, ``win``, ``mac`` - ``alpine_apkbuild`` - None - https://wiki.alpinelinux.org/wiki/APKBUILD_Reference * - Alpine Linux installed package database - ``*lib/apk/db/installed`` - ``alpine`` + - ``linux``, ``win``, ``mac`` - ``alpine_installed_db`` - None - None * - Android application package - ``*.apk`` - ``android`` + - ``linux``, ``win``, ``mac`` - ``android_apk`` - Java - https://en.wikipedia.org/wiki/Apk_(file_format) * - Android library archive - ``*.aar`` - ``android_lib`` + - ``linux``, ``win``, ``mac`` - ``android_aar_library`` - Java - https://developer.android.com/studio/projects/android-library @@ -63,24 +70,28 @@ parsers in scancode-toolkit during documentation builds. - ``*/configure`` ``*/configure.ac`` - ``autotools`` + - ``linux``, ``win``, ``mac`` - ``autotools_configure`` - None - https://www.gnu.org/software/automake/ * - Apache Axis2 module archive - ``*.mar`` - ``axis2`` + - ``linux``, ``win``, ``mac`` - ``axis2_mar`` - Java - https://axis.apache.org/axis2/java/core/docs/modules.html * - Apache Axis2 module.xml - ``*/meta-inf/module.xml`` - ``axis2`` + - ``linux``, ``win``, ``mac`` - ``axis2_module_xml`` - Java - https://axis.apache.org/axis2/java/core/docs/modules.html * - Bazel BUILD - ``*/BUILD`` - ``bazel`` + - ``linux``, ``win``, ``mac`` - ``bazel_build`` - None - https://bazel.build/ @@ -88,24 +99,28 @@ parsers in scancode-toolkit during documentation builds. - ``*/bower.json`` ``*/.bower.json`` - ``bower`` + - ``linux``, ``win``, ``mac`` - ``bower_json`` - JavaScript - https://bower.io * - Buck file - ``*/BUCK`` - ``buck`` + - ``linux``, ``win``, ``mac`` - ``buck_file`` - None - https://buck.build/ * - Buck metadata file - ``*/METADATA.bzl`` - ``buck`` + - ``linux``, ``win``, ``mac`` - ``buck_metadata`` - None - https://buck.build/ * - Microsoft cabinet archive - ``*.cab`` - ``cab`` + - ``linux``, ``win``, ``mac`` - ``microsoft_cabinet`` - C - https://docs.microsoft.com/en-us/windows/win32/msi/cabinet-files @@ -113,6 +128,7 @@ parsers in scancode-toolkit during documentation builds. - ``*/Cargo.lock`` ``*/cargo.lock`` - ``cargo`` + - ``linux``, ``win``, ``mac`` - ``cargo_lock`` - Rust - https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html @@ -120,114 +136,140 @@ parsers in scancode-toolkit during documentation builds. - ``*/Cargo.toml`` ``*/cargo.toml`` - ``cargo`` + - ``linux``, ``win``, ``mac`` - ``cargo_toml`` - Rust - https://doc.rust-lang.org/cargo/reference/manifest.html + * - Rust binary + - None + - ``cargo`` + - ``linux``, ``win``, ``mac`` + - ``rust_binary`` + - Rust + - https://github.com/rust-secure-code/cargo-auditable/blob/master/PARSING.md * - Chef cookbook metadata.json - ``*/metadata.json`` - ``chef`` + - ``linux``, ``win``, ``mac`` - ``chef_cookbook_metadata_json`` - Ruby - https://docs.chef.io/config_rb_metadata/ * - Chef cookbook metadata.rb - ``*/metadata.rb`` - ``chef`` + - ``linux``, ``win``, ``mac`` - ``chef_cookbook_metadata_rb`` - Ruby - https://docs.chef.io/config_rb_metadata/ * - Chrome extension - ``*.crx`` - ``chrome`` + - ``linux``, ``win``, ``mac`` - ``chrome_crx`` - JavaScript - https://chrome.google.com/extensions * - Cocoapods Podfile - ``*Podfile`` - ``cocoapods`` + - ``linux``, ``win``, ``mac`` - ``cocoapods_podfile`` - Objective-C - https://guides.cocoapods.org/using/the-podfile.html * - Cocoapods Podfile.lock - ``*Podfile.lock`` - ``cocoapods`` + - ``linux``, ``win``, ``mac`` - ``cocoapods_podfile_lock`` - Objective-C - https://guides.cocoapods.org/using/the-podfile.html * - Cocoapods .podspec - ``*.podspec`` - ``cocoapods`` + - ``linux``, ``win``, ``mac`` - ``cocoapods_podspec`` - Objective-C - https://guides.cocoapods.org/syntax/podspec.html * - Cocoapods .podspec.json - ``*.podspec.json`` - ``cocoapods`` + - ``linux``, ``win``, ``mac`` - ``cocoapods_podspec_json`` - Objective-C - https://guides.cocoapods.org/syntax/podspec.html * - PHP composer manifest - ``*composer.json`` - ``composer`` + - ``linux``, ``win``, ``mac`` - ``php_composer_json`` - PHP - https://getcomposer.org/doc/04-schema.md * - PHP composer lockfile - ``*composer.lock`` - ``composer`` + - ``linux``, ``win``, ``mac`` - ``php_composer_lock`` - PHP - https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control * - conan external source - ``*/conandata.yml`` - ``conan`` + - ``linux``, ``win``, ``mac`` - ``conan_conandata_yml`` - C++ - https://docs.conan.io/2/tutorial/creating_packages/handle_sources_in_packages.html#using-the-conandata-yml-file * - conan recipe - ``*/conanfile.py`` - ``conan`` + - ``linux``, ``win``, ``mac`` - ``conan_conanfile_py`` - C++ - https://docs.conan.io/2.0/reference/conanfile.html * - Conda meta.yml manifest - ``*/meta.yaml`` - ``conda`` + - ``linux``, ``win``, ``mac`` - ``conda_meta_yaml`` - None - https://docs.conda.io/ * - CPAN Perl dist.ini - ``*/dist.ini`` - ``cpan`` + - ``linux``, ``win``, ``mac`` - ``cpan_dist_ini`` - Perl - https://metacpan.org/pod/Dist::Zilla::Tutorial * - CPAN Perl Makefile.PL - ``*/Makefile.PL`` - ``cpan`` + - ``linux``, ``win``, ``mac`` - ``cpan_makefile`` - Perl - https://www.perlmonks.org/?node_id=128077 * - CPAN Perl module MANIFEST - ``*/MANIFEST`` - ``cpan`` + - ``linux``, ``win``, ``mac`` - ``cpan_manifest`` - Perl - https://metacpan.org/pod/Module::Manifest * - CPAN Perl META.json - ``*/META.json`` - ``cpan`` + - ``linux``, ``win``, ``mac`` - ``cpan_meta_json`` - Perl - https://metacpan.org/pod/Parse::CPAN::Meta * - CPAN Perl META.yml - ``*/META.yml`` - ``cpan`` + - ``linux``, ``win``, ``mac`` - ``cpan_meta_yml`` - Perl - https://metacpan.org/pod/CPAN::Meta::YAML * - CRAN package DESCRIPTION - ``*/DESCRIPTION`` - ``cran`` + - ``linux``, ``win``, ``mac`` - ``cran_description`` - R - https://r-pkgs.org/description.html @@ -235,24 +277,28 @@ parsers in scancode-toolkit during documentation builds. - ``*/control.tar.gz-extract/control`` ``*/control.tar.xz-extract/control`` - ``deb`` + - ``linux``, ``win``, ``mac`` - ``debian_control_extracted_deb`` - None - https://www.debian.org/doc/debian-policy/ch-controlfields.html * - Debian control file - source layout - ``*/debian/control`` - ``deb`` + - ``linux``, ``win``, ``mac`` - ``debian_control_in_source`` - None - https://www.debian.org/doc/debian-policy/ch-controlfields.html * - Debian machine readable file in source - ``*usr/share/doc/*/copyright`` - ``deb`` + - ``linux``, ``win``, ``mac`` - ``debian_copyright_in_package`` - None - https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ * - Debian machine readable file in source - ``*/debian/copyright`` - ``deb`` + - ``linux``, ``win``, ``mac`` - ``debian_copyright_in_source`` - None - https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ @@ -260,36 +306,42 @@ parsers in scancode-toolkit during documentation builds. - ``*/copyright`` ``*_copyright`` - ``deb`` + - ``linux``, ``win``, ``mac`` - ``debian_copyright_standalone`` - None - https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ * - Debian binary package archive - ``*.deb`` - ``deb`` + - ``linux``, ``win``, ``mac`` - ``debian_deb`` - None - https://manpages.debian.org/unstable/dpkg-dev/deb.5.en.html * - Debian distroless installed database - ``*var/lib/dpkg/status.d/*`` - ``deb`` + - ``linux``, ``win``, ``mac`` - ``debian_distroless_installed_db`` - None - https://www.debian.org/doc/debian-policy/ch-controlfields.html * - Debian installed file paths list - ``*var/lib/dpkg/info/*.list`` - ``deb`` + - ``linux``, ``win``, ``mac`` - ``debian_installed_files_list`` - None - None * - Debian installed file MD5 and paths list - ``*var/lib/dpkg/info/*.md5sums`` - ``deb`` + - ``linux``, ``win``, ``mac`` - ``debian_installed_md5sums`` - None - https://www.debian.org/doc/manuals/debian-handbook/sect.package-meta-information.en.html#sect.configuration-scripts * - Debian installed packages database - ``*var/lib/dpkg/status`` - ``deb`` + - ``linux``, ``win``, ``mac`` - ``debian_installed_status_db`` - None - https://www.debian.org/doc/debian-policy/ch-controlfields.html @@ -297,6 +349,7 @@ parsers in scancode-toolkit during documentation builds. - ``*/control.tar.gz-extract/md5sums`` ``*/control.tar.xz-extract/md5sums`` - ``deb`` + - ``linux``, ``win``, ``mac`` - ``debian_md5sums_in_extracted_deb`` - None - https://www.debian.org/doc/manuals/debian-handbook/sect.package-meta-information.en.html#sect.configuration-scripts @@ -304,12 +357,14 @@ parsers in scancode-toolkit during documentation builds. - ``*.orig.tar.xz`` ``*.orig.tar.gz`` - ``deb`` + - ``linux``, ``win``, ``mac`` - ``debian_original_source_tarball`` - None - https://manpages.debian.org/unstable/dpkg-dev/deb.5.en.html * - Debian source control file - ``*.dsc`` - ``deb`` + - ``linux``, ``win``, ``mac`` - ``debian_source_control_dsc`` - None - https://wiki.debian.org/dsc @@ -317,6 +372,7 @@ parsers in scancode-toolkit during documentation builds. - ``*.debian.tar.xz`` ``*.debian.tar.gz`` - ``deb`` + - ``linux``, ``win``, ``mac`` - ``debian_source_metadata_tarball`` - None - https://manpages.debian.org/unstable/dpkg-dev/deb.5.en.html @@ -324,42 +380,49 @@ parsers in scancode-toolkit during documentation builds. - ``*.dmg`` ``*.sparseimage`` - ``dmg`` + - ``linux``, ``win``, ``mac`` - ``apple_dmg`` - None - https://en.wikipedia.org/wiki/Apple_Disk_Image * - Java EAR application.xml - ``*/META-INF/application.xml`` - ``ear`` + - ``linux``, ``win``, ``mac`` - ``java_ear_application_xml`` - Java - https://en.wikipedia.org/wiki/EAR_(file_format) * - Java EAR Enterprise application archive - ``*.ear`` - ``ear`` + - ``linux``, ``win``, ``mac`` - ``java_ear_archive`` - Java - https://en.wikipedia.org/wiki/EAR_(file_format) * - FreeBSD compact package manifest - ``*/+COMPACT_MANIFEST`` - ``freebsd`` + - ``linux``, ``win``, ``mac`` - ``freebsd_compact_manifest`` - None - https://www.freebsd.org/cgi/man.cgi?pkg-create(8)#MANIFEST_FILE_DETAILS * - RubyGems gem package archive - ``*.gem`` - ``gem`` + - ``linux``, ``win``, ``mac`` - ``gem_archive`` - Ruby - https://web.archive.org/web/20220326093616/https://piotrmurach.com/articles/looking-inside-a-ruby-gem/ * - RubyGems gem package extracted archive - ``*/metadata.gz-extract`` - ``gem`` + - ``linux``, ``win``, ``mac`` - ``gem_archive_extracted`` - Ruby - https://web.archive.org/web/20220326093616/https://piotrmurach.com/articles/looking-inside-a-ruby-gem/ * - RubyGems gemspec manifest - installed vendor/bundle/specifications layout - ``*/specifications/*.gemspec`` - ``gem`` + - ``linux``, ``win``, ``mac`` - ``gem_gemspec_installed_specifications`` - Ruby - https://guides.rubygems.org/specification-reference/ @@ -368,72 +431,91 @@ parsers in scancode-toolkit during documentation builds. ``*/*.gemfile`` ``*/Gemfile-*`` - ``gem`` + - ``linux``, ``win``, ``mac`` - ``gemfile`` - Ruby - https://bundler.io/man/gemfile.5.html * - RubyGems Bundler Gemfile - extracted layout - ``*/data.gz-extract/Gemfile`` - ``gem`` + - ``linux``, ``win``, ``mac`` - ``gemfile_extracted`` - Ruby - https://bundler.io/man/gemfile.5.html * - RubyGems Bundler Gemfile.lock - ``*/Gemfile.lock`` - ``gem`` + - ``linux``, ``win``, ``mac`` - ``gemfile_lock`` - Ruby - https://bundler.io/man/gemfile.5.html * - RubyGems Bundler Gemfile.lock - extracted layout - ``*/data.gz-extract/Gemfile.lock`` - ``gem`` + - ``linux``, ``win``, ``mac`` - ``gemfile_lock_extracted`` - Ruby - https://bundler.io/man/gemfile.5.html * - RubyGems gemspec manifest - ``*.gemspec`` - ``gem`` + - ``linux``, ``win``, ``mac`` - ``gemspec`` - Ruby - https://guides.rubygems.org/specification-reference/ * - RubyGems gemspec manifest - extracted data layout - ``*/data.gz-extract/*.gemspec`` - ``gem`` + - ``linux``, ``win``, ``mac`` - ``gemspec_extracted`` - Ruby - https://guides.rubygems.org/specification-reference/ * - Go modules file - ``*/go.mod`` - ``golang`` + - ``linux``, ``win``, ``mac`` - ``go_mod`` - Go - https://go.dev/ref/mod * - Go module cheksums file - ``*/go.sum`` - ``golang`` + - ``linux``, ``win``, ``mac`` - ``go_sum`` - Go - https://go.dev/ref/mod#go-sum-files * - Go Godeps - ``*/Godeps.json`` - ``golang`` + - ``linux``, ``win``, ``mac`` - ``godeps`` - Go - https://github.com/tools/godep + * - Go binary + - None + - ``golang`` + - ``linux``, ``win``, ``mac`` + - ``golang_binary`` + - Go + - https://github.com/nexB/go-inspector/ * - Haxe haxelib.json metadata file - ``*/haxelib.json`` - ``haxe`` + - ``linux``, ``win``, ``mac`` - ``haxelib_json`` - Haxe - https://lib.haxe.org/documentation/creating-a-haxelib-package/ * - InstallShield installer - ``*.exe`` - ``installshield`` + - ``linux``, ``win``, ``mac`` - ``installshield_installer`` - None - https://www.revenera.com/install/products/installshield * - iOS package archive - ``*.ipa`` - ``ios`` + - ``linux``, ``win``, ``mac`` - ``ios_ipa`` - Objective-C - https://en.wikipedia.org/wiki/.ipa @@ -442,36 +524,42 @@ parsers in scancode-toolkit during documentation builds. ``*.udf`` ``*.img`` - ``iso`` + - ``linux``, ``win``, ``mac`` - ``iso_disk_image`` - None - https://en.wikipedia.org/wiki/ISO_9660 * - Ant IVY dependency file - ``*/ivy.xml`` - ``ivy`` + - ``linux``, ``win``, ``mac`` - ``ant_ivy_xml`` - Java - https://ant.apache.org/ivy/history/latest-milestone/ivyfile.html * - JAR Java Archive - ``*.jar`` - ``jar`` + - ``linux``, ``win``, ``mac`` - ``java_jar`` - None - https://en.wikipedia.org/wiki/JAR_(file_format) * - Java JAR MANIFEST.MF - ``*/META-INF/MANIFEST.MF`` - ``jar`` + - ``linux``, ``win``, ``mac`` - ``java_jar_manifest`` - Java - https://docs.oracle.com/javase/tutorial/deployment/jar/manifestindex.html * - JBOSS service archive - ``*.sar`` - ``jboss-service`` + - ``linux``, ``win``, ``mac`` - ``jboss_sar`` - Java - https://docs.jboss.org/jbossas/docs/Server_Configuration_Guide/4/html/ch02s01.html * - JBOSS service.xml - ``*/meta-inf/jboss-service.xml`` - ``jboss-service`` + - ``linux``, ``win``, ``mac`` - ``jboss_service_xml`` - Java - https://docs.jboss.org/jbossas/docs/Server_Configuration_Guide/4/html/ch02s01.html @@ -479,6 +567,7 @@ parsers in scancode-toolkit during documentation builds. - ``*etc/os-release`` ``*usr/lib/os-release`` - ``linux-distro`` + - ``linux``, ``win``, ``mac`` - ``etc_os_release`` - None - https://www.freedesktop.org/software/systemd/man/os-release.html @@ -486,6 +575,7 @@ parsers in scancode-toolkit during documentation builds. - ``*/build.gradle`` ``*/build.gradle.kts`` - ``maven`` + - ``linux``, ``win``, ``mac`` - ``build_gradle`` - None - None @@ -493,36 +583,42 @@ parsers in scancode-toolkit during documentation builds. - ``*.pom`` ``*pom.xml`` - ``maven`` + - ``linux``, ``win``, ``mac`` - ``maven_pom`` - Java - https://maven.apache.org/pom.html * - Apache Maven pom properties file - ``*/pom.properties`` - ``maven`` + - ``linux``, ``win``, ``mac`` - ``maven_pom_properties`` - Java - https://maven.apache.org/pom.html * - Meteor package.js - ``*/package.js`` - ``meteor`` + - ``linux``, ``win``, ``mac`` - ``meteor_package`` - JavaScript - https://docs.meteor.com/api/packagejs.html * - Mozilla XPI extension - ``*.xpi`` - ``mozilla`` + - ``linux``, ``win``, ``mac`` - ``mozilla_xpi`` - JavaScript - https://en.wikipedia.org/wiki/XPInstall * - Microsoft MSI installer - ``*.msi`` - ``msi`` + - ``linux`` - ``msi_installer`` - None - https://docs.microsoft.com/en-us/windows/win32/msi/windows-installer-portal * - npm package.json - ``*/package.json`` - ``npm`` + - ``linux``, ``win``, ``mac`` - ``npm_package_json`` - JavaScript - https://docs.npmjs.com/cli/v8/configuring-npm/package-json @@ -530,90 +626,105 @@ parsers in scancode-toolkit during documentation builds. - ``*/package-lock.json`` ``*/.package-lock.json`` - ``npm`` + - ``linux``, ``win``, ``mac`` - ``npm_package_lock_json`` - JavaScript - https://docs.npmjs.com/cli/v8/configuring-npm/package-lock-json * - npm shrinkwrap.json lockfile - ``*/npm-shrinkwrap.json`` - ``npm`` + - ``linux``, ``win``, ``mac`` - ``npm_shrinkwrap_json`` - JavaScript - https://docs.npmjs.com/cli/v8/configuring-npm/npm-shrinkwrap-json * - pnpm pnpm-lock.yaml lockfile - ``*/pnpm-lock.yaml`` - ``npm`` + - ``linux``, ``win``, ``mac`` - ``pnpm_lock_yaml`` - JavaScript - https://github.com/pnpm/spec/blob/master/lockfile/6.0.md * - pnpm shrinkwrap.yaml lockfile - ``*/shrinkwrap.yaml`` - ``npm`` + - ``linux``, ``win``, ``mac`` - ``pnpm_shrinkwrap_yaml`` - JavaScript - https://github.com/pnpm/spec/blob/master/lockfile/4.md * - pnpm workspace yaml file - ``*/pnpm-workspace.yaml`` - ``npm`` + - ``linux``, ``win``, ``mac`` - ``pnpm_workspace_yaml`` - JavaScript - https://pnpm.io/pnpm-workspace_yaml * - yarn.lock lockfile v1 format - ``*/yarn.lock`` - ``npm`` + - ``linux``, ``win``, ``mac`` - ``yarn_lock_v1`` - JavaScript - https://classic.yarnpkg.com/lang/en/docs/yarn-lock/ * - yarn.lock lockfile v2 format - ``*/yarn.lock`` - ``npm`` + - ``linux``, ``win``, ``mac`` - ``yarn_lock_v2`` - JavaScript - https://classic.yarnpkg.com/lang/en/docs/yarn-lock/ * - NSIS installer - ``*.exe`` - ``nsis`` + - ``linux``, ``win``, ``mac`` - ``nsis_installer`` - None - https://nsis.sourceforge.io/Main_Page * - NuGet nupkg package archive - ``*.nupkg`` - ``nuget`` + - ``linux``, ``win``, ``mac`` - ``nuget_nupkg`` - None - https://en.wikipedia.org/wiki/Open_Packaging_Conventions * - NuGet nuspec package manifest - ``*.nuspec`` - ``nuget`` + - ``linux``, ``win``, ``mac`` - ``nuget_nupsec`` - None - https://docs.microsoft.com/en-us/nuget/reference/nuspec * - NuGet packages.lock.json file - ``*packages.lock.json`` - ``nuget`` + - ``linux``, ``win``, ``mac`` - ``nuget_packages_lock`` - None - https://learn.microsoft.com/en-us/nuget/reference/cli-reference/cli-ref-restore * - Ocaml Opam file - ``*opam`` - ``opam`` + - ``linux``, ``win``, ``mac`` - ``opam_file`` - Ocaml - https://opam.ocaml.org/doc/Manual.html#Common-file-format * - Java OSGi MANIFEST.MF - None - ``osgi`` + - ``linux``, ``win``, ``mac`` - ``java_osgi_manifest`` - Java - https://docs.oracle.com/javase/tutorial/deployment/jar/manifestindex.html * - Dart pubspec lockfile - ``*pubspec.lock`` - ``pubspec`` + - ``linux``, ``win``, ``mac`` - ``pubspec_lock`` - dart - https://web.archive.org/web/20220330081004/https://gpalma.pt/blog/what-is-the-pubspec-lock/ * - Dart pubspec manifest - ``*pubspec.yaml`` - ``pubspec`` + - ``linux``, ``win``, ``mac`` - ``pubspec_yaml`` - dart - https://dart.dev/tools/pub/pubspec @@ -621,6 +732,7 @@ parsers in scancode-toolkit during documentation builds. - ``*conda.yaml`` ``*conda.yml`` - ``pypi`` + - ``linux``, ``win``, ``mac`` - ``conda_yaml`` - Python - https://docs.conda.io/ @@ -634,90 +746,105 @@ parsers in scancode-toolkit during documentation builds. ``*requirements/*.in`` ``*reqs.txt`` - ``pypi`` + - ``linux``, ``win``, ``mac`` - ``pip_requirements`` - Python - https://pip.pypa.io/en/latest/reference/requirements-file-format/ * - Pipfile - ``*Pipfile`` - ``pypi`` + - ``linux``, ``win``, ``mac`` - ``pipfile`` - Python - https://github.com/pypa/pipfile * - Pipfile.lock - ``*Pipfile.lock`` - ``pypi`` + - ``linux``, ``win``, ``mac`` - ``pipfile_lock`` - Python - https://github.com/pypa/pipfile * - PyPI editable local installation PKG-INFO - ``*.egg-info/PKG-INFO`` - ``pypi`` + - ``linux``, ``win``, ``mac`` - ``pypi_editable_egg_pkginfo`` - Python - https://peps.python.org/pep-0376/ * - PyPI egg - ``*.egg`` - ``pypi`` + - ``linux``, ``win``, ``mac`` - ``pypi_egg`` - Python - https://web.archive.org/web/20210604075235/http://peak.telecommunity.com/DevCenter/PythonEggs * - PyPI extracted egg PKG-INFO - ``*/EGG-INFO/PKG-INFO`` - ``pypi`` + - ``linux``, ``win``, ``mac`` - ``pypi_egg_pkginfo`` - Python - https://peps.python.org/pep-0376/ * - Python poetry pyproject.toml - ``*pip-inspect.deplock`` - ``pypi`` + - ``linux``, ``win``, ``mac`` - ``pypi_inspect_deplock`` - Python - https://pip.pypa.io/en/stable/cli/pip_inspect/ * - Python poetry lockfile - ``*poetry.lock`` - ``pypi`` + - ``linux``, ``win``, ``mac`` - ``pypi_poetry_lock`` - Python - https://python-poetry.org/docs/basic-usage/#installing-with-poetrylock * - Python poetry pyproject.toml - ``*pyproject.toml`` - ``pypi`` + - ``linux``, ``win``, ``mac`` - ``pypi_poetry_pyproject_toml`` - Python - https://packaging.python.org/en/latest/specifications/pyproject-toml/ * - Python pyproject.toml - ``*pyproject.toml`` - ``pypi`` + - ``linux``, ``win``, ``mac`` - ``pypi_pyproject_toml`` - Python - https://packaging.python.org/en/latest/specifications/pyproject-toml/ * - PyPI extracted sdist PKG-INFO - ``*/PKG-INFO`` - ``pypi`` + - ``linux``, ``win``, ``mac`` - ``pypi_sdist_pkginfo`` - Python - https://peps.python.org/pep-0314/ * - Python setup.cfg - ``*setup.cfg`` - ``pypi`` + - ``linux``, ``win``, ``mac`` - ``pypi_setup_cfg`` - Python - https://peps.python.org/pep-0390/ * - Python setup.py - ``*setup.py`` - ``pypi`` + - ``linux``, ``win``, ``mac`` - ``pypi_setup_py`` - Python - https://docs.python.org/3.11/distutils/setupscript.html * - PyPI wheel - ``*.whl`` - ``pypi`` + - ``linux``, ``win``, ``mac`` - ``pypi_wheel`` - Python - https://peps.python.org/pep-0427/ * - PyPI installed wheel METADATA - ``*.dist-info/METADATA`` - ``pypi`` + - ``linux``, ``win``, ``mac`` - ``pypi_wheel_metadata`` - Python - https://packaging.python.org/en/latest/specifications/core-metadata/ @@ -728,6 +855,7 @@ parsers in scancode-toolkit during documentation builds. ``*/README.google`` ``*/README.thirdparty`` - ``readme`` + - ``linux``, ``win``, ``mac`` - ``readme`` - None - None @@ -738,30 +866,35 @@ parsers in scancode-toolkit during documentation builds. ``*.mvl`` ``*.vip`` - ``rpm`` + - ``linux``, ``win``, ``mac`` - ``rpm_archive`` - None - https://en.wikipedia.org/wiki/RPM_Package_Manager * - RPM installed package BDB database - ``*var/lib/rpm/Packages`` - ``rpm`` + - ``linux`` - ``rpm_installed_database_bdb`` - None - https://man7.org/linux/man-pages/man8/rpmdb.8.html * - RPM installed package NDB database - ``*usr/lib/sysimage/rpm/Packages.db`` - ``rpm`` + - ``linux`` - ``rpm_installed_database_ndb`` - None - https://fedoraproject.org/wiki/Changes/NewRpmDBFormat * - RPM installed package SQLite database - ``*rpm/rpmdb.sqlite`` - ``rpm`` + - ``linux`` - ``rpm_installed_database_sqlite`` - None - https://fedoraproject.org/wiki/Changes/Sqlite_Rpmdb * - RPM mariner distroless package manifest - ``*var/lib/rpmmanifest/container-manifest-2`` - ``rpm`` + - ``linux``, ``win``, ``mac`` - ``rpm_mariner_manifest`` - None - https://github.com/microsoft/marinara/ @@ -769,24 +902,28 @@ parsers in scancode-toolkit during documentation builds. - ``*usr/share/licenses/*/COPYING*`` ``*usr/share/licenses/*/LICENSE*`` - ``rpm`` + - ``linux``, ``win``, ``mac`` - ``rpm_package_licenses`` - None - https://github.com/microsoft/marinara/ * - RPM specfile - ``*.spec`` - ``rpm`` + - ``linux``, ``win``, ``mac`` - ``rpm_spefile`` - None - https://en.wikipedia.org/wiki/RPM_Package_Manager * - shell archive - ``*.shar`` - ``shar`` + - ``linux``, ``win``, ``mac`` - ``shar_shell_archive`` - None - https://en.wikipedia.org/wiki/Shar * - Squashfs disk image - None - ``squashfs`` + - ``linux``, ``win``, ``mac`` - ``squashfs_disk_image`` - None - https://en.wikipedia.org/wiki/SquashFS @@ -794,6 +931,7 @@ parsers in scancode-toolkit during documentation builds. - ``*/Package.swift.json`` ``*/Package.swift.deplock`` - ``swift`` + - ``linux``, ``win``, ``mac`` - ``swift_package_manifest_json`` - Swift - https://docs.swift.org/package-manager/PackageDescription/PackageDescription.html @@ -801,48 +939,56 @@ parsers in scancode-toolkit during documentation builds. - ``*/Package.resolved`` ``*/.package.resolved`` - ``swift`` + - ``linux``, ``win``, ``mac`` - ``swift_package_resolved`` - swift - https://docs.swift.org/package-manager/PackageDescription/PackageDescription.html#package-dependency * - Swift dependency graph created by DepLock - ``*/swift-show-dependencies.deplock`` - ``swift`` + - ``linux``, ``win``, ``mac`` - ``swift_package_show_dependencies`` - Swift - https://forums.swift.org/t/swiftpm-show-dependencies-without-fetching-dependencies/51154 * - Java Web Application Archive - ``*.war`` - ``war`` + - ``linux``, ``win``, ``mac`` - ``java_war_archive`` - Java - https://en.wikipedia.org/wiki/WAR_(file_format) * - Java WAR web/xml - ``*/WEB-INF/web.xml`` - ``war`` + - ``linux``, ``win``, ``mac`` - ``java_war_web_xml`` - Java - https://en.wikipedia.org/wiki/WAR_(file_format) * - Windows Registry Installed Program - Docker SOFTWARE - ``*/Files/Windows/System32/config/SOFTWARE`` - ``windows-program`` + - ``linux`` - ``win_reg_installed_programs_docker_file_software`` - None - https://en.wikipedia.org/wiki/Windows_Registry * - Windows Registry Installed Program - Docker Software Delta - ``*/Hives/Software_Delta`` - ``windows-program`` + - ``linux`` - ``win_reg_installed_programs_docker_software_delta`` - None - https://en.wikipedia.org/wiki/Windows_Registry * - Windows Registry Installed Program - Docker UtilityVM SOFTWARE - ``*/UtilityVM/Files/Windows/System32/config/SOFTWARE`` - ``windows-program`` + - ``linux`` - ``win_reg_installed_programs_docker_utility_software`` - None - https://en.wikipedia.org/wiki/Windows_Registry * - Microsoft Update Manifest .mum file - ``*.mum`` - ``windows-update`` + - ``linux``, ``win``, ``mac`` - ``microsoft_update_manifest_mum`` - None - None @@ -865,6 +1011,7 @@ parsers in scancode-toolkit during documentation builds. ``*.tlb_*`` ``*.ocx`` - ``winexe`` + - ``linux``, ``win``, ``mac`` - ``windows_executable`` - None - https://en.wikipedia.org/wiki/Portable_Executable diff --git a/setup-mini.cfg b/setup-mini.cfg index cd48f30d97c..790faa1187e 100644 --- a/setup-mini.cfg +++ b/setup-mini.cfg @@ -67,7 +67,7 @@ install_requires = Beautifulsoup4 >= 4.0.0 boolean.py >= 4.0 chardet >= 3.0.0 - click >= 6.7, !=7.0 + click >= 6.7, !=7.0, !=8.1.8 colorama >= 0.3.9 commoncode >= 32.0.0 container-inspector >= 31.0.0 @@ -150,7 +150,7 @@ packages = regipy >= 3.1.0; platform_system == 'Linux' packagedcode_msitools >= 0.101.210706; platform_system == 'Linux' go-inspector >= 0.5.0; platform_system == 'Linux' - + rust-inspector >= 0.1.0; platform_system == 'Linux' [options.entry_points] console_scripts = diff --git a/setup.cfg b/setup.cfg index 8d1b28e381f..797f40bc4f9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -67,7 +67,7 @@ install_requires = Beautifulsoup4 >= 4.0.0 boolean.py >= 4.0 chardet >= 3.0.0 - click >= 6.7, !=7.0 + click >= 6.7, !=7.0, !=8.1.8 colorama >= 0.3.9 commoncode >= 32.0.0 container-inspector >= 31.0.0 @@ -150,7 +150,7 @@ packages = regipy >= 3.1.0; platform_system == 'Linux' packagedcode_msitools >= 0.101.210706; platform_system == 'Linux' go-inspector >= 0.5.0; platform_system == 'Linux' - + rust-inspector >= 0.1.0; platform_system == 'Linux' [options.entry_points] console_scripts = diff --git a/src/packagedcode/__init__.py b/src/packagedcode/__init__.py index 093fd9940f7..53ada87ab09 100644 --- a/src/packagedcode/__init__.py +++ b/src/packagedcode/__init__.py @@ -251,6 +251,12 @@ except ImportError: pass +try: + from rust_inspector.packages import get_rust_binary_handler + APPLICATION_PACKAGE_DATAFILE_HANDLERS.append(get_rust_binary_handler()) +except ImportError: + pass + ALL_DATAFILE_HANDLERS = ( APPLICATION_PACKAGE_DATAFILE_HANDLERS + [ p for p in SYSTEM_PACKAGE_DATAFILE_HANDLERS diff --git a/src/packagedcode/models.py b/src/packagedcode/models.py index ae0adb95f20..40fa8bb3e93 100644 --- a/src/packagedcode/models.py +++ b/src/packagedcode/models.py @@ -1043,9 +1043,9 @@ class DatafileHandler: # possible values are app, sys and info datasource_type = 'app' - # tuple of specifically supported operating systems. If None or empty, all platforms are supported - # possible values are win, mac, linux, freebsd - supported_oses = tuple() + # tuple of operating systems where getting package data using this DatafileHandler is supported. + # If None or empty, all platforms are supported, possible values are win, mac, linux, freebsd + supported_oses = None # Sequence of known fnmatch-style case-insensitive glob patterns (e.g., Unix # shell style patterns) that apply on the whole POSIX path for package diff --git a/src/packagedcode/plugin_package.py b/src/packagedcode/plugin_package.py index b1487022c40..252d6cb1dd4 100644 --- a/src/packagedcode/plugin_package.py +++ b/src/packagedcode/plugin_package.py @@ -89,6 +89,11 @@ def get_available_package_parsers(docs=False): if cls.datasource_id is None: raise Exception(cls) + if not cls.supported_oses: + supported_oses = ('linux', 'win', 'mac') + else: + supported_oses = cls.supported_oses + data_packages = {} if docs: path_patterns = '\n '.join(f"``{p}``" for p in cls.path_patterns) @@ -97,11 +102,15 @@ def get_available_package_parsers(docs=False): else: data_packages['package_type'] = cls.default_package_type data_packages['datasource_id'] = f"``{cls.datasource_id}``" + supported_oses = ', '.join(f"``{os_type}``" for os_type in supported_oses) + else: path_patterns = ', '.join(repr(p) for p in cls.path_patterns) + supported_oses = ', '.join(repr(os_type) for os_type in supported_oses) data_packages['package_type'] = cls.default_package_type data_packages['datasource_id'] = cls.datasource_id + data_packages['supported_oses'] = supported_oses data_packages['documentation_url'] = cls.documentation_url data_packages['default_primary_language'] = cls.default_primary_language data_packages['description'] = cls.description diff --git a/src/packagedcode/templates/available_package_parsers.rst b/src/packagedcode/templates/available_package_parsers.rst index 6b34e70aeaa..b5a3a3e1a53 100644 --- a/src/packagedcode/templates/available_package_parsers.rst +++ b/src/packagedcode/templates/available_package_parsers.rst @@ -14,12 +14,13 @@ parsers in scancode-toolkit during documentation builds. .. list-table:: Supported Package Parsers - :widths: 10 10 20 10 10 2 + :widths: 10 10 20 10 10 10 2 :header-rows: 1 * - Description - Path Patterns - Package type + - Supported OS for detection - Datasource ID - Primary Language - Documentation URL @@ -27,6 +28,7 @@ parsers in scancode-toolkit during documentation builds. * - {% if package_data.description %}{{ package_data.description }}{% else %}{{"None"}}{% endif %} - {% if package_data.path_patterns %}{{ package_data.path_patterns }}{% else %}{{"None"}}{% endif %} - {{ package_data.package_type }} + - {{ package_data.supported_oses }} - {{ package_data.datasource_id }} - {{ package_data.default_primary_language }} - {% if package_data.documentation_url %}{{ package_data.documentation_url }}{% else %}{{"None"}}{% endif %} diff --git a/tests/packagedcode/data/cargo/binary/cargo-binary.expected.json b/tests/packagedcode/data/cargo/binary/cargo-binary.expected.json new file mode 100644 index 00000000000..6fe0a7d75bd --- /dev/null +++ b/tests/packagedcode/data/cargo/binary/cargo-binary.expected.json @@ -0,0 +1,1743 @@ +{ + "packages": [ + { + "type": "cargo", + "namespace": null, + "name": "aho-corasick", + "version": "0.5.3", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "repository_homepage_url": "https://crates.io/crates/aho-corasick", + "repository_download_url": "https://crates.io/api/v1/crates/aho-corasick/0.5.3/download", + "api_data_url": "https://crates.io/api/v1/crates/aho-corasick", + "package_uid": "pkg:cargo/aho-corasick@0.5.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_paths": [ + "cargo_dependencies" + ], + "datasource_ids": [ + "rust_binary" + ], + "purl": "pkg:cargo/aho-corasick@0.5.3" + }, + { + "type": "cargo", + "namespace": null, + "name": "bitflags", + "version": "2.6.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "repository_homepage_url": "https://crates.io/crates/bitflags", + "repository_download_url": "https://crates.io/api/v1/crates/bitflags/2.6.0/download", + "api_data_url": "https://crates.io/api/v1/crates/bitflags", + "package_uid": "pkg:cargo/bitflags@2.6.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_paths": [ + "cargo_dependencies" + ], + "datasource_ids": [ + "rust_binary" + ], + "purl": "pkg:cargo/bitflags@2.6.0" + }, + { + "type": "cargo", + "namespace": null, + "name": "cargo_dependencies", + "version": "0.1.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "is_private": true, + "is_virtual": false, + "extra_data": {}, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "package_uid": "pkg:cargo/cargo_dependencies@0.1.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_paths": [ + "cargo_dependencies" + ], + "datasource_ids": [ + "rust_binary" + ], + "purl": "pkg:cargo/cargo_dependencies@0.1.0" + }, + { + "type": "cargo", + "namespace": null, + "name": "kernel32-sys", + "version": "0.2.2", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "repository_homepage_url": "https://crates.io/crates/kernel32-sys", + "repository_download_url": "https://crates.io/api/v1/crates/kernel32-sys/0.2.2/download", + "api_data_url": "https://crates.io/api/v1/crates/kernel32-sys", + "package_uid": "pkg:cargo/kernel32-sys@0.2.2?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_paths": [ + "cargo_dependencies" + ], + "datasource_ids": [ + "rust_binary" + ], + "purl": "pkg:cargo/kernel32-sys@0.2.2" + }, + { + "type": "cargo", + "namespace": null, + "name": "libc", + "version": "0.2.167", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "repository_homepage_url": "https://crates.io/crates/libc", + "repository_download_url": "https://crates.io/api/v1/crates/libc/0.2.167/download", + "api_data_url": "https://crates.io/api/v1/crates/libc", + "package_uid": "pkg:cargo/libc@0.2.167?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_paths": [ + "cargo_dependencies" + ], + "datasource_ids": [ + "rust_binary" + ], + "purl": "pkg:cargo/libc@0.2.167" + }, + { + "type": "cargo", + "namespace": null, + "name": "memchr", + "version": "0.1.11", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "repository_homepage_url": "https://crates.io/crates/memchr", + "repository_download_url": "https://crates.io/api/v1/crates/memchr/0.1.11/download", + "api_data_url": "https://crates.io/api/v1/crates/memchr", + "package_uid": "pkg:cargo/memchr@0.1.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_paths": [ + "cargo_dependencies" + ], + "datasource_ids": [ + "rust_binary" + ], + "purl": "pkg:cargo/memchr@0.1.11" + }, + { + "type": "cargo", + "namespace": null, + "name": "regex", + "version": "0.1.80", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "repository_homepage_url": "https://crates.io/crates/regex", + "repository_download_url": "https://crates.io/api/v1/crates/regex/0.1.80/download", + "api_data_url": "https://crates.io/api/v1/crates/regex", + "package_uid": "pkg:cargo/regex@0.1.80?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_paths": [ + "cargo_dependencies" + ], + "datasource_ids": [ + "rust_binary" + ], + "purl": "pkg:cargo/regex@0.1.80" + }, + { + "type": "cargo", + "namespace": null, + "name": "regex-syntax", + "version": "0.3.9", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "repository_homepage_url": "https://crates.io/crates/regex-syntax", + "repository_download_url": "https://crates.io/api/v1/crates/regex-syntax/0.3.9/download", + "api_data_url": "https://crates.io/api/v1/crates/regex-syntax", + "package_uid": "pkg:cargo/regex-syntax@0.3.9?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_paths": [ + "cargo_dependencies" + ], + "datasource_ids": [ + "rust_binary" + ], + "purl": "pkg:cargo/regex-syntax@0.3.9" + }, + { + "type": "cargo", + "namespace": null, + "name": "thread-id", + "version": "2.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "repository_homepage_url": "https://crates.io/crates/thread-id", + "repository_download_url": "https://crates.io/api/v1/crates/thread-id/2.0.0/download", + "api_data_url": "https://crates.io/api/v1/crates/thread-id", + "package_uid": "pkg:cargo/thread-id@2.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_paths": [ + "cargo_dependencies" + ], + "datasource_ids": [ + "rust_binary" + ], + "purl": "pkg:cargo/thread-id@2.0.0" + }, + { + "type": "cargo", + "namespace": null, + "name": "thread_local", + "version": "0.2.7", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "repository_homepage_url": "https://crates.io/crates/thread_local", + "repository_download_url": "https://crates.io/api/v1/crates/thread_local/0.2.7/download", + "api_data_url": "https://crates.io/api/v1/crates/thread_local", + "package_uid": "pkg:cargo/thread_local@0.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_paths": [ + "cargo_dependencies" + ], + "datasource_ids": [ + "rust_binary" + ], + "purl": "pkg:cargo/thread_local@0.2.7" + }, + { + "type": "cargo", + "namespace": null, + "name": "time", + "version": "0.1.45", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "repository_homepage_url": "https://crates.io/crates/time", + "repository_download_url": "https://crates.io/api/v1/crates/time/0.1.45/download", + "api_data_url": "https://crates.io/api/v1/crates/time", + "package_uid": "pkg:cargo/time@0.1.45?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_paths": [ + "cargo_dependencies" + ], + "datasource_ids": [ + "rust_binary" + ], + "purl": "pkg:cargo/time@0.1.45" + }, + { + "type": "cargo", + "namespace": null, + "name": "utf8-ranges", + "version": "0.1.3", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "repository_homepage_url": "https://crates.io/crates/utf8-ranges", + "repository_download_url": "https://crates.io/api/v1/crates/utf8-ranges/0.1.3/download", + "api_data_url": "https://crates.io/api/v1/crates/utf8-ranges", + "package_uid": "pkg:cargo/utf8-ranges@0.1.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_paths": [ + "cargo_dependencies" + ], + "datasource_ids": [ + "rust_binary" + ], + "purl": "pkg:cargo/utf8-ranges@0.1.3" + }, + { + "type": "cargo", + "namespace": null, + "name": "winapi", + "version": "0.2.8", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "repository_homepage_url": "https://crates.io/crates/winapi", + "repository_download_url": "https://crates.io/api/v1/crates/winapi/0.2.8/download", + "api_data_url": "https://crates.io/api/v1/crates/winapi", + "package_uid": "pkg:cargo/winapi@0.2.8?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_paths": [ + "cargo_dependencies" + ], + "datasource_ids": [ + "rust_binary" + ], + "purl": "pkg:cargo/winapi@0.2.8" + }, + { + "type": "cargo", + "namespace": null, + "name": "winapi-build", + "version": "0.1.1", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "repository_homepage_url": "https://crates.io/crates/winapi-build", + "repository_download_url": "https://crates.io/api/v1/crates/winapi-build/0.1.1/download", + "api_data_url": "https://crates.io/api/v1/crates/winapi-build", + "package_uid": "pkg:cargo/winapi-build@0.1.1?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_paths": [ + "cargo_dependencies" + ], + "datasource_ids": [ + "rust_binary" + ], + "purl": "pkg:cargo/winapi-build@0.1.1" + } + ], + "dependencies": [ + { + "purl": "pkg:cargo/memchr@0.1.11", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:cargo/memchr@0.1.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:cargo/aho-corasick@0.5.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cargo_dependencies", + "datasource_id": "rust_binary" + }, + { + "purl": "pkg:cargo/bitflags@2.6.0", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:cargo/bitflags@2.6.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:cargo/cargo_dependencies@0.1.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cargo_dependencies", + "datasource_id": "rust_binary" + }, + { + "purl": "pkg:cargo/regex@0.1.80", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:cargo/regex@0.1.80?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:cargo/cargo_dependencies@0.1.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cargo_dependencies", + "datasource_id": "rust_binary" + }, + { + "purl": "pkg:cargo/time@0.1.45", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:cargo/time@0.1.45?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:cargo/cargo_dependencies@0.1.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cargo_dependencies", + "datasource_id": "rust_binary" + }, + { + "purl": "pkg:cargo/winapi@0.2.8", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:cargo/winapi@0.2.8?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:cargo/kernel32-sys@0.2.2?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cargo_dependencies", + "datasource_id": "rust_binary" + }, + { + "purl": "pkg:cargo/winapi-build@0.1.1", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:cargo/winapi-build@0.1.1?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:cargo/kernel32-sys@0.2.2?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cargo_dependencies", + "datasource_id": "rust_binary" + }, + { + "purl": "pkg:cargo/libc@0.2.167", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:cargo/libc@0.2.167?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:cargo/memchr@0.1.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cargo_dependencies", + "datasource_id": "rust_binary" + }, + { + "purl": "pkg:cargo/aho-corasick@0.5.3", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:cargo/aho-corasick@0.5.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:cargo/regex@0.1.80?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cargo_dependencies", + "datasource_id": "rust_binary" + }, + { + "purl": "pkg:cargo/memchr@0.1.11", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:cargo/memchr@0.1.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:cargo/regex@0.1.80?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cargo_dependencies", + "datasource_id": "rust_binary" + }, + { + "purl": "pkg:cargo/regex-syntax@0.3.9", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:cargo/regex-syntax@0.3.9?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:cargo/regex@0.1.80?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cargo_dependencies", + "datasource_id": "rust_binary" + }, + { + "purl": "pkg:cargo/thread_local@0.2.7", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:cargo/thread_local@0.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:cargo/regex@0.1.80?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cargo_dependencies", + "datasource_id": "rust_binary" + }, + { + "purl": "pkg:cargo/utf8-ranges@0.1.3", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:cargo/utf8-ranges@0.1.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:cargo/regex@0.1.80?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cargo_dependencies", + "datasource_id": "rust_binary" + }, + { + "purl": "pkg:cargo/kernel32-sys@0.2.2", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:cargo/kernel32-sys@0.2.2?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:cargo/thread-id@2.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cargo_dependencies", + "datasource_id": "rust_binary" + }, + { + "purl": "pkg:cargo/libc@0.2.167", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:cargo/libc@0.2.167?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:cargo/thread-id@2.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cargo_dependencies", + "datasource_id": "rust_binary" + }, + { + "purl": "pkg:cargo/thread-id@2.0.0", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:cargo/thread-id@2.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:cargo/thread_local@0.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cargo_dependencies", + "datasource_id": "rust_binary" + }, + { + "purl": "pkg:cargo/libc@0.2.167", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:cargo/libc@0.2.167?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:cargo/time@0.1.45?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cargo_dependencies", + "datasource_id": "rust_binary" + } + ], + "files": [ + { + "path": "cargo_dependencies", + "type": "file", + "package_data": [ + { + "type": "cargo", + "namespace": null, + "name": "aho-corasick", + "version": "0.5.3", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:cargo/memchr@0.1.11", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": "https://crates.io/crates/aho-corasick", + "repository_download_url": "https://crates.io/api/v1/crates/aho-corasick/0.5.3/download", + "api_data_url": "https://crates.io/api/v1/crates/aho-corasick", + "datasource_id": "rust_binary", + "purl": "pkg:cargo/aho-corasick@0.5.3" + }, + { + "type": "cargo", + "namespace": null, + "name": "bitflags", + "version": "2.6.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": "https://crates.io/crates/bitflags", + "repository_download_url": "https://crates.io/api/v1/crates/bitflags/2.6.0/download", + "api_data_url": "https://crates.io/api/v1/crates/bitflags", + "datasource_id": "rust_binary", + "purl": "pkg:cargo/bitflags@2.6.0" + }, + { + "type": "cargo", + "namespace": null, + "name": "cargo_dependencies", + "version": "0.1.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": true, + "is_virtual": false, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:cargo/bitflags@2.6.0", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:cargo/regex@0.1.80", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:cargo/time@0.1.45", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "rust_binary", + "purl": "pkg:cargo/cargo_dependencies@0.1.0" + }, + { + "type": "cargo", + "namespace": null, + "name": "kernel32-sys", + "version": "0.2.2", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:cargo/winapi@0.2.8", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:cargo/winapi-build@0.1.1", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": "https://crates.io/crates/kernel32-sys", + "repository_download_url": "https://crates.io/api/v1/crates/kernel32-sys/0.2.2/download", + "api_data_url": "https://crates.io/api/v1/crates/kernel32-sys", + "datasource_id": "rust_binary", + "purl": "pkg:cargo/kernel32-sys@0.2.2" + }, + { + "type": "cargo", + "namespace": null, + "name": "libc", + "version": "0.2.167", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": "https://crates.io/crates/libc", + "repository_download_url": "https://crates.io/api/v1/crates/libc/0.2.167/download", + "api_data_url": "https://crates.io/api/v1/crates/libc", + "datasource_id": "rust_binary", + "purl": "pkg:cargo/libc@0.2.167" + }, + { + "type": "cargo", + "namespace": null, + "name": "memchr", + "version": "0.1.11", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:cargo/libc@0.2.167", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": "https://crates.io/crates/memchr", + "repository_download_url": "https://crates.io/api/v1/crates/memchr/0.1.11/download", + "api_data_url": "https://crates.io/api/v1/crates/memchr", + "datasource_id": "rust_binary", + "purl": "pkg:cargo/memchr@0.1.11" + }, + { + "type": "cargo", + "namespace": null, + "name": "regex", + "version": "0.1.80", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:cargo/aho-corasick@0.5.3", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:cargo/memchr@0.1.11", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:cargo/regex-syntax@0.3.9", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:cargo/thread_local@0.2.7", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:cargo/utf8-ranges@0.1.3", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": "https://crates.io/crates/regex", + "repository_download_url": "https://crates.io/api/v1/crates/regex/0.1.80/download", + "api_data_url": "https://crates.io/api/v1/crates/regex", + "datasource_id": "rust_binary", + "purl": "pkg:cargo/regex@0.1.80" + }, + { + "type": "cargo", + "namespace": null, + "name": "regex-syntax", + "version": "0.3.9", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": "https://crates.io/crates/regex-syntax", + "repository_download_url": "https://crates.io/api/v1/crates/regex-syntax/0.3.9/download", + "api_data_url": "https://crates.io/api/v1/crates/regex-syntax", + "datasource_id": "rust_binary", + "purl": "pkg:cargo/regex-syntax@0.3.9" + }, + { + "type": "cargo", + "namespace": null, + "name": "thread-id", + "version": "2.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:cargo/kernel32-sys@0.2.2", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:cargo/libc@0.2.167", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": "https://crates.io/crates/thread-id", + "repository_download_url": "https://crates.io/api/v1/crates/thread-id/2.0.0/download", + "api_data_url": "https://crates.io/api/v1/crates/thread-id", + "datasource_id": "rust_binary", + "purl": "pkg:cargo/thread-id@2.0.0" + }, + { + "type": "cargo", + "namespace": null, + "name": "thread_local", + "version": "0.2.7", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:cargo/thread-id@2.0.0", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": "https://crates.io/crates/thread_local", + "repository_download_url": "https://crates.io/api/v1/crates/thread_local/0.2.7/download", + "api_data_url": "https://crates.io/api/v1/crates/thread_local", + "datasource_id": "rust_binary", + "purl": "pkg:cargo/thread_local@0.2.7" + }, + { + "type": "cargo", + "namespace": null, + "name": "time", + "version": "0.1.45", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:cargo/libc@0.2.167", + "extracted_requirement": null, + "scope": "build-dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": "https://crates.io/crates/time", + "repository_download_url": "https://crates.io/api/v1/crates/time/0.1.45/download", + "api_data_url": "https://crates.io/api/v1/crates/time", + "datasource_id": "rust_binary", + "purl": "pkg:cargo/time@0.1.45" + }, + { + "type": "cargo", + "namespace": null, + "name": "utf8-ranges", + "version": "0.1.3", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": "https://crates.io/crates/utf8-ranges", + "repository_download_url": "https://crates.io/api/v1/crates/utf8-ranges/0.1.3/download", + "api_data_url": "https://crates.io/api/v1/crates/utf8-ranges", + "datasource_id": "rust_binary", + "purl": "pkg:cargo/utf8-ranges@0.1.3" + }, + { + "type": "cargo", + "namespace": null, + "name": "winapi", + "version": "0.2.8", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": "https://crates.io/crates/winapi", + "repository_download_url": "https://crates.io/api/v1/crates/winapi/0.2.8/download", + "api_data_url": "https://crates.io/api/v1/crates/winapi", + "datasource_id": "rust_binary", + "purl": "pkg:cargo/winapi@0.2.8" + }, + { + "type": "cargo", + "namespace": null, + "name": "winapi-build", + "version": "0.1.1", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": "https://crates.io/crates/winapi-build", + "repository_download_url": "https://crates.io/api/v1/crates/winapi-build/0.1.1/download", + "api_data_url": "https://crates.io/api/v1/crates/winapi-build", + "datasource_id": "rust_binary", + "purl": "pkg:cargo/winapi-build@0.1.1" + } + ], + "for_packages": [ + "pkg:cargo/aho-corasick@0.5.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:cargo/bitflags@2.6.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:cargo/cargo_dependencies@0.1.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:cargo/kernel32-sys@0.2.2?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:cargo/libc@0.2.167?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:cargo/memchr@0.1.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:cargo/regex@0.1.80?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:cargo/regex-syntax@0.3.9?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:cargo/thread-id@2.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:cargo/thread_local@0.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:cargo/time@0.1.45?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:cargo/utf8-ranges@0.1.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:cargo/winapi@0.2.8?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:cargo/winapi-build@0.1.1?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "scan_errors": [] + } + ] +} \ No newline at end of file diff --git a/tests/packagedcode/data/cargo/binary/cargo_dependencies b/tests/packagedcode/data/cargo/binary/cargo_dependencies new file mode 100755 index 00000000000..944e13d8d4a Binary files /dev/null and b/tests/packagedcode/data/cargo/binary/cargo_dependencies differ diff --git a/tests/packagedcode/data/plugin/plugins_list_linux.txt b/tests/packagedcode/data/plugin/plugins_list_linux.txt index 45585388487..9468fab2cc4 100755 --- a/tests/packagedcode/data/plugin/plugins_list_linux.txt +++ b/tests/packagedcode/data/plugin/plugins_list_linux.txt @@ -111,6 +111,13 @@ Package type: cargo description: Rust Cargo.toml package manifest path_patterns: '*/Cargo.toml', '*/cargo.toml' -------------------------------------------- +Package type: cargo + datasource_id: rust_binary + documentation URL: https://github.com/rust-secure-code/cargo-auditable/blob/master/PARSING.md + primary language: Rust + description: Rust binary + path_patterns: +-------------------------------------------- Package type: chef datasource_id: chef_cookbook_metadata_json documentation URL: https://docs.chef.io/config_rb_metadata/ diff --git a/tests/packagedcode/test_cargo.py b/tests/packagedcode/test_cargo.py index da13a17c475..b71634aa8a1 100644 --- a/tests/packagedcode/test_cargo.py +++ b/tests/packagedcode/test_cargo.py @@ -155,6 +155,15 @@ def test_scan_works_on_cargo_workspace_boring(self): expected_file, result_file, remove_uuid=True, regen=REGEN_TEST_FIXTURES ) + def test_scan_works_on_rust_binary_with_inspector(self): + test_file = self.get_test_loc('cargo/binary/cargo_dependencies') + expected_file = self.get_test_loc('cargo/binary/cargo-binary.expected.json') + result_file = self.get_temp_file('results.json') + run_scan_click(['--package', test_file, '--json', result_file]) + check_json_scan( + expected_file, result_file, remove_uuid=True, regen=REGEN_TEST_FIXTURES + ) + PERSON_PARSER_TEST_TABLE = [ ('Barney Rubble ', ('Barney Rubble ', '')), diff --git a/tests/scancode/data/help/help_linux.txt b/tests/scancode/data/help/help_linux.txt index 1295e3c4745..a6527a51f3d 100644 --- a/tests/scancode/data/help/help_linux.txt +++ b/tests/scancode/data/help/help_linux.txt @@ -16,6 +16,7 @@ Options: license/copyright detection and top-level package creation. -c, --copyright Scan for copyrights. --go-symbol Collect Go symbols. + --rust-symbol Collect Rust symbols from rust binaries. other scans: -i, --info Scan for file information (size, checksums, etc). diff --git a/tests/scancode/test_cli.py b/tests/scancode/test_cli.py index e537002af6c..c1edea6604a 100644 --- a/tests/scancode/test_cli.py +++ b/tests/scancode/test_cli.py @@ -128,7 +128,7 @@ def test_no_version_check_run_is_successful(): def test_usage_and_help_return_a_correct_script_name_on_all_platforms(): - result = run_scan_click(['--help']) + result = run_scan_click(options=['--help'], test_mode=False, retry=False) assert 'Usage: scancode [OPTIONS]' in result.output # this was showing up on Windows assert 'scancode-script.py' not in result.output