diff --git a/Dockerfile b/Dockerfile index bad9d0a..24028e0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2023 OWASP ModSecurity Core Rule Set Project +# Copyright 2024 OWASP CRS Project # SPDX-License-Identifier: Apache-2.0 FROM alpine:3@sha256:beefdbd8a1da6d2915566fde36db9db0b524eb737fc57cd1367effd16dc0d06d diff --git a/check/base.go b/check/base.go index e66213f..e49d0a6 100644 --- a/check/base.go +++ b/check/base.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package check diff --git a/check/base_test.go b/check/base_test.go index 14ce975..1def3ec 100644 --- a/check/base_test.go +++ b/check/base_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package check diff --git a/check/error.go b/check/error.go index 57e042b..a0e08e0 100644 --- a/check/error.go +++ b/check/error.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package check diff --git a/check/error_test.go b/check/error_test.go index 256c9ca..83a1311 100644 --- a/check/error_test.go +++ b/check/error_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package check diff --git a/check/logs.go b/check/logs.go index 5a3602c..4c968b1 100644 --- a/check/logs.go +++ b/check/logs.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package check diff --git a/check/logs_test.go b/check/logs_test.go index c69b617..6b11ab3 100644 --- a/check/logs_test.go +++ b/check/logs_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package check diff --git a/check/response.go b/check/response.go index ce06457..2ad3d6c 100644 --- a/check/response.go +++ b/check/response.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package check diff --git a/check/response_test.go b/check/response_test.go index 99365bc..8e37129 100644 --- a/check/response_test.go +++ b/check/response_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package check diff --git a/check/status.go b/check/status.go index 8682a3e..39fcad0 100644 --- a/check/status.go +++ b/check/status.go @@ -1,12 +1,11 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package check import ( - "slices" - "github.com/rs/zerolog/log" + "slices" ) var negativeExpectedStatuses = []int{200, 404, 405} diff --git a/check/status_test.go b/check/status_test.go index c4846fb..f4e2e7e 100644 --- a/check/status_test.go +++ b/check/status_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package check @@ -6,9 +6,8 @@ package check import ( "testing" - "slices" - "github.com/stretchr/testify/suite" + "slices" "github.com/coreruleset/go-ftw/config" "github.com/coreruleset/go-ftw/utils" diff --git a/cmd/check.go b/cmd/check.go index 05ce680..b4ed2fc 100644 --- a/cmd/check.go +++ b/cmd/check.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package cmd diff --git a/cmd/check_test.go b/cmd/check_test.go index 05011c9..2389c25 100644 --- a/cmd/check_test.go +++ b/cmd/check_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package cmd diff --git a/cmd/root.go b/cmd/root.go index 6ad5d11..6836be1 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package cmd diff --git a/cmd/root_test.go b/cmd/root_test.go index b696c1b..48a55b8 100644 --- a/cmd/root_test.go +++ b/cmd/root_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package cmd diff --git a/cmd/run.go b/cmd/run.go index 6fe86a4..4ec1402 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package cmd diff --git a/cmd/run_test.go b/cmd/run_test.go index a53d391..b5a3915 100644 --- a/cmd/run_test.go +++ b/cmd/run_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package cmd diff --git a/config/config.go b/config/config.go index f6d02a0..c17f2e7 100644 --- a/config/config.go +++ b/config/config.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package config diff --git a/config/config_test.go b/config/config_test.go index 8fb4226..1eb2dcd 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package config diff --git a/config/types.go b/config/types.go index 9480921..bbcb907 100644 --- a/config/types.go +++ b/config/types.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package config diff --git a/ftwhttp/client.go b/ftwhttp/client.go index b0a36be..2a13555 100644 --- a/ftwhttp/client.go +++ b/ftwhttp/client.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package ftwhttp diff --git a/ftwhttp/client_test.go b/ftwhttp/client_test.go index 412f7c2..dc338ff 100644 --- a/ftwhttp/client_test.go +++ b/ftwhttp/client_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package ftwhttp diff --git a/ftwhttp/connection.go b/ftwhttp/connection.go index 557cbe8..bb0811f 100644 --- a/ftwhttp/connection.go +++ b/ftwhttp/connection.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 // Package ftwhttp provides low level abstractions for sending/receiving raw http messages diff --git a/ftwhttp/connection_test.go b/ftwhttp/connection_test.go index 20b66e2..5db6152 100644 --- a/ftwhttp/connection_test.go +++ b/ftwhttp/connection_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package ftwhttp diff --git a/ftwhttp/header.go b/ftwhttp/header.go index abe80cb..daa3d59 100644 --- a/ftwhttp/header.go +++ b/ftwhttp/header.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package ftwhttp diff --git a/ftwhttp/request.go b/ftwhttp/request.go index 4ba1dde..338c184 100644 --- a/ftwhttp/request.go +++ b/ftwhttp/request.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package ftwhttp diff --git a/ftwhttp/request_test.go b/ftwhttp/request_test.go index 33565d8..cbf1713 100644 --- a/ftwhttp/request_test.go +++ b/ftwhttp/request_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package ftwhttp diff --git a/ftwhttp/response.go b/ftwhttp/response.go index c39fec1..890a3da 100644 --- a/ftwhttp/response.go +++ b/ftwhttp/response.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package ftwhttp diff --git a/ftwhttp/response_test.go b/ftwhttp/response_test.go index e131add..b7fd006 100644 --- a/ftwhttp/response_test.go +++ b/ftwhttp/response_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package ftwhttp diff --git a/ftwhttp/rtt.go b/ftwhttp/rtt.go index 2fd5091..28b70b1 100644 --- a/ftwhttp/rtt.go +++ b/ftwhttp/rtt.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package ftwhttp diff --git a/ftwhttp/types.go b/ftwhttp/types.go index 35b30fc..1f06207 100644 --- a/ftwhttp/types.go +++ b/ftwhttp/types.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package ftwhttp diff --git a/go.sum b/go.sum index b9cb282..209f359 100644 --- a/go.sum +++ b/go.sum @@ -13,8 +13,6 @@ github.com/antchfx/xpath v1.3.0/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwq github.com/antchfx/xpath v1.3.1 h1:PNbFuUqHwWl0xRjvUPjJ95Agbmdj2uzzIwmQKgu4oCk= github.com/antchfx/xpath v1.3.1/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreruleset/ftw-tests-schema/v2 v2.0.0 h1:o2h/KYp2msZoxQ/lsPAQVv8pAVdk8dfwJq9k0jxf+Es= -github.com/coreruleset/ftw-tests-schema/v2 v2.0.0/go.mod h1:YZT8V+ROY7cC3BCc17IT1VxI+tvvlUSVshq3LDZxpMU= github.com/coreruleset/ftw-tests-schema/v2 v2.1.0 h1:2ilKzKRG5UzzxBcrJLXFtPalStdQ9jzzaYFuFk0OEk0= github.com/coreruleset/ftw-tests-schema/v2 v2.1.0/go.mod h1:ZHVFX5ses4+5IxUP0ufCNg/VqRWxziH6ZuUca092Hxo= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -24,8 +22,6 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= @@ -64,10 +60,6 @@ github.com/knadh/koanf/parsers/yaml v0.1.0 h1:ZZ8/iGfRLvKSaMEECEBPM1HQslrZADk8fP github.com/knadh/koanf/parsers/yaml v0.1.0/go.mod h1:cvbUDC7AL23pImuQP0oRw/hPuccrNBS2bps8asS0CwY= github.com/knadh/koanf/providers/env v0.1.0 h1:LqKteXqfOWyx5Ab9VfGHmjY9BvRXi+clwyZozgVRiKg= github.com/knadh/koanf/providers/env v0.1.0/go.mod h1:RE8K9GbACJkeEnkl8L/Qcj8p4ZyPXZIQ191HJi44ZaQ= -github.com/knadh/koanf/providers/file v0.1.0 h1:fs6U7nrV58d3CFAFh8VTde8TM262ObYf3ODrc//Lp+c= -github.com/knadh/koanf/providers/file v0.1.0/go.mod h1:rjJ/nHQl64iYCtAW2QQnF0eSmDEX/YZ/eNFj5yR6BvA= -github.com/knadh/koanf/providers/file v1.0.0 h1:DtPvSQBeF+N0QLPMz0yf2bx0nFSxUcncpqQvzCxfCyk= -github.com/knadh/koanf/providers/file v1.0.0/go.mod h1:/faSBcv2mxPVjFrXck95qeoyoZ5myJ6uxN8OOVNJJCI= github.com/knadh/koanf/providers/file v1.1.0 h1:MTjA+gRrVl1zqgetEAIaXHqYje0XSosxSiMD4/7kz0o= github.com/knadh/koanf/providers/file v1.1.0/go.mod h1:/faSBcv2mxPVjFrXck95qeoyoZ5myJ6uxN8OOVNJJCI= github.com/knadh/koanf/providers/rawbytes v0.1.0 h1:dpzgu2KO6uf6oCb4aP05KDmKmAmI51k5pe8RYKQ0qME= @@ -125,12 +117,6 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= -golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= -golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= -golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= -golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= @@ -139,12 +125,6 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= -golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= -golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= -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= @@ -158,16 +138,9 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= -golang.org/x/sys v0.22.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= @@ -178,14 +151,8 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= -golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= diff --git a/magefile.go b/magefile.go index 298a8ca..ffd9ff5 100644 --- a/magefile.go +++ b/magefile.go @@ -34,7 +34,7 @@ func Format() error { // addlicense strangely logs skipped files to stderr despite not being erroneous, so use the long sh.Exec form to // discard stderr too. if _, err := sh.Exec(map[string]string{}, io.Discard, io.Discard, "go", "run", fmt.Sprintf("github.com/google/addlicense@%s", addLicenseVersion), - "-c", "OWASP ModSecurity Core Rule Set Project", + "-c", "OWASP CRS Project", "-s=only", "-ignore", "**/*.yml", "-ignore", "**/*.yaml", diff --git a/main.go b/main.go index c004a60..c7c486f 100644 --- a/main.go +++ b/main.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 // Package go-ftw is a Framework for Testing Web Application Firewalls diff --git a/output/output.go b/output/output.go index bbfc0b7..07b6ebe 100644 --- a/output/output.go +++ b/output/output.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 // Package output provides an interface for showing test results in different formats. diff --git a/output/output_test.go b/output/output_test.go index bac3928..541e2aa 100644 --- a/output/output_test.go +++ b/output/output_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package output diff --git a/runner/run.go b/runner/run.go index 30495ed..8a46b41 100644 --- a/runner/run.go +++ b/runner/run.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package runner diff --git a/runner/run_cloud_test.go b/runner/run_cloud_test.go index cea5a46..0beec8d 100644 --- a/runner/run_cloud_test.go +++ b/runner/run_cloud_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package runner diff --git a/runner/run_input_override_test.go b/runner/run_input_override_test.go index 1710b2f..8b0141c 100644 --- a/runner/run_input_override_test.go +++ b/runner/run_input_override_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package runner diff --git a/runner/run_test.go b/runner/run_test.go index b0b3879..8a7bb0c 100644 --- a/runner/run_test.go +++ b/runner/run_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package runner diff --git a/runner/stats.go b/runner/stats.go index 78bbd1c..7436f09 100644 --- a/runner/stats.go +++ b/runner/stats.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package runner diff --git a/runner/types.go b/runner/types.go index d7ebae0..2a41c59 100644 --- a/runner/types.go +++ b/runner/types.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package runner diff --git a/test/data.go b/test/data.go index 10291dd..bf78b06 100644 --- a/test/data.go +++ b/test/data.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package test diff --git a/test/data_test.go b/test/data_test.go index 5849ce4..7352633 100644 --- a/test/data_test.go +++ b/test/data_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package test diff --git a/test/defaults.go b/test/defaults.go index fdf43a8..222c88f 100644 --- a/test/defaults.go +++ b/test/defaults.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package test diff --git a/test/defaults_test.go b/test/defaults_test.go index 578667f..8d3ba98 100644 --- a/test/defaults_test.go +++ b/test/defaults_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package test diff --git a/test/files.go b/test/files.go index 57cf3fd..6139a77 100644 --- a/test/files.go +++ b/test/files.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package test diff --git a/test/files_test.go b/test/files_test.go index e414da7..d169ac6 100644 --- a/test/files_test.go +++ b/test/files_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package test diff --git a/test/types.go b/test/types.go index 59ddd5d..e0b042a 100644 --- a/test/types.go +++ b/test/types.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package test @@ -8,11 +8,10 @@ import ( "regexp" "strconv" - "slices" - schema "github.com/coreruleset/ftw-tests-schema/v2/types" overridesSchema "github.com/coreruleset/ftw-tests-schema/v2/types/overrides" "github.com/rs/zerolog/log" + "slices" "github.com/coreruleset/go-ftw/config" "github.com/coreruleset/go-ftw/ftwhttp" diff --git a/test/types_test.go b/test/types_test.go index 82fbdda..91917d0 100644 --- a/test/types_test.go +++ b/test/types_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package test diff --git a/test/yaml.go b/test/yaml.go index 65c5393..4929f05 100644 --- a/test/yaml.go +++ b/test/yaml.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package test diff --git a/utils/empty.go b/utils/empty.go index c864bc5..fc0553c 100644 --- a/utils/empty.go +++ b/utils/empty.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package utils diff --git a/utils/empty_test.go b/utils/empty_test.go index df44234..7594f24 100644 --- a/utils/empty_test.go +++ b/utils/empty_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package utils diff --git a/utils/slice.go b/utils/slice.go index 4b833c8..506ff8b 100644 --- a/utils/slice.go +++ b/utils/slice.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package utils diff --git a/utils/slice_test.go b/utils/slice_test.go index 041d172..932241a 100644 --- a/utils/slice_test.go +++ b/utils/slice_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package utils diff --git a/utils/tests.go b/utils/tests.go index e2970d5..d0e9568 100644 --- a/utils/tests.go +++ b/utils/tests.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package utils diff --git a/utils/tests_test.go b/utils/tests_test.go index f7eeaa1..75575ba 100644 --- a/utils/tests_test.go +++ b/utils/tests_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package utils diff --git a/utils/time.go b/utils/time.go index d2668a0..ccf23ed 100644 --- a/utils/time.go +++ b/utils/time.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package utils diff --git a/utils/time_test.go b/utils/time_test.go index b08a196..536058b 100644 --- a/utils/time_test.go +++ b/utils/time_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package utils diff --git a/waflog/read.go b/waflog/read.go index f752bfe..dea1f9a 100644 --- a/waflog/read.go +++ b/waflog/read.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package waflog @@ -8,11 +8,11 @@ import ( "errors" "io" "regexp" - "slices" "strconv" "github.com/icza/backscanner" "github.com/rs/zerolog/log" + "slices" ) const maxRuleIdsEstimate = 15 diff --git a/waflog/read_test.go b/waflog/read_test.go index b101a91..4da767c 100644 --- a/waflog/read_test.go +++ b/waflog/read_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package waflog diff --git a/waflog/types.go b/waflog/types.go index 6d4f5aa..4423adf 100644 --- a/waflog/types.go +++ b/waflog/types.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 // Package waflog encapsulates getting logs from a WAF to compare with expected results diff --git a/waflog/waflog.go b/waflog/waflog.go index d21a846..0dfcf12 100644 --- a/waflog/waflog.go +++ b/waflog/waflog.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package waflog diff --git a/waflog/waflog_test.go b/waflog/waflog_test.go index 18e3326..bd8f4d4 100644 --- a/waflog/waflog_test.go +++ b/waflog/waflog_test.go @@ -1,4 +1,4 @@ -// Copyright 2023 OWASP ModSecurity Core Rule Set Project +// Copyright 2024 OWASP CRS Project // SPDX-License-Identifier: Apache-2.0 package waflog