sonatype-nexus-community / nancy

A tool to check for vulnerabilities in your Golang dependencies, powered by Sonatype OSS Index
Apache License 2.0
549 stars 76 forks source link

Nancy does not respect replace directive #254

Closed danieljmt closed 2 years ago

danieljmt commented 2 years ago
    "Module": {
        "Path": "github.com/dgrijalva/jwt-go",
        "Version": "v3.2.0+incompatible",
        "Replace": {
            "Path": "github.com/form3tech-oss/jwt-go",
            "Version": "v3.2.3+incompatible",
            "Time": "2021-05-11T16:32:31Z",
            "Dir": "/Users/danielmarshall/go/pkg/mod/github.com/form3tech-oss/jwt-go@v3.2.3+incompatible",
            "GoMod": "/Users/danielmarshall/go/pkg/mod/cache/download/github.com/form3tech-oss/jwt-go/@v/v3.2.3+incompatible.mod"
        },
        "Indirect": true,
        "Dir": "/Users/danielmarshall/go/pkg/mod/github.com/form3tech-oss/jwt-go@v3.2.3+incompatible",
        "GoMod": "/Users/danielmarshall/go/pkg/mod/cache/download/github.com/form3tech-oss/jwt-go/@v/v3.2.3+incompatible.mod"
    },

cc @bhamail / @DarthHater

DarthHater commented 2 years ago

Wild! For some reason I had thought go list -deps -json was smart enough to have gotten PAST the replace directive, as in I had thought it was a final representation. This is a great catch, thank you!!!