Skip to content

Commit

Permalink
Bump github.com/google/osv-scanner from 1.4.1 to 1.4.2 (guacsec#1444)
Browse files Browse the repository at this point in the history
* Bump github.com/google/osv-scanner from 1.4.1 to 1.4.2

Bumps [github.com/google/osv-scanner](https://github.com/google/osv-scanner) from 1.4.1 to 1.4.2.
- [Release notes](https://github.com/google/osv-scanner/releases)
- [Changelog](https://github.com/google/osv-scanner/blob/main/CHANGELOG.md)
- [Commits](google/osv-scanner@v1.4.1...v1.4.2)

---
updated-dependencies:
- dependency-name: github.com/google/osv-scanner
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* update test results based on update to packageurl-go library

Signed-off-by: pxp928 <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: pxp928 <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: pxp928 <[email protected]>
  • Loading branch information
dependabot[bot] and pxp928 authored Nov 3, 2023
1 parent 0689514 commit 00d978b
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 84 deletions.
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ require (
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0-rc3 // indirect
github.com/owenrumney/go-sarif/v2 v2.2.2 // indirect
github.com/owenrumney/go-sarif/v2 v2.3.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/pierrec/lz4/v4 v4.1.15 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
Expand Down Expand Up @@ -179,10 +179,10 @@ require (
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
github.com/zclconf/go-cty v1.10.0 // indirect
gocloud.dev v0.34.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/mod v0.13.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.13.0 // indirect
golang.org/x/tools v0.14.0 // indirect
golang.org/x/vuln v1.0.1 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a // indirect
Expand Down Expand Up @@ -215,7 +215,7 @@ require (
github.com/gofrs/uuid v4.4.0+incompatible
github.com/golang/mock v1.6.0
github.com/google/go-github/v50 v50.2.0
github.com/google/osv-scanner v1.4.1
github.com/google/osv-scanner v1.4.2
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/hashicorp/go-multierror v1.1.1
github.com/jedib0t/go-pretty/v6 v6.4.8
Expand All @@ -229,7 +229,7 @@ require (
github.com/nats-io/nats.go v1.31.0
github.com/openvex/go-vex v0.2.5
github.com/ossf/scorecard/v4 v4.13.0
github.com/package-url/packageurl-go v0.1.1
github.com/package-url/packageurl-go v0.1.2
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.17.0
github.com/regclient/regclient v0.5.3
Expand All @@ -240,6 +240,6 @@ require (
github.com/spf13/viper v1.16.0
github.com/stretchr/testify v1.8.4
github.com/vektah/gqlparser/v2 v2.5.10
golang.org/x/exp v0.0.0-20230905200255-921286631fa9
golang.org/x/exp v0.0.0-20231006140011-7918f672742d
gopkg.in/yaml.v3 v3.0.1
)
24 changes: 12 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,8 @@ github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIG
github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw=
github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk=
github.com/google/osv-scanner v1.4.1 h1:fDddlRTtemqH0CmllRb56AUI7RvNWT0QduBNIZdTXzg=
github.com/google/osv-scanner v1.4.1/go.mod h1:QF4KFq59E2agCe2j9cXE5oGMsenjs8aL4yqZw81Rzhw=
github.com/google/osv-scanner v1.4.2 h1:jM4buYcK4B2ByDCiWYOi4kCFumohH74CBwLiiSmB4m0=
github.com/google/osv-scanner v1.4.2/go.mod h1:4BzFUZ1tHDtLFKfpWaGLbsQXwHrGVHq4zg61CE/DNB8=
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
Expand Down Expand Up @@ -559,10 +559,10 @@ github.com/openvex/go-vex v0.2.5/go.mod h1:j+oadBxSUELkrKh4NfNb+BPo77U3q7gdKME88
github.com/ossf/scorecard/v4 v4.13.0 h1:V1N/sqi9QdCOQkppCxSj+5B6l6O0kYV+QtCN/0MVhBs=
github.com/ossf/scorecard/v4 v4.13.0/go.mod h1:r0L+2sjPkVMuuqi0mRgE3xXCTmYS/8FhAv4UdFgt2q4=
github.com/owenrumney/go-sarif v1.1.1/go.mod h1:dNDiPlF04ESR/6fHlPyq7gHKmrM0sHUvAGjsoh8ZH0U=
github.com/owenrumney/go-sarif/v2 v2.2.2 h1:x2acaiiAW9hu+78wbEYBRGLk5nRtHmkv7HeUsKvblwc=
github.com/owenrumney/go-sarif/v2 v2.2.2/go.mod h1:MSqMMx9WqlBSY7pXoOZWgEsVB4FDNfhcaXDA1j6Sr+w=
github.com/package-url/packageurl-go v0.1.1 h1:KTRE0bK3sKbFKAk3yy63DpeskU7Cvs/x/Da5l+RtzyU=
github.com/package-url/packageurl-go v0.1.1/go.mod h1:uQd4a7Rh3ZsVg5j0lNyAfyxIeGde9yrlhjF78GzeW0c=
github.com/owenrumney/go-sarif/v2 v2.3.0 h1:wP5yEpI53zr0v5cBmagXzLbHZp9Oylyo3AJDpfLBITs=
github.com/owenrumney/go-sarif/v2 v2.3.0/go.mod h1:MSqMMx9WqlBSY7pXoOZWgEsVB4FDNfhcaXDA1j6Sr+w=
github.com/package-url/packageurl-go v0.1.2 h1:0H2DQt6DHd/NeRlVwW4EZ4oEI6Bn40XlNPRqegcxuo4=
github.com/package-url/packageurl-go v0.1.2/go.mod h1:uQd4a7Rh3ZsVg5j0lNyAfyxIeGde9yrlhjF78GzeW0c=
github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ=
github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4=
github.com/pierrec/lz4/v4 v4.1.15 h1:MO0/ucJhngq7299dKLwIMtgTfbkoSPF6AoMYDd8Q4q0=
Expand Down Expand Up @@ -758,8 +758,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g=
golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k=
golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI=
golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
Expand All @@ -786,8 +786,8 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY=
golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
Expand Down Expand Up @@ -1017,8 +1017,8 @@ golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ=
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc=
golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg=
golang.org/x/vuln v1.0.1 h1:KUas02EjQK5LTuIx1OylBQdKKZ9jeugs+HiqO5HormU=
golang.org/x/vuln v1.0.1/go.mod h1:bb2hMwln/tqxg32BNY4CcxHWtHXuYa3SbIBmtsyjxtM=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand Down
25 changes: 8 additions & 17 deletions pkg/assembler/backends/arangodb/pkgEqual_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -910,13 +910,7 @@ func TestPkgInputSpecToPurl(t *testing.T) {
}),
}, {
// The following are for docker PURLs
// TODO (Issue #635): docker PURLs are really weird and potentially not well specified
// due to the namespace indicating it may contain registry but the use of
// repository_url in the examples. In addition, the versions use in the examples
// use tags and potentially indicate truncated hashes.

//expectedPurlUri: "pkg:docker/customer/dockerimage@sha256%3A244fd47e07d10?repository_url=gcr.io",
expectedPurlUri: "pkg:docker/dockerimage@sha256:244fd47e07d10?repository_url=gcr.io%2Fcustomer",
expectedPurlUri: "pkg:docker/dockerimage@sha256%3A244fd47e07d10?repository_url=gcr.io%2Fcustomer",
input: pkg("docker", "gcr.io/customer", "dockerimage", "sha256:244fd47e07d10", "", map[string]string{}),
}, {
expectedPurlUri: "pkg:docker/debian@dc437cc87d10?repository_url=smartentry",
Expand All @@ -929,13 +923,13 @@ func TestPkgInputSpecToPurl(t *testing.T) {
input: pkg("gem", "", "ruby-advisory-db-check", "0.12.4", "", map[string]string{}),
}, {
// TODO (Issue #635): url path escapes here? Will this be an issue when searching via purl in osv or deps.dev?
expectedPurlUri: "pkg:generic/[email protected]?checksum=sha256:de4d501267da&download_url=https:%2F%2Fopenssl.org%2Fsource%2Fopenssl-1.1.0g.tar.gz",
expectedPurlUri: "pkg:generic/[email protected]?checksum=sha256%3Ade4d501267da&download_url=https%3A%2F%2Fopenssl.org%2Fsource%2Fopenssl-1.1.0g.tar.gz",
input: pkg("generic", "", "openssl", "1.1.10g", "", map[string]string{
"download_url": "https://openssl.org/source/openssl-1.1.0g.tar.gz",
"checksum": "sha256:de4d501267da",
}),
}, {
expectedPurlUri: "pkg:generic/bitwarderl?vcs_url=git+https:%2F%2Fgit.fsfe.org%2Fdxtr%2Fbitwarderl@cc55108da32",
expectedPurlUri: "pkg:generic/bitwarderl?vcs_url=git%2Bhttps%3A%2F%2Fgit.fsfe.org%2Fdxtr%2Fbitwarderl%40cc55108da32",
input: pkg("generic", "", "bitwarderl", "", "", map[string]string{
"vcs_url": "git+https://git.fsfe.org/dxtr/bitwarderl@cc55108da32",
}),
Expand All @@ -949,7 +943,7 @@ func TestPkgInputSpecToPurl(t *testing.T) {
expectedPurlUri: "pkg:hackage/[email protected]",
input: pkg("hackage", "", "3d-graphics-examples", "0.0.0.2", "", map[string]string{}),
}, {
expectedPurlUri: "pkg:hex/[email protected]?repository_url=https:%2F%2Fmyrepo.example.com",
expectedPurlUri: "pkg:hex/[email protected]?repository_url=https%3A%2F%2Fmyrepo.example.com",
input: pkg("hex", "", "bar", "1.2.3", "", map[string]string{
"repository_url": "https://myrepo.example.com",
}),
Expand All @@ -966,7 +960,7 @@ func TestPkgInputSpecToPurl(t *testing.T) {
"classifier": "dist",
}),
}, {
expectedPurlUri: "pkg:mlflow/trafficsigns@10?model_uuid=36233173b22f4c89b451f1228d700d49&repository_url=https:%2F%2Fadb-5245952564735461.0.azuredatabricks.net%2Fapi%2F2.0%2Fmlflow&run_id=410a3121-2709-4f88-98dd-dba0ef056b0a",
expectedPurlUri: "pkg:mlflow/trafficsigns@10?model_uuid=36233173b22f4c89b451f1228d700d49&repository_url=https%3A%2F%2Fadb-5245952564735461.0.azuredatabricks.net%2Fapi%2F2.0%2Fmlflow&run_id=410a3121-2709-4f88-98dd-dba0ef056b0a",
input: pkg("mlflow", "", "trafficsigns", "10", "", map[string]string{
"model_uuid": "36233173b22f4c89b451f1228d700d49",
"run_id": "410a3121-2709-4f88-98dd-dba0ef056b0a",
Expand All @@ -986,21 +980,18 @@ func TestPkgInputSpecToPurl(t *testing.T) {
input: pkg("qpkg", "blackberry", "com.qnx.sdp", "7.0.0.SGA201702151847", "", map[string]string{}),
}, {
// Special OCI case
//TODO (Issue #635): similar issue to above.

//expectedPurlUri: "pkg:oci/debian@sha256%3A244fd47e07d10?repository_url=docker.io/library/debian&arch=amd64&tag=latest",
expectedPurlUri: "pkg:oci/debian@sha256:244fd47e07d10?arch=amd64&tag=latest&repository_url=docker.io%2Flibrary",
expectedPurlUri: "pkg:oci/debian@sha256%3A244fd47e07d10?arch=amd64&repository_url=docker.io%2Flibrary&tag=latest",
input: pkg("oci", "docker.io/library", "debian", "sha256:244fd47e07d10", "", map[string]string{
"arch": "amd64",
"tag": "latest",
}),
}, {
expectedPurlUri: "pkg:oci/debian@sha256:244fd47e07d10?tag=bullseye&repository_url=ghcr.io",
expectedPurlUri: "pkg:oci/debian@sha256%3A244fd47e07d10?repository_url=ghcr.io&tag=bullseye",
input: pkg("oci", "ghcr.io", "debian", "sha256:244fd47e07d10", "", map[string]string{
"tag": "bullseye",
}),
}, {
expectedPurlUri: "pkg:oci/hello-wasm@sha256:244fd47e07d10?tag=v1",
expectedPurlUri: "pkg:oci/hello-wasm@sha256%3A244fd47e07d10?tag=v1",
input: pkg("oci", "", "hello-wasm", "sha256:244fd47e07d10", "", map[string]string{
"tag": "v1",
}),
Expand Down
7 changes: 6 additions & 1 deletion pkg/assembler/helpers/purl.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,5 +225,10 @@ func GuacFilePurl(alg string, digest string, filename *string) string {
}

func GuacGenericPurl(s string) string {
return fmt.Sprintf("pkg:guac/generic/%s", SanitizeString(s))
sanitizedString := SanitizeString(s)
if strings.HasPrefix(sanitizedString, "/") {
return fmt.Sprintf("pkg:guac/generic%s", sanitizedString)
} else {
return fmt.Sprintf("pkg:guac/generic/%s", sanitizedString)
}
}
Loading

0 comments on commit 00d978b

Please sign in to comment.