mirror of
https://github.com/lukaszraczylo/gohoarder.git
synced 2026-11-26 06:37:07 +00:00
grype 0.121 prints source.target as a string for file, directory and purl sources. The parser expected an object and failed every scan. A bare npm, PyPI or Go archive holds nothing grype can catalog, so a scan of the archive read minimist 0.0.8 as clean. The scanner now passes a purl for these registries and falls back to the file for others.
14 lines
344 B
Go
14 lines
344 B
Go
package gomodule
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestPath(t *testing.T) {
|
|
assert.Equal(t, "golang.org/x/text", Path("golang.org/x/text/@v/v0.3.5.zip"))
|
|
assert.Equal(t, "github.com/Azure/go-x", Path("github.com/!azure/go-x/@v/v1.2.3.zip"))
|
|
assert.Equal(t, "github.com/a/b/v2", Path("github.com/a/b/v2"))
|
|
}
|