Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scan submodules too. #581

Merged
merged 9 commits into from
Oct 30, 2023
Merged

Conversation

andrewpollock
Copy link
Contributor

@andrewpollock andrewpollock commented Oct 10, 2023

Using https://github.com/charlesneimog/pd-server (at cf3f15a) as the example:

With submodules not initialized:

$ go run ./cmd/osv-scanner -r ../pd-server/
Scanning dir ../pd-server/
Scanning /home/apollock/pd-server/ at commit cf3f15a841ca21b53c6de654c9981a30ae0b590c
Scanning submodule src/cpp-httplib at commit 227d2c20509f85a394133e2be6d0b0fc1fda54b2
Scanning submodule pd-lib-builder at commit 5c2e137f7a7a03f4007494954ccb3e23753e7807
Scanning submodule src/json at commit 4c6cde72e533158e044252718c013a48bcff346c
Scanning submodule src/websocketpp at commit 1b11fd301531e6df35a6107c1e8665b1e77a2d8e
╭────────────────────────────────┬──────┬───────────┬─────────────────────┬─────────────────────┬──────────────────────────────╮
│ OSV URL                        │ CVSS │ ECOSYSTEM │ PACKAGE             │ VERSION             │ SOURCE                       │
├────────────────────────────────┼──────┼───────────┼─────────────────────┴─────────────────────┼──────────────────────────────┤
│ https://osv.dev/CVE-2023-26130 │ 8.8  │ GIT       │  227d2c20509f85a394133e2be6d0b0fc1fda54b2 │ ../pd-server/src/cpp-httplib │
╰────────────────────────────────┴──────┴───────────┴───────────────────────────────────────────┴──────────────────────────────╯
exit status 1

With submodules initialized:

