Skip to content

Commit af567eb

Browse files
committed
fix: update Mageia snapshot and bump osv-scalibr to detect Mageia base image
- Bump github.com/google/osv-scalibr to v0.4.6-0.20260713000915-500ad84f4ed1 which includes the Mageia ecosystem mapping fix (google/osv-scalibr#2199) - Update TestCommand_OCIImage_JSONFormat/scanning_mageia_9_image snapshot to reflect that the Mageia base image is now correctly detected (base_image_index updated, 'mageia' added to base_images list) - Update TestCommand_OCIImage_JSONFormat cassette with new API interaction order Fixes snapshot mismatch that caused CI failures on all platforms.
1 parent 7ab2a47 commit af567eb

4 files changed

Lines changed: 156 additions & 153 deletions

File tree

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3532,17 +3532,21 @@ Scanning local image tarball "./testdata/test-chisel.tar"
35323532
"diff_id": "sha256:...",
35333533
"command": "ADD rootfs.tar.xz / # buildkit",
35343534
"is_empty": false,
3535-
"base_image_index": 0
3535+
"base_image_index": 1
35363536
},
35373537
{
35383538
"diff_id": "",
35393539
"command": "CMD [/"/bin/bash/"]",
35403540
"is_empty": true,
3541-
"base_image_index": 0
3541+
"base_image_index": 1
35423542
}
35433543
],
35443544
"base_images": [
3545-
{}
3545+
{},
3546+
{
3547+
"name": "mageia",
3548+
"tags": null
3549+
}
35463550
]
35473551
}
35483552
}

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

