Skip to content

Commit 0e8dc0b

Browse files
committed
chore(coraza): bump coraza to v3.7.0, go 1.25, CRS v4.25.0
1 parent 34cba8f commit 0e8dc0b

5 files changed

Lines changed: 21 additions & 12 deletions

File tree

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
if: matrix.lang == 'go'
8181
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
8282
with:
83-
go-version: "1.23"
83+
go-version: "1.25"
8484
- name: Run Go unit tests
8585
if: matrix.lang == 'go'
8686
working-directory: coraza/api

coraza/api/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.23-alpine@sha256:04ec5618ca64098b8325e064aa1de2d3efbbd022a3ac5554d49d5ece99d41ad5 AS builder
1+
FROM golang:1.26-alpine@sha256:3ad57304ad93bbec8548a0437ad9e06a455660655d9af011d58b993f6f615648 AS builder
22

33
WORKDIR /usr/src/app
44

@@ -11,7 +11,7 @@ COPY --chmod=644 crs.sh .
1111
RUN apk add bash git && \
1212
bash crs.sh Download
1313

14-
FROM golang:1.23-alpine@sha256:04ec5618ca64098b8325e064aa1de2d3efbbd022a3ac5554d49d5ece99d41ad5
14+
FROM golang:1.26-alpine@sha256:3ad57304ad93bbec8548a0437ad9e06a455660655d9af011d58b993f6f615648
1515

1616
COPY --from=builder --chown=0:0 /usr/local/bin/bw-coraza /usr/local/bin/bw-coraza
1717

coraza/api/crs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ echo "ℹ️ Download CRS or Remove CRS"
6666
if [[ "$1" == "Remove" ]]; then
6767
remove_coreruleset
6868
elif [[ "$1" == "Download" ]]; then
69-
git_secure_clone "https://github.com/coreruleset/coreruleset.git" "23196d6a8b3ee2b668bbc26750954501342bfee4" # v4.10.0
69+
git_secure_clone "https://github.com/coreruleset/coreruleset.git" "aabf675fcfc5e489b424b844e6c9f1b39802df69" # v4.25.0
7070
else
7171
echo "❌ Error wrong argument : $1 try Remove or Download"
7272
fi

coraza/api/go.mod

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,31 @@
11
module bw-coraza
22

3-
go 1.23
3+
go 1.25.0
44

55
require (
6-
github.com/corazawaf/coraza/v3 v3.3.2
6+
github.com/corazawaf/coraza/v3 v3.7.0
77
github.com/gorilla/handlers v1.5.2
88
github.com/gorilla/mux v1.8.1
99
)
1010

1111
require (
12-
github.com/corazawaf/libinjection-go v0.2.2 // indirect
12+
github.com/corazawaf/libinjection-go v0.3.2 // indirect
1313
github.com/felixge/httpsnoop v1.0.4 // indirect
14-
github.com/magefile/mage v1.15.0 // indirect
15-
github.com/petar-dambovaliev/aho-corasick v0.0.0-20240411101913-e07a1f0e8eb4 // indirect
14+
github.com/goccy/go-json v0.10.5 // indirect
15+
github.com/goccy/go-yaml v1.18.0 // indirect
16+
github.com/gotnospirit/makeplural v0.0.0-20180622080156-a5f48d94d976 // indirect
17+
github.com/gotnospirit/messageformat v0.0.0-20221001023931-dfe49f1eb092 // indirect
18+
github.com/kaptinlin/go-i18n v0.1.4 // indirect
19+
github.com/kaptinlin/jsonschema v0.4.6 // indirect
20+
github.com/magefile/mage v1.17.0 // indirect
21+
github.com/petar-dambovaliev/aho-corasick v0.0.0-20250424160509-463d218d4745 // indirect
1622
github.com/tidwall/gjson v1.18.0 // indirect
1723
github.com/tidwall/match v1.1.1 // indirect
1824
github.com/tidwall/pretty v1.2.1 // indirect
19-
golang.org/x/net v0.34.0 // indirect
20-
golang.org/x/sync v0.10.0 // indirect
25+
github.com/valllabh/ocsf-schema-golang v1.0.3 // indirect
26+
golang.org/x/net v0.52.0 // indirect
27+
golang.org/x/sync v0.20.0 // indirect
28+
golang.org/x/text v0.35.0 // indirect
29+
google.golang.org/protobuf v1.36.11 // indirect
2130
rsc.io/binaryregexp v0.2.0 // indirect
2231
)

coraza/api/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func processInterruption(w http.ResponseWriter, tx types.Transaction, it *types.
4242

4343
for _, rule := range rules {
4444
if rule.Message() != "" {
45-
WarningLogger.Printf(rule.AuditLog())
45+
WarningLogger.Printf("%s", rule.AuditLog())
4646
}
4747
}
4848

0 commit comments

Comments
 (0)