Commit Graph
43 Commits
Author SHA1 Message Date
f38980ea94 deps: bump indirect deps to clear critical/high Dependabot alerts (#1952)
* deps: bump indirect deps to clear critical/high Dependabot alerts

Bumps the vulnerable indirect dependencies flagged as critical or high
severity in Dependabot:

- golang.org/x/crypto  v0.39.0 -> v0.54.0  (7 critical + 2 high: SSH agent
  constraint/key-constraint bypass, @revoked auth bypass, FIDO/U2F presence
  check bypass, VerifiedPublicKeyCallback permission skip, infinite loop on
  large channel writes, client-induced server deadlock, RSA/DSA DoS, byte
  arithmetic underflow panic)
- google.golang.org/grpc  v1.68.1 -> v1.83.0  (critical: authz bypass via
  missing leading slash in :path; high: xDS RBAC and HTTP/2 issues)
- github.com/containerd/containerd  v1.7.27 -> v1.7.34  (high: LABEL ->
  restart-monitor binary:// host-root RCE, runAsNonRoot evasion, local
  privesc via wide CRI directory permissions)
- oras.land/oras-go/v2  v2.6.0 -> v2.6.2  (high: CVE-2026-50163 hardlink
  extract-dir escape, credential forwarding via unvalidated Location header)
- github.com/moby/spdystream  v0.5.0 -> v0.5.1  (high: DoS on CRI)

Transitively pulls up x/net, x/sync, x/sys, x/term, x/text, x/time,
x/oauth2, protobuf, filepath-securejoin, selinux and go-logr via go mod tidy.

The go directive moves 1.24.0 -> 1.25.0 (required by the upgraded modules);
the explicit toolchain pin is dropped. CI resolves Go from go.mod, so no
workflow changes are needed.

go build ./... and go test ./... pass.

* ci: move golangci-lint to v2, fix resulting lint issues

golangci-lint-action@v3 pins `latest` to v1.64.8, which is built with
go1.24 and refuses to run now that go.mod targets 1.25.0:

  can't load config: the Go language version (go1.24) used to build
  golangci-lint is lower than the targeted Go version (1.25.0)

Move the job to golangci-lint-action@v7 + v2.8.0 and add a .golangci.yml
mirroring the hub repo's v2 config: govet, staticcheck, ineffassign and
unused, plus gofmt/goimports as formatters.

Fixes for the issues that surfaced:
- ST1005: lowercase error strings, drop trailing '!' in connect/hub.go
- SA4011: kubernetes/watch.go had a `break` inside a `select` default
  that broke the select rather than the loop, i.e. a no-op; removed
- QF1008: drop the embedded ChartPathOptions selector in helm.go
- QF1003: tagged switch on r.URL.Path in mcp_test.go
- QF1004: strings.Replace(..., -1) -> strings.ReplaceAll
- gofmt -s and goimports with a local prefix across the tree

errcheck is not in the enabled set, matching hub.

* cmd: clarify --time parse error in pcap dump

The error neither named the offending flag/value nor separated the
wrapped error from the message. Reported by Copilot on #1952.

---------

Co-authored-by: Alon Girmonsky <1990761+alongir@users.noreply.github.com>
2026-08-04 08:35:41 -07:00
3d5c999be1 Make the scritps command directly use the K8s API without requiring a connector to Hub (#1615)
* Make the `scritps` command directly use the K8s API without requiring a connector to Hub

* Fix linter

* Fix linter

---------

Co-authored-by: Alon Girmonsky <1990761+alongir@users.noreply.github.com>
2024-09-23 10:11:44 -07:00
M. Mert YildiranandGitHub ba126dff51 Add X-Kubeshark-Capture: ignore header to all of the HTTP requests (#1579)
* Add `X-Kubeshark-Capture: ignore` header to all of the HTTP requests

* Add `X-Kubeshark-Capture: ignore` header to WebSocket requests

* Reduce duplication
2024-08-10 15:35:54 -07:00
M. Mert Yildiran 7ce18ecaa9 🐛 Fix the POST script request 2023-11-03 01:09:22 +03:00
M. Mert YildiranandGitHub 41dacbff1a 🔨 Add tracer as a separate container to worker DaemonSet (#1428)
* 🔨 Add `tracer` as a separate container to worker `DaemonSet`

* 🔥 Delete some of the unused connector methods

* 🔨 Set `POD_NAME` and `POD_NAMESPACE` environment variables in worker `DeamonSet`

* 🔨 Set `POD_NAME` and `POD_NAMESPACE` environment variables in hub `Deployment`

* Fix the labels

* Fix the self config role

* Restrict it to specific resource names

* Run `make generate-manifests`
2023-09-24 04:23:32 +03:00
M. Mert Yildiran f59f84af02 Add export command to download PCAP export 2023-08-28 22:00:36 +03:00
M. Mert Yildiran 646da4810d Allow license key holders to bypass the auth 2023-06-19 01:44:01 +03:00
M. Mert Yildiran 8c7d9ea8fd Fix the updateLicense method 2023-05-04 21:33:38 +03:00
M. Mert Yildiran 657ea8570c Add PersistentVolumeClaim and mount it to worker DaemonSet 2023-04-20 00:09:22 +03:00
M. Mert Yildiran a4d35599df Change some logs 2023-03-13 22:45:57 +03:00
M. Mert Yildiran bcc1a36d71 👕 Fix the linter error 2023-03-13 22:42:56 +03:00
M. Mert Yildiran b4a3a0451e Increase DefaultSleep value 2023-03-13 22:42:17 +03:00
M. Mert Yildiran 1a2892d46e Increase DefaultSleep value 2023-03-13 22:35:03 +03:00
M. Mert Yildiran 606fddc776 🐛 Fix the log messages related to POST /scripts/env request 2023-03-04 14:12:03 +03:00
M. Mert Yildiran 9a95fa364c Change consts config field to env 2023-03-03 17:32:19 +03:00
M. Mert Yildiran 72a18871b1 Update Hub about the changes in the config in case of kubeshark tap re-run 2023-02-16 20:06:39 +03:00
M. Mert Yildiran b9a7cfb4fa Reduce DefaultSleep value 2023-02-16 00:49:45 +03:00
M. Mert Yildiran 384f62f94f Create Worker(s) before Hub and reduce the grace periods 2023-02-15 00:43:30 +03:00
M. Mert Yildiran 7312addb65 Change the key into index 2023-02-14 23:10:38 +03:00
M. Mert Yildiran 41ba509428 Add scripts command 2023-02-14 20:23:25 +03:00
M. Mert Yildiran ac9298d681 Log the POST to Hub calls even if debug is false 2023-02-07 12:43:31 +03:00
M. Mert Yildiran 2a20dc173c Call POST /scripts/done after the posting the scripts to mark the end 2023-02-07 12:25:41 +03:00
M. Mert Yildiran 5d15667a03 POST storage limit to Hub and better error handling 2023-02-06 07:58:43 +03:00
M. Mert Yildiran 776f9ce9af Change consts type to map[string]interface{} 2023-02-05 22:55:02 +03:00
M. Mert Yildiran eee641082e Add ScriptingConfig and read JavaScript files from the source directory using github.com/robertkrimen/otto 2023-02-05 22:00:01 +03:00
M. Mert Yildiran 17e038e703 Do POST /license after Hub is started 2023-01-31 22:31:44 +03:00
M. Mert Yildiran 4e3233ade8 Deploy workers DaemonSet without NodeSelector and call POST /pods/regex to set the pod regex in Hub 2023-01-22 04:14:44 +03:00
M. Mert Yildiran 846f253a03 Don't watch and POST Worker pods to Hub 2023-01-21 03:09:15 +03:00
M. Mert Yildiran eaa21f0789 🔨 Fix the targetted typo 2023-01-08 21:44:12 +03:00
M. Mert Yildiran 287e3ccf35 Log the proxy connection failures better 2022-12-29 08:01:12 +03:00
M. Mert Yildiran de38ef259e Post the storage limit to Hub after posting the worker 2022-12-29 03:25:22 +03:00
M. Mert Yildiran f6bde5fe76 🔥 Remove envConfig.go 2022-12-27 09:29:17 +03:00
M. Mert Yildiran 33f23ea849 🔨 Rename WaitForFinish method to WaitForTermination 2022-12-27 09:28:23 +03:00
M. Mert Yildiran 57257025d2 🐛 Fix PostWorkerPodToHub and PostTargettedPodsToHub failure 2022-12-26 07:23:00 +03:00
M. Mert Yildiran 442f638f2b 🔨 Fix the /pods/* HTTP endpoint paths of Hub 2022-12-14 00:39:54 +03:00
M. Mert Yildiran 8b9b3c2fc2 Send targetted pods to POST /pods/set-targetted HTTP endpoint of Hub 2022-12-11 17:03:57 +03:00
M. Mert Yildiran bbf6bbcc22 Send worker pod to POST /pods/set-worker HTTP endpoint of Hub 2022-12-11 16:08:07 +03:00
M. Mert Yildiran 168234598a ⬆️ github.com/kubeshark/base@v0.1.3 2022-12-01 02:31:05 +03:00
M. Mert Yildiran 5d4fab04c3 Replace kubeshark/worker with kubeshark/base 2022-11-30 03:58:23 +03:00
M. Mert Yildiran 6ca0fe137e 🎨 Replace the tap/tapper terminology with deploy, worker and targetted 2022-11-29 07:31:36 +03:00
M. Mert YildiranandGitHub 86fd616b84 Use github.com/rs/zerolog for logging (#1255)
* Use `github.com/rs/zerolog` for logging

* Use `github.com/rs/zerolog` for logging (continue)

* Add `debug` flag

* Remove `github.com/op/go-logging` dependency completely

* Fix linter
2022-11-29 03:48:20 +03:00
M. Mert Yildiran 671aa783c5 🔨 Replace ApiServer naming with Hub 2022-11-26 22:06:06 +03:00
M. Mert Yildiran 919fe81982 🔨 Move apiserver package into internal/connect 2022-11-26 21:44:30 +03:00