Skip to content

Commit

Permalink
chore(deps): upgrade deps to fix CVEs (#168)
Browse files Browse the repository at this point in the history
* chore(deps): upgrade deps to fix CVE

* go mod tidy && go mod vendor

* chore(ci): add ci job to scan cve

* chore(ci): fix warn
  • Loading branch information
mozillazg authored Oct 19, 2024
1 parent 119581c commit 1ef0057
Show file tree
Hide file tree
Showing 1,117 changed files with 121,393 additions and 83,059 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/release-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@ jobs:
- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5
with:
go-version: '1.22.4'
go-version: '1.23.2'

- name: Install govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6
with:
distribution: goreleaser
version: latest
version: '~> v2'
args: release --snapshot --clean --skip=publish -p 1

- name: Test binary
Expand All @@ -38,6 +41,12 @@ jobs:
file ./amd64/ptcpdump |grep x86-64 |grep 'statically linked'
file ./arm64/ptcpdump |grep aarch64 |grep 'statically linked'
- name: Run govulncheck for binary
run: |
set -xe
govulncheck -mode=binary -show verbose -scan module ./amd64/ptcpdump
govulncheck -mode=binary -show verbose -scan module ./arm64/ptcpdump
- name: Store Releases
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ jobs:
- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5
with:
go-version: '1.22.4'
go-version: '1.23.2'
env:
GOPATH: ${{ env.HOME }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6
with:
version: latest
version: '~> v2'
args: release --clean -p 1
env:
GOPATH: ${{ env.HOME }}
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/scan-cve.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: scan-cve

on:
workflow_dispatch:
push:
branches: [ "master", "dev" ]
pull_request:
branches: [ "master", "dev" ]
schedule:
- cron: "03 */24 * * *"

permissions:
contents: read

jobs:

scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5
with:
go-version: '1.23'

- name: Install govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest

- name: Run govulncheck for project
run: govulncheck -show verbose -scan module

- name: Build binary
run: make build-via-docker

- name: Run govulncheck for binary
run: govulncheck -mode=binary -show verbose -scan module ./ptcpdump
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5
with:
go-version: '1.22.4'
go-version: '1.23'

- name: Build
run: make build-via-docker
Expand Down
104 changes: 42 additions & 62 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/mozillazg/ptcpdump

go 1.22.0
go 1.23.0

require (
github.com/cilium/ebpf v0.15.0
Expand All @@ -14,71 +14,68 @@ require (
github.com/shirou/gopsutil/v4 v4.24.8
github.com/spf13/cobra v1.8.1
github.com/x-way/pktdump v0.0.5
golang.org/x/sys v0.24.0
golang.org/x/sys v0.26.0
)

require (
github.com/containerd/containerd/api v1.7.19
github.com/containerd/errdefs v0.1.0
github.com/go-logr/logr v1.4.2
github.com/mandiant/GoReSym v1.7.2-0.20240819162932-534ca84b42d5
github.com/smira/go-xz v0.1.0
github.com/stretchr/testify v1.9.0
github.com/vishvananda/netns v0.0.0-20211101163701-50045581ed74
golang.org/x/arch v0.10.0
k8s.io/cri-api v0.31.1
k8s.io/cri-client v0.31.1
k8s.io/klog/v2 v2.130.1
)

require (
github.com/Microsoft/hcsshim/test v0.0.0-00010101000000-000000000000 // indirect
github.com/containerd/typeurl v1.0.2 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/docker/distribution v2.8.2+incompatible // indirect
github.com/elliotchance/orderedmap v1.4.0 // indirect
github.com/gogo/googleapis v1.4.1 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/opencontainers/runc v1.1.14 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apimachinery v0.31.0-alpha.3 // indirect
k8s.io/apiserver v0.26.2 // indirect
rsc.io/binaryregexp v0.2.0 // indirect
)

require (
github.com/prometheus/procfs v0.15.1 // indirect
k8s.io/component-base v0.31.0-alpha.3 // indirect
k8s.io/kubernetes v0.31.0-alpha.3
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
)

require (
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect
github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/Microsoft/hcsshim v0.11.7 // indirect
github.com/cloudflare/cbpfc v0.0.0-20230809125630-31aa294050ff // indirect
github.com/containerd/cgroups v1.1.0 // indirect
github.com/containerd/continuity v0.4.2 // indirect
github.com/containerd/errdefs v0.1.0
github.com/containerd/fifo v1.1.0 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/containerd/platforms v0.2.1 // indirect
github.com/containerd/ttrpc v1.2.5 // indirect
github.com/docker/go-connections v0.5.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/go-logr/logr v1.4.2
github.com/elliotchance/orderedmap v1.4.0 // indirect
github.com/felixge/httpsnoop v1.0.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/josharian/native v1.1.0 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
github.com/mdlayher/netlink v1.6.0 // indirect
github.com/mdlayher/socket v0.1.1 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/locker v1.0.1 // indirect
github.com/moby/sys/mountinfo v0.6.2 // indirect
github.com/moby/sys/sequential v0.5.0 // indirect
github.com/moby/sys/signal v0.7.0 // indirect
github.com/moby/sys/user v0.1.0 // indirect
github.com/moby/term v0.5.0 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0 // indirect
github.com/opencontainers/runtime-spec v1.1.0 // indirect
github.com/opencontainers/selinux v1.11.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
Expand All @@ -87,47 +84,30 @@ require (
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect
go.opentelemetry.io/otel v1.28.0 // indirect
go.opentelemetry.io/otel/metric v1.28.0 // indirect
go.opentelemetry.io/otel/trace v1.28.0 // indirect
golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect
google.golang.org/grpc v1.63.2 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/text v0.19.0 // indirect
google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect
google.golang.org/grpc v1.65.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gotest.tools/v3 v3.5.1 // indirect
k8s.io/cri-api v0.31.0
k8s.io/component-base v0.26.2 // indirect
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
rsc.io/binaryregexp v0.2.0 // indirect
)

replace (
github.com/Microsoft/hcsshim => github.com/Microsoft/hcsshim v0.8.26
github.com/Microsoft/hcsshim/test => github.com/Microsoft/hcsshim/test v0.0.0-20210514012740-eba372547321
github.com/containerd/containerd => github.com/containerd/containerd v1.4.13
github.com/docker/docker => github.com/docker/docker v24.0.9+incompatible
github.com/gopacket/gopacket => github.com/mozillazg/gopacket v0.0.0-20241005073024-5750600e7922
// github.com/gopacket/gopacket => ../../gopacket/gopacket
github.com/x-way/pktdump => github.com/mozillazg/pktdump v0.0.9-0.20241003022253-cbafa8b6312d
// github.com/x-way/pktdump => ../../x-way/pktdump

// https://github.com/kubernetes/kubernetes/blob/release-1.24/go.mod
go.opencensus.io => go.opencensus.io v0.23.0
go.opentelemetry.io/contrib => go.opentelemetry.io/contrib v0.20.0
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc => go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp => go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0
go.opentelemetry.io/otel => go.opentelemetry.io/otel v0.20.0
go.opentelemetry.io/otel/exporters/otlp => go.opentelemetry.io/otel/exporters/otlp v0.20.1
go.opentelemetry.io/otel/metric => go.opentelemetry.io/otel/metric v0.20.0
go.opentelemetry.io/otel/oteltest => go.opentelemetry.io/otel/oteltest v0.20.1
go.opentelemetry.io/otel/sdk => go.opentelemetry.io/otel/sdk v0.20.0
go.opentelemetry.io/otel/sdk/export/metric => go.opentelemetry.io/otel/sdk/export/metric v0.20.0
go.opentelemetry.io/otel/sdk/metric => go.opentelemetry.io/otel/sdk/metric v0.20.0
go.opentelemetry.io/otel/trace => go.opentelemetry.io/otel/trace v0.20.0
go.opentelemetry.io/proto/otlp => go.opentelemetry.io/proto/otlp v0.7.0
k8s.io/api => k8s.io/api v0.23.17
k8s.io/apimachinery => k8s.io/apimachinery v0.24.17
k8s.io/apiserver => k8s.io/apiserver v0.24.17
k8s.io/client-go => k8s.io/client-go v0.24.17
k8s.io/component-base => k8s.io/component-base v0.24.17
k8s.io/cri-api => k8s.io/kubernetes/staging/src/k8s.io/cri-api v0.0.0-20230824000246-2cb31c9333ad
k8s.io/kubernetes => k8s.io/kubernetes v1.24.17
k8s.io/cri-api => github.com/mozillazg/cri-api v0.32.0-alpha.1.0.20241019013855-3dc36f8743df
k8s.io/cri-client => github.com/mozillazg/cri-client v0.31.0-alpha.0.0.20241019023238-87687176fd67
)
Loading

0 comments on commit 1ef0057

Please sign in to comment.