$ go run ./cmd/osv-scanner -r ../pd-server/
Scanning dir ../pd-server/
Scanning /home/apollock/pd-server/ at commit cf3f15a841ca21b53c6de654c9981a30ae0b590c
Scanning submodule src/cpp-httplib at commit 227d2c20509f85a394133e2be6d0b0fc1fda54b2
Scanning submodule pd-lib-builder at commit 5c2e137f7a7a03f4007494954ccb3e23753e7807
Scanning submodule src/json at commit 4c6cde72e533158e044252718c013a48bcff346c
Scanning submodule src/websocketpp at commit 1b11fd301531e6df35a6107c1e8665b1e77a2d8e
Scanned /home/apollock/pd-server/src/json/docs/mkdocs/requirements.txt file and found 49 packages
Scanned /home/apollock/pd-server/src/json/tools/serve_header/requirements.txt file and found 2 packages
╭─────────────────────────────────────┬──────┬───────────┬─────────────────────┬─────────────────────┬────────────────────────────────────────────────────╮
│ OSV URL                             │ CVSS │ ECOSYSTEM │ PACKAGE             │ VERSION             │ SOURCE                                             │
├─────────────────────────────────────┼──────┼───────────┼─────────────────────┴─────────────────────┼────────────────────────────────────────────────────┤
│ https://osv.dev/CVE-2023-26130      │ 8.8  │ GIT       │  227d2c20509f85a394133e2be6d0b0fc1fda54b2 │ ../pd-server/src/cpp-httplib                       │
│ https://osv.dev/GHSA-xqr8-7jwr-rhp7 │ 7.5  │ PyPI      │ certifi             │ 2022.12.7           │ ../pd-server/src/json/docs/mkdocs/requirements.txt │
│ https://osv.dev/PYSEC-2023-135      │      │           │                     │                     │                                                    │
│ https://osv.dev/GHSA-v3c5-jqr6-7qm8 │ 7.5  │ PyPI      │ future              │ 0.18.2              │ ../pd-server/src/json/docs/mkdocs/requirements.txt │
│ https://osv.dev/PYSEC-2022-42991    │      │           │                     │                     │                                                    │
│ https://osv.dev/GHSA-cwvm-v4w8-q58c │ 6.5  │ PyPI      │ gitpython           │ 3.1.29              │ ../pd-server/src/json/docs/mkdocs/requirements.txt │
│ https://osv.dev/PYSEC-2023-165      │      │           │                     │                     │                                                    │
│ https://osv.dev/GHSA-hcpj-qp55-gfph │ 8.1  │ PyPI      │ gitpython           │ 3.1.29              │ ../pd-server/src/json/docs/mkdocs/requirements.txt │
│ https://osv.dev/PYSEC-2022-42992    │      │           │                     │                     │                                                    │
│ https://osv.dev/GHSA-pr76-5cm5-w9cj │ 9.8  │ PyPI      │ gitpython           │ 3.1.29              │ ../pd-server/src/json/docs/mkdocs/requirements.txt │
│ https://osv.dev/PYSEC-2023-137      │      │           │                     │                     │                                                    │
│ https://osv.dev/GHSA-wfm5-v35h-vwf4 │ 7.8  │ PyPI      │ gitpython           │ 3.1.29              │ ../pd-server/src/json/docs/mkdocs/requirements.txt │
│ https://osv.dev/PYSEC-2023-161      │      │           │                     │                     │                                                    │
│ https://osv.dev/GHSA-mrwq-x4v8-fh7p │ 5.5  │ PyPI      │ pygments            │ 2.13.0              │ ../pd-server/src/json/docs/mkdocs/requirements.txt │
│ https://osv.dev/PYSEC-2023-117      │      │           │                     │                     │                                                    │
│ https://osv.dev/GHSA-jh85-wwv9-24hv │ 7.5  │ PyPI      │ pymdown-extensions  │ 9.9                 │ ../pd-server/src/json/docs/mkdocs/requirements.txt │
│ https://osv.dev/GHSA-j8r2-6x86-q33q │ 6.1  │ PyPI      │ requests            │ 2.28.1              │ ../pd-server/src/json/docs/mkdocs/requirements.txt │
│ https://osv.dev/PYSEC-2023-74       │      │           │                     │                     │                                                    │
│ https://osv.dev/GHSA-hj3f-6gcp-jg8j │ 6.1  │ PyPI      │ tornado             │ 6.2                 │ ../pd-server/src/json/docs/mkdocs/requirements.txt │
│ https://osv.dev/PYSEC-2023-75       │      │           │                     │                     │                                                    │
│ https://osv.dev/GHSA-qppv-j76h-2rpx │      │ PyPI      │ tornado             │ 6.2                 │ ../pd-server/src/json/docs/mkdocs/requirements.txt │
│ https://osv.dev/GHSA-g4mx-q9vg-27p4 │ 4.2  │ PyPI      │ urllib3             │ 1.26.13             │ ../pd-server/src/json/docs/mkdocs/requirements.txt │
│ https://osv.dev/PYSEC-2023-212      │      │           │                     │                     │                                                    │
│ https://osv.dev/GHSA-v845-jxx5-vc9f │ 8.1  │ PyPI      │ urllib3             │ 1.26.13             │ ../pd-server/src/json/docs/mkdocs/requirements.txt │
│ https://osv.dev/PYSEC-2023-192      │      │           │                     │                     │                                                    │
╰─────────────────────────────────────┴──────┴───────────┴─────────────────────┴─────────────────────┴────────────────────────────────────────────────────╯
exit status 1

This seems to only be partially working currently, and I'm suspecting a
bug in go-git with respect to submodules and recursion.

```
$ go run ./cmd/osv-scanner -r /tmp/pd-server/
Scanning dir /tmp/pd-server/
Scanning /tmp/pd-server/ at commit cf3f15a841ca21b53c6de654c9981a30ae0b590c
Scanning submodule src/cpp-httplib at commit 0000000000000000000000000000000000000000
Scanning submodule pd-lib-builder at commit 5c2e137f7a7a03f4007494954ccb3e23753e7807
Scanning submodule src/json at commit 0000000000000000000000000000000000000000
Scanning submodule src/websocketpp at commit 0000000000000000000000000000000000000000
Scanned /tmp/pd-server/src/json/docs/mkdocs/requirements.txt file and found 49 packages
Scanned /tmp/pd-server/src/json/tools/serve_header/requirements.txt file and found 2 packages
```
@codecov-commenter
Copy link

