diff --git a/experimental/plugins/plugintypes/auditlog.go b/experimental/plugins/plugintypes/auditlog.go index 268ec893b..4742953fb 100644 --- a/experimental/plugins/plugintypes/auditlog.go +++ b/experimental/plugins/plugintypes/auditlog.go @@ -1,4 +1,4 @@ -// Copyright 2023 Juan Pablo Tosso and the OWASP Coraza contributors +// Copyright 2024 Juan Pablo Tosso and the OWASP Coraza contributors // SPDX-License-Identifier: Apache-2.0 package plugintypes diff --git a/go.mod b/go.mod index 8f0a8e297..01abf16a8 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,7 @@ require ( github.com/petar-dambovaliev/aho-corasick v0.0.0-20240411101913-e07a1f0e8eb4 github.com/tidwall/gjson v1.17.3 github.com/valllabh/ocsf-schema-golang v1.0.3 - golang.org/x/net v0.28.0 + golang.org/x/net v0.29.0 golang.org/x/sync v0.8.0 rsc.io/binaryregexp v0.2.0 ) @@ -35,7 +35,7 @@ require ( github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.1 // indirect golang.org/x/mod v0.18.0 // indirect - golang.org/x/sys v0.23.0 // indirect + golang.org/x/sys v0.25.0 // indirect golang.org/x/tools v0.22.0 // indirect google.golang.org/protobuf v1.34.1 // indirect ) diff --git a/go.sum b/go.sum index 80b0a15c7..57eae8613 100644 --- a/go.sum +++ b/go.sum @@ -43,8 +43,8 @@ golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= -golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -63,8 +63,8 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= -golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= diff --git a/internal/auditlog/auditlog.go b/internal/auditlog/auditlog.go index 0cf84ece9..7a0383b7d 100644 --- a/internal/auditlog/auditlog.go +++ b/internal/auditlog/auditlog.go @@ -1,4 +1,4 @@ -// Copyright 2022 Juan Pablo Tosso and the OWASP Coraza contributors +// Copyright 2024 Juan Pablo Tosso and the OWASP Coraza contributors // SPDX-License-Identifier: Apache-2.0 package auditlog diff --git a/internal/auditlog/auditlog_test.go b/internal/auditlog/auditlog_test.go index 462ae5718..089640c22 100644 --- a/internal/auditlog/auditlog_test.go +++ b/internal/auditlog/auditlog_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 Juan Pablo Tosso and the OWASP Coraza contributors +// Copyright 2024 Juan Pablo Tosso and the OWASP Coraza contributors // SPDX-License-Identifier: Apache-2.0 //go:build !tinygo diff --git a/internal/auditlog/formats_ocsf.go b/internal/auditlog/formats_ocsf.go index 2379a3c26..ca3c69595 100644 --- a/internal/auditlog/formats_ocsf.go +++ b/internal/auditlog/formats_ocsf.go @@ -1,4 +1,4 @@ -// Copyright 2022 Juan Pablo Tosso and the OWASP Coraza contributors +// Copyright 2024 Juan Pablo Tosso and the OWASP Coraza contributors // SPDX-License-Identifier: Apache-2.0 // OCSF log format diff --git a/internal/auditlog/formats_ocsf_test.go b/internal/auditlog/formats_ocsf_test.go index 5424ae36c..2f0409918 100644 --- a/internal/auditlog/formats_ocsf_test.go +++ b/internal/auditlog/formats_ocsf_test.go @@ -1,4 +1,4 @@ -// Copyright 2022 Juan Pablo Tosso and the OWASP Coraza contributors +// Copyright 2024 Juan Pablo Tosso and the OWASP Coraza contributors // SPDX-License-Identifier: Apache-2.0 package auditlog diff --git a/internal/auditlog/https_writer_test.go b/internal/auditlog/https_writer_test.go index ca61946ea..f0713e011 100644 --- a/internal/auditlog/https_writer_test.go +++ b/internal/auditlog/https_writer_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 Juan Pablo Tosso and the OWASP Coraza contributors +// Copyright 2024 Juan Pablo Tosso and the OWASP Coraza contributors // SPDX-License-Identifier: Apache-2.0 //go:build !tinygo @@ -19,7 +19,6 @@ import ( ) var sampleHttpsAuditLog = &Log{ - Transaction_: Transaction{ ID_: "test123", }, @@ -33,7 +32,7 @@ var sampleHttpsAuditLog = &Log{ }, } -func TestHTTPSAuditLog(t *testing.T) { +func TestHTTPAuditLog(t *testing.T) { writer := &httpsWriter{} formatter := &nativeFormatter{} pts, err := types.ParseAuditLogParts("ABCDEZ") @@ -74,7 +73,7 @@ func TestHTTPSAuditLog(t *testing.T) { } } -func TestJSONAuditHTTPS(t *testing.T) { +func TestJSONAuditHTTP(t *testing.T) { writer := &httpsWriter{} formatter := &jsonFormatter{} // we create a test http server @@ -99,7 +98,7 @@ func TestJSONAuditHTTPS(t *testing.T) { } } -func TestOCSFAuditHTTPS(t *testing.T) { +func TestOCSFAuditHTTP(t *testing.T) { writer := &httpsWriter{} formatter := &ocsfFormatter{} // we create a test http server diff --git a/internal/seclang/parser_test.go b/internal/seclang/parser_test.go index c5000ccd1..b03ce1fc8 100644 --- a/internal/seclang/parser_test.go +++ b/internal/seclang/parser_test.go @@ -169,6 +169,10 @@ func TestHardcodedIncludeDirectiveDDOS2(t *testing.T) { if err != nil { t.Fatal(err) } + err = tmpFile2.Close() + if err != nil { + t.Fatal(err) + } w := bufio.NewWriter(tmpFile) for i := 0; i < maxIncludeRecursion+1; i++ {