Lines changed: 146 additions & 146 deletions
Original file line numberDiff line numberDiff line change
@@ -2773,6 +2773,152 @@ interactions:
27732773
status: 200 OK
27742774
code: 200
27752775
duration: 0s
2776+
- request:
2777+
proto: HTTP/1.1
2778+
proto_major: 1
2779+
proto_minor: 1
2780+
content_length: 866
2781+
host: api.osv.dev
2782+
body: |
2783+
{
2784+
"queries": [
2785+
{
2786+
"package": {
2787+
"ecosystem": "PyPI",
2788+
"name": "pygobject"
2789+
},
2790+
"version": "3.44.1"
2791+
},
2792+
{
2793+
"package": {
2794+
"ecosystem": "PyPI",
2795+
"name": "gpg"
2796+
},
2797+
"version": "1.18.0"
2798+
},
2799+
{
2800+
"package": {
2801+
"ecosystem": "PyPI",
2802+
"name": "libcomps"
2803+
},
2804+
"version": "0.1.18"
2805+
},
2806+
{
2807+
"package": {
2808+
"ecosystem": "PyPI",
2809+
"name": "pip"
2810+
},
2811+
"version": "23.0.1"
2812+
},
2813+
{
2814+
"package": {
2815+
"ecosystem": "PyPI",
2816+
"name": "rpm"
2817+
},
2818+
"version": "4.18.2"
2819+
},
2820+
{
2821+
"package": {
2822+
"ecosystem": "PyPI",
2823+
"name": "setuptools"
2824+
},
2825+
"version": "65.5.0"
2826+
},
2827+
{
2828+
"package": {
2829+
"ecosystem": "PyPI",
2830+
"name": "six"
2831+
},
2832+
"version": "1.16.0"
2833+
}
2834+
]
2835+
}
2836+
headers:
2837+
Content-Type:
2838+
- application/json
2839+
X-Test-Name:
2840+
- TestCommand_OCIImage_JSONFormat/scanning_mageia_9_image
2841+
url: https://api.osv.dev/v1/querybatch
2842+
method: POST
2843+
response:
2844+
proto: HTTP/2.0
2845+
proto_major: 2
2846+
proto_minor: 0
2847+
content_length: 873
2848+
body: |
2849+
{
2850+
"results": [
2851+
{},
2852+
{},
2853+
{},
2854+
{
2855+
"vulns": [
2856+
{
2857+
"id": "GHSA-4xh5-x5gv-qwph",
2858+
"modified": "2026-03-24T01:43:53.135277Z"
2859+
},
2860+
{
2861+
"id": "GHSA-58qw-9mgm-455v",
2862+
"modified": "2026-05-20T21:00:09.920997Z"
2863+
},
2864+
{
2865+
"id": "GHSA-6vgw-5pg2-w6jp",
2866+
"modified": "2026-03-24T01:43:46.425088Z"
2867+
},
2868+
{
2869+
"id": "GHSA-jp4c-xjxw-mgf9",
2870+
"modified": "2026-05-07T16:59:14.079020Z"
2871+
},
2872+
{
2873+
"id": "GHSA-mq26-g339-26xf",
2874+
"modified": "2026-03-24T01:43:05.410801Z"
2875+
},
2876+
{
2877+
"id": "PYSEC-2023-228",
2878+
"modified": "2026-03-24T01:42:37.905754Z"
2879+
},
2880+
{
2881+
"id": "PYSEC-2026-196",
2882+
"modified": "2026-06-05T12:45:14.124059Z"
2883+
}
2884+
]
2885+
},
2886+
{},
2887+
{
2888+
"vulns": [
2889+
{
2890+
"id": "GHSA-5rjg-fvgr-3xxf",
2891+
"modified": "2026-05-11T00:26:34.671259Z"
2892+
},
2893+
{
2894+
"id": "GHSA-cx63-2mw6-8hw5",
2895+
"modified": "2026-02-04T03:54:02.259111Z"
2896+
},
2897+
{
2898+
"id": "GHSA-r9hx-vwmv-q579",
2899+
"modified": "2026-02-04T03:03:25.892107Z"
2900+
},
2901+
{
2902+
"id": "PYSEC-2022-43012",
2903+
"modified": "2023-12-06T01:02:35.662444Z"
2904+
},
2905+
{
2906+
"id": "PYSEC-2025-49",
2907+
"modified": "2026-05-11T00:26:34.671259Z"
2908+
}
2909+
]
2910+
},
2911+
{}
2912+
]
2913+
}
2914+
headers:
2915+
Content-Length:
2916+
- "873"
2917+
Content-Type:
2918+
- application/json
2919+
status: 200 OK
2920+
code: 200
2921+
duration: 0s
27762922
- request:
27772923
proto: HTTP/1.1
27782924
proto_major: 1
@@ -6283,149 +6429,3 @@ interactions:
62836429
status: 200 OK
62846430
code: 200
62856431
duration: 0s
6286-
- request:
6287-
proto: HTTP/1.1
6288-
proto_major: 1
6289-
proto_minor: 1
6290-
content_length: 866
6291-
host: api.osv.dev
6292-
body: |
6293-
{
6294-
"queries": [
6295-
{
6296-
"package": {
6297-
"ecosystem": "PyPI",
6298-
"name": "pygobject"
6299-
},
6300-
"version": "3.44.1"
6301-
},
6302-
{
6303-
"package": {
6304-
"ecosystem": "PyPI",
6305-
"name": "gpg"
6306-
},
6307-
"version": "1.18.0"
6308-
},
6309-
{
6310-
"package": {
6311-
"ecosystem": "PyPI",
6312-
"name": "libcomps"
6313-
},
6314-
"version": "0.1.18"
6315-
},
6316-
{
6317-
"package": {
6318-
"ecosystem": "PyPI",
6319-
"name": "pip"
6320-
},
6321-
"version": "23.0.1"
6322-
},
6323-
{
6324-
"package": {
6325-
"ecosystem": "PyPI",
6326-
"name": "rpm"
6327-
},
6328-
"version": "4.18.2"
6329-
},
6330-
{
6331-
"package": {
6332-
"ecosystem": "PyPI",
6333-
"name": "setuptools"
6334-
},
6335-
"version": "65.5.0"
6336-
},
6337-
{
6338-
"package": {
6339-
"ecosystem": "PyPI",
6340-
"name": "six"
6341-
},
6342-
"version": "1.16.0"
6343-
}
6344-
]
6345-
}
6346-
headers:
6347-
Content-Type:
6348-
- application/json
6349-
X-Test-Name:
6350-
- TestCommand_OCIImage_JSONFormat/scanning_mageia_9_image
6351-
url: https://api.osv.dev/v1/querybatch
6352-
method: POST
6353-
response:
6354-
proto: HTTP/2.0
6355-
proto_major: 2
6356-
proto_minor: 0
6357-
content_length: 873
6358-
body: |
6359-
{
6360-
"results": [
6361-
{},
6362-
{},
6363-
{},
6364-
{
6365-
"vulns": [
6366-
{
6367-
"id": "GHSA-4xh5-x5gv-qwph",
6368-
"modified": "2026-03-24T01:43:53.135277Z"
6369-
},
6370-
{
6371-
"id": "GHSA-58qw-9mgm-455v",
6372-
"modified": "2026-05-20T21:00:09.920997Z"
6373-
},
6374-
{
6375-
"id": "GHSA-6vgw-5pg2-w6jp",
6376-
"modified": "2026-03-24T01:43:46.425088Z"
6377-
},
6378-
{
6379-
"id": "GHSA-jp4c-xjxw-mgf9",
6380-
"modified": "2026-05-07T16:59:14.079020Z"
6381-
},
6382-
{
6383-
"id": "GHSA-mq26-g339-26xf",
6384-
"modified": "2026-03-24T01:43:05.410801Z"
6385-
},
6386-
{
6387-
"id": "PYSEC-2023-228",
6388-
"modified": "2026-03-24T01:42:37.905754Z"
6389-
},
6390-
{
6391-
"id": "PYSEC-2026-196",
6392-
"modified": "2026-06-05T12:45:14.124059Z"
6393-
}
6394-
]
6395-
},
6396-
{},
6397-
{
6398-
"vulns": [
6399-
{
6400-
"id": "GHSA-5rjg-fvgr-3xxf",
6401-
"modified": "2026-05-11T00:26:34.671259Z"
6402-
},
6403-
{
6404-
"id": "GHSA-cx63-2mw6-8hw5",
6405-
"modified": "2026-02-04T03:54:02.259111Z"
6406-
},
6407-
{
6408-
"id": "GHSA-r9hx-vwmv-q579",
6409-
"modified": "2026-02-04T03:03:25.892107Z"
6410-
},
6411-
{
6412-
"id": "PYSEC-2022-43012",
6413-
"modified": "2023-12-06T01:02:35.662444Z"
6414-
},
6415-
{
6416-
"id": "PYSEC-2025-49",
6417-
"modified": "2026-05-11T00:26:34.671259Z"
6418-
}
6419-
]
6420-
},
6421-
{}
6422-
]
6423-
}
6424-
headers:
6425-
Content-Length:
6426-
- "873"
6427-
Content-Type:
6428-
- application/json
6429-
status: 200 OK
6430-
code: 200
6431-
duration: 0s