codecov-commenter commented Oct 10, 2023

Codecov Report

Merging #581 (89c03a1) into main (419a945) will decrease coverage by 0.37%.
The diff coverage is 23.52%.

@@            Coverage Diff             @@
##             main     #581      +/-   ##
==========================================
- Coverage   80.65%   80.29%   -0.37%     
==========================================
  Files          78       78              
  Lines        5346     5379      +33     
==========================================
+ Hits         4312     4319       +7     
- Misses        866      885      +19     
- Partials      168      175       +7     
Files Coverage Δ
pkg/osvscanner/osvscanner.go 57.44% <23.52%> (-2.70%) ⬇️

@another-rex
Copy link
Collaborator

I'm suspecting a bug in go-git with respect to submodules and recursion.

Is the bug you are referring to the 0000 hashes?

I think that's because you are using s.Current.String(), which shows the actual checked out commit. If you haven't updated/initiated the submodules it will display 0000. Using s.Expected.String() seems to fix this.

Something I'm thinking about is whether we should be checking out the submodules and scanning the contents as well, but that's probably something we should put behind a flag since it makes changes to the file system.

@oliverchang
Copy link
Collaborator

I'm suspecting a bug in go-git with respect to submodules and recursion.

Is the bug you are referring to the 0000 hashes?

I think that's because you are using s.Current.String(), which shows the actual checked out commit. If you haven't updated/initiated the submodules it will display 0000. Using s.Expected.String() seems to fix this.

Is that all that's required to fix up this PR? It would be nice to get this in together with the CVE announcement.

Something I'm thinking about is whether we should be checking out the submodules and scanning the contents as well, but that's probably something we should put behind a flag since it makes changes to the file system.

Hmm, it seems to me that most contexts where OSV-Scanner would have this all set up already (i.e. developer machines, CI/CD), so unless there's a big ask we can probably skip this completely?

@andrewpollock
Copy link
Contributor Author

Is the bug you are referring to the 0000 hashes?

At a functional level, yes, that plus what I've described at go-git/go-git#373 (comment)

I think that's because you are using s.Current.String(), which shows the actual checked out commit. If you haven't updated/initiated the submodules it will display 0000. Using s.Expected.String() seems to fix this.

Wow, that's incredible, and very unexpected (no pun intended). The lack of documentation for this particular code made this harder to work through than I'd have liked. For what it's worth I had checked out the submodules...

By the looks of it, whilst this addresses the functional issue, for reasons unknown, it's still causing unexpected side-effects to the state of the submodules in the repository. Here's an end-to-end example with the current state of this PR:

