Skip to content

No dependencies are reported despite go.mod being available & resolvable #307

@aeneasr

Description

@aeneasr

Running the following commands:

git clone git@github.com:ory/x.git
cd x
go-licenses report github.com/ory/x

results in one license reported

+W1230 09:01:11.509776   20797 library.go:394] module github.com/ory/x has empty version, defaults to HEAD. The license URL may be incorrect. Please verify!
github.com/ory/x,https://github.com/ory/x/blob/HEAD/LICENSE,Apache-2.0

Despite go.mod having several dependencies with proper licensing set up (https://github.com/ory/x/blob/master/go.mod).

which go
/Users/*/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.2.darwin-amd64/bin/go

The command works fine in other repositories like (https://github.com/ory/kratos):

kratos %  .bin/go-licenses report github.com/ory/kratos

code.dny.dev/ssrf,https://github.com/daenney/ssrf/blob/v0.2.0/LICENSE,MIT
dario.cat/mergo,https://github.com/imdario/mergo/blob/v1.0.0/LICENSE,BSD-3-Clause
filippo.io/edwards25519,https://github.com/FiloSottile/edwards25519/blob/v1.1.0/LICENSE,BSD-3-Clause
github.com/Masterminds/goutils,https://github.com/Masterminds/goutils/blob/v1.1.1/LICENSE.txt,Apache-2.0
...

It also works for direct dependencies in that directory:

kratos % go-licenses report github.com/hashicorp/go-retryablehttp 
github.com/hashicorp/go-cleanhttp,https://github.com/hashicorp/go-cleanhttp/blob/v0.5.2/LICENSE,MPL-2.0
github.com/hashicorp/go-retryablehttp,https://github.com/hashicorp/go-retryablehttp/blob/v0.7.7/LICENSE,MPL-2.0

However, again, for the other repo it does not show any dependencies:

kratos %  go-licenses report github.com/ory/kratos
github.com/ory/x,https://github.com/ory/x/blob/v0.0.675/LICENSE,Apache-2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions