mirror of
https://github.com/slsa-framework/slsa-verifier.git
synced 2026-05-13 03:57:11 +00:00
We've long had the problem that slsa-verifier has too many dependencies. This PR replaces `"github.com/sigstore/cosign/v2/cmd/cosign/cli/fulcio"` with `"github.com/sigstore/sigstore/pkg/fulcioroots"`, removing lot's of unneeded transitive dependencies like `"github.com/aws/aws-sdk-go-v2"` and `"github.com/Azure/go-autorest/autorest"` from our `go.mod`. ## Investigation At [deps.dep](https://deps.dev/go/github.com%2Fslsa-framework%2Fslsa-verifier%2Fv2/v2.4.1/dependencies/graph?filter=aws), we can see that the indirect dependencies of `aws/aws-sdk-go-v2` come from `cosign/cosign`. <img width="1110" alt="image" src="https://github.com/slsa-framework/slsa-verifier/assets/32398091/3de1adf4-29ac-4bec-a511-0ae191c3141c"> That's a good start, but this gives us only module-wide dependencies, not package-level dependencies. We can instead use `go mod why <pkg>` to get the package-level dependency chain. Now we know that it's our `gha` package that imports a fulcio package, which imports an aws package. ``` ➜ slsa-verifier git:(main) ✗ go mod why github.com/aws/aws-sdk-go-v2/ # github.com/aws/aws-sdk-go-v2 github.com/slsa-framework/slsa-verifier/v2/verifiers/internal/gha github.com/sigstore/cosign/v2/cmd/cosign/cli/fulcio github.com/sigstore/cosign/v2/cmd/cosign/cli/options github.com/awslabs/amazon-ecr-credential-helper/ecr-login github.com/awslabs/amazon-ecr-credential-helper/ecr-login/api github.com/aws/aws-sdk-go-v2/config github.com/aws/aws-sdk-go-v2/internal/ini github.com/aws/aws-sdk-go-v2 ``` Looking at our `gha` package we can see that the required methods from fulcio are `Get()` and `GetIntermediates()`. Looking at the source codes, we see that `"github.com/sigstore/cosign/v2/cmd/cosign/cli/fulcio"`'s implementation of these methods is the same as `"github.com/sigstore/sigstore/pkg/fulcioroots"`'s implementation. So we chose the latter's implementation, which happens to require fewer module-level dependencies. -546f1c5b91/cmd/cosign/cli/fulcio/fulcio.go (L16)-546f1c5b91/internal/pkg/cosign/fulcio/fulcioroots/fulcioroots.go (L16)-25dd9f3e52/pkg/fulcioroots/fulcioroots.go (L17)## Testing - unit tests continue to pass - manual test to verify a provenance with the steps in our [readme](https://github.com/slsa-framework/slsa-verifier?tab=readme-ov-file#npm-packages-built-using-the-slsa3-nodejs-builder) ## Future Work The sigstore-go library is meant to be a more long-term solution, for replacing much of the sigstore-related functionality that slsa-verifier implements directly. Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
122 lines
5.4 KiB
Modula-2
122 lines
5.4 KiB
Modula-2
module github.com/slsa-framework/slsa-verifier/v2
|
|
|
|
go 1.21
|
|
|
|
toolchain go1.21.6
|
|
|
|
require (
|
|
github.com/docker/go v1.5.1-1
|
|
github.com/go-openapi/runtime v0.27.0
|
|
github.com/google/go-cmp v0.6.0
|
|
github.com/google/trillian v1.5.3 // indirect
|
|
github.com/in-toto/in-toto-golang v0.9.0
|
|
github.com/secure-systems-lab/go-securesystemslib v0.8.0
|
|
github.com/sigstore/rekor v1.3.4
|
|
github.com/sigstore/sigstore v1.8.1
|
|
)
|
|
|
|
require (
|
|
github.com/google/go-containerregistry v0.18.0
|
|
github.com/gorilla/mux v1.8.1
|
|
github.com/sigstore/cosign/v2 v2.2.0
|
|
github.com/slsa-framework/slsa-github-generator v1.9.0
|
|
github.com/spf13/cobra v1.8.0
|
|
golang.org/x/mod v0.14.0
|
|
sigs.k8s.io/release-utils v0.7.7
|
|
)
|
|
|
|
require (
|
|
github.com/digitorus/pkcs7 v0.0.0-20230818184609-3a137a874352 // indirect
|
|
github.com/digitorus/timestamp v0.0.0-20230821155606-d1ad5ca9624c // indirect
|
|
github.com/go-openapi/strfmt v0.22.0 // indirect
|
|
github.com/go-openapi/swag v0.22.8 // indirect
|
|
github.com/google/uuid v1.5.0 // indirect
|
|
github.com/nozzle/throttler v0.0.0-20180817012639-2ea982251481 // indirect
|
|
github.com/sagikazarmark/locafero v0.3.0 // indirect
|
|
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
|
|
github.com/sigstore/timestamp-authority v1.1.2 // indirect
|
|
github.com/sourcegraph/conc v0.3.0 // indirect
|
|
github.com/transparency-dev/merkle v0.0.2 // indirect
|
|
go.opentelemetry.io/otel/metric v1.19.0 // indirect
|
|
google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect
|
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect
|
|
gopkg.in/go-jose/go-jose.v2 v2.6.1 // indirect
|
|
)
|
|
|
|
require (
|
|
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
|
|
github.com/blang/semver v3.5.1+incompatible // indirect
|
|
github.com/common-nighthawk/go-figure v0.0.0-20210622060536-734e95fb86be // indirect
|
|
github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect
|
|
github.com/cyberphone/json-canonicalization v0.0.0-20220623050100-57a0ce2678a7 // indirect
|
|
github.com/docker/cli v24.0.0+incompatible // indirect
|
|
github.com/docker/distribution v2.8.3+incompatible // indirect
|
|
github.com/docker/docker v24.0.7+incompatible // indirect
|
|
github.com/docker/docker-credential-helpers v0.7.0 // indirect
|
|
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
|
github.com/go-chi/chi v4.1.2+incompatible // indirect
|
|
github.com/go-logr/logr v1.3.0 // indirect
|
|
github.com/go-logr/stdr v1.2.2 // indirect
|
|
github.com/go-openapi/analysis v0.21.5 // indirect
|
|
github.com/go-openapi/errors v0.21.0 // indirect
|
|
github.com/go-openapi/jsonpointer v0.20.1 // indirect
|
|
github.com/go-openapi/jsonreference v0.20.3 // indirect
|
|
github.com/go-openapi/loads v0.21.3 // indirect
|
|
github.com/go-openapi/spec v0.20.12 // indirect
|
|
github.com/go-openapi/validate v0.22.4 // indirect
|
|
github.com/golang/protobuf v1.5.3 // indirect
|
|
github.com/golang/snappy v0.0.4 // indirect
|
|
github.com/google/certificate-transparency-go v1.1.6 // indirect
|
|
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
|
|
github.com/hashicorp/go-retryablehttp v0.7.5 // indirect
|
|
github.com/hashicorp/hcl v1.0.0 // indirect
|
|
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
|
github.com/jedisct1/go-minisign v0.0.0-20211028175153-1c139d1cc84b // indirect
|
|
github.com/josharian/intern v1.0.0 // indirect
|
|
github.com/klauspost/compress v1.17.0 // indirect
|
|
github.com/letsencrypt/boulder v0.0.0-20230907030200-6d76a0f91e1e // indirect
|
|
github.com/magiconair/properties v1.8.7 // indirect
|
|
github.com/mailru/easyjson v0.7.7 // indirect
|
|
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
|
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
|
github.com/oklog/ulid v1.3.1 // indirect
|
|
github.com/opencontainers/go-digest v1.0.0 // indirect
|
|
github.com/opencontainers/image-spec v1.1.0-rc5 // indirect
|
|
github.com/opentracing/opentracing-go v1.2.0 // indirect
|
|
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
|
|
github.com/pkg/errors v0.9.1 // indirect
|
|
github.com/sassoftware/relic v7.2.1+incompatible // indirect
|
|
github.com/shibumi/go-pathspec v1.3.0 // indirect
|
|
github.com/sigstore/fulcio v1.4.3
|
|
github.com/sigstore/protobuf-specs v0.2.1
|
|
github.com/sirupsen/logrus v1.9.3 // indirect
|
|
github.com/spf13/afero v1.10.0 // indirect
|
|
github.com/spf13/cast v1.5.1 // indirect
|
|
github.com/spf13/pflag v1.0.5 // indirect
|
|
github.com/spf13/viper v1.17.0 // indirect
|
|
github.com/subosito/gotenv v1.6.0 // indirect
|
|
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect
|
|
github.com/theupdateframework/go-tuf v0.7.0 // indirect
|
|
github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect
|
|
github.com/vbatts/tar-split v0.11.3 // indirect
|
|
go.mongodb.org/mongo-driver v1.13.1 // indirect
|
|
go.opentelemetry.io/otel v1.19.0 // indirect
|
|
go.opentelemetry.io/otel/trace v1.19.0 // indirect
|
|
go.uber.org/multierr v1.11.0 // indirect
|
|
go.uber.org/zap v1.26.0 // indirect
|
|
golang.org/x/crypto v0.18.0 // indirect
|
|
golang.org/x/exp v0.0.0-20231006140011-7918f672742d
|
|
golang.org/x/net v0.20.0 // indirect
|
|
golang.org/x/sync v0.5.0 // indirect
|
|
golang.org/x/sys v0.16.0 // indirect
|
|
golang.org/x/term v0.16.0 // indirect
|
|
golang.org/x/text v0.14.0 // indirect
|
|
google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 // indirect
|
|
google.golang.org/grpc v1.59.0 // indirect
|
|
google.golang.org/protobuf v1.33.0
|
|
gopkg.in/ini.v1 v1.67.0 // indirect
|
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
|
k8s.io/klog/v2 v2.100.1 // indirect
|
|
sigs.k8s.io/yaml v1.4.0 // indirect
|
|
)
|