$ git clone --recursive --recurse-submodules=. https://github.com/charlesneimog/pd-server
Cloning into 'pd-server'...
remote: Enumerating objects: 849, done.
remote: Counting objects: 100% (10/10), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 849 (delta 2), reused 4 (delta 2), pack-reused 839
Receiving objects: 100% (849/849), 2.12 MiB | 2.46 MiB/s, done.
Resolving deltas: 100% (371/371), done.
Submodule 'pd-lib-builder' (https://github.com/pure-data/pd-lib-builder) registered for path 'pd-lib-builder'
Submodule 'src/cpp-httplib' (https://github.com/yhirose/cpp-httplib) registered for path 'src/cpp-httplib'
Submodule 'src/json' (https://github.com/nlohmann/json) registered for path 'src/json'
Submodule 'src/websocketpp' (https://github.com/zaphoyd/websocketpp) registered for path 'src/websocketpp'
Cloning into '/tmp/pd-server/pd-lib-builder'...
remote: Enumerating objects: 711, done.        
remote: Counting objects: 100% (126/126), done.        
remote: Compressing objects: 100% (58/58), done.        
remote: Total 711 (delta 82), reused 80 (delta 68), pack-reused 585        
Receiving objects: 100% (711/711), 176.00 KiB | 598.00 KiB/s, done.
Resolving deltas: 100% (356/356), done.
Cloning into '/tmp/pd-server/src/cpp-httplib'...
remote: Enumerating objects: 4723, done.        
remote: Counting objects: 100% (4723/4723), done.        
remote: Compressing objects: 100% (1489/1489), done.        
remote: Total 4723 (delta 3223), reused 4656 (delta 3184), pack-reused 0        
Receiving objects: 100% (4723/4723), 2.80 MiB | 3.71 MiB/s, done.
Resolving deltas: 100% (3223/3223), done.
Cloning into '/tmp/pd-server/src/json'...
remote: Enumerating objects: 36542, done.        
remote: Counting objects: 100% (812/812), done.        
remote: Compressing objects: 100% (196/196), done.        
remote: Total 36542 (delta 386), reused 798 (delta 377), pack-reused 35730        
Receiving objects: 100% (36542/36542), 177.57 MiB | 20.89 MiB/s, done.
Resolving deltas: 100% (22580/22580), done.
Cloning into '/tmp/pd-server/src/websocketpp'...
remote: Enumerating objects: 12791, done.        
remote: Counting objects: 100% (1549/1549), done.        
remote: Compressing objects: 100% (197/197), done.        
remote: Total 12791 (delta 1504), reused 1353 (delta 1352), pack-reused 11242        
Receiving objects: 100% (12791/12791), 8.37 MiB | 8.19 MiB/s, done.
Resolving deltas: 100% (7985/7985), done.
Submodule path 'pd-lib-builder': checked out '5c2e137f7a7a03f4007494954ccb3e23753e7807'
Submodule path 'src/cpp-httplib': checked out '227d2c20509f85a394133e2be6d0b0fc1fda54b2'
Submodule path 'src/json': checked out '4c6cde72e533158e044252718c013a48bcff346c'
Submodule path 'src/websocketpp': checked out '1b11fd301531e6df35a6107c1e8665b1e77a2d8e'

$ go run ./cmd/osv-scanner -r /tmp/pd-server/
Scanning dir /tmp/pd-server/
Scanning /tmp/pd-server/ at commit cf3f15a841ca21b53c6de654c9981a30ae0b590c
Scanning submodule src/websocketpp at commit 1b11fd301531e6df35a6107c1e8665b1e77a2d8e
Scanning submodule src/cpp-httplib at commit 227d2c20509f85a394133e2be6d0b0fc1fda54b2
Scanning submodule pd-lib-builder at commit 5c2e137f7a7a03f4007494954ccb3e23753e7807
Scanning submodule src/json at commit 4c6cde72e533158e044252718c013a48bcff346c
Scanned /tmp/pd-server/src/json/docs/mkdocs/requirements.txt file and found 49 packages
Scanned /tmp/pd-server/src/json/tools/serve_header/requirements.txt file and found 2 packages
╭─────────────────────────────────────┬──────┬───────────┬─────────────────────┬─────────────────────┬─────────────── ≈
│ OSV URL                             │ CVSS │ ECOSYSTEM │ PACKAGE             │ VERSION             │ SOURCE         ≈
├─────────────────────────────────────┼──────┼───────────┼─────────────────────┴─────────────────────┼─────────────── ≈
│ https://osv.dev/CVE-2023-26130      │ 8.8  │ GIT       │  227d2c20509f85a394133e2be6d0b0fc1fda54b2 │ ../../../../.. ≈
│ https://osv.dev/GHSA-xqr8-7jwr-rhp7 │ 7.5  │ PyPI      │ certifi             │ 2022.12.7           │ ../../../../.. ≈
│ https://osv.dev/PYSEC-2023-135      │      │           │                     │                     │                ≈
│ https://osv.dev/GHSA-v3c5-jqr6-7qm8 │ 7.5  │ PyPI      │ future              │ 0.18.2              │ ../../../../.. ≈
│ https://osv.dev/PYSEC-2022-42991    │      │           │                     │                     │                ≈
│ https://osv.dev/GHSA-cwvm-v4w8-q58c │ 6.5  │ PyPI      │ gitpython           │ 3.1.29              │ ../../../../.. ≈
│ https://osv.dev/PYSEC-2023-165      │      │           │                     │                     │                ≈
│ https://osv.dev/GHSA-hcpj-qp55-gfph │ 8.1  │ PyPI      │ gitpython           │ 3.1.29              │ ../../../../.. ≈
│ https://osv.dev/PYSEC-2022-42992    │      │           │                     │                     │                ≈
│ https://osv.dev/GHSA-pr76-5cm5-w9cj │ 9.8  │ PyPI      │ gitpython           │ 3.1.29              │ ../../../../.. ≈
│ https://osv.dev/PYSEC-2023-137      │      │           │                     │                     │                ≈
│ https://osv.dev/GHSA-wfm5-v35h-vwf4 │ 7.8  │ PyPI      │ gitpython           │ 3.1.29              │ ../../../../.. ≈
│ https://osv.dev/PYSEC-2023-161      │      │           │                     │                     │                ≈
│ https://osv.dev/GHSA-mrwq-x4v8-fh7p │ 5.5  │ PyPI      │ pygments            │ 2.13.0              │ ../../../../.. ≈
│ https://osv.dev/PYSEC-2023-117      │      │           │                     │                     │                ≈
│ https://osv.dev/GHSA-jh85-wwv9-24hv │ 7.5  │ PyPI      │ pymdown-extensions  │ 9.9                 │ ../../../../.. ≈
│ https://osv.dev/GHSA-j8r2-6x86-q33q │ 6.1  │ PyPI      │ requests            │ 2.28.1              │ ../../../../.. ≈
│ https://osv.dev/PYSEC-2023-74       │      │           │                     │                     │                ≈
│ https://osv.dev/GHSA-hj3f-6gcp-jg8j │ 6.1  │ PyPI      │ tornado             │ 6.2                 │ ../../../../.. ≈
│ https://osv.dev/PYSEC-2023-75       │      │           │                     │                     │                ≈
│ https://osv.dev/GHSA-qppv-j76h-2rpx │      │ PyPI      │ tornado             │ 6.2                 │ ../../../../.. ≈
│ https://osv.dev/GHSA-g4mx-q9vg-27p4 │ 4.2  │ PyPI      │ urllib3             │ 1.26.13             │ ../../../../.. ≈
│ https://osv.dev/PYSEC-2023-212      │      │           │                     │                     │                ≈
│ https://osv.dev/GHSA-v845-jxx5-vc9f │ 8.1  │ PyPI      │ urllib3             │ 1.26.13             │ ../../../../.. ≈
│ https://osv.dev/PYSEC-2023-192      │      │           │                     │                     │                ≈
╰─────────────────────────────────────┴──────┴───────────┴─────────────────────┴─────────────────────┴─────────────── ≈
exit status 1

$ git submodule status
 5c2e137f7a7a03f4007494954ccb3e23753e7807 pd-lib-builder (v0.6.0-28-g5c2e137)
 227d2c20509f85a394133e2be6d0b0fc1fda54b2 src/cpp-httplib ()
 4c6cde72e533158e044252718c013a48bcff346c src/json ()
 1b11fd301531e6df35a6107c1e8665b1e77a2d8e src/websocketpp ()

@oliverchang oliverchang mentioned this pull request Oct 26, 2023
@another-rex
Copy link
Collaborator

Hmm looks like it only changes the status if the submodules are checked out, I'll look a bit more into this as well.

@andrewpollock andrewpollock changed the title WIP: Scan submodules too. Scan submodules too. Oct 27, 2023
@andrewpollock
Copy link
Contributor Author

So armed with the knowledge that gLinux's Git submodule behaviour is not consistent with upstream Git, rerunning this PR in a Cloud Shell against https://github.com/charlesneimog/pd-server @ cf3f15a841ca21b53c6de654c9981a30ae0b590c:

$ go run ./cmd/osv-scanner -r ../pd-server/. 
Scanning dir ../pd-server/.
Scanning /home/apollock/pd-server/ at commit cf3f15a841ca21b53c6de654c9981a30ae0b590c
Scanning submodule src/cpp-httplib at commit 227d2c20509f85a394133e2be6d0b0fc1fda54b2
Scanning submodule pd-lib-builder at commit 5c2e137f7a7a03f4007494954ccb3e23753e7807
Scanning submodule src/json at commit 4c6cde72e533158e044252718c013a48bcff346c
Scanning submodule src/websocketpp at commit 1b11fd301531e6df35a6107c1e8665b1e77a2d8e
Scanned /home/apollock/pd-server/src/json/docs/mkdocs/requirements.txt file and found 49 packages
Scanned /home/apollock/pd-server/src/json/tools/serve_header/requirements.txt file and found 2 packages
╭─────────────────────────────────────┬──────┬───────────┬─────────────────────┬─────────────────────┬────────────────────────────────────────────────────╮
│ OSV URL                             │ CVSS │ ECOSYSTEM │ PACKAGE             │ VERSION             │ SOURCE                                             │
├─────────────────────────────────────┼──────┼───────────┼─────────────────────┴─────────────────────┼────────────────────────────────────────────────────┤
│ https://osv.dev/CVE-2023-26130      │ 8.8  │ GIT       │  227d2c20509f85a394133e2be6d0b0fc1fda54b2 │ ../pd-server                                       │
│ https://osv.dev/GHSA-xqr8-7jwr-rhp7 │ 7.5  │ PyPI      │ certifi             │ 2022.12.7           │ ../pd-server/src/json/docs/mkdocs/requirements.txt │
│ https://osv.dev/PYSEC-2023-135      │      │           │                     │                     │                                                    │
│ https://osv.dev/GHSA-v3c5-jqr6-7qm8 │ 7.5  │ PyPI      │ future              │ 0.18.2              │ ../pd-server/src/json/docs/mkdocs/requirements.txt │
│ https://osv.dev/PYSEC-2022-42991    │      │           │                     │                     │                                                    │
│ https://osv.dev/GHSA-cwvm-v4w8-q58c │ 6.5  │ PyPI      │ gitpython           │ 3.1.29              │ ../pd-server/src/json/docs/mkdocs/requirements.txt │
│ https://osv.dev/PYSEC-2023-165      │      │           │                     │                     │                                                    │
│ https://osv.dev/GHSA-hcpj-qp55-gfph │ 8.1  │ PyPI      │ gitpython           │ 3.1.29              │ ../pd-server/src/json/docs/mkdocs/requirements.txt │
│ https://osv.dev/PYSEC-2022-42992    │      │           │                     │                     │                                                    │
│ https://osv.dev/GHSA-pr76-5cm5-w9cj │ 9.8  │ PyPI      │ gitpython           │ 3.1.29              │ ../pd-server/src/json/docs/mkdocs/requirements.txt │
│ https://osv.dev/PYSEC-2023-137      │      │           │                     │                     │                                                    │
│ https://osv.dev/GHSA-wfm5-v35h-vwf4 │ 7.8  │ PyPI      │ gitpython           │ 3.1.29              │ ../pd-server/src/json/docs/mkdocs/requirements.txt │
│ https://osv.dev/PYSEC-2023-161      │      │           │                     │                     │                                                    │
│ https://osv.dev/GHSA-mrwq-x4v8-fh7p │ 5.5  │ PyPI      │ pygments            │ 2.13.0              │ ../pd-server/src/json/docs/mkdocs/requirements.txt │
│ https://osv.dev/PYSEC-2023-117      │      │           │                     │                     │                                                    │
│ https://osv.dev/GHSA-jh85-wwv9-24hv │ 7.5  │ PyPI      │ pymdown-extensions  │ 9.9                 │ ../pd-server/src/json/docs/mkdocs/requirements.txt │
│ https://osv.dev/GHSA-j8r2-6x86-q33q │ 6.1  │ PyPI      │ requests            │ 2.28.1              │ ../pd-server/src/json/docs/mkdocs/requirements.txt │
│ https://osv.dev/PYSEC-2023-74       │      │           │                     │                     │                                                    │
│ https://osv.dev/GHSA-hj3f-6gcp-jg8j │ 6.1  │ PyPI      │ tornado             │ 6.2                 │ ../pd-server/src/json/docs/mkdocs/requirements.txt │
│ https://osv.dev/PYSEC-2023-75       │      │           │                     │                     │                                                    │
│ https://osv.dev/GHSA-qppv-j76h-2rpx │      │ PyPI      │ tornado             │ 6.2                 │ ../pd-server/src/json/docs/mkdocs/requirements.txt │
│ https://osv.dev/GHSA-g4mx-q9vg-27p4 │ 4.2  │ PyPI      │ urllib3             │ 1.26.13             │ ../pd-server/src/json/docs/mkdocs/requirements.txt │
│ https://osv.dev/PYSEC-2023-212      │      │           │                     │                     │                                                    │
│ https://osv.dev/GHSA-v845-jxx5-vc9f │ 8.1  │ PyPI      │ urllib3             │ 1.26.13             │ ../pd-server/src/json/docs/mkdocs/requirements.txt │
│ https://osv.dev/PYSEC-2023-192      │      │           │                     │                     │                                                    │
╰─────────────────────────────────────┴──────┴───────────┴─────────────────────┴─────────────────────┴────────────────────────────────────────────────────╯
exit status 1

@andrewpollock andrewpollock marked this pull request as ready for review October 30, 2023 00:01
pkg/osvscanner/osvscanner.go Outdated Show resolved Hide resolved
This will include more precise information about the location of the
vulnerability in the output:

e.g. in https://github.com/charlesneimog/pd-server with submodules not
initialized and at cf3f15a:

```
$ go run ./cmd/osv-scanner -r ../pd-server/
Scanning dir ../pd-server/
Scanning /home/apollock/pd-server/ at commit cf3f15a841ca21b53c6de654c9981a30ae0b590c
Scanning submodule /home/apollock/pd-server/src/cpp-httplib at commit 227d2c20509f85a394133e2be6d0b0fc1fda54b2
Scanning submodule /home/apollock/pd-server/pd-lib-builder at commit 5c2e137f7a7a03f4007494954ccb3e23753e7807
Scanning submodule /home/apollock/pd-server/src/json at commit 4c6cde72e533158e044252718c013a48bcff346c
Scanning submodule /home/apollock/pd-server/src/websocketpp at commit 1b11fd301531e6df35a6107c1e8665b1e77a2d8e
╭────────────────────────────────┬──────┬───────────┬─────────────────────┬─────────────────────┬──────────────────────────────╮
│ OSV URL                        │ CVSS │ ECOSYSTEM │ PACKAGE             │ VERSION             │ SOURCE                       │
├────────────────────────────────┼──────┼───────────┼─────────────────────┴─────────────────────┼──────────────────────────────┤
│ https://osv.dev/CVE-2023-26130 │ 8.8  │ GIT       │  227d2c20509f85a394133e2be6d0b0fc1fda54b2 │ ../pd-server/src/cpp-httplib │
╰────────────────────────────────┴──────┴───────────┴───────────────────────────────────────────┴──────────────────────────────╯
exit status 1
```
@andrewpollock andrewpollock merged commit f819495 into google:main Oct 30, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants