Skip to content

Commit b251f21

Browse files
committed
build: update base images and go modules to fix vulns
1 parent f26c206 commit b251f21

43 files changed

Lines changed: 547 additions & 383 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docker-base-aarch64.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
imageName = "quay.io/sysdig/sysdig-mini-ubi9";
3-
imageDigest = "sha256:5e58dfac68d9c9b35e01fcdbb588a1b9b91e4c495e6d503fd6256c56a30f6ed6";
4-
hash = "sha256-u7wCRKYxK/ycZcR21zWjkPRZ3p8kRl5Hl+tLTsuv394=";
3+
imageDigest = "sha256:e41fa798f88f07e065720f62186b65552ac70d1f33ba36e45c063980950b7bef";
4+
hash = "sha256-tbngNKTGLym3rENyVKmfYl0PUGAZERyoS78xb3W7AlM=";
55
finalImageName = "quay.io/sysdig/sysdig-mini-ubi9";
66
finalImageTag = "1";
77
}

docker-base-amd64.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
imageName = "quay.io/sysdig/sysdig-mini-ubi9";
3-
imageDigest = "sha256:5e58dfac68d9c9b35e01fcdbb588a1b9b91e4c495e6d503fd6256c56a30f6ed6";
4-
hash = "sha256-L4os/2dU0DoC9rXssTJ/q/InmRQ5j3uuUEfinqMhMEs=";
3+
imageDigest = "sha256:e41fa798f88f07e065720f62186b65552ac70d1f33ba36e45c063980950b7bef";
4+
hash = "sha256-T/imK3ZAQXorg1KtCJ2RYseRkI3TmLzQ4U6832ThZCM=";
55
finalImageName = "quay.io/sysdig/sysdig-mini-ubi9";
66
finalImageTag = "1";
77
}

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go.mod

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,34 @@ module github.com/sysdiglabs/sysdig-mcp-server
33
go 1.26
44

55
require (
6-
github.com/mark3labs/mcp-go v0.49.0
6+
github.com/mark3labs/mcp-go v0.54.0
77
github.com/oapi-codegen/runtime v1.4.0
8-
github.com/onsi/ginkgo/v2 v2.28.2
9-
github.com/onsi/gomega v1.39.1
8+
github.com/onsi/ginkgo/v2 v2.29.0
9+
github.com/onsi/gomega v1.41.0
1010
github.com/spf13/cobra v1.10.2
1111
go.uber.org/mock v0.6.0
1212
gopkg.in/yaml.v2 v2.4.0
1313
)
1414

1515
require (
16-
github.com/Masterminds/semver/v3 v3.4.0 // indirect
16+
github.com/Masterminds/semver/v3 v3.5.0 // indirect
1717
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
1818
github.com/go-logr/logr v1.4.3 // indirect
1919
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
2020
github.com/google/go-cmp v0.7.0 // indirect
21-
github.com/google/jsonschema-go v0.4.2 // indirect
22-
github.com/google/pprof v0.0.0-20260402051712-545e8a4df936 // indirect
21+
github.com/google/jsonschema-go v0.4.3 // indirect
22+
github.com/google/pprof v0.0.0-20260507013755-92041b743c96 // indirect
2323
github.com/google/uuid v1.6.0 // indirect
2424
github.com/inconshreveable/mousetrap v1.1.0 // indirect
25+
github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect
2526
github.com/spf13/cast v1.10.0 // indirect
2627
github.com/spf13/pflag v1.0.10 // indirect
2728
github.com/yosida95/uritemplate/v3 v3.0.2 // indirect
2829
go.yaml.in/yaml/v3 v3.0.4 // indirect
29-
golang.org/x/mod v0.35.0 // indirect
30-
golang.org/x/net v0.53.0 // indirect
30+
golang.org/x/mod v0.36.0 // indirect
31+
golang.org/x/net v0.54.0 // indirect
3132
golang.org/x/sync v0.20.0 // indirect
32-
golang.org/x/sys v0.43.0 // indirect
33-
golang.org/x/text v0.36.0 // indirect
34-
golang.org/x/tools v0.44.0 // indirect
35-
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
33+
golang.org/x/sys v0.44.0 // indirect
34+
golang.org/x/text v0.37.0 // indirect
35+
golang.org/x/tools v0.45.0 // indirect
3636
)

