From 831613ceeebde928b535e91292ffc70703ce5c7f Mon Sep 17 00:00:00 2001 From: Rex P <106129829+another-rex@users.noreply.github.com> Date: Fri, 4 Oct 2024 12:53:42 +1000 Subject: [PATCH] refactor: Update test names (#1297) Remove all empty names in our test cases. --- cmd/osv-scanner/__snapshots__/main_test.snap | 678 +++++++++---------- cmd/osv-scanner/main_test.go | 86 +-- 2 files changed, 370 insertions(+), 394 deletions(-) diff --git a/cmd/osv-scanner/__snapshots__/main_test.snap b/cmd/osv-scanner/__snapshots__/main_test.snap index 678befac04..21f5bb443e 100755 --- a/cmd/osv-scanner/__snapshots__/main_test.snap +++ b/cmd/osv-scanner/__snapshots__/main_test.snap @@ -8,28 +8,7 @@ No package sources found, --help for usage information. --- -[TestRun/#01 - 1] -osv-scanner version: 1.9.0 -commit: n/a -built at: n/a - ---- - -[TestRun/#01 - 2] - ---- - -[TestRun/#02 - 1] -Scanning dir ./fixtures/locks-many/not-a-lockfile.toml - ---- - -[TestRun/#02 - 2] -No package sources found, --help for usage information. - ---- - -[TestRun/#03 - 1] +[TestRun/.gitignored_files - 1] Scanning dir ./fixtures/locks-gitignore Scanned /fixtures/locks-gitignore/Gemfile.lock file and found 1 package Scanned /fixtures/locks-gitignore/subdir/yarn.lock file and found 1 package @@ -37,47 +16,7 @@ No issues found --- -[TestRun/#03 - 2] - ---- - -[TestRun/#04 - 1] -Scanning dir ./fixtures/locks-gitignore -Scanned /fixtures/locks-gitignore/Gemfile.lock file and found 1 package -Scanned /fixtures/locks-gitignore/composer.lock file and found 1 package -Scanned /fixtures/locks-gitignore/ignored/Gemfile.lock file and found 1 package -Scanned /fixtures/locks-gitignore/ignored/yarn.lock file and found 1 package -Scanned /fixtures/locks-gitignore/subdir/Gemfile.lock file and found 1 package -Scanned /fixtures/locks-gitignore/subdir/composer.lock file and found 1 package -Scanned /fixtures/locks-gitignore/subdir/yarn.lock file and found 1 package -Scanned /fixtures/locks-gitignore/yarn.lock file and found 1 package -No issues found - ---- - -[TestRun/#04 - 2] - ---- - -[TestRun/#05 - 1] -Scanning dir ./fixtures/locks-many/package-lock.json -Scanned /fixtures/locks-many/package-lock.json file and found 1 package -| OSV URL | CVSS | Ecosystem | Package | Version | Source | -| --- | --- | --- | --- | --- | --- | -| https://osv.dev/GHSA-whgm-jr23-g3j9 | 7.5 | npm | ansi-html | 0.0.1 | fixtures/locks-many/package-lock.json | - ---- - -[TestRun/#05 - 2] - ---- - -[TestRun/#06 - 1] - ---- - -[TestRun/#06 - 2] -unsupported output format "unknown" - must be one of: table, vertical, json, markdown, sarif, gh-annotations, cyclonedx-1-4, cyclonedx-1-5 +[TestRun/.gitignored_files - 2] --- @@ -652,6 +591,24 @@ No issues found --- +[TestRun/ignoring_.gitignore - 1] +Scanning dir ./fixtures/locks-gitignore +Scanned /fixtures/locks-gitignore/Gemfile.lock file and found 1 package +Scanned /fixtures/locks-gitignore/composer.lock file and found 1 package +Scanned /fixtures/locks-gitignore/ignored/Gemfile.lock file and found 1 package +Scanned /fixtures/locks-gitignore/ignored/yarn.lock file and found 1 package +Scanned /fixtures/locks-gitignore/subdir/Gemfile.lock file and found 1 package +Scanned /fixtures/locks-gitignore/subdir/composer.lock file and found 1 package +Scanned /fixtures/locks-gitignore/subdir/yarn.lock file and found 1 package +Scanned /fixtures/locks-gitignore/yarn.lock file and found 1 package +No issues found + +--- + +[TestRun/ignoring_.gitignore - 2] + +--- + [TestRun/invalid_--verbosity_value - 1] --- @@ -769,6 +726,16 @@ Scanned /fixtures/sbom-insecure/alpine.cdx.xml as CycloneDX SBOM and fo --- +[TestRun/one_specific_unsupported_lockfile - 1] +Scanning dir ./fixtures/locks-many/not-a-lockfile.toml + +--- + +[TestRun/one_specific_unsupported_lockfile - 2] +No package sources found, --help for usage information. + +--- + [TestRun/only_the_files_in_the_given_directories_are_checked_by_default_(no_recursion) - 1] Scanning dir ./fixtures/locks-one-with-nested Scanned /fixtures/locks-one-with-nested/yarn.lock file and found 1 package @@ -780,6 +747,28 @@ No issues found --- +[TestRun/output_format:_markdown_table - 1] +Scanning dir ./fixtures/locks-many/package-lock.json +Scanned /fixtures/locks-many/package-lock.json file and found 1 package +| OSV URL | CVSS | Ecosystem | Package | Version | Source | +| --- | --- | --- | --- | --- | --- | +| https://osv.dev/GHSA-whgm-jr23-g3j9 | 7.5 | npm | ansi-html | 0.0.1 | fixtures/locks-many/package-lock.json | + +--- + +[TestRun/output_format:_markdown_table - 2] + +--- + +[TestRun/output_format:_unsupported - 1] + +--- + +[TestRun/output_format:_unsupported - 2] +unsupported output format "unknown" - must be one of: table, vertical, json, markdown, sarif, gh-annotations, cyclonedx-1-4, cyclonedx-1-5 + +--- + [TestRun/requirements.txt_can_have_all_kinds_of_names - 1] Scanning dir ./fixtures/locks-requirements Scanned /fixtures/locks-requirements/my-requirements.txt file and found 1 package @@ -837,6 +826,17 @@ No issues found --- +[TestRun/version - 1] +osv-scanner version: 1.9.0 +commit: n/a +built at: n/a + +--- + +[TestRun/version - 2] + +--- + [TestRunCallAnalysis/Run_with_govulncheck - 1] Scanning dir ./fixtures/call-analysis-go-project Scanned /fixtures/call-analysis-go-project/go.mod file and found 4 packages @@ -1439,7 +1439,195 @@ Scanned /fixtures/locks-many/package-lock.json file and found 1 package --- -[TestRun_LocalDatabases/#00 - 1] +[TestRun_LocalDatabases/.gitignored_files - 1] +Scanning dir ./fixtures/locks-gitignore +Scanned /fixtures/locks-gitignore/Gemfile.lock file and found 1 package +Scanned /fixtures/locks-gitignore/subdir/yarn.lock file and found 1 package +Loaded RubyGems local db from /osv-scanner/RubyGems/all.zip +Loaded npm local db from /osv-scanner/npm/all.zip +No issues found + +--- + +[TestRun_LocalDatabases/.gitignored_files - 2] + +--- + +[TestRun_LocalDatabases/.gitignored_files - 3] +Scanning dir ./fixtures/locks-gitignore +Scanned /fixtures/locks-gitignore/Gemfile.lock file and found 1 package +Scanned /fixtures/locks-gitignore/subdir/yarn.lock file and found 1 package +Loaded RubyGems local db from /osv-scanner/RubyGems/all.zip +Loaded npm local db from /osv-scanner/npm/all.zip +No issues found + +--- + +[TestRun_LocalDatabases/.gitignored_files - 4] + +--- + +[TestRun_LocalDatabases/all_supported_lockfiles_in_the_directory_should_be_checked - 1] +Scanning dir ./fixtures/locks-many +Scanned /fixtures/locks-many/Gemfile.lock file and found 1 package +Scanned /fixtures/locks-many/alpine.cdx.xml as CycloneDX SBOM and found 14 packages +Scanned /fixtures/locks-many/composer.lock file and found 1 package +Scanned /fixtures/locks-many/package-lock.json file and found 1 package +Scanned /fixtures/locks-many/yarn.lock file and found 1 package +Loaded filter from: /fixtures/locks-many/osv-scanner.toml +Loaded RubyGems local db from /osv-scanner/RubyGems/all.zip +Loaded Alpine local db from /osv-scanner/Alpine/all.zip +Loaded Packagist local db from /osv-scanner/Packagist/all.zip +Loaded npm local db from /osv-scanner/npm/all.zip +GHSA-whgm-jr23-g3j9 and 1 alias have been filtered out because: Test manifest file +Filtered 1 vulnerability from output +No issues found + +--- + +[TestRun_LocalDatabases/all_supported_lockfiles_in_the_directory_should_be_checked - 2] + +--- + +[TestRun_LocalDatabases/all_supported_lockfiles_in_the_directory_should_be_checked - 3] +Scanning dir ./fixtures/locks-many +Scanned /fixtures/locks-many/Gemfile.lock file and found 1 package +Scanned /fixtures/locks-many/alpine.cdx.xml as CycloneDX SBOM and found 14 packages +Scanned /fixtures/locks-many/composer.lock file and found 1 package +Scanned /fixtures/locks-many/package-lock.json file and found 1 package +Scanned /fixtures/locks-many/yarn.lock file and found 1 package +Loaded filter from: /fixtures/locks-many/osv-scanner.toml +Loaded RubyGems local db from /osv-scanner/RubyGems/all.zip +Loaded Alpine local db from /osv-scanner/Alpine/all.zip +Loaded Packagist local db from /osv-scanner/Packagist/all.zip +Loaded npm local db from /osv-scanner/npm/all.zip +GHSA-whgm-jr23-g3j9 and 1 alias have been filtered out because: Test manifest file +Filtered 1 vulnerability from output +No issues found + +--- + +[TestRun_LocalDatabases/all_supported_lockfiles_in_the_directory_should_be_checked - 4] + +--- + +[TestRun_LocalDatabases/all_supported_lockfiles_in_the_directory_should_be_checked#01 - 1] +Scanning dir ./fixtures/locks-many-with-invalid +Scanned /fixtures/locks-many-with-invalid/Gemfile.lock file and found 1 package +Scanned /fixtures/locks-many-with-invalid/yarn.lock file and found 1 package +Loaded RubyGems local db from /osv-scanner/RubyGems/all.zip +Loaded npm local db from /osv-scanner/npm/all.zip + +--- + +[TestRun_LocalDatabases/all_supported_lockfiles_in_the_directory_should_be_checked#01 - 2] +Attempted to scan lockfile but failed: /fixtures/locks-many-with-invalid/composer.lock + +--- + +[TestRun_LocalDatabases/all_supported_lockfiles_in_the_directory_should_be_checked#01 - 3] +Scanning dir ./fixtures/locks-many-with-invalid +Scanned /fixtures/locks-many-with-invalid/Gemfile.lock file and found 1 package +Scanned /fixtures/locks-many-with-invalid/yarn.lock file and found 1 package +Loaded RubyGems local db from /osv-scanner/RubyGems/all.zip +Loaded npm local db from /osv-scanner/npm/all.zip + +--- + +[TestRun_LocalDatabases/all_supported_lockfiles_in_the_directory_should_be_checked#01 - 4] +Attempted to scan lockfile but failed: /fixtures/locks-many-with-invalid/composer.lock + +--- + +[TestRun_LocalDatabases/database_should_be_downloaded_only_when_offline_is_set - 1] + +--- + +[TestRun_LocalDatabases/database_should_be_downloaded_only_when_offline_is_set - 2] +databases can only be downloaded when running in offline mode + +--- + +[TestRun_LocalDatabases/database_should_be_downloaded_only_when_offline_is_set - 3] + +--- + +[TestRun_LocalDatabases/database_should_be_downloaded_only_when_offline_is_set - 4] +databases can only be downloaded when running in offline mode + +--- + +[TestRun_LocalDatabases/ignoring_.gitignore - 1] +Scanning dir ./fixtures/locks-gitignore +Scanned /fixtures/locks-gitignore/Gemfile.lock file and found 1 package +Scanned /fixtures/locks-gitignore/composer.lock file and found 1 package +Scanned /fixtures/locks-gitignore/ignored/Gemfile.lock file and found 1 package +Scanned /fixtures/locks-gitignore/ignored/yarn.lock file and found 1 package +Scanned /fixtures/locks-gitignore/subdir/Gemfile.lock file and found 1 package +Scanned /fixtures/locks-gitignore/subdir/composer.lock file and found 1 package +Scanned /fixtures/locks-gitignore/subdir/yarn.lock file and found 1 package +Scanned /fixtures/locks-gitignore/yarn.lock file and found 1 package +Loaded RubyGems local db from /osv-scanner/RubyGems/all.zip +Loaded Packagist local db from /osv-scanner/Packagist/all.zip +Loaded npm local db from /osv-scanner/npm/all.zip +No issues found + +--- + +[TestRun_LocalDatabases/ignoring_.gitignore - 2] + +--- + +[TestRun_LocalDatabases/ignoring_.gitignore - 3] +Scanning dir ./fixtures/locks-gitignore +Scanned /fixtures/locks-gitignore/Gemfile.lock file and found 1 package +Scanned /fixtures/locks-gitignore/composer.lock file and found 1 package +Scanned /fixtures/locks-gitignore/ignored/Gemfile.lock file and found 1 package +Scanned /fixtures/locks-gitignore/ignored/yarn.lock file and found 1 package +Scanned /fixtures/locks-gitignore/subdir/Gemfile.lock file and found 1 package +Scanned /fixtures/locks-gitignore/subdir/composer.lock file and found 1 package +Scanned /fixtures/locks-gitignore/subdir/yarn.lock file and found 1 package +Scanned /fixtures/locks-gitignore/yarn.lock file and found 1 package +Loaded RubyGems local db from /osv-scanner/RubyGems/all.zip +Loaded Packagist local db from /osv-scanner/Packagist/all.zip +Loaded npm local db from /osv-scanner/npm/all.zip +No issues found + +--- + +[TestRun_LocalDatabases/ignoring_.gitignore - 4] + +--- + +[TestRun_LocalDatabases/nested_directories_are_checked_when_`--recursive`_is_passed - 1] +Scanning dir ./fixtures/locks-one-with-nested +Scanned /fixtures/locks-one-with-nested/nested/composer.lock file and found 1 package +Scanned /fixtures/locks-one-with-nested/yarn.lock file and found 1 package +Loaded Packagist local db from /osv-scanner/Packagist/all.zip +Loaded npm local db from /osv-scanner/npm/all.zip +No issues found + +--- + +[TestRun_LocalDatabases/nested_directories_are_checked_when_`--recursive`_is_passed - 2] + +--- + +[TestRun_LocalDatabases/nested_directories_are_checked_when_`--recursive`_is_passed - 3] +Scanning dir ./fixtures/locks-one-with-nested +Scanned /fixtures/locks-one-with-nested/nested/composer.lock file and found 1 package +Scanned /fixtures/locks-one-with-nested/yarn.lock file and found 1 package +Loaded Packagist local db from /osv-scanner/Packagist/all.zip +Loaded npm local db from /osv-scanner/npm/all.zip +No issues found + +--- + +[TestRun_LocalDatabases/nested_directories_are_checked_when_`--recursive`_is_passed - 4] + +--- + +[TestRun_LocalDatabases/one_specific_supported_lockfile - 1] Scanning dir ./fixtures/locks-many/composer.lock Scanned /fixtures/locks-many/composer.lock file and found 1 package Loaded filter from: /fixtures/locks-many/osv-scanner.toml @@ -1448,11 +1636,11 @@ No issues found --- -[TestRun_LocalDatabases/#00 - 2] +[TestRun_LocalDatabases/one_specific_supported_lockfile - 2] --- -[TestRun_LocalDatabases/#00 - 3] +[TestRun_LocalDatabases/one_specific_supported_lockfile - 3] Scanning dir ./fixtures/locks-many/composer.lock Scanned /fixtures/locks-many/composer.lock file and found 1 package Loaded filter from: /fixtures/locks-many/osv-scanner.toml @@ -1461,11 +1649,11 @@ No issues found --- -[TestRun_LocalDatabases/#00 - 4] +[TestRun_LocalDatabases/one_specific_supported_lockfile - 4] --- -[TestRun_LocalDatabases/#01 - 1] +[TestRun_LocalDatabases/one_specific_supported_sbom_with_vulns - 1] Scanning dir ./fixtures/sbom-insecure/postgres-stretch.cdx.xml Scanned /fixtures/sbom-insecure/postgres-stretch.cdx.xml as CycloneDX SBOM and found 136 packages Loaded Debian local db from /osv-scanner/Debian/all.zip @@ -1636,11 +1824,11 @@ Filtered 16 vulnerabilities from output --- -[TestRun_LocalDatabases/#01 - 2] +[TestRun_LocalDatabases/one_specific_supported_sbom_with_vulns - 2] --- -[TestRun_LocalDatabases/#01 - 3] +[TestRun_LocalDatabases/one_specific_supported_sbom_with_vulns - 3] Scanning dir ./fixtures/sbom-insecure/postgres-stretch.cdx.xml Scanned /fixtures/sbom-insecure/postgres-stretch.cdx.xml as CycloneDX SBOM and found 136 packages Loaded Debian local db from /osv-scanner/Debian/all.zip @@ -1811,225 +1999,81 @@ Filtered 16 vulnerabilities from output --- -[TestRun_LocalDatabases/#01 - 4] +[TestRun_LocalDatabases/one_specific_supported_sbom_with_vulns - 4] --- -[TestRun_LocalDatabases/#02 - 1] +[TestRun_LocalDatabases/one_specific_unsupported_lockfile - 1] Scanning dir ./fixtures/locks-many/not-a-lockfile.toml --- -[TestRun_LocalDatabases/#02 - 2] +[TestRun_LocalDatabases/one_specific_unsupported_lockfile - 2] No package sources found, --help for usage information. --- -[TestRun_LocalDatabases/#02 - 3] +[TestRun_LocalDatabases/one_specific_unsupported_lockfile - 3] Scanning dir ./fixtures/locks-many/not-a-lockfile.toml --- -[TestRun_LocalDatabases/#02 - 4] +[TestRun_LocalDatabases/one_specific_unsupported_lockfile - 4] No package sources found, --help for usage information. --- -[TestRun_LocalDatabases/#03 - 1] -Scanning dir ./fixtures/locks-many -Scanned /fixtures/locks-many/Gemfile.lock file and found 1 package -Scanned /fixtures/locks-many/alpine.cdx.xml as CycloneDX SBOM and found 14 packages -Scanned /fixtures/locks-many/composer.lock file and found 1 package -Scanned /fixtures/locks-many/package-lock.json file and found 1 package -Scanned /fixtures/locks-many/yarn.lock file and found 1 package -Loaded filter from: /fixtures/locks-many/osv-scanner.toml -Loaded RubyGems local db from /osv-scanner/RubyGems/all.zip -Loaded Alpine local db from /osv-scanner/Alpine/all.zip -Loaded Packagist local db from /osv-scanner/Packagist/all.zip -Loaded npm local db from /osv-scanner/npm/all.zip -GHSA-whgm-jr23-g3j9 and 1 alias have been filtered out because: Test manifest file -Filtered 1 vulnerability from output -No issues found - ---- - -[TestRun_LocalDatabases/#03 - 2] - ---- - -[TestRun_LocalDatabases/#03 - 3] -Scanning dir ./fixtures/locks-many -Scanned /fixtures/locks-many/Gemfile.lock file and found 1 package -Scanned /fixtures/locks-many/alpine.cdx.xml as CycloneDX SBOM and found 14 packages -Scanned /fixtures/locks-many/composer.lock file and found 1 package -Scanned /fixtures/locks-many/package-lock.json file and found 1 package -Scanned /fixtures/locks-many/yarn.lock file and found 1 package -Loaded filter from: /fixtures/locks-many/osv-scanner.toml -Loaded RubyGems local db from /osv-scanner/RubyGems/all.zip -Loaded Alpine local db from /osv-scanner/Alpine/all.zip -Loaded Packagist local db from /osv-scanner/Packagist/all.zip -Loaded npm local db from /osv-scanner/npm/all.zip -GHSA-whgm-jr23-g3j9 and 1 alias have been filtered out because: Test manifest file -Filtered 1 vulnerability from output -No issues found - ---- - -[TestRun_LocalDatabases/#03 - 4] - ---- - -[TestRun_LocalDatabases/#04 - 1] -Scanning dir ./fixtures/locks-many-with-invalid -Scanned /fixtures/locks-many-with-invalid/Gemfile.lock file and found 1 package -Scanned /fixtures/locks-many-with-invalid/yarn.lock file and found 1 package -Loaded RubyGems local db from /osv-scanner/RubyGems/all.zip -Loaded npm local db from /osv-scanner/npm/all.zip - ---- - -[TestRun_LocalDatabases/#04 - 2] -Attempted to scan lockfile but failed: /fixtures/locks-many-with-invalid/composer.lock - ---- - -[TestRun_LocalDatabases/#04 - 3] -Scanning dir ./fixtures/locks-many-with-invalid -Scanned /fixtures/locks-many-with-invalid/Gemfile.lock file and found 1 package -Scanned /fixtures/locks-many-with-invalid/yarn.lock file and found 1 package -Loaded RubyGems local db from /osv-scanner/RubyGems/all.zip -Loaded npm local db from /osv-scanner/npm/all.zip - ---- - -[TestRun_LocalDatabases/#04 - 4] -Attempted to scan lockfile but failed: /fixtures/locks-many-with-invalid/composer.lock - ---- - -[TestRun_LocalDatabases/#05 - 1] -Scanning dir ./fixtures/locks-one-with-nested -Scanned /fixtures/locks-one-with-nested/yarn.lock file and found 1 package -Loaded npm local db from /osv-scanner/npm/all.zip -No issues found - ---- - -[TestRun_LocalDatabases/#05 - 2] - ---- - -[TestRun_LocalDatabases/#05 - 3] -Scanning dir ./fixtures/locks-one-with-nested -Scanned /fixtures/locks-one-with-nested/yarn.lock file and found 1 package -Loaded npm local db from /osv-scanner/npm/all.zip -No issues found - ---- - -[TestRun_LocalDatabases/#05 - 4] - ---- - -[TestRun_LocalDatabases/#06 - 1] +[TestRun_LocalDatabases/only_the_files_in_the_given_directories_are_checked_by_default_(no_recursion) - 1] Scanning dir ./fixtures/locks-one-with-nested -Scanned /fixtures/locks-one-with-nested/nested/composer.lock file and found 1 package Scanned /fixtures/locks-one-with-nested/yarn.lock file and found 1 package -Loaded Packagist local db from /osv-scanner/Packagist/all.zip Loaded npm local db from /osv-scanner/npm/all.zip No issues found --- -[TestRun_LocalDatabases/#06 - 2] +[TestRun_LocalDatabases/only_the_files_in_the_given_directories_are_checked_by_default_(no_recursion) - 2] --- -[TestRun_LocalDatabases/#06 - 3] +[TestRun_LocalDatabases/only_the_files_in_the_given_directories_are_checked_by_default_(no_recursion) - 3] Scanning dir ./fixtures/locks-one-with-nested -Scanned /fixtures/locks-one-with-nested/nested/composer.lock file and found 1 package Scanned /fixtures/locks-one-with-nested/yarn.lock file and found 1 package -Loaded Packagist local db from /osv-scanner/Packagist/all.zip Loaded npm local db from /osv-scanner/npm/all.zip No issues found --- -[TestRun_LocalDatabases/#06 - 4] +[TestRun_LocalDatabases/only_the_files_in_the_given_directories_are_checked_by_default_(no_recursion) - 4] --- -[TestRun_LocalDatabases/#07 - 1] -Scanning dir ./fixtures/locks-gitignore -Scanned /fixtures/locks-gitignore/Gemfile.lock file and found 1 package -Scanned /fixtures/locks-gitignore/subdir/yarn.lock file and found 1 package -Loaded RubyGems local db from /osv-scanner/RubyGems/all.zip -Loaded npm local db from /osv-scanner/npm/all.zip -No issues found - ---- - -[TestRun_LocalDatabases/#07 - 2] - ---- - -[TestRun_LocalDatabases/#07 - 3] -Scanning dir ./fixtures/locks-gitignore -Scanned /fixtures/locks-gitignore/Gemfile.lock file and found 1 package -Scanned /fixtures/locks-gitignore/subdir/yarn.lock file and found 1 package -Loaded RubyGems local db from /osv-scanner/RubyGems/all.zip -Loaded npm local db from /osv-scanner/npm/all.zip -No issues found - ---- - -[TestRun_LocalDatabases/#07 - 4] - ---- - -[TestRun_LocalDatabases/#08 - 1] -Scanning dir ./fixtures/locks-gitignore -Scanned /fixtures/locks-gitignore/Gemfile.lock file and found 1 package -Scanned /fixtures/locks-gitignore/composer.lock file and found 1 package -Scanned /fixtures/locks-gitignore/ignored/Gemfile.lock file and found 1 package -Scanned /fixtures/locks-gitignore/ignored/yarn.lock file and found 1 package -Scanned /fixtures/locks-gitignore/subdir/Gemfile.lock file and found 1 package -Scanned /fixtures/locks-gitignore/subdir/composer.lock file and found 1 package -Scanned /fixtures/locks-gitignore/subdir/yarn.lock file and found 1 package -Scanned /fixtures/locks-gitignore/yarn.lock file and found 1 package -Loaded RubyGems local db from /osv-scanner/RubyGems/all.zip +[TestRun_LocalDatabases/output_format:_markdown_table - 1] +Scanning dir ./fixtures/locks-many/composer.lock +Scanned /fixtures/locks-many/composer.lock file and found 1 package +Loaded filter from: /fixtures/locks-many/osv-scanner.toml Loaded Packagist local db from /osv-scanner/Packagist/all.zip -Loaded npm local db from /osv-scanner/npm/all.zip No issues found --- -[TestRun_LocalDatabases/#08 - 2] +[TestRun_LocalDatabases/output_format:_markdown_table - 2] --- -[TestRun_LocalDatabases/#08 - 3] -Scanning dir ./fixtures/locks-gitignore -Scanned /fixtures/locks-gitignore/Gemfile.lock file and found 1 package -Scanned /fixtures/locks-gitignore/composer.lock file and found 1 package -Scanned /fixtures/locks-gitignore/ignored/Gemfile.lock file and found 1 package -Scanned /fixtures/locks-gitignore/ignored/yarn.lock file and found 1 package -Scanned /fixtures/locks-gitignore/subdir/Gemfile.lock file and found 1 package -Scanned /fixtures/locks-gitignore/subdir/composer.lock file and found 1 package -Scanned /fixtures/locks-gitignore/subdir/yarn.lock file and found 1 package -Scanned /fixtures/locks-gitignore/yarn.lock file and found 1 package -Loaded RubyGems local db from /osv-scanner/RubyGems/all.zip +[TestRun_LocalDatabases/output_format:_markdown_table - 3] +Scanning dir ./fixtures/locks-many/composer.lock +Scanned /fixtures/locks-many/composer.lock file and found 1 package +Loaded filter from: /fixtures/locks-many/osv-scanner.toml Loaded Packagist local db from /osv-scanner/Packagist/all.zip -Loaded npm local db from /osv-scanner/npm/all.zip No issues found --- -[TestRun_LocalDatabases/#08 - 4] +[TestRun_LocalDatabases/output_format:_markdown_table - 4] --- -[TestRun_LocalDatabases/#09 - 1] +[TestRun_LocalDatabases/output_with_json - 1] { "results": [], "experimental_config": { @@ -2042,7 +2086,7 @@ No issues found --- -[TestRun_LocalDatabases/#09 - 2] +[TestRun_LocalDatabases/output_with_json - 2] Scanning dir ./fixtures/locks-many/composer.lock Scanned /fixtures/locks-many/composer.lock file and found 1 package Loaded filter from: /fixtures/locks-many/osv-scanner.toml @@ -2050,7 +2094,7 @@ Loaded Packagist local db from /osv-scanner/Packagist/all.zip --- -[TestRun_LocalDatabases/#09 - 3] +[TestRun_LocalDatabases/output_with_json - 3] { "results": [], "experimental_config": { @@ -2063,7 +2107,7 @@ Loaded Packagist local db from /osv-scanner/Packagist/all.zip --- -[TestRun_LocalDatabases/#09 - 4] +[TestRun_LocalDatabases/output_with_json - 4] Scanning dir ./fixtures/locks-many/composer.lock Scanned /fixtures/locks-many/composer.lock file and found 1 package Loaded filter from: /fixtures/locks-many/osv-scanner.toml @@ -2071,7 +2115,7 @@ Loaded Packagist local db from /osv-scanner/Packagist/all.zip --- -[TestRun_LocalDatabases/#10 - 1] +[TestRun_LocalDatabases/output_with_json#01 - 1] { "results": [], "experimental_config": { @@ -2084,7 +2128,7 @@ Loaded Packagist local db from /osv-scanner/Packagist/all.zip --- -[TestRun_LocalDatabases/#10 - 2] +[TestRun_LocalDatabases/output_with_json#01 - 2] Scanning dir ./fixtures/locks-many/composer.lock Scanned /fixtures/locks-many/composer.lock file and found 1 package Loaded filter from: /fixtures/locks-many/osv-scanner.toml @@ -2092,7 +2136,7 @@ Loaded Packagist local db from /osv-scanner/Packagist/all.zip --- -[TestRun_LocalDatabases/#10 - 3] +[TestRun_LocalDatabases/output_with_json#01 - 3] { "results": [], "experimental_config": { @@ -2105,59 +2149,15 @@ Loaded Packagist local db from /osv-scanner/Packagist/all.zip --- -[TestRun_LocalDatabases/#10 - 4] -Scanning dir ./fixtures/locks-many/composer.lock -Scanned /fixtures/locks-many/composer.lock file and found 1 package -Loaded filter from: /fixtures/locks-many/osv-scanner.toml -Loaded Packagist local db from /osv-scanner/Packagist/all.zip - ---- - -[TestRun_LocalDatabases/#11 - 1] +[TestRun_LocalDatabases/output_with_json#01 - 4] Scanning dir ./fixtures/locks-many/composer.lock Scanned /fixtures/locks-many/composer.lock file and found 1 package Loaded filter from: /fixtures/locks-many/osv-scanner.toml Loaded Packagist local db from /osv-scanner/Packagist/all.zip -No issues found - ---- - -[TestRun_LocalDatabases/#11 - 2] - ---- - -[TestRun_LocalDatabases/#11 - 3] -Scanning dir ./fixtures/locks-many/composer.lock -Scanned /fixtures/locks-many/composer.lock file and found 1 package -Loaded filter from: /fixtures/locks-many/osv-scanner.toml -Loaded Packagist local db from /osv-scanner/Packagist/all.zip -No issues found - ---- - -[TestRun_LocalDatabases/#11 - 4] - ---- - -[TestRun_LocalDatabases/#12 - 1] - ---- - -[TestRun_LocalDatabases/#12 - 2] -databases can only be downloaded when running in offline mode - ---- - -[TestRun_LocalDatabases/#12 - 3] - ---- - -[TestRun_LocalDatabases/#12 - 4] -databases can only be downloaded when running in offline mode --- -[TestRun_LocalDatabases_AlwaysOffline/#00 - 1] +[TestRun_LocalDatabases_AlwaysOffline/a_bunch_of_different_lockfiles_and_ecosystem - 1] Scanning dir ./fixtures/locks-requirements Scanned /fixtures/locks-requirements/my-requirements.txt file and found 1 package Scanned /fixtures/locks-requirements/requirements-dev.txt file and found 1 package @@ -2173,12 +2173,12 @@ Scanned /fixtures/locks-many/yarn.lock file and found 1 package --- -[TestRun_LocalDatabases_AlwaysOffline/#00 - 2] +[TestRun_LocalDatabases_AlwaysOffline/a_bunch_of_different_lockfiles_and_ecosystem - 2] could not find local databases for ecosystems: Alpine, Packagist, PyPI, RubyGems, npm --- -[TestRun_LocalDatabases_AlwaysOffline/#00 - 3] +[TestRun_LocalDatabases_AlwaysOffline/a_bunch_of_different_lockfiles_and_ecosystem - 3] Scanning dir ./fixtures/locks-requirements Scanned /fixtures/locks-requirements/my-requirements.txt file and found 1 package Scanned /fixtures/locks-requirements/requirements-dev.txt file and found 1 package @@ -2194,67 +2194,72 @@ Scanned /fixtures/locks-many/yarn.lock file and found 1 package --- -[TestRun_LocalDatabases_AlwaysOffline/#00 - 4] +[TestRun_LocalDatabases_AlwaysOffline/a_bunch_of_different_lockfiles_and_ecosystem - 4] could not find local databases for ecosystems: Alpine, Packagist, PyPI, RubyGems, npm --- -[TestRun_LockfileWithExplicitParseAs/#00 - 1] +[TestRun_LockfileWithExplicitParseAs/"apk-installed"_is_supported - 1] +Scanned /fixtures/locks-many/installed file as a apk-installed and found 1 package +Loaded filter from: /fixtures/locks-many/osv-scanner.toml +No issues found + +--- + +[TestRun_LockfileWithExplicitParseAs/"apk-installed"_is_supported - 2] --- -[TestRun_LockfileWithExplicitParseAs/#00 - 2] -could not determine extractor, requested my-file +[TestRun_LockfileWithExplicitParseAs/"dpkg-status"_is_supported - 1] +Scanned /fixtures/locks-many/status file as a dpkg-status and found 1 package +Loaded filter from: /fixtures/locks-many/osv-scanner.toml +No issues found --- -[TestRun_LockfileWithExplicitParseAs/#01 - 1] +[TestRun_LockfileWithExplicitParseAs/"dpkg-status"_is_supported - 2] + +--- + +[TestRun_LockfileWithExplicitParseAs/empty_is_default - 1] Scanned /fixtures/locks-many/composer.lock file and found 1 package Loaded filter from: /fixtures/locks-many/osv-scanner.toml No issues found --- -[TestRun_LockfileWithExplicitParseAs/#01 - 2] +[TestRun_LockfileWithExplicitParseAs/empty_is_default - 2] --- -[TestRun_LockfileWithExplicitParseAs/#02 - 1] +[TestRun_LockfileWithExplicitParseAs/empty_works_as_an_escape_(no_fixture_because_it's_not_valid_on_Windows) - 1] --- -[TestRun_LockfileWithExplicitParseAs/#02 - 2] +[TestRun_LockfileWithExplicitParseAs/empty_works_as_an_escape_(no_fixture_because_it's_not_valid_on_Windows) - 2] open /path/to/my:file: no such file or directory --- -[TestRun_LockfileWithExplicitParseAs/#03 - 1] +[TestRun_LockfileWithExplicitParseAs/empty_works_as_an_escape_(no_fixture_because_it's_not_valid_on_Windows)#01 - 1] --- -[TestRun_LockfileWithExplicitParseAs/#03 - 2] +[TestRun_LockfileWithExplicitParseAs/empty_works_as_an_escape_(no_fixture_because_it's_not_valid_on_Windows)#01 - 2] open /path/to/my:project/package-lock.json: no such file or directory --- -[TestRun_LockfileWithExplicitParseAs/#04 - 1] -Scanned /fixtures/locks-insecure/my-package-lock.json file as a package-lock.json and found 1 package -Scanning dir ./fixtures/locks-insecure -Scanned /fixtures/locks-insecure/composer.lock file and found 1 package -+-------------------------------------+------+-----------+------------------+---------+----------------------------------------------+ -| OSV URL | CVSS | ECOSYSTEM | PACKAGE | VERSION | SOURCE | -+-------------------------------------+------+-----------+------------------+---------+----------------------------------------------+ -| https://osv.dev/GHSA-9f46-5r25-5wfm | 9.8 | Packagist | league/flysystem | 1.0.8 | fixtures/locks-insecure/composer.lock | -| https://osv.dev/GHSA-whgm-jr23-g3j9 | 7.5 | npm | ansi-html | 0.0.1 | fixtures/locks-insecure/my-package-lock.json | -+-------------------------------------+------+-----------+------------------+---------+----------------------------------------------+ +[TestRun_LockfileWithExplicitParseAs/files_that_error_on_parsing_stop_parsable_files_from_being_checked - 1] --- -[TestRun_LockfileWithExplicitParseAs/#04 - 2] +[TestRun_LockfileWithExplicitParseAs/files_that_error_on_parsing_stop_parsable_files_from_being_checked - 2] +(extracting as Cargo.lock) could not extract from /fixtures/locks-insecure/my-package-lock.json: toml: line 1: expected '.' or '=', but got '{' instead --- -[TestRun_LockfileWithExplicitParseAs/#05 - 1] +[TestRun_LockfileWithExplicitParseAs/multiple,_+_output_order_is_deterministic - 1] Scanned /fixtures/locks-insecure/my-package-lock.json file as a package-lock.json and found 1 package Scanned /fixtures/locks-insecure/my-yarn.lock file as a yarn.lock and found 1 package Scanning dir ./fixtures/locks-insecure @@ -2269,11 +2274,11 @@ Scanned /fixtures/locks-insecure/composer.lock file and found 1 package --- -[TestRun_LockfileWithExplicitParseAs/#05 - 2] +[TestRun_LockfileWithExplicitParseAs/multiple,_+_output_order_is_deterministic - 2] --- -[TestRun_LockfileWithExplicitParseAs/#06 - 1] +[TestRun_LockfileWithExplicitParseAs/multiple,_+_output_order_is_deterministic_2 - 1] Scanned /fixtures/locks-insecure/my-yarn.lock file as a yarn.lock and found 1 package Scanned /fixtures/locks-insecure/my-package-lock.json file as a package-lock.json and found 1 package Scanning dir ./fixtures/locks-insecure @@ -2288,58 +2293,53 @@ Scanned /fixtures/locks-insecure/composer.lock file and found 1 package --- -[TestRun_LockfileWithExplicitParseAs/#06 - 2] +[TestRun_LockfileWithExplicitParseAs/multiple,_+_output_order_is_deterministic_2 - 2] --- -[TestRun_LockfileWithExplicitParseAs/#07 - 1] +[TestRun_LockfileWithExplicitParseAs/one_lockfile_with_local_path - 1] +Scanned /fixtures/locks-many/replace-local.mod file as a go.mod and found 1 package +Filtered 1 local package/s from the scan. +No issues found --- -[TestRun_LockfileWithExplicitParseAs/#07 - 2] -(extracting as Cargo.lock) could not extract from /fixtures/locks-insecure/my-package-lock.json: toml: line 1: expected '.' or '=', but got '{' instead +[TestRun_LockfileWithExplicitParseAs/one_lockfile_with_local_path - 2] --- -[TestRun_LockfileWithExplicitParseAs/#08 - 1] +[TestRun_LockfileWithExplicitParseAs/parse-as_takes_priority,_even_if_it's_wrong - 1] --- -[TestRun_LockfileWithExplicitParseAs/#08 - 2] +[TestRun_LockfileWithExplicitParseAs/parse-as_takes_priority,_even_if_it's_wrong - 2] (extracting as package-lock.json) could not extract from /fixtures/locks-many/yarn.lock: invalid character '#' looking for beginning of value --- -[TestRun_LockfileWithExplicitParseAs/#09 - 1] -Scanned /fixtures/locks-many/installed file as a apk-installed and found 1 package -Loaded filter from: /fixtures/locks-many/osv-scanner.toml -No issues found - ---- - -[TestRun_LockfileWithExplicitParseAs/#09 - 2] - ---- - -[TestRun_LockfileWithExplicitParseAs/#10 - 1] -Scanned /fixtures/locks-many/status file as a dpkg-status and found 1 package -Loaded filter from: /fixtures/locks-many/osv-scanner.toml -No issues found +[TestRun_LockfileWithExplicitParseAs/unsupported_parse-as - 1] --- -[TestRun_LockfileWithExplicitParseAs/#10 - 2] +[TestRun_LockfileWithExplicitParseAs/unsupported_parse-as - 2] +could not determine extractor, requested my-file --- -[TestRun_LockfileWithExplicitParseAs/one_lockfile_with_local_path - 1] -Scanned /fixtures/locks-many/replace-local.mod file as a go.mod and found 1 package -Filtered 1 local package/s from the scan. -No issues found +[TestRun_LockfileWithExplicitParseAs/when_an_explicit_parse-as_is_given,_it's_applied_to_that_file - 1] +Scanned /fixtures/locks-insecure/my-package-lock.json file as a package-lock.json and found 1 package +Scanning dir ./fixtures/locks-insecure +Scanned /fixtures/locks-insecure/composer.lock file and found 1 package ++-------------------------------------+------+-----------+------------------+---------+----------------------------------------------+ +| OSV URL | CVSS | ECOSYSTEM | PACKAGE | VERSION | SOURCE | ++-------------------------------------+------+-----------+------------------+---------+----------------------------------------------+ +| https://osv.dev/GHSA-9f46-5r25-5wfm | 9.8 | Packagist | league/flysystem | 1.0.8 | fixtures/locks-insecure/composer.lock | +| https://osv.dev/GHSA-whgm-jr23-g3j9 | 7.5 | npm | ansi-html | 0.0.1 | fixtures/locks-insecure/my-package-lock.json | ++-------------------------------------+------+-----------+------------------+---------+----------------------------------------------+ --- -[TestRun_LockfileWithExplicitParseAs/one_lockfile_with_local_path - 2] +[TestRun_LockfileWithExplicitParseAs/when_an_explicit_parse-as_is_given,_it's_applied_to_that_file - 2] --- diff --git a/cmd/osv-scanner/main_test.go b/cmd/osv-scanner/main_test.go index 711e036d88..b02b69070c 100644 --- a/cmd/osv-scanner/main_test.go +++ b/cmd/osv-scanner/main_test.go @@ -144,7 +144,7 @@ func TestRun(t *testing.T) { exit: 128, }, { - name: "", + name: "version", args: []string{"", "--version"}, exit: 0, }, @@ -172,9 +172,8 @@ func TestRun(t *testing.T) { args: []string{"", "--config=./fixtures/osv-scanner-empty-config.toml", "--sbom", "./fixtures/sbom-insecure/bad-purls.cdx.xml"}, exit: 0, }, - // one specific unsupported lockfile { - name: "", + name: "one specific unsupported lockfile", args: []string{"", "./fixtures/locks-many/not-a-lockfile.toml"}, exit: 128, }, @@ -204,13 +203,13 @@ func TestRun(t *testing.T) { }, // .gitignored files { - name: "", + name: ".gitignored files", args: []string{"", "--recursive", "./fixtures/locks-gitignore"}, exit: 0, }, // ignoring .gitignore { - name: "", + name: "ignoring .gitignore", args: []string{"", "--recursive", "--no-ignore", "./fixtures/locks-gitignore"}, exit: 0, }, @@ -249,7 +248,7 @@ func TestRun(t *testing.T) { }, // output format: markdown table { - name: "", + name: "output format: markdown table", args: []string{"", "--format", "markdown", "--config", "./fixtures/osv-scanner-empty-config.toml", "./fixtures/locks-many/package-lock.json"}, exit: 1, }, @@ -277,7 +276,7 @@ func TestRun(t *testing.T) { }, // output format: unsupported { - name: "", + name: "output format: unsupported", args: []string{"", "--format", "unknown", "./fixtures/locks-many/composer.lock"}, exit: 127, }, @@ -398,15 +397,13 @@ func TestRun_LockfileWithExplicitParseAs(t *testing.T) { t.Parallel() tests := []cliTestCase{ - // unsupported parse-as { - name: "", + name: "unsupported parse-as", args: []string{"", "-L", "my-file:./fixtures/locks-many/composer.lock"}, exit: 127, }, - // empty is default { - name: "", + name: "empty is default", args: []string{ "", "-L", @@ -414,9 +411,8 @@ func TestRun_LockfileWithExplicitParseAs(t *testing.T) { }, exit: 0, }, - // empty works as an escape (no fixture because it's not valid on Windows) { - name: "", + name: "empty works as an escape (no fixture because it's not valid on Windows)", args: []string{ "", "-L", @@ -425,7 +421,7 @@ func TestRun_LockfileWithExplicitParseAs(t *testing.T) { exit: 127, }, { - name: "", + name: "empty works as an escape (no fixture because it's not valid on Windows)", args: []string{ "", "-L", @@ -433,15 +429,13 @@ func TestRun_LockfileWithExplicitParseAs(t *testing.T) { }, exit: 127, }, - // one lockfile with local path { name: "one lockfile with local path", args: []string{"", "--lockfile=go.mod:./fixtures/locks-many/replace-local.mod"}, exit: 0, }, - // when an explicit parse-as is given, it's applied to that file { - name: "", + name: "when an explicit parse-as is given, it's applied to that file", args: []string{ "", "--config=./fixtures/osv-scanner-empty-config.toml", @@ -451,9 +445,8 @@ func TestRun_LockfileWithExplicitParseAs(t *testing.T) { }, exit: 1, }, - // multiple, + output order is deterministic { - name: "", + name: "multiple, + output order is deterministic", args: []string{ "", "--config=./fixtures/osv-scanner-empty-config.toml", @@ -464,7 +457,7 @@ func TestRun_LockfileWithExplicitParseAs(t *testing.T) { exit: 1, }, { - name: "", + name: "multiple, + output order is deterministic 2", args: []string{ "", "--config=./fixtures/osv-scanner-empty-config.toml", @@ -474,9 +467,8 @@ func TestRun_LockfileWithExplicitParseAs(t *testing.T) { }, exit: 1, }, - // files that error on parsing stop parsable files from being checked { - name: "", + name: "files that error on parsing stop parsable files from being checked", args: []string{ "", "-L", @@ -486,9 +478,8 @@ func TestRun_LockfileWithExplicitParseAs(t *testing.T) { }, exit: 127, }, - // parse-as takes priority, even if it's wrong { - name: "", + name: "parse-as takes priority, even if it's wrong", args: []string{ "", "-L", @@ -496,9 +487,8 @@ func TestRun_LockfileWithExplicitParseAs(t *testing.T) { }, exit: 127, }, - // "apk-installed" is supported { - name: "", + name: "\"apk-installed\" is supported", args: []string{ "", "-L", @@ -506,9 +496,8 @@ func TestRun_LockfileWithExplicitParseAs(t *testing.T) { }, exit: 0, }, - // "dpkg-status" is supported { - name: "", + name: "\"dpkg-status\" is supported", args: []string{ "", "-L", @@ -555,80 +544,68 @@ func TestRun_LocalDatabases(t *testing.T) { t.Parallel() tests := []cliTestCase{ - // one specific supported lockfile { - name: "", + name: "one specific supported lockfile", args: []string{"", "--experimental-offline", "--experimental-download-offline-databases", "./fixtures/locks-many/composer.lock"}, exit: 0, }, - // one specific supported sbom with vulns { - name: "", + name: "one specific supported sbom with vulns", args: []string{"", "--experimental-offline", "--experimental-download-offline-databases", "--config=./fixtures/osv-scanner-empty-config.toml", "./fixtures/sbom-insecure/postgres-stretch.cdx.xml"}, exit: 1, }, - // one specific unsupported lockfile { - name: "", + name: "one specific unsupported lockfile", args: []string{"", "--experimental-offline", "--experimental-download-offline-databases", "./fixtures/locks-many/not-a-lockfile.toml"}, exit: 128, }, - // all supported lockfiles in the directory should be checked { - name: "", + name: "all supported lockfiles in the directory should be checked", args: []string{"", "--experimental-offline", "--experimental-download-offline-databases", "./fixtures/locks-many"}, exit: 0, }, - // all supported lockfiles in the directory should be checked { - name: "", + name: "all supported lockfiles in the directory should be checked", args: []string{"", "--experimental-offline", "--experimental-download-offline-databases", "./fixtures/locks-many-with-invalid"}, exit: 127, }, - // only the files in the given directories are checked by default (no recursion) { - name: "", + name: "only the files in the given directories are checked by default (no recursion)", args: []string{"", "--experimental-offline", "--experimental-download-offline-databases", "./fixtures/locks-one-with-nested"}, exit: 0, }, - // nested directories are checked when `--recursive` is passed { - name: "", + name: "nested directories are checked when `--recursive` is passed", args: []string{"", "--experimental-offline", "--experimental-download-offline-databases", "--recursive", "./fixtures/locks-one-with-nested"}, exit: 0, }, - // .gitignored files { - name: "", + name: ".gitignored files", args: []string{"", "--experimental-offline", "--experimental-download-offline-databases", "--recursive", "./fixtures/locks-gitignore"}, exit: 0, }, - // ignoring .gitignore { - name: "", + name: "ignoring .gitignore", args: []string{"", "--experimental-offline", "--experimental-download-offline-databases", "--recursive", "--no-ignore", "./fixtures/locks-gitignore"}, exit: 0, }, - // output with json { - name: "", + name: "output with json", args: []string{"", "--experimental-offline", "--experimental-download-offline-databases", "--json", "./fixtures/locks-many/composer.lock"}, exit: 0, }, { - name: "", + name: "output with json", args: []string{"", "--experimental-offline", "--experimental-download-offline-databases", "--format", "json", "./fixtures/locks-many/composer.lock"}, exit: 0, }, - // output format: markdown table { - name: "", + name: "output format: markdown table", args: []string{"", "--experimental-offline", "--experimental-download-offline-databases", "--format", "markdown", "./fixtures/locks-many/composer.lock"}, exit: 0, }, - // database should be downloaded only when offline is set { - name: "", + name: "database should be downloaded only when offline is set", args: []string{"", "--experimental-download-offline-databases", "./fixtures/locks-many"}, exit: 127, }, @@ -657,9 +634,8 @@ func TestRun_LocalDatabases_AlwaysOffline(t *testing.T) { t.Parallel() tests := []cliTestCase{ - // a bunch of different lockfiles and ecosystem { - name: "", + name: "a bunch of different lockfiles and ecosystem", args: []string{"", "--config=./fixtures/osv-scanner-empty-config.toml", "--experimental-offline", "./fixtures/locks-requirements", "./fixtures/locks-many"}, exit: 127, },