Skip to content

Commit

Permalink
fixing macos sequoia build (#288)
Browse files Browse the repository at this point in the history
* fixing macos sequoia build

* fix typo

* bumping version

* egress audit

* fix linter

* fix linter

* block mode
  • Loading branch information
jt-dd authored Nov 14, 2024
1 parent 027d7d4 commit 4e64984
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 24 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:
jobs:
linter:
runs-on: ubuntu-latest
steps:
steps:
- name: Harden Runner
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09
with:
Expand All @@ -28,17 +28,18 @@ jobs:
storage.googleapis.com:443
uploads.github.com:443
sum.golang.org:443
raw.githubusercontent.com:443
- name: Setup Golang
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe
with:
go-version: "1.22"
go-version: "1.23"

- name: Checkout Git Repo
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab

- name: golangci-lint
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc
with:
version: v1.56.2
args: ./...
version: v1.60
args: ./...
2 changes: 1 addition & 1 deletion .github/workflows/system-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
- name: Setup Golang
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe
with:
go-version: "1.22"
go-version: "1.23"

- name: Run integration Tests
run: make system-test
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ jobs:
go.dev:443
storage.googleapis.com:443
*.docker.io:443

- name: Setup Golang
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe
with:
go-version: "1.22"
go-version: "1.23"

- name: Checkout Git Repo
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab

- name: Run Unit Tests
run: make test
run: make test
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1

ARG GO_VERSION=1.22.0
ARG GO_VERSION=1.23.0
ARG XX_VERSION=1.2.1
ARG GOLANGCI_LINT_VERSION=v1.55.2

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ kubehound: | build ## Prepare kubehound (build go binary, deploy backend)
./bin/build/kubehound

.PHONY: test
test: ## Run the full suite of unit tests
test: ## Run the full suite of unit tests
cd pkg && go test -count=1 -race $(BUILD_FLAGS) ./...

.PHONY: system-test
Expand Down
2 changes: 1 addition & 1 deletion docs/dev-guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ make help

## Requirements build

- go (v1.22): https://go.dev/doc/install
- go (v1.23): https://go.dev/doc/install
- [Docker](https://docs.docker.com/engine/install/) >= 19.03 (`docker version`)
- [Docker Compose](https://docs.docker.com/compose/compose-file/compose-versioning/) >= v2.0 (`docker compose version`)

Expand Down
2 changes: 1 addition & 1 deletion docs/dev-guide/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ To ensure no regression in KubeHound, 2 kinds of tests are in place:

## Requirements test

- [Golang](https://go.dev/doc/install) `>= 1.22`
- [Golang](https://go.dev/doc/install) `>= 1.23`
- [Kind](https://kind.sigs.k8s.io/docs/user/quick-start/#installing-with-a-package-manager)
- [Kubectl](https://kubernetes.io/docs/tasks/tools/)

Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/DataDog/KubeHound

go 1.22.0
go 1.23.0

toolchain go1.22.1
toolchain go1.23

require (
github.com/DataDog/datadog-go/v5 v5.5.0
Expand Down Expand Up @@ -276,7 +276,7 @@ require (

require (
github.com/oklog/ulid/v2 v2.1.0
github.com/sirupsen/logrus v1.9.3
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/spf13/viper v1.19.0
golang.org/x/net v0.26.0 // indirect
golang.org/x/text v0.16.0 // indirect
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/run_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (r RunID) String() string {

// Timestamp returns the timestamp embedded within the run id.
func (r RunID) Timestamp() time.Time {
return time.UnixMilli(int64(r.val.Time()))
return time.UnixMilli(int64(r.val.Time())) //nolint:gosec
}

func LoadRunID(runid string) (*RunID, error) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/ingestor/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func (g *IngestorAPI) RehydrateLatest(ctx context.Context) ([]*grpc.IngestedClus
return res, errRet
}

func (g *IngestorAPI) Ingest(ctx context.Context, path string) error {
func (g *IngestorAPI) Ingest(ctx context.Context, path string) error { //nolint: contextcheck
l := log.Logger(ctx)

archivePath, err := g.puller.Pull(ctx, path)
Expand Down
2 changes: 1 addition & 1 deletion pkg/kubehound/storage/graphdb/janusgraph_edge_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (jgv *JanusGraphEdgeWriter) batchWrite(ctx context.Context, data []any) err
datalen := len(data)
_ = statsd.Count(ctx, metric.EdgeWrite, int64(datalen), jgv.tags, 1)
log.Trace(ctx).Debugf("Batch write JanusGraphEdgeWriter with %d elements", datalen)
atomic.AddInt32(&jgv.wcounter, int32(datalen))
atomic.AddInt32(&jgv.wcounter, int32(datalen)) //nolint:gosec // disable G115

op := jgv.gremlin(jgv.traversalSource, data)
promise := op.Iterate()
Expand Down
2 changes: 1 addition & 1 deletion pkg/kubehound/storage/graphdb/janusgraph_vertex_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func (jgv *JanusGraphVertexWriter) batchWrite(ctx context.Context, data []any) e
datalen := len(data)
_ = statsd.Count(ctx, metric.VertexWrite, int64(datalen), jgv.tags, 1)
log.Trace(ctx).Debugf("Batch write JanusGraphVertexWriter with %d elements", datalen)
atomic.AddInt32(&jgv.wcounter, int32(datalen))
atomic.AddInt32(&jgv.wcounter, int32(datalen)) //nolint:gosec // disable G115

op := jgv.gremlin(jgv.traversalSource, data)
raw, err := op.Project("id", "storeID").
Expand Down
4 changes: 2 additions & 2 deletions pkg/telemetry/log/kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ func (enc *kvEncoder) AppendDuration(value time.Duration) {

func (enc *kvEncoder) AppendComplex128(value complex128) {
enc.addElementSeparator()
r, i := float64(real(value)), float64(imag(value)) //nolint: unconvert
enc.buf.AppendFloat(r, 64) //nolint: gomnd
r, i := float64(real(value)), float64(imag(value))
enc.buf.AppendFloat(r, 64) //nolint: gomnd
enc.buf.AppendByte('+')
enc.buf.AppendFloat(i, 64) //nolint: gomnd
enc.buf.AppendByte('i')
Expand Down

0 comments on commit 4e64984

Please sign in to comment.