go.sum

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0=
2-
github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
1+
github.com/Masterminds/semver/v3 v3.5.0 h1:kQceYJfbupGfZOKZQg0kou0DgAKhzDg2NZPAwZ/2OOE=
2+
github.com/Masterminds/semver/v3 v3.5.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
33
github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk=
44
github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ=
55
github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk=
@@ -8,6 +8,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6N
88
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
99
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
1010
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
11+
github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI=
12+
github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
1113
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
1214
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
1315
github.com/gkampitakis/ciinfo v0.3.2 h1:JcuOPk8ZU7nZQjdUhctuhQofk7BGHuIy0c9Ez8BNhXs=
@@ -24,10 +26,10 @@ github.com/goccy/go-yaml v1.18.0 h1:8W7wMFS12Pcas7KU+VVkaiCng+kG8QiFeFwzFb+rwuw=
2426
github.com/goccy/go-yaml v1.18.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA=
2527
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
2628
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
27-
github.com/google/jsonschema-go v0.4.2 h1:tmrUohrwoLZZS/P3x7ex0WAVknEkBZM46iALbcqoRA8=
28-
github.com/google/jsonschema-go v0.4.2/go.mod h1:r5quNTdLOYEz95Ru18zA0ydNbBuYoo9tgaYcxEYhJVE=
29-
github.com/google/pprof v0.0.0-20260402051712-545e8a4df936 h1:EwtI+Al+DeppwYX2oXJCETMO23COyaKGP6fHVpkpWpg=
30-
github.com/google/pprof v0.0.0-20260402051712-545e8a4df936/go.mod h1:MxpfABSjhmINe3F1It9d+8exIHFvUqtLIRCdOGNXqiI=
29+
github.com/google/jsonschema-go v0.4.3 h1:/DBOLZTfDow7pe2GmaJNhltueGTtDKICi8V8p+DQPd0=
30+
github.com/google/jsonschema-go v0.4.3/go.mod h1:r5quNTdLOYEz95Ru18zA0ydNbBuYoo9tgaYcxEYhJVE=
31+
github.com/google/pprof v0.0.0-20260507013755-92041b743c96 h1:YDDnaZ9afWajDboPMt9Vikqca/yWAX7KAxVzb4lJU1M=
32+
github.com/google/pprof v0.0.0-20260507013755-92041b743c96/go.mod h1:MxpfABSjhmINe3F1It9d+8exIHFvUqtLIRCdOGNXqiI=
3133
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
3234
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
3335
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
@@ -39,23 +41,25 @@ github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
3941
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
4042
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
4143
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
42-
github.com/mark3labs/mcp-go v0.49.0 h1:7Ssx4d7/T86qnWoJIdye7wEEvUzv39UIbnZb/FqUZMY=
43-
github.com/mark3labs/mcp-go v0.49.0/go.mod h1:BflTAZAzXlrTpiO44gmjMu89n2FO56rJ9m31fp4zd5k=
44+
github.com/mark3labs/mcp-go v0.54.0 h1:PZhQvd+5xrT43cUoiaKn/hDcvLUhcLc1twSEKYPTcTA=
45+
github.com/mark3labs/mcp-go v0.54.0/go.mod h1:+8WclSK1ZUweCP3hvktSji8n8ABG/95QaEkeVE/Uwas=
4446
github.com/maruel/natural v1.1.1 h1:Hja7XhhmvEFhcByqDoHz9QZbkWey+COd9xWfCfn1ioo=
4547
github.com/maruel/natural v1.1.1/go.mod h1:v+Rfd79xlw1AgVBjbO0BEQmptqb5HvL/k9GRHB7ZKEg=
4648
github.com/mfridman/tparse v0.18.0 h1:wh6dzOKaIwkUGyKgOntDW4liXSo37qg5AXbIhkMV3vE=
4749
github.com/mfridman/tparse v0.18.0/go.mod h1:gEvqZTuCgEhPbYk/2lS3Kcxg1GmTxxU7kTC8DvP0i/A=
4850
github.com/oapi-codegen/runtime v1.4.0 h1:KLOSFOp7UzkbS7Cs1ms6NBEKYr0WmH2wZG0KKbd2er4=
4951
github.com/oapi-codegen/runtime v1.4.0/go.mod h1:5sw5fxCDmnOzKNYmkVNF8d34kyUeejJEY8HNT2WaPec=
50-
github.com/onsi/ginkgo/v2 v2.28.2 h1:DTrMfpqxiNUyQ3Y0zhn1n3cOO2euFgQPYIpkWwxVFps=
51-
github.com/onsi/ginkgo/v2 v2.28.2/go.mod h1:CLtbVInNckU3/+gC8LzkGUb9oF+e8W8TdUsxPwvdOgE=
52-
github.com/onsi/gomega v1.39.1 h1:1IJLAad4zjPn2PsnhH70V4DKRFlrCzGBNrNaru+Vf28=
53-
github.com/onsi/gomega v1.39.1/go.mod h1:hL6yVALoTOxeWudERyfppUcZXjMwIMLnuSfruD2lcfg=
52+
github.com/onsi/ginkgo/v2 v2.29.0 h1:rfh+ZFjgJhYWRoIqVf3Uwx/W20yLrcrE2h2GmYVRaag=
53+
github.com/onsi/ginkgo/v2 v2.29.0/go.mod h1:+aXOY+vzZ5mu2iI2HpTZUPmM//oQfsNFX6gU9kNcA44=
54+
github.com/onsi/gomega v1.41.0 h1:OwKp4pXNgVxf6sCplzYo794OFNuoL2q2SBMU5NSWOjA=
55+
github.com/onsi/gomega v1.41.0/go.mod h1:M/Uqpu/8qTjtzCLUA2zJHX9Iilrau25x1PdoSRbWh5A=
5456
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
5557
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
56-
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
57-
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
58+
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
59+
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
5860
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
61+
github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 h1:KRzFb2m7YtdldCEkzs6KqmJw4nqEVZGK7IN2kJkjTuQ=
62+
github.com/santhosh-tekuri/jsonschema/v6 v6.0.2/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU=
5963
github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY=
6064
github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo=
6165
github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU=
@@ -82,23 +86,23 @@ go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y=
8286
go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU=
8387
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
8488
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
85-
golang.org/x/mod v0.35.0 h1:Ww1D637e6Pg+Zb2KrWfHQUnH2dQRLBQyAtpr/haaJeM=
86-
golang.org/x/mod v0.35.0/go.mod h1:+GwiRhIInF8wPm+4AoT6L0FA1QWAad3OMdTRx4tFYlU=
87-
golang.org/x/net v0.53.0 h1:d+qAbo5L0orcWAr0a9JweQpjXF19LMXJE8Ey7hwOdUA=
88-
golang.org/x/net v0.53.0/go.mod h1:JvMuJH7rrdiCfbeHoo3fCQU24Lf5JJwT9W3sJFulfgs=
89+
golang.org/x/mod v0.36.0 h1:JJjpVx6myfUsUdAzZuOSTTmRE0PfZeNWzzvKrP7amb4=
90+
golang.org/x/mod v0.36.0/go.mod h1:moc6ELqsWcOw5Ef3xVprK5ul/MvtVvkIXLziUOICjUQ=
91+
golang.org/x/net v0.54.0 h1:2zJIZAxAHV/OHCDTCOHAYehQzLfSXuf/5SoL/Dv6w/w=
92+
golang.org/x/net v0.54.0/go.mod h1:Sj4oj8jK6XmHpBZU/zWHw3BV3abl4Kvi+Ut7cQcY+cQ=
8993
golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4=
9094
golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
91-
golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI=
92-
golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
93-
golang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg=
94-
golang.org/x/text v0.36.0/go.mod h1:NIdBknypM8iqVmPiuco0Dh6P5Jcdk8lJL0CUebqK164=
95-
golang.org/x/tools v0.44.0 h1:UP4ajHPIcuMjT1GqzDWRlalUEoY+uzoZKnhOjbIPD2c=
96-
golang.org/x/tools v0.44.0/go.mod h1:KA0AfVErSdxRZIsOVipbv3rQhVXTnlU6UhKxHd1seDI=
95+
golang.org/x/sys v0.44.0 h1:ildZl3J4uzeKP07r2F++Op7E9B29JRUy+a27EibtBTQ=
96+
golang.org/x/sys v0.44.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
97+
golang.org/x/text v0.37.0 h1:Cqjiwd9eSg8e0QAkyCaQTNHFIIzWtidPahFWR83rTrc=
98+
golang.org/x/text v0.37.0/go.mod h1:a5sjxXGs9hsn/AJVwuElvCAo9v8QYLzvavO5z2PiM38=
99+
golang.org/x/tools v0.45.0 h1:18qN3FAooORvApf5XjCXgsuayZOEtXf6JK18I3+ONa8=
100+
golang.org/x/tools v0.45.0/go.mod h1:LuUGqqaXcXMEFEruIVJVm5mgDD8vww/z/SR1gQ4uE/0=
97101
google.golang.org/protobuf v1.36.7 h1:IgrO7UwFQGJdRNXH/sQux4R1Dj1WAKcLElzeeRaXV2A=
98102
google.golang.org/protobuf v1.36.7/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
99103
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
100-
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
101-
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
104+
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
105+
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
102106
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
103107
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
104108
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

