diff --git a/.clang-format b/.clang-format deleted file mode 100644 index 9f28501b39..0000000000 --- a/.clang-format +++ /dev/null @@ -1,5 +0,0 @@ ---- -Language: Proto -BasedOnStyle: Google -AlignConsecutiveAssignments: true -AlignConsecutiveDeclarations: true diff --git a/Dockerfile.protoc b/Dockerfile.protoc deleted file mode 100644 index cf8877cdf4..0000000000 --- a/Dockerfile.protoc +++ /dev/null @@ -1,20 +0,0 @@ -FROM --platform=linux/amd64 golang:1.24 - -# Set environment variable for protoc -ENV PROTOC_ZIP=protoc-3.19.4-linux-x86_64.zip - -# Install unzip for protoc installation and clean up cache -RUN apt-get update && apt-get install -y unzip && rm -rf /var/lib/apt/lists/* - -# Download and install protoc -RUN curl --retry 5 -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/$PROTOC_ZIP \ - && unzip -o $PROTOC_ZIP -d /usr/local bin/protoc \ - && unzip -o $PROTOC_ZIP -d /usr/local 'include/*' \ - && rm -f $PROTOC_ZIP - -# Install Go tools -RUN go install github.com/twitchtv/twirp/protoc-gen-twirp@v8.1.0 -RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.0 -RUN go install github.com/magefile/mage@v1.15.0 - -ENV TRIVY_PROTOC_CONTAINER=true diff --git a/buf.gen.yaml b/buf.gen.yaml new file mode 100644 index 0000000000..34f2690cd3 --- /dev/null +++ b/buf.gen.yaml @@ -0,0 +1,13 @@ +version: v2 +plugins: + - remote: buf.build/protocolbuffers/go:v1.34.0 + out: . + opt: + - paths=source_relative + # Using local protoc-gen-twirp since the remote twirp plugin is not available on buf.build + - local: protoc-gen-twirp + out: . + opt: + - paths=source_relative +inputs: + - directory: . \ No newline at end of file diff --git a/buf.yaml b/buf.yaml new file mode 100644 index 0000000000..6828fe2c4a --- /dev/null +++ b/buf.yaml @@ -0,0 +1,10 @@ +version: v2 +modules: + - path: . + name: buf.build/aquasecurity/trivy +lint: + use: + - STANDARD +breaking: + use: + - FILE \ No newline at end of file diff --git a/docs/community/contribute/pr.md b/docs/community/contribute/pr.md index e60b3d987c..2c09540906 100644 --- a/docs/community/contribute/pr.md +++ b/docs/community/contribute/pr.md @@ -54,6 +54,21 @@ Your PR must pass all the integration tests. You can test it as below. $ mage test:integration ``` +### Protocol Buffers +If you update protobuf files (`.proto`), you need to regenerate the Go code: + +```shell +$ mage protoc:generate +``` + +You can also format and lint protobuf files: + +```shell +$ mage protoc:fmt # Format protobuf files +$ mage protoc:lint # Lint protobuf files +$ mage protoc:breaking # Check for breaking changes against main branch +``` + ### Documentation If you update CLI flags, you need to generate the CLI references. The test will fail if they are not up-to-date. diff --git a/go.mod b/go.mod index 1909d7f9a6..ffcd9f9c60 100644 --- a/go.mod +++ b/go.mod @@ -110,7 +110,7 @@ require ( github.com/testcontainers/testcontainers-go v0.37.1-0.20250602105123-1720acdcb24e github.com/testcontainers/testcontainers-go/modules/localstack v0.37.0 github.com/tetratelabs/wazero v1.9.0 - github.com/twitchtv/twirp v8.1.3+incompatible + github.com/twitchtv/twirp v8.1.0+incompatible github.com/xeipuuv/gojsonschema v1.2.0 github.com/xlab/treeprint v1.2.0 github.com/zclconf/go-cty v1.16.3 @@ -133,7 +133,19 @@ require ( ) require ( - cel.dev/expr v0.20.0 // indirect + buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.36.6-20250121211742-6d880cc6cc8d.1 // indirect + buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.6-20250613105001-9f2d3c737feb.1 // indirect + buf.build/gen/go/bufbuild/registry/connectrpc/go v1.18.1-20250606164443-9d1800bf4ccc.1 // indirect + buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.36.6-20250606164443-9d1800bf4ccc.1 // indirect + buf.build/gen/go/pluginrpc/pluginrpc/protocolbuffers/go v1.36.6-20241007202033-cf42259fcbfc.1 // indirect + buf.build/go/app v0.1.0 // indirect + buf.build/go/bufplugin v0.9.0 // indirect + buf.build/go/interrupt v1.1.0 // indirect + buf.build/go/protovalidate v0.13.1 // indirect + buf.build/go/protoyaml v0.6.0 // indirect + buf.build/go/spdx v0.2.0 // indirect + buf.build/go/standard v0.1.0 // indirect + cel.dev/expr v0.24.0 // indirect cloud.google.com/go v0.118.3 // indirect cloud.google.com/go/auth v0.15.0 // indirect cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect @@ -141,6 +153,8 @@ require ( cloud.google.com/go/iam v1.4.1 // indirect cloud.google.com/go/monitoring v1.24.0 // indirect cloud.google.com/go/storage v1.50.0 // indirect + connectrpc.com/connect v1.18.1 // indirect + connectrpc.com/otelconnect v0.7.2 // indirect dario.cat/mergo v1.0.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 // indirect github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect @@ -169,6 +183,7 @@ require ( github.com/agnivade/levenshtein v1.2.1 // indirect github.com/alessio/shellescape v1.4.1 // indirect github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092 // indirect + github.com/antlr4-go/antlr/v4 v4.13.1 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect github.com/aquasecurity/jfather v0.0.8 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect @@ -188,6 +203,9 @@ require ( github.com/blang/semver v3.5.1+incompatible // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/briandowns/spinner v1.23.0 // indirect + github.com/bufbuild/buf v1.55.1 // indirect + github.com/bufbuild/protocompile v0.14.1 // indirect + github.com/bufbuild/protoplugin v0.0.0-20250218205857-750e09ce93e1 // indirect github.com/cenkalti/backoff/v5 v5.0.2 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chai2010/gettext-go v1.0.2 // indirect @@ -231,6 +249,7 @@ require ( github.com/fvbommel/sortorder v1.1.0 // indirect github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/go-chi/chi v4.1.2+incompatible // indirect + github.com/go-chi/chi/v5 v5.2.1 // indirect github.com/go-errors/errors v1.4.2 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.6.2 // indirect @@ -250,20 +269,24 @@ require ( github.com/go-openapi/strfmt v0.23.0 // indirect github.com/go-openapi/swag v0.23.1 // indirect github.com/go-openapi/validate v0.24.0 // indirect + github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/go-viper/mapstructure/v2 v2.3.0 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/goccy/go-yaml v1.15.23 // indirect + github.com/gofrs/flock v0.12.1 // indirect github.com/gofrs/uuid v4.3.1+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.2 // indirect github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.3 // indirect + github.com/google/cel-go v0.25.0 // indirect github.com/google/certificate-transparency-go v1.1.8 // indirect github.com/google/gnostic-models v0.6.9 // indirect github.com/google/go-cmp v0.7.0 // indirect github.com/google/go-github/v31 v31.0.0 // indirect github.com/google/go-querystring v1.1.0 // indirect + github.com/google/pprof v0.0.0-20250607225305-033d6d78b36a // indirect github.com/google/s2a-go v0.1.9 // indirect github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect @@ -282,6 +305,7 @@ require ( github.com/huandu/xstrings v1.5.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect + github.com/jdx/go-netrc v1.0.0 // indirect github.com/jedisct1/go-minisign v0.0.0-20230811132847-661be99b8267 // indirect github.com/jmespath/go-jmespath v0.4.1-0.20220621161143-b0104c826a24 // indirect github.com/jmoiron/sqlx v1.4.0 // indirect @@ -289,6 +313,7 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/klauspost/compress v1.18.0 // indirect + github.com/klauspost/pgzip v1.2.6 // indirect github.com/knqyf263/labeler v0.0.0-20200423181506-7a6e545148c3 // indirect github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect @@ -327,6 +352,7 @@ require ( github.com/nozzle/throttler v0.0.0-20180817012639-2ea982251481 // indirect github.com/oklog/ulid v1.3.1 // indirect github.com/oklog/ulid/v2 v2.1.1 // indirect + github.com/onsi/ginkgo/v2 v2.23.4 // indirect github.com/opencontainers/runtime-spec v1.2.1 // indirect github.com/opencontainers/selinux v1.12.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect @@ -344,15 +370,20 @@ require ( github.com/prometheus/client_model v0.6.2 // indirect github.com/prometheus/common v0.62.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect + github.com/quic-go/qpack v0.5.1 // indirect + github.com/quic-go/quic-go v0.52.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/rivo/uniseg v0.4.7 // indirect + github.com/rs/cors v1.11.1 // indirect github.com/rubenv/sql-migrate v1.8.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sagikazarmark/locafero v0.7.0 // indirect github.com/samber/oops v1.18.1 // indirect github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect github.com/sassoftware/relic v7.2.1+incompatible // indirect + github.com/segmentio/asm v1.2.0 // indirect + github.com/segmentio/encoding v0.5.1 // indirect github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect github.com/shibumi/go-pathspec v1.3.0 // indirect github.com/shirou/gopsutil/v4 v4.25.4 // indirect @@ -365,6 +396,7 @@ require ( github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.12.0 // indirect github.com/spiffe/go-spiffe/v2 v2.5.0 // indirect + github.com/stoewer/go-strcase v1.3.0 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect @@ -391,6 +423,10 @@ require ( github.com/yuin/gopher-lua v1.1.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect github.com/zeebo/errs v1.4.0 // indirect + go.lsp.dev/jsonrpc2 v0.10.0 // indirect + go.lsp.dev/pkg v0.0.0-20210717090340-384b27a52fb2 // indirect + go.lsp.dev/protocol v0.12.0 // indirect + go.lsp.dev/uri v0.3.0 // indirect go.mongodb.org/mongo-driver v1.14.0 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect @@ -405,10 +441,12 @@ require ( go.opentelemetry.io/otel/sdk v1.36.0 // indirect go.opentelemetry.io/otel/sdk/metric v1.36.0 // indirect go.opentelemetry.io/otel/trace v1.36.0 // indirect - go.opentelemetry.io/proto/otlp v1.6.0 // indirect + go.opentelemetry.io/proto/otlp v1.7.0 // indirect + go.uber.org/automaxprocs v1.6.0 // indirect + go.uber.org/mock v0.5.2 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 // indirect + golang.org/x/exp v0.0.0-20250606033433-dcc06ee1d476 // indirect golang.org/x/oauth2 v0.30.0 // indirect golang.org/x/sys v0.33.0 // indirect golang.org/x/telemetry v0.0.0-20240522233618-39ace7a40ae7 // indirect @@ -416,8 +454,8 @@ require ( golang.org/x/tools v0.34.0 // indirect google.golang.org/api v0.228.0 // indirect google.golang.org/genproto v0.0.0-20250303144028-a0af3efb3deb // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250519155744-55703ea1f237 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250519155744-55703ea1f237 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 // indirect google.golang.org/grpc v1.72.2 // indirect gopkg.in/cheggaaa/pb.v1 v1.0.28 // indirect gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect @@ -438,6 +476,7 @@ require ( modernc.org/memory v1.11.0 // indirect mvdan.cc/sh/v3 v3.11.0 // indirect oras.land/oras-go/v2 v2.6.0 // indirect + pluginrpc.com/pluginrpc v0.5.0 // indirect sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect sigs.k8s.io/kind v0.19.0 // indirect sigs.k8s.io/kustomize/api v0.19.0 // indirect @@ -448,9 +487,11 @@ require ( ) tool ( + github.com/bufbuild/buf/cmd/buf github.com/google/wire/cmd/wire github.com/knqyf263/labeler github.com/magefile/mage + github.com/twitchtv/twirp/protoc-gen-twirp golang.org/x/tools/cmd/goyacc sigs.k8s.io/kind ) diff --git a/go.sum b/go.sum index 04d0fd519c..64716fca0a 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,29 @@ -cel.dev/expr v0.20.0 h1:OunBvVCfvpWlt4dN7zg3FM6TDkzOePe1+foGJ9AXeeI= -cel.dev/expr v0.20.0/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= +buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.36.6-20250121211742-6d880cc6cc8d.1 h1:f6miF8tK6H+Ktad24WpnNfpHO75GRGk0rhJ1mxPXqgA= +buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.36.6-20250121211742-6d880cc6cc8d.1/go.mod h1:rvbyamNtvJ4o3ExeCmaG5/6iHnu0vy0E+UQ+Ph0om8s= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.6-20250613105001-9f2d3c737feb.1 h1:AUL6VF5YWL01j/1H/DQbPUSDkEwYqwVCNw7yhbpOxSQ= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.6-20250613105001-9f2d3c737feb.1/go.mod h1:avRlCjnFzl98VPaeCtJ24RrV/wwHFzB8sWXhj26+n/U= +buf.build/gen/go/bufbuild/registry/connectrpc/go v1.18.1-20250606164443-9d1800bf4ccc.1 h1:x7juyChlm/fXZyuJTdBeMzHwAMhPJkP0qE4/IpwpGX4= +buf.build/gen/go/bufbuild/registry/connectrpc/go v1.18.1-20250606164443-9d1800bf4ccc.1/go.mod h1:vi8xjh+6SQRvLQYnyVFZ7kOBrFevwFudusxWVc6E58A= +buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.36.6-20250606164443-9d1800bf4ccc.1 h1:iiP7EL8EWrWmxn9qPDQTFdVSu04qIrmglpyjC10K4IU= +buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.36.6-20250606164443-9d1800bf4ccc.1/go.mod h1:bUPpZtzAkcnTA7OLfKCvkvkxEAC6dG/ZIlbnbUJicL4= +buf.build/gen/go/pluginrpc/pluginrpc/protocolbuffers/go v1.36.6-20241007202033-cf42259fcbfc.1 h1:trcsXBDm8exui7mvndZnvworCyBq1xuMnod2N0j79K8= +buf.build/gen/go/pluginrpc/pluginrpc/protocolbuffers/go v1.36.6-20241007202033-cf42259fcbfc.1/go.mod h1:OUbhXurY+VHFGn9FBxcRy8UB7HXk9NvJ2qCgifOMypQ= +buf.build/go/app v0.1.0 h1:nlqD/h0rhIN73ZoiDElprrPiO2N6JV+RmNK34K29Ihg= +buf.build/go/app v0.1.0/go.mod h1:0XVOYemubVbxNXVY0DnsVgWeGkcbbAvjDa1fmhBC+Wo= +buf.build/go/bufplugin v0.9.0 h1:ktZJNP3If7ldcWVqh46XKeiYJVPxHQxCfjzVQDzZ/lo= +buf.build/go/bufplugin v0.9.0/go.mod h1:Z0CxA3sKQ6EPz/Os4kJJneeRO6CjPeidtP1ABh5jPPY= +buf.build/go/interrupt v1.1.0 h1:olBuhgv9Sav4/9pkSLoxgiOsZDgM5VhRhvRpn3DL0lE= +buf.build/go/interrupt v1.1.0/go.mod h1:ql56nXPG1oHlvZa6efNC7SKAQ/tUjS6z0mhJl0gyeRM= +buf.build/go/protovalidate v0.13.1 h1:6loHDTWdY/1qmqmt1MijBIKeN4T9Eajrqb9isT1W1s8= +buf.build/go/protovalidate v0.13.1/go.mod h1:C/QcOn/CjXRn5udUwYBiLs8y1TGy7RS+GOSKqjS77aU= +buf.build/go/protoyaml v0.6.0 h1:Nzz1lvcXF8YgNZXk+voPPwdU8FjDPTUV4ndNTXN0n2w= +buf.build/go/protoyaml v0.6.0/go.mod h1:RgUOsBu/GYKLDSIRgQXniXbNgFlGEZnQpRAUdLAFV2Q= +buf.build/go/spdx v0.2.0 h1:IItqM0/cMxvFJJumcBuP8NrsIzMs/UYjp/6WSpq8LTw= +buf.build/go/spdx v0.2.0/go.mod h1:bXdwQFem9Si3nsbNy8aJKGPoaPi5DKwdeEp5/ArZ6w8= +buf.build/go/standard v0.1.0 h1:g98T9IyvAl0vS3Pq8iVk6Cvj2ZiFvoUJRtfyGa0120U= +buf.build/go/standard v0.1.0/go.mod h1:PiqpHz/7ZFq+kqvYhc/SK3lxFIB9N/aiH2CFC2JHIQg= +cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= +cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -616,6 +640,10 @@ cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoIS cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M= cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= cloud.google.com/go/workflows v1.10.0/go.mod h1:fZ8LmRmZQWacon9UCX1r/g/DfAXx5VcPALq2CxzdePw= +connectrpc.com/connect v1.18.1 h1:PAg7CjSAGvscaf6YZKUefjoih5Z/qYkyaTrBW8xvYPw= +connectrpc.com/connect v1.18.1/go.mod h1:0292hj1rnx8oFrStN7cB4jjVBeqs+Yx5yDIC2prWDO8= +connectrpc.com/otelconnect v0.7.2 h1:WlnwFzaW64dN06JXU+hREPUGeEzpz3Acz2ACOmN8cMI= +connectrpc.com/otelconnect v0.7.2/go.mod h1:JS7XUKfuJs2adhCnXhNHPHLz6oAaZniCJdSF00OZSew= cuelabs.dev/go/oci/ociregistry v0.0.0-20240314152124-224736b49f2e h1:GwCVItFUPxwdsEYnlUcJ6PJxOjTeFFCKOh6QWg4oAzQ= cuelabs.dev/go/oci/ociregistry v0.0.0-20240314152124-224736b49f2e/go.mod h1:ApHceQLLwcOkCEXM1+DyCXTHEJhNGDpJ2kmV6axsx24= cuelang.org/go v0.8.1 h1:VFYsxIFSPY5KgSaH1jQ2GxHOrbu6Ga3kEI70yCZwnOg= @@ -768,6 +796,8 @@ github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHG github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= +github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0Ih0vcRo/gZ1M0= github.com/apache/arrow/go/v11 v11.0.0/go.mod h1:Eg5OsL5H+e299f7u5ssuXsuHQVEGC4xei5aX110hRiI= github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= @@ -878,6 +908,12 @@ github.com/briandowns/spinner v1.23.0 h1:alDF2guRWqa/FOZZYWjlMIx2L6H0wyewPxo/CH4 github.com/briandowns/spinner v1.23.0/go.mod h1:rPG4gmXeN3wQV/TsAY4w8lPdIM6RX3yqeBQJSrbXjuE= github.com/bshuster-repo/logrus-logstash-hook v1.0.0 h1:e+C0SB5R1pu//O4MQ3f9cFuPGoOVeF2fE4Og9otCc70= github.com/bshuster-repo/logrus-logstash-hook v1.0.0/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= +github.com/bufbuild/buf v1.55.1 h1:yaRXO9YmtgyEhiqT/gwuJWhHN9xBBbqlQvXVnPauvCk= +github.com/bufbuild/buf v1.55.1/go.mod h1:bvDF6WkvObC+ca9gmP++/oCAWeVVX7MspMcTFznqF7k= +github.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/FBatYVw= +github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c= +github.com/bufbuild/protoplugin v0.0.0-20250218205857-750e09ce93e1 h1:V1xulAoqLqVg44rY97xOR+mQpD2N+GzhMHVwJ030WEU= +github.com/bufbuild/protoplugin v0.0.0-20250218205857-750e09ce93e1/go.mod h1:c5D8gWRIZ2HLWO3gXYTtUfw/hbJyD8xikv2ooPxnklQ= github.com/bugsnag/bugsnag-go v1.0.5-0.20150529004307-13fd6b8acda0/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= @@ -1113,6 +1149,8 @@ github.com/gliderlabs/ssh v0.3.8 h1:a4YXD1V7xMF9g5nTkdfnja3Sxy1PVDCj1Zg4Wb8vY6c= github.com/gliderlabs/ssh v0.3.8/go.mod h1:xYoytBv1sV0aL3CavoDuJIQNURXkkfPA/wxQ1pL1fAU= github.com/go-chi/chi v4.1.2+incompatible h1:fGFk2Gmi/YKXk0OmGfBh0WgmN3XB8lVnEyNz34tQRec= github.com/go-chi/chi v4.1.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= +github.com/go-chi/chi/v5 v5.2.1 h1:KOIHODQj58PmL80G2Eak4WdvUzjSJSm0vG72crDCqb8= +github.com/go-chi/chi/v5 v5.2.1/go.mod h1:L2yAIGWB3H+phAw1NxKwWM+7eUH/lU8pOMm5hHcoops= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= @@ -1185,7 +1223,6 @@ github.com/go-sql-driver/mysql v1.3.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= github.com/go-sql-driver/mysql v1.9.1 h1:FrjNGn/BsJQjVRuSa8CBrM5BWA9BWoXXat3KrtSb/iI= github.com/go-sql-driver/mysql v1.9.1/go.mod h1:qn46aNg1333BRMNU69Lq93t8du/dwxI64Gl8i5p1WMU= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= @@ -1203,6 +1240,8 @@ github.com/gocsaf/csaf/v3 v3.2.0 h1:LF9j1ou4Cm5MT4+oHbk16Ae0hSmCztwPJqciTapVNIU= github.com/gocsaf/csaf/v3 v3.2.0/go.mod h1:EpUCrQg69i+Y66MphmQvVbcj333GFLjXOYHg1zoXVso= github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gofrs/flock v0.12.1 h1:MTLVXXHf8ekldpJk3AKicLij9MdwOWkZ+a/jHHZby9E= +github.com/gofrs/flock v0.12.1/go.mod h1:9zxTsyu5xtJ9DK+1tFZyibEV7y3uwDxPPfbxeeHCoD0= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.3.1+incompatible h1:0/KbAdpx3UXAx1kEOWHJeOkpbgRFGHVgv+CFIY7dBJI= github.com/gofrs/uuid v4.3.1+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= @@ -1263,6 +1302,8 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/cel-go v0.25.0 h1:jsFw9Fhn+3y2kBbltZR4VEz5xKkcIFRPDnuEzAGv5GY= +github.com/google/cel-go v0.25.0/go.mod h1:hjEb6r5SuOSlhCHmFoLzu8HGCERvIsDAbxDAyNU/MmI= github.com/google/certificate-transparency-go v1.0.10-0.20180222191210-5ab67e519c93/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= github.com/google/certificate-transparency-go v1.1.8 h1:LGYKkgZF7satzgTak9R4yzfJXEeYVAjV6/EAEJOf1to= github.com/google/certificate-transparency-go v1.1.8/go.mod h1:bV/o8r0TBKRf1X//iiiSgWrvII4d7/8OiA+3vG26gI8= @@ -1329,8 +1370,8 @@ github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8= -github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA= +github.com/google/pprof v0.0.0-20250607225305-033d6d78b36a h1://KbezygeMJZCSHH+HgUZiTeSoiuFspbMg1ge+eFj18= +github.com/google/pprof v0.0.0-20250607225305-033d6d78b36a/go.mod h1:5hDyRhoBCxViHszMt12TnOpEI4VVi+U8Gm9iphldiMA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0= github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM= @@ -1451,11 +1492,16 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2 github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= +github.com/jdx/go-netrc v1.0.0 h1:QbLMLyCZGj0NA8glAhxUpf1zDg6cxnWgMBbjq40W0gQ= +github.com/jdx/go-netrc v1.0.0/go.mod h1:Gh9eFQJnoTNIRHXl2j5bJXA1u84hQWJWgGh569zF3v8= github.com/jedisct1/go-minisign v0.0.0-20230811132847-661be99b8267 h1:TMtDYDHKYY15rFihtRfck/bfFqNfvcabqvXAFQfAUpY= github.com/jedisct1/go-minisign v0.0.0-20230811132847-661be99b8267/go.mod h1:h1nSAbGFqGVzn6Jyl1R/iCcBUHN4g+gW1u9CoBTrb9E= github.com/jellydator/ttlcache/v3 v3.3.0 h1:BdoC9cE81qXfrxeb9eoJi9dWrdhSuwXMAnHTbnBm4Wc= github.com/jellydator/ttlcache/v3 v3.3.0/go.mod h1:bj2/e0l4jRnQdrnSTaGTsh4GSXvMjQcy41i7th0GVGw= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= +github.com/jhump/protoreflect/v2 v2.0.0-beta.2 h1:qZU+rEZUOYTz1Bnhi3xbwn+VxdXkLVeEpAeZzVXLY88= +github.com/jhump/protoreflect/v2 v2.0.0-beta.2/go.mod h1:4tnOYkB/mq7QTyS3YKtVtNrJv4Psqout8HA1U+hZtgM= github.com/jinzhu/gorm v0.0.0-20170222002820-5409931a1bb8/go.mod h1:Vla75njaFJ8clLU1W44h34PjIkijhjHIYnZxMqCdxqo= github.com/jinzhu/inflection v0.0.0-20170102125226-1c35d901db3d/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= @@ -1492,6 +1538,8 @@ github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zt github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU= +github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/knqyf263/go-apk-version v0.0.0-20200609155635-041fdbb8563f h1:GvCU5GXhHq+7LeOzx/haG7HSIZokl3/0GkoUFzsRJjg= github.com/knqyf263/go-apk-version v0.0.0-20200609155635-041fdbb8563f/go.mod h1:q59u9px8b7UTj0nIjEjvmTWekazka6xIt6Uogz5Dm+8= github.com/knqyf263/go-deb-version v0.0.0-20241115132648-6f4aee6ccd23 h1:dWzdsqjh1p2gNtRKqNwuBvKqMNwnLOPLzVZT1n6DK7s= @@ -1667,15 +1715,15 @@ github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vv github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/ginkgo/v2 v2.21.0 h1:7rg/4f3rB88pb5obDgNZrNHrQ4e6WpjonchcpuBRnZM= -github.com/onsi/ginkgo/v2 v2.21.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= +github.com/onsi/ginkgo/v2 v2.23.4 h1:ktYTpKJAVZnDT4VjxSbiBenUjmlL/5QkBEocaWXiQus= +github.com/onsi/ginkgo/v2 v2.23.4/go.mod h1:Bt66ApGPBFzHyR+JO10Zbt0Gsp4uWxu5mIOTusL46e8= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/onsi/gomega v1.35.1 h1:Cwbd75ZBPxFSuZ6T+rN/WCb/gOc6YgFBXLlZLhC7Ds4= -github.com/onsi/gomega v1.35.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= +github.com/onsi/gomega v1.36.3 h1:hID7cr8t3Wp26+cYnfcjR6HpJ00fdogN6dqZ1t6IylU= +github.com/onsi/gomega v1.36.3/go.mod h1:8D9+Txp43QWKhM24yyOBEdpkzN8FvJyAwecBgsU4KU0= github.com/open-policy-agent/opa v1.6.0 h1:/S/cnNQJ2MUMNzizHPbisTWBHowmLkPrugY5jjkPlRQ= github.com/open-policy-agent/opa v1.6.0/go.mod h1:zFmw4P+W62+CWGYRDDswfVYSCnPo6oYaktQnfIaRFC4= github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= @@ -1737,6 +1785,8 @@ github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/poy/onpar v1.1.2 h1:QaNrNiZx0+Nar5dLgTVp5mXkyoVFIbepjyEoGSnhbAY= github.com/poy/onpar v1.1.2/go.mod h1:6X8FLNoxyr9kkmnlqpK6LSoiOtrO6MICtWwEuWkLjzg= +github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= +github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/prometheus/client_golang v0.9.0-pre1.0.20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q= github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0= @@ -1756,6 +1806,10 @@ github.com/protocolbuffers/txtpbfmt v0.0.0-20231025115547-084445ff1adf h1:014O62 github.com/protocolbuffers/txtpbfmt v0.0.0-20231025115547-084445ff1adf/go.mod h1:jgxiZysxFPM+iWKwQwPR+y+Jvo54ARd4EisXxKYpB5c= github.com/quasilyte/go-ruleguard/dsl v0.3.22 h1:wd8zkOhSNr+I+8Qeciml08ivDt1pSXe60+5DqOpCjPE= github.com/quasilyte/go-ruleguard/dsl v0.3.22/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quic-go/qpack v0.5.1 h1:giqksBPnT/HDtZ6VhtFKgoLOWmlyo9Ei6u9PqzIMbhI= +github.com/quic-go/qpack v0.5.1/go.mod h1:+PC4XFrEskIVkcLzpEkbLqq1uCoxPhQuvK5rH1ZgaEg= +github.com/quic-go/quic-go v0.52.0 h1:/SlHrCRElyaU6MaEPKqKr9z83sBg2v4FLLvWM+Z47pA= +github.com/quic-go/quic-go v0.52.0/go.mod h1:MFlGGpcpJqRAfmYi6NC2cptDPSxRWTOGNuP4wqrWmzQ= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/redis/go-redis/extra/rediscmd/v9 v9.0.5 h1:EaDatTxkdHG+U3Bk4EUr+DZ7fOGwTfezUiUJMaIcaho= @@ -1776,6 +1830,8 @@ github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTE github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= +github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= +github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rubenv/sql-migrate v1.8.0 h1:dXnYiJk9k3wetp7GfQbKJcPHjVJL6YK19tKj8t2Ns0o= github.com/rubenv/sql-migrate v1.8.0/go.mod h1:F2bGFBwCU+pnmbtNYDeKvSuvL6lBVtXDXUUv5t+u1qw= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -1803,6 +1859,10 @@ github.com/sassoftware/relic/v7 v7.6.2 h1:rS44Lbv9G9eXsukknS4mSjIAuuX+lMq/FnStgm github.com/sassoftware/relic/v7 v7.6.2/go.mod h1:kjmP0IBVkJZ6gXeAu35/KCEfca//+PKM6vTAsyDPY+k= github.com/secure-systems-lab/go-securesystemslib v0.9.0 h1:rf1HIbL64nUpEIZnjLZ3mcNEL9NBPB0iuVjyxvq3LZc= github.com/secure-systems-lab/go-securesystemslib v0.9.0/go.mod h1:DVHKMcZ+V4/woA/peqr+L0joiRXbPpQ042GgJckkFgw= +github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys= +github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= +github.com/segmentio/encoding v0.5.1 h1:LhmgXA5/alniiqfc4cYYrxF6DbUQ3m8MVz4/LQIU1mg= +github.com/segmentio/encoding v0.5.1/go.mod h1:HS1ZKa3kSN32ZHVZ7ZLPLXWvOVIiZtyJnO1gPH1sKt0= github.com/segmentio/ksuid v1.0.4 h1:sBo2BdShXjmcugAMwjugoGUdUV0pcxY5mW4xKRn3v4c= github.com/segmentio/ksuid v1.0.4/go.mod h1:/XUiZBD3kVx5SmUOl55voK5yeAbBNNIed+2O73XgrPE= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= @@ -1877,6 +1937,8 @@ github.com/spf13/viper v1.20.1 h1:ZMi+z/lvLyPSCoNtFCpqjy0S4kPbirhpTMwl8BkW9X4= github.com/spf13/viper v1.20.1/go.mod h1:P9Mdzt1zoHIG8m2eZQinpiBjo6kCmZSKBClNNqjJvu4= github.com/spiffe/go-spiffe/v2 v2.5.0 h1:N2I01KCUkv1FAjZXJMwh95KK1ZIQLYbPfhaxw8WS0hE= github.com/spiffe/go-spiffe/v2 v2.5.0/go.mod h1:P+NxobPc6wXhVtINNtFjNWGBTreew1GBUCwT2wPmb7g= +github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs= +github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= @@ -1942,8 +2004,8 @@ github.com/tonistiigi/go-csvvalue v0.0.0-20240814133006-030d3b2625d0 h1:2f304B10 github.com/tonistiigi/go-csvvalue v0.0.0-20240814133006-030d3b2625d0/go.mod h1:278M4p8WsNh3n4a1eqiFcV2FGk7wE5fwUpUom9mK9lE= github.com/transparency-dev/merkle v0.0.2 h1:Q9nBoQcZcgPamMkGn7ghV8XiTZ/kRxn1yCG81+twTK4= github.com/transparency-dev/merkle v0.0.2/go.mod h1:pqSy+OXefQ1EDUVmAJ8MUhHB9TXGuzVAT58PqBoHz1A= -github.com/twitchtv/twirp v8.1.3+incompatible h1:+F4TdErPgSUbMZMwp13Q/KgDVuI7HJXP61mNV3/7iuU= -github.com/twitchtv/twirp v8.1.3+incompatible/go.mod h1:RRJoFSAmTEh2weEqWtpPE3vFK5YBhA6bqp2l1kfCC5A= +github.com/twitchtv/twirp v8.1.0+incompatible h1:KGXanpa9LXdVE/V5P/tA27rkKFmXRGCtSNT7zdeeVOY= +github.com/twitchtv/twirp v8.1.0+incompatible/go.mod h1:RRJoFSAmTEh2weEqWtpPE3vFK5YBhA6bqp2l1kfCC5A= github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.12 h1:37Nm15o69RwBkXM0J6A5OlE67RZTfzUxTj8fB3dfcsc= @@ -2005,6 +2067,14 @@ github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaD go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.4.2 h1:IrUHp260R8c+zYx/Tm8QZr04CX+qWS5PGfPdevhdm1I= go.etcd.io/bbolt v1.4.2/go.mod h1:Is8rSHO/b4f3XigBC0lL0+4FwAQv3HXEEIgFMuKHceM= +go.lsp.dev/jsonrpc2 v0.10.0 h1:Pr/YcXJoEOTMc/b6OTmcR1DPJ3mSWl/SWiU1Cct6VmI= +go.lsp.dev/jsonrpc2 v0.10.0/go.mod h1:fmEzIdXPi/rf6d4uFcayi8HpFP1nBF99ERP1htC72Ac= +go.lsp.dev/pkg v0.0.0-20210717090340-384b27a52fb2 h1:hCzQgh6UcwbKgNSRurYWSqh8MufqRRPODRBblutn4TE= +go.lsp.dev/pkg v0.0.0-20210717090340-384b27a52fb2/go.mod h1:gtSHRuYfbCT0qnbLnovpie/WEmqyJ7T4n6VXiFMBtcw= +go.lsp.dev/protocol v0.12.0 h1:tNprUI9klQW5FAFVM4Sa+AbPFuVQByWhP1ttNUAjIWg= +go.lsp.dev/protocol v0.12.0/go.mod h1:Qb11/HgZQ72qQbeyPfJbu3hZBH23s1sr4st8czGeDMQ= +go.lsp.dev/uri v0.3.0 h1:KcZJmh6nFIBeJzTugn5JTU6OOyG0lDOo3R9KwTxTYbo= +go.lsp.dev/uri v0.3.0/go.mod h1:P5sbO1IQR+qySTWOCnhnK7phBx+W3zbLqSMDJNTw88I= go.mongodb.org/mongo-driver v1.14.0 h1:P98w8egYRjYe3XDjxhYJagTokP/H6HzlsnojRgZRd80= go.mongodb.org/mongo-driver v1.14.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -2067,12 +2137,16 @@ go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2 go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.opentelemetry.io/proto/otlp v1.6.0 h1:jQjP+AQyTf+Fe7OKj/MfkDrmK4MNVtw2NpXsf9fefDI= -go.opentelemetry.io/proto/otlp v1.6.0/go.mod h1:cicgGehlFuNdgZkcALOCh3VE6K/u2tAjzlRhDwmVpZc= +go.opentelemetry.io/proto/otlp v1.7.0 h1:jX1VolD6nHuFzOYso2E73H85i92Mv8JQYk0K9vz09os= +go.opentelemetry.io/proto/otlp v1.7.0/go.mod h1:fSKjH6YJ7HDlwzltzyMj036AJ3ejJLCgCSHGj4efDDo= go.step.sm/crypto v0.60.0 h1:UgSw8DFG5xUOGB3GUID17UA32G4j1iNQ4qoMhBmsVFw= go.step.sm/crypto v0.60.0/go.mod h1:Ep83Lv818L4gV0vhFTdPWRKnL6/5fRMpi8SaoP5ArSw= +go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= +go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/mock v0.5.2 h1:LbtPTcP8A5k9WPXj54PPPbjcI4Y6lhyOZXn+VS7wNko= +go.uber.org/mock v0.5.2/go.mod h1:wLlUxC2vVTPTaE3UD51E0BGOAElKrILxhVSDYQLld5o= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= @@ -2115,8 +2189,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 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-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 h1:R84qjqJb5nVJMxqWYb3np9L5ZsaDtB+a39EqjV0JSUM= -golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0/go.mod h1:S9Xr4PYopiDyqSyp5NjCrhFrqg6A5zA2E/iPHPhqnS8= +golang.org/x/exp v0.0.0-20250606033433-dcc06ee1d476 h1:bsqhLWFR6G6xiQcb+JoGqdKdRU6WzPWmK8E0jxTjzo4= +golang.org/x/exp v0.0.0-20250606033433-dcc06ee1d476/go.mod h1:3//PLf8L/X+8b4vuAfHzxeRUl04Adcb341+IGKfnqS8= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= 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= @@ -2727,10 +2801,10 @@ google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633/go.mod h1:UUQDJDOl google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= google.golang.org/genproto v0.0.0-20250303144028-a0af3efb3deb h1:ITgPrl429bc6+2ZraNSzMDk3I95nmQln2fuPstKwFDE= google.golang.org/genproto v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:sAo5UzpjUwgFBCzupwhcLcxHVDK7vG5IqI30YnwX2eE= -google.golang.org/genproto/googleapis/api v0.0.0-20250519155744-55703ea1f237 h1:Kog3KlB4xevJlAcbbbzPfRG0+X9fdoGM+UBRKVz6Wr0= -google.golang.org/genproto/googleapis/api v0.0.0-20250519155744-55703ea1f237/go.mod h1:ezi0AVyMKDWy5xAncvjLWH7UcLBB5n7y2fQ8MzjJcto= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250519155744-55703ea1f237 h1:cJfm9zPbe1e873mHJzmQ1nwVEeRDU/T1wXDK2kUSU34= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250519155744-55703ea1f237/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822 h1:oWVWY3NzT7KJppx2UKhKmzPq4SRe0LdCijVRwvGeikY= +google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822/go.mod h1:h3c4v36UTKzUiuaOKQ6gr3S+0hovBtUrXzTG/i3+XEc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 h1:fc6jSaCT0vBduLYZHYrBBNY4dsWuvgyff9noRNDdBeE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= google.golang.org/grpc v1.0.5/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -2931,6 +3005,8 @@ mvdan.cc/sh/v3 v3.11.0 h1:q5h+XMDRfUGUedCqFFsjoFjrhwf2Mvtt1rkMvVz0blw= mvdan.cc/sh/v3 v3.11.0/go.mod h1:LRM+1NjoYCzuq/WZ6y44x14YNAI0NK7FLPeQSaFagGg= oras.land/oras-go/v2 v2.6.0 h1:X4ELRsiGkrbeox69+9tzTu492FMUu7zJQW6eJU+I2oc= oras.land/oras-go/v2 v2.6.0/go.mod h1:magiQDfG6H1O9APp+rOsvCPcW1GD2MM7vgnKY0Y+u1o= +pluginrpc.com/pluginrpc v0.5.0 h1:tOQj2D35hOmvHyPu8e7ohW2/QvAnEtKscy2IJYWQ2yo= +pluginrpc.com/pluginrpc v0.5.0/go.mod h1:UNWZ941hcVAoOZUn8YZsMmOZBzbUjQa3XMns8RQLp9o= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= diff --git a/magefiles/magefile.go b/magefiles/magefile.go index a9766f36cf..a612a4a154 100644 --- a/magefiles/magefile.go +++ b/magefiles/magefile.go @@ -3,9 +3,7 @@ package main import ( "context" "encoding/json" - "errors" "fmt" - "io/fs" "log/slog" "os" "os/exec" @@ -34,10 +32,6 @@ var ( } ) -var protoFiles = []string{ - "pkg/iac/scanners/terraformplan/snapshot/planproto/planfile.proto", -} - func init() { slog.SetDefault(log.New(log.NewHandler(os.Stderr, nil))) // stdout is suppressed in mage } @@ -123,44 +117,38 @@ func Wire() error { return sh.RunV("go", "tool", "wire", "gen", "./pkg/commands/...", "./pkg/rpc/...", "./pkg/k8s/...") } -// Protoc parses PROTO_FILES and generates the Go code for client/server mode -func Protoc() error { - // It is called in the protoc container - if _, ok := os.LookupEnv("TRIVY_PROTOC_CONTAINER"); ok { - rpcProtoFiles, err := findRPCProtoFiles() - if err != nil { - return err - } - for _, file := range rpcProtoFiles { - // Check if the generated Go file is up-to-date - dst := strings.TrimSuffix(file, ".proto") + ".pb.go" - if updated, err := target.Path(dst, file); err != nil { - return err - } else if !updated { - continue - } +type Protoc mg.Namespace - // Generate - if err = sh.RunV("protoc", "--twirp_out", ".", "--twirp_opt", "paths=source_relative", - "--go_out", ".", "--go_opt", "paths=source_relative", file); err != nil { - return err - } - } +// Generate parses PROTO_FILES and generates the Go code for client/server mode +func (Protoc) Generate() error { + mg.Deps(Tool{}.Install) // Install buf and protoc-gen-twirp - for _, file := range protoFiles { - if err := sh.RunV("protoc", ".", "paths=source_relative", "--go_out", ".", "--go_opt", - "paths=source_relative", file); err != nil { - return err - } - } - return nil - } + // Run buf generate + return sh.RunV("buf", "generate") +} - // It is called on the host - if err := sh.RunV("bash", "-c", "docker build -t trivy-protoc - < Dockerfile.protoc"); err != nil { - return err - } - return sh.Run("docker", "run", "--rm", "-it", "--platform", "linux/x86_64", "-v", "${PWD}:/app", "-w", "/app", "trivy-protoc", "mage", "protoc") +// Fmt formats protobuf files using buf +func (Protoc) Fmt() error { + mg.Deps(Tool{}.Install) // Install buf + + // Run buf format + return sh.RunV("buf", "format", "-w") +} + +// Lint runs linting on protobuf files using buf +func (Protoc) Lint() error { + mg.Deps(Tool{}.Install) // Install buf + + // Run buf lint + return sh.RunV("buf", "lint") +} + +// Breaking checks for breaking changes in protobuf files using buf +func (Protoc) Breaking() error { + mg.Deps(Tool{}.Install) // Install buf + + // Run buf breaking against main branch + return sh.RunV("buf", "breaking", "--against", ".git#branch=main") } // Yacc generates parser @@ -357,26 +345,8 @@ func (Lint) Fix() error { return sh.RunV("golangci-lint", "run", "--fix", "--build-tags=integration") } -// Fmt formats Go code and proto files +// Fmt formats Go code func Fmt() error { - // Check if clang-format is installed - if !installed("clang-format") { - return errors.New("need to install clang-format") - } - - // Format proto files - rpcProtoFiles, err := findRPCProtoFiles() - if err != nil { - return err - } - - allProtoFiles := append(protoFiles, rpcProtoFiles...) - for _, file := range allProtoFiles { - if err = sh.Run("clang-format", "-i", file); err != nil { - return err - } - } - // Format Go code return sh.Run("go", "fmt", "./...") } @@ -494,25 +464,6 @@ func (Docs) Generate() error { return sh.RunWith(ENV, "go", "run", "-tags=mage_docs", "./magefiles") } -func findRPCProtoFiles() ([]string, error) { - var files []string - err := filepath.WalkDir("rpc", func(path string, d fs.DirEntry, err error) error { - switch { - case err != nil: - return err - case d.IsDir(): - return nil - case filepath.Ext(path) == ".proto": - files = append(files, path) - } - return nil - }) - if err != nil { - return nil, err - } - return files, nil -} - func exists(filename string) bool { _, err := os.Stat(filename) return err == nil diff --git a/pkg/iac/scanners/terraformplan/snapshot/planproto/planfile.pb.go b/pkg/iac/scanners/terraformplan/snapshot/planproto/planfile.pb.go index 1aa3ae5a7c..4e3db0a409 100644 --- a/pkg/iac/scanners/terraformplan/snapshot/planproto/planfile.pb.go +++ b/pkg/iac/scanners/terraformplan/snapshot/planproto/planfile.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 -// protoc v5.27.1 +// protoc-gen-go v1.34.0 +// protoc (unknown) // source: pkg/iac/scanners/terraformplan/snapshot/planproto/planfile.proto package planproto diff --git a/pkg/iac/scanners/terraformplan/snapshot/planproto/planfile.proto b/pkg/iac/scanners/terraformplan/snapshot/planproto/planfile.proto index c5615b819e..688be55be7 100644 --- a/pkg/iac/scanners/terraformplan/snapshot/planproto/planfile.proto +++ b/pkg/iac/scanners/terraformplan/snapshot/planproto/planfile.proto @@ -9,4 +9,4 @@ message DynamicValue { message Plan { map variables = 2; -} \ No newline at end of file +} diff --git a/rpc/cache/service.pb.go b/rpc/cache/service.pb.go index c98cd177c9..091c8a88a3 100644 --- a/rpc/cache/service.pb.go +++ b/rpc/cache/service.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.0 -// protoc v3.19.4 +// protoc (unknown) // source: rpc/cache/service.proto package cache @@ -604,12 +604,12 @@ var File_rpc_cache_service_proto protoreflect.FileDescriptor var file_rpc_cache_service_proto_rawDesc = []byte{ 0x0a, 0x17, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x74, 0x72, 0x69, 0x76, 0x79, - 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x72, 0x70, 0x63, 0x2f, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb6, 0x02, 0x0a, 0x0c, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x63, 0x68, 0x65, diff --git a/rpc/cache/service.proto b/rpc/cache/service.proto index f276027a53..34df2e5e83 100644 --- a/rpc/cache/service.proto +++ b/rpc/cache/service.proto @@ -1,11 +1,12 @@ syntax = "proto3"; package trivy.cache.v1; -option go_package = "github.com/aquasecurity/trivy/rpc/cache;cache"; +import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; import "rpc/common/service.proto"; -import "google/protobuf/empty.proto"; + +option go_package = "github.com/aquasecurity/trivy/rpc/cache;cache"; service Cache { rpc PutArtifact(PutArtifactRequest) returns (google.protobuf.Empty); @@ -15,55 +16,55 @@ service Cache { } message ArtifactInfo { - int32 schema_version = 1; - string architecture = 2; - google.protobuf.Timestamp created = 3; - string docker_version = 4; - string os = 5; + int32 schema_version = 1; + string architecture = 2; + google.protobuf.Timestamp created = 3; + string docker_version = 4; + string os = 5; repeated common.Package history_packages = 6; - common.Secret secret = 7; + common.Secret secret = 7; } message PutArtifactRequest { - string artifact_id = 1; + string artifact_id = 1; ArtifactInfo artifact_info = 2; } message BlobInfo { - int32 schema_version = 1; - common.OS os = 2; - common.Repository repository = 11; - repeated common.PackageInfo package_infos = 3; - repeated common.Application applications = 4; + int32 schema_version = 1; + common.OS os = 2; + common.Repository repository = 11; + repeated common.PackageInfo package_infos = 3; + repeated common.Application applications = 4; repeated common.Misconfiguration misconfigurations = 9; - repeated string opaque_dirs = 5; - repeated string whiteout_files = 6; - string digest = 7; - string diff_id = 8; - repeated common.CustomResource custom_resources = 10; - repeated common.Secret secrets = 12; - repeated common.LicenseFile licenses = 13; - int64 size = 14; - string created_by = 15; + repeated string opaque_dirs = 5; + repeated string whiteout_files = 6; + string digest = 7; + string diff_id = 8; + repeated common.CustomResource custom_resources = 10; + repeated common.Secret secrets = 12; + repeated common.LicenseFile licenses = 13; + int64 size = 14; + string created_by = 15; } message PutBlobRequest { - string diff_id = 1; + string diff_id = 1; BlobInfo blob_info = 3; } message PutResponse { - common.OS os = 1; - bool eosl = 2; + common.OS os = 1; + bool eosl = 2; } message MissingBlobsRequest { - string artifact_id = 1; - repeated string blob_ids = 2; + string artifact_id = 1; + repeated string blob_ids = 2; } message MissingBlobsResponse { - bool missing_artifact = 1; + bool missing_artifact = 1; repeated string missing_blob_ids = 2; } diff --git a/rpc/cache/service.twirp.go b/rpc/cache/service.twirp.go index dc3bd09e37..f751c0ea89 100644 --- a/rpc/cache/service.twirp.go +++ b/rpc/cache/service.twirp.go @@ -16,7 +16,7 @@ import proto "google.golang.org/protobuf/proto" import twirp "github.com/twitchtv/twirp" import ctxsetters "github.com/twitchtv/twirp/ctxsetters" -import google_protobuf2 "google.golang.org/protobuf/types/known/emptypb" +import google_protobuf "google.golang.org/protobuf/types/known/emptypb" import bytes "bytes" import errors "errors" @@ -35,13 +35,13 @@ const _ = twirp.TwirpPackageMinVersion_8_1_0 // =============== type Cache interface { - PutArtifact(context.Context, *PutArtifactRequest) (*google_protobuf2.Empty, error) + PutArtifact(context.Context, *PutArtifactRequest) (*google_protobuf.Empty, error) - PutBlob(context.Context, *PutBlobRequest) (*google_protobuf2.Empty, error) + PutBlob(context.Context, *PutBlobRequest) (*google_protobuf.Empty, error) MissingBlobs(context.Context, *MissingBlobsRequest) (*MissingBlobsResponse, error) - DeleteBlobs(context.Context, *DeleteBlobsRequest) (*google_protobuf2.Empty, error) + DeleteBlobs(context.Context, *DeleteBlobsRequest) (*google_protobuf.Empty, error) } // ===================== @@ -93,13 +93,13 @@ func NewCacheProtobufClient(baseURL string, client HTTPClient, opts ...twirp.Cli } } -func (c *cacheProtobufClient) PutArtifact(ctx context.Context, in *PutArtifactRequest) (*google_protobuf2.Empty, error) { +func (c *cacheProtobufClient) PutArtifact(ctx context.Context, in *PutArtifactRequest) (*google_protobuf.Empty, error) { ctx = ctxsetters.WithPackageName(ctx, "trivy.cache.v1") ctx = ctxsetters.WithServiceName(ctx, "Cache") ctx = ctxsetters.WithMethodName(ctx, "PutArtifact") caller := c.callPutArtifact if c.interceptor != nil { - caller = func(ctx context.Context, req *PutArtifactRequest) (*google_protobuf2.Empty, error) { + caller = func(ctx context.Context, req *PutArtifactRequest) (*google_protobuf.Empty, error) { resp, err := c.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { typedReq, ok := req.(*PutArtifactRequest) @@ -110,9 +110,9 @@ func (c *cacheProtobufClient) PutArtifact(ctx context.Context, in *PutArtifactRe }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*google_protobuf2.Empty) + typedResp, ok := resp.(*google_protobuf.Empty) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf2.Empty) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf.Empty) when calling interceptor") } return typedResp, err } @@ -122,8 +122,8 @@ func (c *cacheProtobufClient) PutArtifact(ctx context.Context, in *PutArtifactRe return caller(ctx, in) } -func (c *cacheProtobufClient) callPutArtifact(ctx context.Context, in *PutArtifactRequest) (*google_protobuf2.Empty, error) { - out := new(google_protobuf2.Empty) +func (c *cacheProtobufClient) callPutArtifact(ctx context.Context, in *PutArtifactRequest) (*google_protobuf.Empty, error) { + out := new(google_protobuf.Empty) ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[0], in, out) if err != nil { twerr, ok := err.(twirp.Error) @@ -139,13 +139,13 @@ func (c *cacheProtobufClient) callPutArtifact(ctx context.Context, in *PutArtifa return out, nil } -func (c *cacheProtobufClient) PutBlob(ctx context.Context, in *PutBlobRequest) (*google_protobuf2.Empty, error) { +func (c *cacheProtobufClient) PutBlob(ctx context.Context, in *PutBlobRequest) (*google_protobuf.Empty, error) { ctx = ctxsetters.WithPackageName(ctx, "trivy.cache.v1") ctx = ctxsetters.WithServiceName(ctx, "Cache") ctx = ctxsetters.WithMethodName(ctx, "PutBlob") caller := c.callPutBlob if c.interceptor != nil { - caller = func(ctx context.Context, req *PutBlobRequest) (*google_protobuf2.Empty, error) { + caller = func(ctx context.Context, req *PutBlobRequest) (*google_protobuf.Empty, error) { resp, err := c.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { typedReq, ok := req.(*PutBlobRequest) @@ -156,9 +156,9 @@ func (c *cacheProtobufClient) PutBlob(ctx context.Context, in *PutBlobRequest) ( }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*google_protobuf2.Empty) + typedResp, ok := resp.(*google_protobuf.Empty) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf2.Empty) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf.Empty) when calling interceptor") } return typedResp, err } @@ -168,8 +168,8 @@ func (c *cacheProtobufClient) PutBlob(ctx context.Context, in *PutBlobRequest) ( return caller(ctx, in) } -func (c *cacheProtobufClient) callPutBlob(ctx context.Context, in *PutBlobRequest) (*google_protobuf2.Empty, error) { - out := new(google_protobuf2.Empty) +func (c *cacheProtobufClient) callPutBlob(ctx context.Context, in *PutBlobRequest) (*google_protobuf.Empty, error) { + out := new(google_protobuf.Empty) ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[1], in, out) if err != nil { twerr, ok := err.(twirp.Error) @@ -231,13 +231,13 @@ func (c *cacheProtobufClient) callMissingBlobs(ctx context.Context, in *MissingB return out, nil } -func (c *cacheProtobufClient) DeleteBlobs(ctx context.Context, in *DeleteBlobsRequest) (*google_protobuf2.Empty, error) { +func (c *cacheProtobufClient) DeleteBlobs(ctx context.Context, in *DeleteBlobsRequest) (*google_protobuf.Empty, error) { ctx = ctxsetters.WithPackageName(ctx, "trivy.cache.v1") ctx = ctxsetters.WithServiceName(ctx, "Cache") ctx = ctxsetters.WithMethodName(ctx, "DeleteBlobs") caller := c.callDeleteBlobs if c.interceptor != nil { - caller = func(ctx context.Context, req *DeleteBlobsRequest) (*google_protobuf2.Empty, error) { + caller = func(ctx context.Context, req *DeleteBlobsRequest) (*google_protobuf.Empty, error) { resp, err := c.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { typedReq, ok := req.(*DeleteBlobsRequest) @@ -248,9 +248,9 @@ func (c *cacheProtobufClient) DeleteBlobs(ctx context.Context, in *DeleteBlobsRe }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*google_protobuf2.Empty) + typedResp, ok := resp.(*google_protobuf.Empty) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf2.Empty) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf.Empty) when calling interceptor") } return typedResp, err } @@ -260,8 +260,8 @@ func (c *cacheProtobufClient) DeleteBlobs(ctx context.Context, in *DeleteBlobsRe return caller(ctx, in) } -func (c *cacheProtobufClient) callDeleteBlobs(ctx context.Context, in *DeleteBlobsRequest) (*google_protobuf2.Empty, error) { - out := new(google_protobuf2.Empty) +func (c *cacheProtobufClient) callDeleteBlobs(ctx context.Context, in *DeleteBlobsRequest) (*google_protobuf.Empty, error) { + out := new(google_protobuf.Empty) ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[3], in, out) if err != nil { twerr, ok := err.(twirp.Error) @@ -326,13 +326,13 @@ func NewCacheJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientO } } -func (c *cacheJSONClient) PutArtifact(ctx context.Context, in *PutArtifactRequest) (*google_protobuf2.Empty, error) { +func (c *cacheJSONClient) PutArtifact(ctx context.Context, in *PutArtifactRequest) (*google_protobuf.Empty, error) { ctx = ctxsetters.WithPackageName(ctx, "trivy.cache.v1") ctx = ctxsetters.WithServiceName(ctx, "Cache") ctx = ctxsetters.WithMethodName(ctx, "PutArtifact") caller := c.callPutArtifact if c.interceptor != nil { - caller = func(ctx context.Context, req *PutArtifactRequest) (*google_protobuf2.Empty, error) { + caller = func(ctx context.Context, req *PutArtifactRequest) (*google_protobuf.Empty, error) { resp, err := c.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { typedReq, ok := req.(*PutArtifactRequest) @@ -343,9 +343,9 @@ func (c *cacheJSONClient) PutArtifact(ctx context.Context, in *PutArtifactReques }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*google_protobuf2.Empty) + typedResp, ok := resp.(*google_protobuf.Empty) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf2.Empty) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf.Empty) when calling interceptor") } return typedResp, err } @@ -355,8 +355,8 @@ func (c *cacheJSONClient) PutArtifact(ctx context.Context, in *PutArtifactReques return caller(ctx, in) } -func (c *cacheJSONClient) callPutArtifact(ctx context.Context, in *PutArtifactRequest) (*google_protobuf2.Empty, error) { - out := new(google_protobuf2.Empty) +func (c *cacheJSONClient) callPutArtifact(ctx context.Context, in *PutArtifactRequest) (*google_protobuf.Empty, error) { + out := new(google_protobuf.Empty) ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[0], in, out) if err != nil { twerr, ok := err.(twirp.Error) @@ -372,13 +372,13 @@ func (c *cacheJSONClient) callPutArtifact(ctx context.Context, in *PutArtifactRe return out, nil } -func (c *cacheJSONClient) PutBlob(ctx context.Context, in *PutBlobRequest) (*google_protobuf2.Empty, error) { +func (c *cacheJSONClient) PutBlob(ctx context.Context, in *PutBlobRequest) (*google_protobuf.Empty, error) { ctx = ctxsetters.WithPackageName(ctx, "trivy.cache.v1") ctx = ctxsetters.WithServiceName(ctx, "Cache") ctx = ctxsetters.WithMethodName(ctx, "PutBlob") caller := c.callPutBlob if c.interceptor != nil { - caller = func(ctx context.Context, req *PutBlobRequest) (*google_protobuf2.Empty, error) { + caller = func(ctx context.Context, req *PutBlobRequest) (*google_protobuf.Empty, error) { resp, err := c.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { typedReq, ok := req.(*PutBlobRequest) @@ -389,9 +389,9 @@ func (c *cacheJSONClient) PutBlob(ctx context.Context, in *PutBlobRequest) (*goo }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*google_protobuf2.Empty) + typedResp, ok := resp.(*google_protobuf.Empty) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf2.Empty) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf.Empty) when calling interceptor") } return typedResp, err } @@ -401,8 +401,8 @@ func (c *cacheJSONClient) PutBlob(ctx context.Context, in *PutBlobRequest) (*goo return caller(ctx, in) } -func (c *cacheJSONClient) callPutBlob(ctx context.Context, in *PutBlobRequest) (*google_protobuf2.Empty, error) { - out := new(google_protobuf2.Empty) +func (c *cacheJSONClient) callPutBlob(ctx context.Context, in *PutBlobRequest) (*google_protobuf.Empty, error) { + out := new(google_protobuf.Empty) ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[1], in, out) if err != nil { twerr, ok := err.(twirp.Error) @@ -464,13 +464,13 @@ func (c *cacheJSONClient) callMissingBlobs(ctx context.Context, in *MissingBlobs return out, nil } -func (c *cacheJSONClient) DeleteBlobs(ctx context.Context, in *DeleteBlobsRequest) (*google_protobuf2.Empty, error) { +func (c *cacheJSONClient) DeleteBlobs(ctx context.Context, in *DeleteBlobsRequest) (*google_protobuf.Empty, error) { ctx = ctxsetters.WithPackageName(ctx, "trivy.cache.v1") ctx = ctxsetters.WithServiceName(ctx, "Cache") ctx = ctxsetters.WithMethodName(ctx, "DeleteBlobs") caller := c.callDeleteBlobs if c.interceptor != nil { - caller = func(ctx context.Context, req *DeleteBlobsRequest) (*google_protobuf2.Empty, error) { + caller = func(ctx context.Context, req *DeleteBlobsRequest) (*google_protobuf.Empty, error) { resp, err := c.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { typedReq, ok := req.(*DeleteBlobsRequest) @@ -481,9 +481,9 @@ func (c *cacheJSONClient) DeleteBlobs(ctx context.Context, in *DeleteBlobsReques }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*google_protobuf2.Empty) + typedResp, ok := resp.(*google_protobuf.Empty) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf2.Empty) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf.Empty) when calling interceptor") } return typedResp, err } @@ -493,8 +493,8 @@ func (c *cacheJSONClient) DeleteBlobs(ctx context.Context, in *DeleteBlobsReques return caller(ctx, in) } -func (c *cacheJSONClient) callDeleteBlobs(ctx context.Context, in *DeleteBlobsRequest) (*google_protobuf2.Empty, error) { - out := new(google_protobuf2.Empty) +func (c *cacheJSONClient) callDeleteBlobs(ctx context.Context, in *DeleteBlobsRequest) (*google_protobuf.Empty, error) { + out := new(google_protobuf.Empty) ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[3], in, out) if err != nil { twerr, ok := err.(twirp.Error) @@ -668,7 +668,7 @@ func (s *cacheServer) servePutArtifactJSON(ctx context.Context, resp http.Respon handler := s.Cache.PutArtifact if s.interceptor != nil { - handler = func(ctx context.Context, req *PutArtifactRequest) (*google_protobuf2.Empty, error) { + handler = func(ctx context.Context, req *PutArtifactRequest) (*google_protobuf.Empty, error) { resp, err := s.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { typedReq, ok := req.(*PutArtifactRequest) @@ -679,9 +679,9 @@ func (s *cacheServer) servePutArtifactJSON(ctx context.Context, resp http.Respon }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*google_protobuf2.Empty) + typedResp, ok := resp.(*google_protobuf.Empty) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf2.Empty) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf.Empty) when calling interceptor") } return typedResp, err } @@ -690,7 +690,7 @@ func (s *cacheServer) servePutArtifactJSON(ctx context.Context, resp http.Respon } // Call service method - var respContent *google_protobuf2.Empty + var respContent *google_protobuf.Empty func() { defer ensurePanicResponses(ctx, resp, s.hooks) respContent, err = handler(ctx, reqContent) @@ -701,7 +701,7 @@ func (s *cacheServer) servePutArtifactJSON(ctx context.Context, resp http.Respon return } if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf2.Empty and nil error while calling PutArtifact. nil responses are not supported")) + s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf.Empty and nil error while calling PutArtifact. nil responses are not supported")) return } @@ -749,7 +749,7 @@ func (s *cacheServer) servePutArtifactProtobuf(ctx context.Context, resp http.Re handler := s.Cache.PutArtifact if s.interceptor != nil { - handler = func(ctx context.Context, req *PutArtifactRequest) (*google_protobuf2.Empty, error) { + handler = func(ctx context.Context, req *PutArtifactRequest) (*google_protobuf.Empty, error) { resp, err := s.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { typedReq, ok := req.(*PutArtifactRequest) @@ -760,9 +760,9 @@ func (s *cacheServer) servePutArtifactProtobuf(ctx context.Context, resp http.Re }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*google_protobuf2.Empty) + typedResp, ok := resp.(*google_protobuf.Empty) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf2.Empty) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf.Empty) when calling interceptor") } return typedResp, err } @@ -771,7 +771,7 @@ func (s *cacheServer) servePutArtifactProtobuf(ctx context.Context, resp http.Re } // Call service method - var respContent *google_protobuf2.Empty + var respContent *google_protobuf.Empty func() { defer ensurePanicResponses(ctx, resp, s.hooks) respContent, err = handler(ctx, reqContent) @@ -782,7 +782,7 @@ func (s *cacheServer) servePutArtifactProtobuf(ctx context.Context, resp http.Re return } if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf2.Empty and nil error while calling PutArtifact. nil responses are not supported")) + s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf.Empty and nil error while calling PutArtifact. nil responses are not supported")) return } @@ -848,7 +848,7 @@ func (s *cacheServer) servePutBlobJSON(ctx context.Context, resp http.ResponseWr handler := s.Cache.PutBlob if s.interceptor != nil { - handler = func(ctx context.Context, req *PutBlobRequest) (*google_protobuf2.Empty, error) { + handler = func(ctx context.Context, req *PutBlobRequest) (*google_protobuf.Empty, error) { resp, err := s.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { typedReq, ok := req.(*PutBlobRequest) @@ -859,9 +859,9 @@ func (s *cacheServer) servePutBlobJSON(ctx context.Context, resp http.ResponseWr }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*google_protobuf2.Empty) + typedResp, ok := resp.(*google_protobuf.Empty) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf2.Empty) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf.Empty) when calling interceptor") } return typedResp, err } @@ -870,7 +870,7 @@ func (s *cacheServer) servePutBlobJSON(ctx context.Context, resp http.ResponseWr } // Call service method - var respContent *google_protobuf2.Empty + var respContent *google_protobuf.Empty func() { defer ensurePanicResponses(ctx, resp, s.hooks) respContent, err = handler(ctx, reqContent) @@ -881,7 +881,7 @@ func (s *cacheServer) servePutBlobJSON(ctx context.Context, resp http.ResponseWr return } if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf2.Empty and nil error while calling PutBlob. nil responses are not supported")) + s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf.Empty and nil error while calling PutBlob. nil responses are not supported")) return } @@ -929,7 +929,7 @@ func (s *cacheServer) servePutBlobProtobuf(ctx context.Context, resp http.Respon handler := s.Cache.PutBlob if s.interceptor != nil { - handler = func(ctx context.Context, req *PutBlobRequest) (*google_protobuf2.Empty, error) { + handler = func(ctx context.Context, req *PutBlobRequest) (*google_protobuf.Empty, error) { resp, err := s.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { typedReq, ok := req.(*PutBlobRequest) @@ -940,9 +940,9 @@ func (s *cacheServer) servePutBlobProtobuf(ctx context.Context, resp http.Respon }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*google_protobuf2.Empty) + typedResp, ok := resp.(*google_protobuf.Empty) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf2.Empty) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf.Empty) when calling interceptor") } return typedResp, err } @@ -951,7 +951,7 @@ func (s *cacheServer) servePutBlobProtobuf(ctx context.Context, resp http.Respon } // Call service method - var respContent *google_protobuf2.Empty + var respContent *google_protobuf.Empty func() { defer ensurePanicResponses(ctx, resp, s.hooks) respContent, err = handler(ctx, reqContent) @@ -962,7 +962,7 @@ func (s *cacheServer) servePutBlobProtobuf(ctx context.Context, resp http.Respon return } if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf2.Empty and nil error while calling PutBlob. nil responses are not supported")) + s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf.Empty and nil error while calling PutBlob. nil responses are not supported")) return } @@ -1208,7 +1208,7 @@ func (s *cacheServer) serveDeleteBlobsJSON(ctx context.Context, resp http.Respon handler := s.Cache.DeleteBlobs if s.interceptor != nil { - handler = func(ctx context.Context, req *DeleteBlobsRequest) (*google_protobuf2.Empty, error) { + handler = func(ctx context.Context, req *DeleteBlobsRequest) (*google_protobuf.Empty, error) { resp, err := s.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { typedReq, ok := req.(*DeleteBlobsRequest) @@ -1219,9 +1219,9 @@ func (s *cacheServer) serveDeleteBlobsJSON(ctx context.Context, resp http.Respon }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*google_protobuf2.Empty) + typedResp, ok := resp.(*google_protobuf.Empty) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf2.Empty) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf.Empty) when calling interceptor") } return typedResp, err } @@ -1230,7 +1230,7 @@ func (s *cacheServer) serveDeleteBlobsJSON(ctx context.Context, resp http.Respon } // Call service method - var respContent *google_protobuf2.Empty + var respContent *google_protobuf.Empty func() { defer ensurePanicResponses(ctx, resp, s.hooks) respContent, err = handler(ctx, reqContent) @@ -1241,7 +1241,7 @@ func (s *cacheServer) serveDeleteBlobsJSON(ctx context.Context, resp http.Respon return } if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf2.Empty and nil error while calling DeleteBlobs. nil responses are not supported")) + s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf.Empty and nil error while calling DeleteBlobs. nil responses are not supported")) return } @@ -1289,7 +1289,7 @@ func (s *cacheServer) serveDeleteBlobsProtobuf(ctx context.Context, resp http.Re handler := s.Cache.DeleteBlobs if s.interceptor != nil { - handler = func(ctx context.Context, req *DeleteBlobsRequest) (*google_protobuf2.Empty, error) { + handler = func(ctx context.Context, req *DeleteBlobsRequest) (*google_protobuf.Empty, error) { resp, err := s.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { typedReq, ok := req.(*DeleteBlobsRequest) @@ -1300,9 +1300,9 @@ func (s *cacheServer) serveDeleteBlobsProtobuf(ctx context.Context, resp http.Re }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*google_protobuf2.Empty) + typedResp, ok := resp.(*google_protobuf.Empty) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf2.Empty) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf.Empty) when calling interceptor") } return typedResp, err } @@ -1311,7 +1311,7 @@ func (s *cacheServer) serveDeleteBlobsProtobuf(ctx context.Context, resp http.Re } // Call service method - var respContent *google_protobuf2.Empty + var respContent *google_protobuf.Empty func() { defer ensurePanicResponses(ctx, resp, s.hooks) respContent, err = handler(ctx, reqContent) @@ -1322,7 +1322,7 @@ func (s *cacheServer) serveDeleteBlobsProtobuf(ctx context.Context, resp http.Re return } if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf2.Empty and nil error while calling DeleteBlobs. nil responses are not supported")) + s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf.Empty and nil error while calling DeleteBlobs. nil responses are not supported")) return } @@ -1933,60 +1933,60 @@ func callClientError(ctx context.Context, h *twirp.ClientHooks, err twirp.Error) } var twirpFileDescriptor0 = []byte{ - // 872 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xef, 0x8f, 0x1b, 0x35, - 0x10, 0x55, 0x92, 0xbb, 0x4b, 0x32, 0xf9, 0x71, 0x87, 0x29, 0xed, 0x36, 0x94, 0x36, 0x0a, 0x20, - 0x05, 0x09, 0x76, 0xc5, 0x41, 0x25, 0x24, 0x04, 0xe2, 0xee, 0x0a, 0x28, 0x52, 0x2b, 0x0e, 0x17, - 0x21, 0xc1, 0x97, 0xb0, 0xf1, 0x7a, 0x13, 0xeb, 0xb2, 0xeb, 0x3d, 0x8f, 0xf7, 0x20, 0xfc, 0x61, - 0xfd, 0xc2, 0x3f, 0x87, 0xec, 0xf5, 0x26, 0xd9, 0x24, 0x3d, 0xc1, 0x97, 0x68, 0x3d, 0xf3, 0xfc, - 0x3c, 0xf3, 0xfc, 0xc6, 0x81, 0x47, 0x2a, 0x63, 0x01, 0x0b, 0xd9, 0x82, 0x07, 0xc8, 0xd5, 0x9d, + // 871 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xef, 0x8f, 0xdb, 0x44, + 0x10, 0x55, 0x92, 0xbb, 0x4b, 0x32, 0xf9, 0x71, 0xc7, 0x52, 0x5a, 0x37, 0x94, 0x36, 0x0a, 0x20, + 0x05, 0x09, 0x6c, 0x71, 0x50, 0x09, 0x09, 0x81, 0xb8, 0xbb, 0x02, 0x8a, 0xd4, 0x8a, 0x63, 0x8b, + 0x90, 0xe0, 0x4b, 0x70, 0xd6, 0xeb, 0x64, 0x75, 0xb1, 0xd7, 0xb7, 0xb3, 0x3e, 0x08, 0x7f, 0x58, + 0xbf, 0xf0, 0xcf, 0xa1, 0x5d, 0xaf, 0x93, 0x38, 0x49, 0x4f, 0xf0, 0x25, 0xf2, 0xce, 0x3c, 0xcf, + 0xbe, 0x79, 0xf3, 0xc6, 0x81, 0x47, 0x2a, 0x63, 0x01, 0x0b, 0xd9, 0x82, 0x07, 0xc8, 0xd5, 0x9d, 0x60, 0xdc, 0xcf, 0x94, 0xd4, 0x92, 0xf4, 0xb5, 0x12, 0x77, 0x2b, 0xdf, 0xa6, 0xfc, 0xbb, 0xcf, - 0x07, 0xcf, 0xe6, 0x52, 0xce, 0x97, 0x3c, 0xb0, 0xd9, 0x59, 0x1e, 0x07, 0x5a, 0x24, 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f8, 0x36, 0x96, 0x97, 0xc1, 0xef, 0x9f, 0xcd, 0x85, 0x5e, 0xe4, 0x33, + 0x63, 0xad, 0x20, 0xbc, 0xcd, 0x43, 0xe4, 0x2c, 0x57, 0x42, 0xaf, 0x02, 0x5b, 0x34, 0x58, 0xff, + 0xc5, 0x7f, 0x6d, 0x7f, 0x67, 0x27, 0xb6, 0xc0, 0x17, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xe5, + 0xb0, 0xd7, 0x0b, 0xfc, 0x07, 0x00, 0x00, } diff --git a/rpc/common/service.pb.go b/rpc/common/service.pb.go index 278a37e3c4..1d30079c1b 100644 --- a/rpc/common/service.pb.go +++ b/rpc/common/service.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.0 -// protoc v3.19.4 +// protoc (unknown) // source: rpc/common/service.proto package common @@ -2504,11 +2504,11 @@ var File_rpc_common_service_proto protoreflect.FileDescriptor var file_rpc_common_service_proto_rawDesc = []byte{ 0x0a, 0x18, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x74, 0x72, 0x69, 0x76, - 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x60, 0x0a, 0x02, 0x4f, 0x53, 0x12, 0x16, 0x0a, + 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x60, 0x0a, 0x02, 0x4f, 0x53, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x6f, 0x73, diff --git a/rpc/common/service.proto b/rpc/common/service.proto index 23b6bfe4d4..f7d87bad1c 100644 --- a/rpc/common/service.proto +++ b/rpc/common/service.proto @@ -1,205 +1,205 @@ syntax = "proto3"; -import "google/protobuf/timestamp.proto"; - package trivy.common; -option go_package = "github.com/aquasecurity/trivy/rpc/common;common"; import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "github.com/aquasecurity/trivy/rpc/common;common"; message OS { - string family = 1; - string name = 2; - bool eosl = 3; - bool extended = 4; + string family = 1; + string name = 2; + bool eosl = 3; + bool extended = 4; } message Repository { - string family = 1; + string family = 1; string release = 2; } message PackageInfo { - string file_path = 1; - repeated Package packages = 2; + string file_path = 1; + repeated Package packages = 2; } message Application { - string type = 1; - string file_path = 2; - repeated Package packages = 3; + string type = 1; + string file_path = 2; + repeated Package packages = 3; } message Package { // binary package // e.g. bind-utils - string id = 13; - string name = 1; - string version = 2; - string release = 3; - int32 epoch = 4; + string id = 13; + string name = 1; + string version = 2; + string release = 3; + int32 epoch = 4; PkgIdentifier identifier = 19; - string arch = 5; + string arch = 5; // src package containing some binary packages // e.g. bind - string src_name = 6; - string src_version = 7; - string src_release = 8; - int32 src_epoch = 9; - repeated string licenses = 15; - repeated Location locations = 20; - Layer layer = 11; - string file_path = 12; - repeated string depends_on = 14; - string digest = 16; - bool dev = 17; - bool indirect = 18; - string maintainer = 21; - int32 relationship = 22; + string src_name = 6; + string src_version = 7; + string src_release = 8; + int32 src_epoch = 9; + repeated string licenses = 15; + repeated Location locations = 20; + Layer layer = 11; + string file_path = 12; + repeated string depends_on = 14; + string digest = 16; + bool dev = 17; + bool indirect = 18; + string maintainer = 21; + int32 relationship = 22; } message PkgIdentifier { - string purl = 1; + string purl = 1; string bom_ref = 2; - string uid = 3; + string uid = 3; } message Location { int32 start_line = 1; - int32 end_line = 2; + int32 end_line = 2; } message Misconfiguration { - string file_type = 1; - string file_path = 2; + string file_type = 1; + string file_path = 2; repeated MisconfResult successes = 3; - repeated MisconfResult warnings = 4; - repeated MisconfResult failures = 5; + repeated MisconfResult warnings = 4; + repeated MisconfResult failures = 5; - reserved 6; // deprecated 'exceptions' + reserved 6; // deprecated 'exceptions' } message MisconfResult { string namespace = 1; - string message = 2; + string message = 2; reserved 3 to 6; reserved "type", "id", "title", "severity"; PolicyMetadata policy_metadata = 7; - CauseMetadata cause_metadata = 8; + CauseMetadata cause_metadata = 8; } message PolicyMetadata { - string id = 1; - string adv_id = 2; - string type = 3; - string title = 4; - string description = 5; - string severity = 6; - string recommended_actions = 7; - repeated string references = 8; + string id = 1; + string adv_id = 2; + string type = 3; + string title = 4; + string description = 5; + string severity = 6; + string recommended_actions = 7; + repeated string references = 8; } message DetectedMisconfiguration { - string type = 1; - string id = 2; - string title = 3; - string description = 4; - string message = 5; - string namespace = 6; - string resolution = 7; - Severity severity = 8; - string primary_url = 9; - repeated string references = 10; - string status = 11; - Layer layer = 12; - CauseMetadata cause_metadata = 13; - string avd_id = 14; - string query = 15; + string type = 1; + string id = 2; + string title = 3; + string description = 4; + string message = 5; + string namespace = 6; + string resolution = 7; + Severity severity = 8; + string primary_url = 9; + repeated string references = 10; + string status = 11; + Layer layer = 12; + CauseMetadata cause_metadata = 13; + string avd_id = 14; + string query = 15; } message Vulnerability { - string vulnerability_id = 1; - string pkg_name = 2; - string installed_version = 3; - string fixed_version = 4; - string title = 5; - string description = 6; - Severity severity = 7; - repeated string references = 8; - PkgIdentifier pkg_identifier = 25; - Layer layer = 10; - string severity_source = 11; - map cvss = 12; - repeated string cwe_ids = 13; - string primary_url = 14; - google.protobuf.Timestamp published_date = 15; - google.protobuf.Timestamp last_modified_date = 16; - bytes custom_advisory_data = 17; - bytes custom_vuln_data = 18; - repeated string vendor_ids = 19; - DataSource data_source = 20; - map vendor_severity = 21; - string pkg_path = 22; - string pkg_id = 23; - int32 status = 24; + string vulnerability_id = 1; + string pkg_name = 2; + string installed_version = 3; + string fixed_version = 4; + string title = 5; + string description = 6; + Severity severity = 7; + repeated string references = 8; + PkgIdentifier pkg_identifier = 25; + Layer layer = 10; + string severity_source = 11; + map cvss = 12; + repeated string cwe_ids = 13; + string primary_url = 14; + google.protobuf.Timestamp published_date = 15; + google.protobuf.Timestamp last_modified_date = 16; + bytes custom_advisory_data = 17; + bytes custom_vuln_data = 18; + repeated string vendor_ids = 19; + DataSource data_source = 20; + map vendor_severity = 21; + string pkg_path = 22; + string pkg_id = 23; + int32 status = 24; } message DataSource { - string id = 1; + string id = 1; string name = 2; - string url = 3; + string url = 3; } message Layer { - string digest = 1; - string diff_id = 2; + string digest = 1; + string diff_id = 2; string created_by = 3; - int64 size = 4; + int64 size = 4; } message CauseMetadata { - string resource = 1; - string provider = 2; - string service = 3; - int32 start_line = 4; - int32 end_line = 5; - Code code = 6; + string resource = 1; + string provider = 2; + string service = 3; + int32 start_line = 4; + int32 end_line = 5; + Code code = 6; RenderedCause rendered_cause = 7; } enum Severity { - UNKNOWN = 0; - LOW = 1; - MEDIUM = 2; - HIGH = 3; + UNKNOWN = 0; + LOW = 1; + MEDIUM = 2; + HIGH = 3; CRITICAL = 4; } message CVSS { - string v2_vector = 1; - string v3_vector = 2; - double v2_score = 3; - double v3_score = 4; + string v2_vector = 1; + string v3_vector = 2; + double v2_score = 3; + double v3_score = 4; string v40_vector = 5; - double v40_score = 6; + double v40_score = 6; } message CustomResource { - string type = 1; - string file_path = 2; - Layer layer = 3; - google.protobuf.Value data = 4; + string type = 1; + string file_path = 2; + Layer layer = 3; + google.protobuf.Value data = 4; } message Line { - int32 number = 1; - string content = 2; - bool is_cause = 3; - string annotation = 4; - bool truncated = 5; + int32 number = 1; + string content = 2; + bool is_cause = 3; + string annotation = 4; + bool truncated = 5; string highlighted = 6; - bool first_cause = 7; - bool last_cause = 8; + bool first_cause = 7; + bool last_cause = 8; } message Code { @@ -207,53 +207,53 @@ message Code { } message RenderedCause { - string raw = 1; + string raw = 1; string highlighted = 2; } message SecretFinding { - string rule_id = 1; - string category = 2; - string severity = 3; - string title = 4; - int32 start_line = 5; - int32 end_line = 6; - Code code = 7; - string match = 8; - Layer layer = 10; + string rule_id = 1; + string category = 2; + string severity = 3; + string title = 4; + int32 start_line = 5; + int32 end_line = 6; + Code code = 7; + string match = 8; + Layer layer = 10; - reserved 9; // deprecated 'deleted' + reserved 9; // deprecated 'deleted' } message Secret { - string filepath = 1; + string filepath = 1; repeated SecretFinding findings = 2; } message DetectedLicense { - Severity severity = 1; - LicenseCategory.Enum category = 2; - string pkg_name = 3; - string file_path = 4; - string name = 5; - float confidence = 6; - string link = 7; - string text = 8; + Severity severity = 1; + LicenseCategory.Enum category = 2; + string pkg_name = 3; + string file_path = 4; + string name = 5; + float confidence = 6; + string link = 7; + string text = 8; } message LicenseFile { - LicenseType.Enum license_type = 1; - string file_path = 2; - string pkg_name = 3; - repeated LicenseFinding fingings = 4; - Layer layer = 5; + LicenseType.Enum license_type = 1; + string file_path = 2; + string pkg_name = 3; + repeated LicenseFinding fingings = 4; + Layer layer = 5; } message LicenseFinding { - LicenseCategory.Enum category = 1; - string name = 2; - float confidence = 3; - string link = 4; + LicenseCategory.Enum category = 1; + string name = 2; + float confidence = 3; + string link = 4; } // Enumerations are wrapped with a message to improve the readability of @@ -261,22 +261,22 @@ message LicenseFinding { // https://github.com/golang/protobuf/issues/513 message LicenseCategory { enum Enum { - UNSPECIFIED = 0; - FORBIDDEN = 1; - RESTRICTED = 2; - RECIPROCAL = 3; - NOTICE = 4; - PERMISSIVE = 5; + UNSPECIFIED = 0; + FORBIDDEN = 1; + RESTRICTED = 2; + RECIPROCAL = 3; + NOTICE = 4; + PERMISSIVE = 5; UNENCUMBERED = 6; - UNKNOWN = 7; + UNKNOWN = 7; } } message LicenseType { enum Enum { - UNSPECIFIED = 0; - DPKG = 1; - HEADER = 2; + UNSPECIFIED = 0; + DPKG = 1; + HEADER = 2; LICENSE_FILE = 3; } } diff --git a/rpc/scanner/service.pb.go b/rpc/scanner/service.pb.go index 61b1931d75..ed28691f48 100644 --- a/rpc/scanner/service.pb.go +++ b/rpc/scanner/service.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.0 -// protoc v3.19.4 +// protoc (unknown) // source: rpc/scanner/service.proto package scanner diff --git a/rpc/scanner/service.proto b/rpc/scanner/service.proto index 0acbf5d9dc..e91228839f 100644 --- a/rpc/scanner/service.proto +++ b/rpc/scanner/service.proto @@ -1,19 +1,20 @@ syntax = "proto3"; package trivy.scanner.v1; -option go_package = "github.com/aquasecurity/trivy/rpc/scanner;scanner"; import "rpc/common/service.proto"; +option go_package = "github.com/aquasecurity/trivy/rpc/scanner;scanner"; + service Scanner { rpc Scan(ScanRequest) returns (ScanResponse); } message ScanRequest { - string target = 1; // image name or tar file path - string artifact_id = 2; - repeated string blob_ids = 3; - ScanOptions options = 4; + string target = 1; // image name or tar file path + string artifact_id = 2; + repeated string blob_ids = 3; + ScanOptions options = 4; } // cf. @@ -23,33 +24,33 @@ message Licenses { } message ScanOptions { - repeated string pkg_types = 1; - repeated string scanners = 2; - map license_categories = 4; - bool include_dev_deps = 5; - repeated string pkg_relationships = 6; - common.OS distro = 7; - repeated string vuln_severity_sources = 8; - bool license_full = 9; + repeated string pkg_types = 1; + repeated string scanners = 2; + map license_categories = 4; + bool include_dev_deps = 5; + repeated string pkg_relationships = 6; + common.OS distro = 7; + repeated string vuln_severity_sources = 8; + bool license_full = 9; - reserved 3; // deleted 'list_all_packages' + reserved 3; // deleted 'list_all_packages' } message ScanResponse { - common.OS os = 1; - repeated Result results = 3; + common.OS os = 1; + repeated Result results = 3; repeated common.Layer layers = 4; } // Result is the same as github.com/aquasecurity/trivy/pkg/report.Result message Result { - string target = 1; - repeated common.Vulnerability vulnerabilities = 2; + string target = 1; + repeated common.Vulnerability vulnerabilities = 2; repeated common.DetectedMisconfiguration misconfigurations = 4; - string class = 6; - string type = 3; - repeated common.Package packages = 5; - repeated common.CustomResource custom_resources = 7; - repeated common.SecretFinding secrets = 8; - repeated common.DetectedLicense licenses = 9; -} \ No newline at end of file + string class = 6; + string type = 3; + repeated common.Package packages = 5; + repeated common.CustomResource custom_resources = 7; + repeated common.SecretFinding secrets = 8; + repeated common.DetectedLicense licenses = 9; +}