go.mod

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ require (
1313
github.com/go-git/go-git/v5 v5.19.1
1414
github.com/gobwas/glob v0.2.3
1515
github.com/google/go-cmp v0.7.0
16-
github.com/google/osv-scalibr v0.4.6-0.20260612031204-164402d9140e
16+
github.com/google/osv-scalibr v0.4.6-0.20260713000915-500ad84f4ed1
1717
github.com/ianlancetaylor/demangle v0.0.0-20260505044615-1ff4bf46051f
1818
github.com/jedib0t/go-pretty/v6 v6.7.10
1919
github.com/modelcontextprotocol/go-sdk v1.6.1
@@ -214,4 +214,3 @@ require (
214214
www.velocidex.com/golang/go-ntfs v0.2.0 // indirect
215215
www.velocidex.com/golang/regparser v0.0.0-20250203141505-31e704a67ef7 // indirect
216216
)
217-

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ github.com/google/go-cpy v0.0.0-20211218193943-a9c933c06932 h1:5/4TSDzpDnHQ8rKEE
247247
github.com/google/go-cpy v0.0.0-20211218193943-a9c933c06932/go.mod h1:cC6EdPbj/17GFCPDK39NRarlMI+kt+O60S12cNB5J9Y=
248248
github.com/google/jsonschema-go v0.4.3 h1:/DBOLZTfDow7pe2GmaJNhltueGTtDKICi8V8p+DQPd0=
249249
github.com/google/jsonschema-go v0.4.3/go.mod h1:r5quNTdLOYEz95Ru18zA0ydNbBuYoo9tgaYcxEYhJVE=
250-
github.com/google/osv-scalibr v0.4.6-0.20260612031204-164402d9140e h1:cQTtydMwNMniteU1xth8JECOBS6vtw0FIjZVZUAqAJo=
251-
github.com/google/osv-scalibr v0.4.6-0.20260612031204-164402d9140e/go.mod h1:7NVYCBa6Uu7S2GvVj/kacQ8Bib8KhdIxU6+cf3aIIVI=
250+
github.com/google/osv-scalibr v0.4.6-0.20260713000915-500ad84f4ed1 h1:yHo18phm3Xy56T1ngXgNqCMJR7uFWVWrnWyvTbzD+Ak=
251+
github.com/google/osv-scalibr v0.4.6-0.20260713000915-500ad84f4ed1/go.mod h1:7NVYCBa6Uu7S2GvVj/kacQ8Bib8KhdIxU6+cf3aIIVI=
252252
github.com/google/pprof v0.0.0-20250820193118-f64d9cf942d6 h1:EEHtgt9IwisQ2AZ4pIsMjahcegHh6rmhqxzIRQIyepY=
253253
github.com/google/pprof v0.0.0-20250820193118-f64d9cf942d6/go.mod h1:I6V7YzU0XDpsHqbsyrghnFZLO1gwK6NPTNvmetQIk9U=
254254
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=

0 commit comments

Comments
 (0)