Skip to content

Commit f945d21

Browse files
committed
test: update snapshots
1 parent c51e81c commit f945d21

7 files changed

Lines changed: 120 additions & 25 deletions

File tree

cmd/osv-scanner/scan/image/__snapshots__/command_test.snap

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,6 +1202,34 @@ You can also view the full vulnerability list in your terminal with: `osv-scanne
12021202
12031203
---
12041204
1205+
[TestCommand_OCIImage/scanning_ubuntu_image_with_homebrew_extractor - 1]
1206+
Scanning local image tarball "./testdata/test-ubuntu-homebrew.tar"
1207+
skipping file "home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core/.git/objects/pack/pack-e9e01e0d000c8cde5a2151a6c277c318dda8a828.pack" because its size (1157852163 bytes) is larger than the max size (1073741824 bytes)
1208+
1209+
1210+
Container Scanning Result (Ubuntu 22.04.5 LTS):
1211+
Total 1 package affected by 3 known vulnerabilities (1 Critical, 1 High, 1 Medium, 0 Low, 0 Unknown) from 1 ecosystem.
1212+
0 vulnerabilities can be fixed.
1213+
1214+
1215+
GIT
1216+
+------------------------------------------------------------------------------------------------------------------------------------------------------+
1217+
| Source:os:/home/linuxbrew/.linuxbrew/Cellar/cjson/1.7.17/INSTALL_RECEIPT.json |
1218+
+-------------------------------------+-------------------+------------------+------------+-------------------------+------------------+---------------+
1219+
| SOURCE PACKAGE | INSTALLED VERSION | FIX AVAILABLE | VULN COUNT | BINARY PACKAGES (COUNT) | INTRODUCED LAYER | IN BASE IMAGE |
1220+
+-------------------------------------+-------------------+------------------+------------+-------------------------+------------------+---------------+
1221+
| https://github.com/DaveGamble/cJSON | 1.7.17 | No fix available | 3 | | # 19 Layer | -- |
1222+
+-------------------------------------+-------------------+------------------+------------+-------------------------+------------------+---------------+
1223+
1224+
For the most comprehensive scan results, we recommend using the HTML output: `osv-scanner scan image --serve <image_name>`.
1225+
You can also view the full vulnerability list in your terminal with: `osv-scanner scan image --format vertical <image_name>`.
1226+
1227+
---
1228+
1229+
[TestCommand_OCIImage/scanning_ubuntu_image_with_homebrew_extractor - 2]
1230+
1231+
---
1232+
12051233
[TestCommand_OCIImage_JSONFormat/Scanning_python_image_with_some_packages - 1]
12061234
{
12071235
"results": [

cmd/osv-scanner/scan/image/command_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ func TestCommand_OCIImage(t *testing.T) {
358358
"", "image",
359359
"--experimental-plugins", "os/homebrew",
360360
"--experimental-plugins", "misc/brew-source",
361-
"--experimental-disable-plugins",
361+
"--experimental-no-default-plugins",
362362
"--archive", "./testdata/test-ubuntu-homebrew.tar",
363363
},
364364
Exit: 1,

cmd/osv-scanner/scan/image/testdata/cassettes/TestCommand_OCIImage.yaml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15602,3 +15602,62 @@ interactions:
1560215602
status: 200 OK
1560315603
code: 200
1560415604
duration: 0s
15605+
- request:
15606+
proto: HTTP/1.1
15607+
proto_major: 1
15608+
proto_minor: 1
15609+
content_length: 171
15610+
host: api.osv.dev
15611+
body: |
15612+
{
15613+
"queries": [
15614+
{
15615+
"package": {
15616+
"ecosystem": "GIT",
15617+
"name": "https://github.com/davegamble/cjson"
15618+
},
15619+
"version": "1.7.17"
15620+
}
15621+
]
15622+
}
15623+
headers:
15624+
Content-Type:
15625+
- application/json
15626+
X-Test-Name:
15627+
- TestCommand_OCIImage/scanning_ubuntu_image_with_homebrew_extractor
15628+
url: https://api.osv.dev/v1/querybatch
15629+
method: POST
15630+
response:
15631+
proto: HTTP/1.1
15632+
proto_major: 1
15633+
proto_minor: 1
15634+
content_length: 220
15635+
body: |
15636+
{
15637+
"results": [
15638+
{
15639+
"vulns": [
15640+
{
15641+
"id": "CVE-2023-53154",
15642+
"modified": "2026-03-14T12:23:16.581554Z"
15643+
},
15644+
{
15645+
"id": "CVE-2024-31755",
15646+
"modified": "2026-03-14T12:30:30.932017Z"
15647+
},
15648+
{
15649+
"id": "CVE-2025-57052",
15650+
"modified": "2026-03-23T05:11:28.908372Z"
15651+
}
15652+
]
15653+
}
15654+
]
15655+
}
15656+
headers:
15657+
Content-Length:
15658+
- "220"
15659+
Content-Type:
15660+
- application/json
15661+
status: 200 OK
15662+
code: 200
15663+
duration: 0s

cmd/osv-scanner/scan/source/__snapshots__/command_test.snap

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -516,9 +516,9 @@ Total 6 packages affected by 10 known vulnerabilities (2 Critical, 2 High, 2 Med
516516
| 0BSD | Packagist | league/flysystem | 1.0.8 | testdata/locks-insecure/composer.lock |
517517
| UNKNOWN | Go | stdlib | 1.99.9 | testdata/locks-insecure/osv-scanner-custom.json |
518518
| UNKNOWN | Go | toolchain | 1.99.9 | testdata/locks-insecure/osv-scanner-custom.json |
519-
| UNKNOWN | | https://chromium.googlesource.com/chromium/src | | testdata/locks-insecure/osv-scanner-flutter-deps.json |
520-
| UNKNOWN | | https://github.com/brendan-duncan/archive.git | | testdata/locks-insecure/osv-scanner-flutter-deps.json |
521-
| UNKNOWN | | https://github.com/flutter/buildroot.git | | testdata/locks-insecure/osv-scanner-flutter-deps.json |
519+
| UNKNOWN | GIT | https://chromium.googlesource.com/chromium/src | | testdata/locks-insecure/osv-scanner-flutter-deps.json |
520+
| UNKNOWN | GIT | https://github.com/brendan-duncan/archive.git | | testdata/locks-insecure/osv-scanner-flutter-deps.json |
521+
| UNKNOWN | GIT | https://github.com/flutter/buildroot.git | | testdata/locks-insecure/osv-scanner-flutter-deps.json |
522522
| 0BSD | Packagist | drupal/core | 10.4.5 | testdata/locks-many-with-insecure/composer.lock |
523523
| 0BSD | Packagist | drupal/simple_sitemap | 4.2.1 | testdata/locks-many-with-insecure/composer.lock |
524524
| 0BSD | Packagist | drupal/tfa | 2.0.0-alpha4 | testdata/locks-many-with-insecure/composer.lock |
@@ -3413,21 +3413,23 @@ Total 1 package affected by 40 known vulnerabilities (5 Critical, 15 High, 20 Me
34133413
[TestCommand_HomebrewWithAnnotators/homebrew_extractor_explicitly_enabled_with_annotator - 1]
34143414
Scanning dir ./testdata/homebrew/Cellar/
34153415
Scanned <rootdir>/testdata/homebrew/Cellar/libssh2/1.11.1/INSTALL_RECEIPT.json file and found 1 package
3416+
Warning: plugin transitivedependency/pomxml can be risky when run on untrusted artifacts. Please ensure you trust the source code and artifacts before proceeding.
3417+
34163418

34173419
Scanning Result (package view):
34183420
Total 1 package affected by 5 known vulnerabilities (0 Critical, 0 High, 0 Medium, 0 Low, 5 Unknown) from 1 ecosystem.
34193421
0 vulnerabilities can be fixed.
34203422

34213423

34223424
GIT
3423-
+----------------------------------------------------------------------------------------------+
3424-
| Source:os:<rootdir>/testdata/homebrew/Cell |
3425-
| ar/libssh2/1.11.1/INSTALL_RECEIPT.json |
3426-
+----------------+-------------------+------------------+------------+-------------------------+
3427-
| SOURCE PACKAGE | INSTALLED VERSION | FIX AVAILABLE | VULN COUNT | BINARY PACKAGES (COUNT) |
3428-
+----------------+-------------------+------------------+------------+-------------------------+
3429-
| libssh2 | 1.11.1 | No fix available | 5 | |
3430-
+----------------+-------------------+------------------+------------+-------------------------+
3425+
+------------------------------------------------------------------------------------------------------------------+
3426+
| Source:os:<rootdir>/testdata/homebrew/Cellar/libssh2/1.11.1/IN |
3427+
| STALL_RECEIPT.json |
3428+
+------------------------------------+-------------------+------------------+------------+-------------------------+
3429+
| SOURCE PACKAGE | INSTALLED VERSION | FIX AVAILABLE | VULN COUNT | BINARY PACKAGES (COUNT) |
3430+
+------------------------------------+-------------------+------------------+------------+-------------------------+
3431+
| https://github.com/libssh2/libssh2 | 1.11.1 | No fix available | 5 | |
3432+
+------------------------------------+-------------------+------------------+------------+-------------------------+
34313433

34323434
For the most comprehensive scan results, we recommend using the HTML output: `osv-scanner scan image --serve <image_name>`.
34333435
You can also view the full vulnerability list in your terminal with: `osv-scanner scan image --format vertical <image_name>`.
@@ -3443,21 +3445,23 @@ Scanning dir ./testdata/homebrew/Cellar/
34433445
Scanned <rootdir>/testdata/homebrew/Cellar/libssh2/1.11.1/.brew/libssh2.rb file and found 0 packages
34443446
Scanned <rootdir>/testdata/homebrew/Cellar/libssh2/1.11.1/.brew/libssh2.rb file and found 0 packages
34453447
Scanned <rootdir>/testdata/homebrew/Cellar/libssh2/1.11.1/INSTALL_RECEIPT.json file and found 1 package
3448+
Warning: plugin transitivedependency/pomxml can be risky when run on untrusted artifacts. Please ensure you trust the source code and artifacts before proceeding.
3449+
34463450

34473451
Scanning Result (package view):
34483452
Total 1 package affected by 5 known vulnerabilities (0 Critical, 0 High, 0 Medium, 0 Low, 5 Unknown) from 1 ecosystem.
34493453
0 vulnerabilities can be fixed.
34503454

34513455

34523456
GIT
3453-
+----------------------------------------------------------------------------------------------+
3454-
| Source:os:<rootdir>/testdata/homebrew/Cell |
3455-
| ar/libssh2/1.11.1/INSTALL_RECEIPT.json |
3456-
+----------------+-------------------+------------------+------------+-------------------------+
3457-
| SOURCE PACKAGE | INSTALLED VERSION | FIX AVAILABLE | VULN COUNT | BINARY PACKAGES (COUNT) |
3458-
+----------------+-------------------+------------------+------------+-------------------------+
3459-
| libssh2 | 1.11.1 | No fix available | 5 | |
3460-
+----------------+-------------------+------------------+------------+-------------------------+
3457+
+------------------------------------------------------------------------------------------------------------------+
3458+
| Source:os:<rootdir>/testdata/homebrew/Cellar/libssh2/1.11.1/IN |
3459+
| STALL_RECEIPT.json |
3460+
+------------------------------------+-------------------+------------------+------------+-------------------------+
3461+
| SOURCE PACKAGE | INSTALLED VERSION | FIX AVAILABLE | VULN COUNT | BINARY PACKAGES (COUNT) |
3462+
+------------------------------------+-------------------+------------------+------------+-------------------------+
3463+
| https://github.com/libssh2/libssh2 | 1.11.1 | No fix available | 5 | |
3464+
+------------------------------------+-------------------+------------------+------------+-------------------------+
34613465

34623466
For the most comprehensive scan results, we recommend using the HTML output: `osv-scanner scan image --serve <image_name>`.
34633467
You can also view the full vulnerability list in your terminal with: `osv-scanner scan image --format vertical <image_name>`.

cmd/osv-scanner/scan/source/testdata/cassettes/TestCommand_HomebrewWithAnnotators.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
22
version: 2
33
interactions:
4-
- id: 0
5-
request:
4+
- request:
65
proto: HTTP/1.1
76
proto_major: 1
87
proto_minor: 1
@@ -69,8 +68,7 @@ interactions:
6968
status: 200 OK
7069
code: 200
7170
duration: 0s
72-
- id: 1
73-
request:
71+
- request:
7472
proto: HTTP/1.1
7573
proto_major: 1
7674
proto_minor: 1

internal/scalibrplugin/__snapshots__/resolve_test.snap

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ javascript/packagelockjson
3030
javascript/pnpmlock
3131
javascript/yarnlock
3232
license/depsdev
33+
misc/brew-source
3334
os/apk
3435
os/dpkg
36+
os/homebrew
3537
osv/osvscannerjson
3638
php/composerlock
3739
python/pdmlock
@@ -65,8 +67,10 @@ baseimage
6567
go/binary
6668
java/archive
6769
javascript/nodemodules
70+
misc/brew-source
6871
os/apk
6972
os/dpkg
73+
os/homebrew
7074
python/wheelegg
7175
rust/cargoauditable
7276
vex/os-duplicate/apk
@@ -102,8 +106,10 @@ baseimage
102106
go/binary
103107
java/archive
104108
javascript/nodemodules
109+
misc/brew-source
105110
os/apk
106111
os/dpkg
112+
os/homebrew
107113
python/wheelegg
108114
rust/cargoauditable
109115
vex/os-duplicate/apk

pkg/osvscanner/__snapshots__/osvscanner_test.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"package": {
1313
"name": "",
1414
"version": "",
15-
"ecosystem": "",
15+
"ecosystem": "GIT",
1616
"commit": "33dffa3909a67e1b5d22647128ab7eb6e53fd0c7"
1717
},
1818
"groups": [

0 commit comments

Comments
 (0)