Skip to content

Commit be9ef1a

Browse files
committed
update threatwinds dependencies
1 parent b084660 commit be9ef1a

File tree

23 files changed

+50
-49
lines changed

23 files changed

+50
-49
lines changed

agent-manager/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ require (
99
github.com/gin-contrib/gzip v1.2.3
1010
github.com/gin-gonic/gin v1.10.1
1111
github.com/google/uuid v1.6.0
12-
github.com/threatwinds/logger v1.2.1
12+
github.com/threatwinds/logger v1.2.2
1313
google.golang.org/grpc v1.73.0
1414
google.golang.org/protobuf v1.36.6
1515
gorm.io/driver/postgres v1.6.0

agent-manager/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
8888
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
8989
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
9090
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
91-
github.com/threatwinds/logger v1.2.1 h1:uN7efZaHobMX3DRi6GOPtxESPxt5xj0bNflnmgklwII=
92-
github.com/threatwinds/logger v1.2.1/go.mod h1:eevkhjP9wSpRekRIgi4ZAq7DMdlUMy+Shwx/QNDvOHg=
91+
github.com/threatwinds/logger v1.2.2 h1:sVuT8yhbecPqP4tT8EwHfp1czNC6e1wdkE1ihNnuBdA=
92+
github.com/threatwinds/logger v1.2.2/go.mod h1:Amq0QI1y7fkTpnBUgeGVu2Z/C4u4ys2pNLUOuj3UAAU=
9393
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
9494
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
9595
github.com/ugorji/go/codec v1.2.14 h1:yOQvXCBc3Ij46LRkRoh4Yd5qK6LVOgi0bYOXfb7ifjw=

agent/collectors/macos.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import (
99
"os/exec"
1010
"path/filepath"
1111

12-
"github.com/threatwinds/validations"
12+
twsdk "github.com/threatwinds/go-sdk/entities"
13+
1314
"github.com/utmstack/UTMStack/agent/config"
1415
"github.com/utmstack/UTMStack/agent/logservice"
1516
"github.com/utmstack/UTMStack/agent/utils"
@@ -62,7 +63,7 @@ func (d Darwin) SendLogs() {
6263

6364
utils.Logger.LogF(100, "output: %s", logLine)
6465

65-
validatedLog, _, err := validations.ValidateString(logLine, false)
66+
validatedLog, _, err := twsdk.ValidateString(logLine, false)
6667
if err != nil {
6768
utils.Logger.ErrorF("error validating log: %s: %v", logLine, err)
6869
continue

agent/collectors/windows_amd64.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"fmt"
88
"path/filepath"
99

10-
"github.com/threatwinds/validations"
10+
twsdk "github.com/threatwinds/go-sdk/entities"
1111
"github.com/utmstack/UTMStack/agent/config"
1212
"github.com/utmstack/UTMStack/agent/logservice"
1313
"github.com/utmstack/UTMStack/agent/utils"
@@ -80,7 +80,7 @@ func (w Windows) SendLogs() {
8080
logLine := <-logLinesChan
8181
validatedLogs := []string{}
8282
for _, log := range logLine {
83-
validatedLog, _, err := validations.ValidateString(log, false)
83+
validatedLog, _, err := twsdk.ValidateString(log, false)
8484
if err != nil {
8585
utils.Logger.ErrorF("error validating log: %s: %v", log, err)
8686
continue

agent/collectors/windows_arm64.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"time"
1717
"unsafe"
1818

19-
"github.com/threatwinds/validations"
19+
twsdk "github.com/threatwinds/go-sdk/entities"
2020
"github.com/utmstack/UTMStack/agent/config"
2121
"github.com/utmstack/UTMStack/agent/logservice"
2222
"github.com/utmstack/UTMStack/agent/utils"
@@ -206,7 +206,7 @@ func eventWorker() {
206206
continue
207207
}
208208

209-
validatedLog, _, err := validations.ValidateString(eventJSON, false)
209+
validatedLog, _, err := twsdk.ValidateString(eventJSON, false)
210210
if err != nil {
211211
utils.Logger.LogF(100, "validation error: %s: %v", eventJSON, err)
212212
continue

agent/go.mod

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ require (
88
github.com/google/uuid v1.6.0
99
github.com/kardianos/service v1.2.2
1010
github.com/tehmaze/netflow v0.0.0-20240303214733-8c13bb004068
11-
github.com/threatwinds/logger v1.2.1
12-
github.com/threatwinds/validations v1.0.14
11+
github.com/threatwinds/go-sdk v1.0.40
12+
github.com/threatwinds/logger v1.2.2
1313
golang.org/x/sys v0.33.0
1414
google.golang.org/grpc v1.73.0
1515
google.golang.org/protobuf v1.36.6
@@ -37,12 +37,14 @@ require (
3737
github.com/modern-go/reflect2 v1.0.2 // indirect
3838
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
3939
github.com/prometheus/procfs v0.16.1 // indirect
40-
github.com/threatwinds/go-sdk v1.0.40 // indirect
4140
github.com/tidwall/gjson v1.18.0 // indirect
4241
github.com/tidwall/match v1.1.1 // indirect
4342
github.com/tidwall/pretty v1.2.1 // indirect
4443
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
4544
github.com/ugorji/go/codec v1.2.14 // indirect
45+
go.opentelemetry.io/otel/metric v1.36.0 // indirect
46+
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
47+
go.opentelemetry.io/otel/trace v1.36.0 // indirect
4648
golang.org/x/arch v0.18.0 // indirect
4749
golang.org/x/crypto v0.39.0 // indirect
4850
golang.org/x/net v0.41.0 // indirect

agent/go.sum

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,8 @@ github.com/tehmaze/netflow v0.0.0-20240303214733-8c13bb004068 h1:1B+EAUqxEyPByCf
8888
github.com/tehmaze/netflow v0.0.0-20240303214733-8c13bb004068/go.mod h1:QRP5wJOf7gGMGL2fCAfmh/5CMZQspRxT5DqghaPRrjM=
8989
github.com/threatwinds/go-sdk v1.0.40 h1:g0XS8WiGVGD6djucY0ZuckpZljBbXDuqGJ1dKOjce3I=
9090
github.com/threatwinds/go-sdk v1.0.40/go.mod h1:ZLcT5kB0s2xFEUVJoFpwlLucnbQ8VBNU44aoKKC/j/g=
91-
github.com/threatwinds/logger v1.2.1 h1:uN7efZaHobMX3DRi6GOPtxESPxt5xj0bNflnmgklwII=
92-
github.com/threatwinds/logger v1.2.1/go.mod h1:eevkhjP9wSpRekRIgi4ZAq7DMdlUMy+Shwx/QNDvOHg=
93-
github.com/threatwinds/validations v1.0.14 h1:mgSEaD+61sAVRcQn5+9Vn0AAQrptSprwpxCTKJgBBNg=
94-
github.com/threatwinds/validations v1.0.14/go.mod h1:68bixaVUcfX3u5zH6hVSygdLcx8/Iy3/qvtdELtKqog=
91+
github.com/threatwinds/logger v1.2.2 h1:sVuT8yhbecPqP4tT8EwHfp1czNC6e1wdkE1ihNnuBdA=
92+
github.com/threatwinds/logger v1.2.2/go.mod h1:Amq0QI1y7fkTpnBUgeGVu2Z/C4u4ys2pNLUOuj3UAAU=
9593
github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY=
9694
github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
9795
github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=
@@ -107,14 +105,14 @@ go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJyS
107105
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
108106
go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg=
109107
go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E=
110-
go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M=
111-
go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE=
112-
go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY=
113-
go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg=
108+
go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE=
109+
go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs=
110+
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
111+
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
114112
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
115113
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
116-
go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs=
117-
go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc=
114+
go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w=
115+
go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA=
118116
golang.org/x/arch v0.18.0 h1:WN9poc33zL4AzGxqf8VtpKUnGvMi8O9lhNyBMF/85qc=
119117
golang.org/x/arch v0.18.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk=
120118
golang.org/x/crypto v0.39.0 h1:SHs+kF4LP+f+p14esP5jAoDpHU8Gu/v9lFRK6IT5imM=

agent/modules/netflow.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111

1212
"github.com/tehmaze/netflow"
1313
"github.com/tehmaze/netflow/session"
14-
"github.com/threatwinds/validations"
14+
twsdk "github.com/threatwinds/go-sdk/entities"
1515
"github.com/utmstack/UTMStack/agent/config"
1616
"github.com/utmstack/UTMStack/agent/logservice"
1717
"github.com/utmstack/UTMStack/agent/parser"
@@ -176,7 +176,7 @@ func (m *NetflowModule) handleConnection(logsChannel chan []string) {
176176
return
177177
case messages := <-logsChannel:
178178
for _, message := range messages {
179-
msg, _, err := validations.ValidateString(message, false)
179+
msg, _, err := twsdk.ValidateString(message, false)
180180
if err != nil {
181181
utils.Logger.ErrorF("error validating string: %v: message: %s", err, message)
182182
}

agent/modules/syslog.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"strings"
1111
"time"
1212

13-
"github.com/threatwinds/validations"
13+
twsdk "github.com/threatwinds/go-sdk/entities"
1414
"github.com/utmstack/UTMStack/agent/config"
1515
"github.com/utmstack/UTMStack/agent/logservice"
1616
"github.com/utmstack/UTMStack/agent/parser"
@@ -328,7 +328,7 @@ func (m *SyslogModule) handleMessageTCP(logsChannel chan string) {
328328

329329
case message := <-logsChannel:
330330
message = strings.TrimSuffix(message, "\n")
331-
message, _, err := validations.ValidateString(message, false)
331+
message, _, err := twsdk.ValidateString(message, false)
332332
if err != nil {
333333
utils.Logger.ErrorF("error validating string: %v: message: %s", err, message)
334334
}
@@ -393,7 +393,7 @@ func (m *SyslogModule) handleConnectionUDP(logsChannel chan string) {
393393

394394
case message := <-logsChannel:
395395
message = strings.TrimSuffix(message, "\n")
396-
message, _, err := validations.ValidateString(message, false)
396+
message, _, err := twsdk.ValidateString(message, false)
397397
if err != nil {
398398
utils.Logger.ErrorF("error validating string: %v: message: %s", err, message)
399399
}

agent/parser/beats.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"regexp"
66
"sync"
77

8-
"github.com/threatwinds/validations"
8+
twsdk "github.com/threatwinds/go-sdk/entities"
99
"github.com/utmstack/UTMStack/agent/config"
1010
"github.com/utmstack/UTMStack/agent/utils"
1111
)
@@ -67,7 +67,7 @@ func (p *BeatsParser) ProcessData(logBatch interface{}) (map[string][]string, er
6767
return nil, err
6868
} else {
6969
if logType != "" {
70-
validatedLog, _, err := validations.ValidateString(log, false)
70+
validatedLog, _, err := twsdk.ValidateString(log, false)
7171
if err != nil {
7272
utils.Logger.ErrorF("error validating log: %s: %v", log, err)
7373
continue

0 commit comments

Comments
 (0)