diff --git a/Dockerfile b/Dockerfile index bad9d0a5..24028e06 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 e66213fd..e49d0a6f 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 14ce9752..1def3ec2 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 57e042b3..a0e08e0b 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 256c9caf..83a1311c 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 5a3602cb..4c968b14 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 c69b6174..6b11ab34 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 ce06457c..2ad3d6c8 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 99365bc5..8e371291 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 8682a3e6..39fcad09 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 c4846fbe..f4e2e7e1 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 05ce6806..b4ed2fc9 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 05011c9e..2389c25c 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 6ad5d11c..6836be1a 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 b696c1be..48a55b8b 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 6fe86a4e..4ec1402a 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 a53d3918..b5a39159 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 f6d02a00..c17f2e70 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 8fb4226c..1eb2dcd4 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 94809215..bbcb9072 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 b0a36be6..2a135551 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 412f7c29..dc338fff 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 557cbe81..bb0811f2 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 20b66e28..5db61523 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 abe80cb4..daa3d59a 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 4ba1dde5..338c1846 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 33565d86..cbf17130 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 c39fec15..890a3da2 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 e131addb..b7fd0067 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 2fd50914..28b70b19 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 35b30fc8..1f062075 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 8cbfb44d..5929e758 100644 --- a/go.sum +++ b/go.sum @@ -9,8 +9,6 @@ github.com/antchfx/htmlquery v1.3.1/go.mod h1:PTj+f1V2zksPlwNt7uVvZPsxpKNa7mlVli github.com/antchfx/xpath v1.3.0 h1:nTMlzGAK3IJ0bPpME2urTuFL76o4A96iYvoKFHRXJgc= github.com/antchfx/xpath v1.3.0/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= @@ -20,8 +18,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= @@ -60,10 +56,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= @@ -119,12 +111,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= @@ -133,12 +119,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= @@ -152,16 +132,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= @@ -172,14 +145,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 298a8ca5..ffd9ff58 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 c004a600..c7c486f4 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 bbfc0b78..07b6ebe0 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 bac39286..541e2aab 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 30495edf..8a46b417 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 cea5a46c..0beec8d0 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 1710b2f7..8b0141c4 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 b0b3879e..8a7bb0ce 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 78bbd1c3..7436f09e 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 d7ebae06..2a41c591 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 10291dd2..bf78b065 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 5849ce46..73526331 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 fdf43a8e..222c88fd 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 578667fb..8d3ba98d 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 57cf3fd5..6139a77f 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 e414da70..d169ac67 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 59ddd5d2..e0b042a3 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 82fbdda6..91917d0e 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 65c53939..4929f052 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 c864bc55..fc0553c9 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 df44234f..7594f247 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 4b833c8b..506ff8bd 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 041d1723..932241a9 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 e2970d50..d0e95680 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 f7eeaa17..75575ba6 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 d2668a0b..ccf23edc 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 b08a1963..536058bd 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 f752bfed..dea1f9a2 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 b101a91a..4da767cb 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 6d4f5aaa..4423adf8 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 d21a846c..0dfcf124 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 18e3326b..bd8f4d4f 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