Skip to content

Commit bcff5de

Browse files
authored
chore: updates and improvements to remove vulnerabilities (#60)
1 parent ff69330 commit bcff5de

File tree

7 files changed

+72
-47
lines changed

7 files changed

+72
-47
lines changed

AGENTS.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This document is a comprehensive guide for an AI agent tasked with developing an
1414
| **Tech Stack** | Go 1.25+, `mcp-go`, Cobra CLI, Ginkgo/Gomega, `golangci-lint`, Nix. |
1515
| **Entry Point** | `cmd/server/main.go` (Cobra CLI that wires config, Sysdig client, etc.). |
1616
| **Dev Shell** | `nix develop` provides a consistent development environment. |
17-
| **Key Commands** | `just fmt`, `just lint`, `just test`, `just check`, `just bump`. |
17+
| **Key Commands** | `just fmt`, `just lint`, `just test`, `just check`, `just update`. |
1818

1919
## 2. Environment Setup
2020

@@ -54,7 +54,7 @@ internal/
5454
tools/ - Individual MCP tool implementations
5555
sysdig/ - Sysdig API client (generated + extensions)
5656
docs/ - Documentation assets
57-
justfile - Canonical development tasks (format, lint, test, generate, bump)
57+
justfile - Canonical development tasks (format, lint, test, generate, update)
5858
flake.nix - Defines the Nix development environment and its dependencies
5959
package.nix - Defines how the package is going to be built with Nix
6060
```
@@ -94,7 +94,7 @@ package.nix - Defines how the package is going to be built with Nix
9494
1. **Enter the Dev Shell:** Always work inside the Nix shell (`nix develop` or `direnv allow`). You can assume the developer already did that.
9595
2. **Make Focused Changes:** Implement a new tool, fix a bug, or improve documentation.
9696
3. **Run Quality Gates:** Use `just` to run formatters, linters, and tests.
97-
4. **Commit:** Follow the Conventional Commits specification.
97+
4. **Commit:** Follow the Conventional Commits specification (see section 4.4).
9898

9999
### 4.1. Testing & Quality Gates
100100

@@ -115,7 +115,23 @@ If any of the hooks fail, the commit will not be created.
115115

116116
### 4.3 Updating all dependencies
117117

118-
Automated with `just bump`. Requires `nix` installed.
118+
Automated with `just update`. Requires `nix` installed.
119+
120+
### 4.4 Commit Conventions
121+
122+
Follow the [Conventional Commits](https://www.conventionalcommits.org/) specification with these guidelines:
123+
124+
- **Title only:** Commits should have only a title, no description body.
125+
- **Large changes:** If the change is significant, add a description explaining the **why**, not what changed.
126+
- **Format:** `<type>(<scope>): <subject>` (scope is optional).
127+
- **Types:** `feat`, `fix`, `docs`, `refactor`, `test`, `chore`, `build`, `ci`.
128+
129+
Examples:
130+
```
131+
feat(tools): add new runtime events tool
132+
fix: correct API endpoint URL
133+
chore: update dependencies
134+
```
119135

120136
## 5. Guides & Reference
121137

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.

flake.nix

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@
1111
}:
1212
let
1313
overlays.default = final: prev: {
14-
sysdig-mcp-server = prev.pkgsStatic.callPackage ./package.nix { };
14+
sysdig-mcp-server =
15+
if prev.stdenv.isLinux then
16+
prev.pkgsStatic.callPackage ./package.nix { }
17+
else
18+
prev.callPackage ./package.nix { };
1519
};
1620
flake = flake-utils.lib.eachDefaultSystem (
1721
system:
@@ -33,6 +37,7 @@
3337
packages = [
3438
ginkgo
3539
go
40+
govulncheck
3641
gofumpt
3742
golangci-lint
3843
just

go.mod

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

55
require (
6-
github.com/mark3labs/mcp-go v0.43.0
6+
github.com/mark3labs/mcp-go v0.43.2
77
github.com/oapi-codegen/runtime v1.1.2
8-
github.com/onsi/ginkgo/v2 v2.27.2
9-
github.com/onsi/gomega v1.38.2
10-
github.com/spf13/cobra v1.10.1
8+
github.com/onsi/ginkgo/v2 v2.27.5
9+
github.com/onsi/gomega v1.39.0
10+
github.com/spf13/cobra v1.10.2
1111
go.uber.org/mock v0.6.0
1212
gopkg.in/yaml.v2 v2.4.0
1313
)
@@ -20,7 +20,7 @@ require (
2020
github.com/go-logr/logr v1.4.3 // indirect
2121
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
2222
github.com/google/go-cmp v0.7.0 // indirect
23-
github.com/google/pprof v0.0.0-20251114195745-4902fdda35c8 // indirect
23+
github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83 // indirect
2424
github.com/google/uuid v1.6.0 // indirect
2525
github.com/inconshreveable/mousetrap v1.1.0 // indirect
2626
github.com/invopop/jsonschema v0.13.0 // indirect
@@ -31,12 +31,12 @@ require (
3131
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
3232
github.com/yosida95/uritemplate/v3 v3.0.2 // indirect
3333
go.yaml.in/yaml/v3 v3.0.4 // indirect
34-
golang.org/x/mod v0.30.0 // indirect
35-
golang.org/x/net v0.47.0 // indirect
36-
golang.org/x/sync v0.18.0 // indirect
37-
golang.org/x/sys v0.38.0 // indirect
38-
golang.org/x/text v0.31.0 // indirect
39-
golang.org/x/tools v0.39.0 // indirect
34+
golang.org/x/mod v0.32.0 // indirect
35+
golang.org/x/net v0.49.0 // indirect
36+
golang.org/x/sync v0.19.0 // indirect
37+
golang.org/x/sys v0.40.0 // indirect
38+
golang.org/x/text v0.33.0 // indirect
39+
golang.org/x/tools v0.41.0 // indirect
4040
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
4141
gopkg.in/yaml.v3 v3.0.1 // indirect
4242
)

go.sum

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ github.com/goccy/go-yaml v1.18.0 h1:8W7wMFS12Pcas7KU+VVkaiCng+kG8QiFeFwzFb+rwuw=
2828
github.com/goccy/go-yaml v1.18.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA=
2929
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
3030
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
31-
github.com/google/pprof v0.0.0-20251114195745-4902fdda35c8 h1:3DsUAV+VNEQa2CUVLxCY3f87278uWfIDhJnbdvDjvmE=
32-
github.com/google/pprof v0.0.0-20251114195745-4902fdda35c8/go.mod h1:I6V7YzU0XDpsHqbsyrghnFZLO1gwK6NPTNvmetQIk9U=
31+
github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83 h1:z2ogiKUYzX5Is6zr/vP9vJGqPwcdqsWjOt+V8J7+bTc=
32+
github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83/go.mod h1:MxpfABSjhmINe3F1It9d+8exIHFvUqtLIRCdOGNXqiI=
3333
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
3434
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
3535
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
@@ -45,27 +45,27 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
4545
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
4646
github.com/mailru/easyjson v0.9.1 h1:LbtsOm5WAswyWbvTEOqhypdPeZzHavpZx96/n553mR8=
4747
github.com/mailru/easyjson v0.9.1/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU=
48-
github.com/mark3labs/mcp-go v0.43.0 h1:lgiKcWMddh4sngbU+hoWOZ9iAe/qp/m851RQpj3Y7jA=
49-
github.com/mark3labs/mcp-go v0.43.0/go.mod h1:YnJfOL382MIWDx1kMY+2zsRHU/q78dBg9aFb8W6Thdw=
48+
github.com/mark3labs/mcp-go v0.43.2 h1:21PUSlWWiSbUPQwXIJ5WKlETixpFpq+WBpbMGDSVy/I=
49+
github.com/mark3labs/mcp-go v0.43.2/go.mod h1:YnJfOL382MIWDx1kMY+2zsRHU/q78dBg9aFb8W6Thdw=
5050
github.com/maruel/natural v1.1.1 h1:Hja7XhhmvEFhcByqDoHz9QZbkWey+COd9xWfCfn1ioo=
5151
github.com/maruel/natural v1.1.1/go.mod h1:v+Rfd79xlw1AgVBjbO0BEQmptqb5HvL/k9GRHB7ZKEg=
5252
github.com/mfridman/tparse v0.18.0 h1:wh6dzOKaIwkUGyKgOntDW4liXSo37qg5AXbIhkMV3vE=
5353
github.com/mfridman/tparse v0.18.0/go.mod h1:gEvqZTuCgEhPbYk/2lS3Kcxg1GmTxxU7kTC8DvP0i/A=
5454
github.com/oapi-codegen/runtime v1.1.2 h1:P2+CubHq8fO4Q6fV1tqDBZHCwpVpvPg7oKiYzQgXIyI=
5555
github.com/oapi-codegen/runtime v1.1.2/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg=
56-
github.com/onsi/ginkgo/v2 v2.27.2 h1:LzwLj0b89qtIy6SSASkzlNvX6WktqurSHwkk2ipF/Ns=
57-
github.com/onsi/ginkgo/v2 v2.27.2/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo=
58-
github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A=
59-
github.com/onsi/gomega v1.38.2/go.mod h1:W2MJcYxRGV63b418Ai34Ud0hEdTVXq9NW9+Sx6uXf3k=
56+
github.com/onsi/ginkgo/v2 v2.27.5 h1:ZeVgZMx2PDMdJm/+w5fE/OyG6ILo1Y3e+QX4zSR0zTE=
57+
github.com/onsi/ginkgo/v2 v2.27.5/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo=
58+
github.com/onsi/gomega v1.39.0 h1:y2ROC3hKFmQZJNFeGAMeHZKkjBL65mIZcvrLQBF9k6Q=
59+
github.com/onsi/gomega v1.39.0/go.mod h1:ZCU1pkQcXDO5Sl9/VVEGlDyp+zm0m1cmeG5TOzLgdh4=
6060
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
6161
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
6262
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
6363
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
6464
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
6565
github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY=
6666
github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo=
67-
github.com/spf13/cobra v1.10.1 h1:lJeBwCfmrnXthfAupyUTzJ/J4Nc1RsHC/mSRU2dll/s=
68-
github.com/spf13/cobra v1.10.1/go.mod h1:7SmJGaTHFVBY0jW4NXGluQoLvhqFQM+6XSKD+P4XaB0=
67+
github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU=
68+
github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4=
6969
github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
7070
github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=
7171
github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
@@ -90,18 +90,18 @@ go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y=
9090
go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU=
9191
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
9292
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
93-
golang.org/x/mod v0.30.0 h1:fDEXFVZ/fmCKProc/yAXXUijritrDzahmwwefnjoPFk=
94-
golang.org/x/mod v0.30.0/go.mod h1:lAsf5O2EvJeSFMiBxXDki7sCgAxEUcZHXoXMKT4GJKc=
95-
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
96-
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
97-
golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
98-
golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
99-
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
100-
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
101-
golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
102-
golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
103-
golang.org/x/tools v0.39.0 h1:ik4ho21kwuQln40uelmciQPp9SipgNDdrafrYA4TmQQ=
104-
golang.org/x/tools v0.39.0/go.mod h1:JnefbkDPyD8UU2kI5fuf8ZX4/yUeh9W877ZeBONxUqQ=
93+
golang.org/x/mod v0.32.0 h1:9F4d3PHLljb6x//jOyokMv3eX+YDeepZSEo3mFJy93c=
94+
golang.org/x/mod v0.32.0/go.mod h1:SgipZ/3h2Ci89DlEtEXWUk/HteuRin+HHhN+WbNhguU=
95+
golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o=
96+
golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8=
97+
golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4=
98+
golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
99+
golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ=
100+
golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
101+
golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE=
102+
golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8=
103+
golang.org/x/tools v0.41.0 h1:a9b8iMweWG+S0OBnlU36rzLp20z1Rp10w+IY2czHTQc=
104+
golang.org/x/tools v0.41.0/go.mod h1:XSY6eDqxVNiYgezAVqqCeihT4j1U2CCsqvH3WhQpnlg=
105105
google.golang.org/protobuf v1.36.7 h1:IgrO7UwFQGJdRNXH/sQux4R1Dj1WAKcLElzeeRaXV2A=
106106
google.golang.org/protobuf v1.36.7/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
107107
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

justfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ default:
33
@just --list
44

55
# Run all checks
6-
check: fmt lint test
6+
check: fmt check-vulnerabilities lint test
7+
8+
# Check for vulnerabilities in the project
9+
check-vulnerabilities:
10+
govulncheck -show verbose ./...
711

812
# Lint and fix code
913
lint:
@@ -25,8 +29,8 @@ generate:
2529
test-coverage: generate
2630
go test -coverprofile=coverage.out ./...
2731

28-
# Bump all dependencies
29-
bump:
32+
# Update all dependencies
33+
update:
3034
nix flake update
3135
nix develop --command go get -u -t -v ./...
3236
nix develop --command go mod tidy

package.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{ buildGoModule, versionCheckHook }:
22
buildGoModule (finalAttrs: {
33
pname = "sysdig-mcp-server";
4-
version = "0.6.0";
4+
version = "0.6.1";
55
src = ./.;
6-
# This hash is automatically re-calculated with `just rehash-package-nix`. This is automatically called as well by `just bump`.
7-
vendorHash = "sha256-jf/px0p88XbfuSPMry/qZcfR0QPTF9IrPegg2CwAd6M=";
6+
# This hash is automatically re-calculated with `just rehash-package-nix`. This is automatically called as well by `just update`.
7+
vendorHash = "sha256-qMgFlDqzmtpxNOFCX9TsE4sjz0ZdvTJ5Q5IpA8lzG8g=";
88

99
subPackages = [
1010
"cmd/server"

0 commit comments

Comments
 (0)