internal/infra/mcp/tools/tool_generate_sysql.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,11 @@ func (h *ToolGenerateSysql) handle(ctx context.Context, request mcp.CallToolRequ
4141
}
4242

4343
func (h *ToolGenerateSysql) RegisterInServer(s *server.MCPServer) {
44-
tool := mcp.NewTool("generate_sysql",
44+
tool := mcp.NewTool(
45+
"generate_sysql",
4546
mcp.WithDescription(`Generates a SysQL query from a natural language question.`),
46-
mcp.WithString("question",
47+
mcp.WithString(
48+
"question",
4749
mcp.Description("A natural language question to be translated into a SysQL query."),
4850
mcp.Required(),
4951
Examples(

internal/infra/mcp/tools/tool_get_event_info.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ func (h *ToolGetEventInfo) handle(ctx context.Context, request mcp.CallToolReque
3636
}
3737

3838
func (h *ToolGetEventInfo) RegisterInServer(s *server.MCPServer) {
39-
tool := mcp.NewTool("get_event_info",
39+
tool := mcp.NewTool(
40+
"get_event_info",
4041
mcp.WithDescription("Retrieve detailed information for a specific security event by its ID"),
41-
mcp.WithString("event_id",
42+
mcp.WithString(
43+
"event_id",
4244
mcp.Description("The unique identifier of the security event."),
4345
mcp.Required(),
4446
),

internal/infra/mcp/tools/tool_get_event_process_tree.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,11 @@ func (h *ToolGetEventProcessTree) handle(ctx context.Context, request mcp.CallTo
5454
}
5555

5656
func (h *ToolGetEventProcessTree) RegisterInServer(s *server.MCPServer) {
57-
tool := mcp.NewTool("get_event_process_tree",
57+
tool := mcp.NewTool(
58+
"get_event_process_tree",
5859
mcp.WithDescription("Retrieves the process tree for a specific security event.\nNot every event has a process tree, so this may return an empty tree."),
59-
mcp.WithString("event_id",
60+
mcp.WithString(
61+
"event_id",
6062
mcp.Description("The unique identifier of the security event."),
6163
mcp.Required(),
6264
),

internal/infra/mcp/tools/tool_k8s_list_clusters.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ func NewK8sListClusters(sysdigClient sysdig.ExtendedClientWithResponsesInterface
2525
}
2626

2727
func (t *K8sListClusters) RegisterInServer(s *server.MCPServer) {
28-
tool := mcp.NewTool("k8s_list_clusters",
28+
tool := mcp.NewTool(
29+
"k8s_list_clusters",
2930
mcp.WithDescription("Lists the cluster information for all clusters or just the cluster specified. Optionally pass start/end (RFC3339) to list clusters that existed at any point in the window."),
3031
mcp.WithString("cluster_name", mcp.Description("The name of the cluster to filter by.")),
31-
mcp.WithNumber("limit",
32+
mcp.WithNumber(
33+
"limit",
3234
mcp.Description("Maximum number of clusters to return."),
3335
mcp.DefaultNumber(10),
3436
),

internal/infra/mcp/tools/tool_k8s_list_clusters_test.go

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,23 @@ var _ = Describe("KubernetesListClusters Tool", func() {
4343
})
4444

4545
When("listing all clusters", func() {
46-
DescribeTable("it succeeds", func(ctx context.Context, toolName string, request mcp.CallToolRequest, expectedParamsRequested sysdig.GetQueryV1Params) {
47-
mockSysdig.EXPECT().GetQueryV1(gomock.Any(), &expectedParamsRequested).Return(&http.Response{
48-
StatusCode: http.StatusOK,
49-
Body: io.NopCloser(bytes.NewBufferString(`{"status":"success"}`)),
50-
}, nil)
46+
DescribeTable(
47+
"it succeeds", func(ctx context.Context, toolName string, request mcp.CallToolRequest, expectedParamsRequested sysdig.GetQueryV1Params) {
48+
mockSysdig.EXPECT().GetQueryV1(gomock.Any(), &expectedParamsRequested).Return(&http.Response{
49+
StatusCode: http.StatusOK,
50+
Body: io.NopCloser(bytes.NewBufferString(`{"status":"success"}`)),
51+
}, nil)
5152

52-
serverTool := mcpServer.GetTool(toolName)
53-
result, err := serverTool.Handler(ctx, request)
54-
Expect(err).NotTo(HaveOccurred())
53+
serverTool := mcpServer.GetTool(toolName)
54+
result, err := serverTool.Handler(ctx, request)
55+
Expect(err).NotTo(HaveOccurred())
5556

56-
resultData, ok := result.Content[0].(mcp.TextContent)
57-
Expect(ok).To(BeTrue())
58-
Expect(resultData.Text).To(MatchJSON(`{"status":"success"}`))
59-
},
60-
Entry(nil,
57+
resultData, ok := result.Content[0].(mcp.TextContent)
58+
Expect(ok).To(BeTrue())
59+
Expect(resultData.Text).To(MatchJSON(`{"status":"success"}`))
60+
},
61+
Entry(
62+
nil,
6163
"k8s_list_clusters",
6264
mcp.CallToolRequest{
6365
Params: mcp.CallToolParams{
@@ -70,7 +72,8 @@ var _ = Describe("KubernetesListClusters Tool", func() {
7072
Limit: new(sysdig.LimitQuery(10)),
7173
},
7274
),
73-
Entry(nil,
75+
Entry(
76+
nil,
7477
"k8s_list_clusters",
7578
mcp.CallToolRequest{
7679
Params: mcp.CallToolParams{
@@ -83,7 +86,8 @@ var _ = Describe("KubernetesListClusters Tool", func() {
8386
Limit: new(sysdig.LimitQuery(20)),
8487
},
8588
),
86-
Entry(nil,
89+
Entry(
90+
nil,
8791
"k8s_list_clusters",
8892
mcp.CallToolRequest{
8993
Params: mcp.CallToolParams{
@@ -96,7 +100,8 @@ var _ = Describe("KubernetesListClusters Tool", func() {
96100
Limit: new(sysdig.LimitQuery(10)),
97101
},
98102
),
99-
Entry(nil,
103+
Entry(
104+
nil,
100105
"k8s_list_clusters",
101106
mcp.CallToolRequest{
102107
Params: mcp.CallToolParams{
@@ -109,7 +114,8 @@ var _ = Describe("KubernetesListClusters Tool", func() {
109114
Limit: new(sysdig.LimitQuery(20)),
110115
},
111116
),
112-
Entry("windowed, no filters",
117+
Entry(
118+
"windowed, no filters",
113119
"k8s_list_clusters",
114120
mcp.CallToolRequest{
115121
Params: mcp.CallToolParams{
@@ -125,7 +131,8 @@ var _ = Describe("KubernetesListClusters Tool", func() {
125131
time.Date(2026, time.April, 16, 11, 0, 0, 0, time.UTC),
126132
), 10),
127133
),
128-
Entry("windowed, cluster_name filter",
134+
Entry(
135+
"windowed, cluster_name filter",
129136
"k8s_list_clusters",
130137
mcp.CallToolRequest{
131138
Params: mcp.CallToolParams{

0 commit comments

Comments
 (0)