Skip to content

Commit

Permalink
Use coraza-wasilibs (envoyproxy#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
anuraaga authored Mar 3, 2023
1 parent 7819502 commit 454447a
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 268 deletions.
7 changes: 4 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ module github.com/corazawaf/coraza-proxy-wasm
go 1.19

require (
github.com/corazawaf/coraza-wasilibs v0.0.0-20230203072127-1efe825d0089
github.com/corazawaf/coraza/v3 v3.0.0-20230214110518-a823d91882bb
github.com/stretchr/testify v1.8.0
github.com/tetratelabs/proxy-wasm-go-sdk v0.21.0
github.com/tidwall/gjson v1.14.4
github.com/wasilibs/go-aho-corasick v0.2.0
github.com/wasilibs/go-libinjection v0.1.0
github.com/wasilibs/go-re2 v0.1.0
github.com/wasilibs/nottinygc v0.2.0
)

Expand All @@ -23,6 +21,9 @@ require (
github.com/tetratelabs/wazero v1.0.0-pre.8 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/wasilibs/go-aho-corasick v0.2.0 // indirect
github.com/wasilibs/go-libinjection v0.1.0 // indirect
github.com/wasilibs/go-re2 v0.1.0 // indirect
golang.org/x/net v0.7.0 // indirect
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
github.com/corazawaf/coraza-wasilibs v0.0.0-20230203072127-1efe825d0089 h1:g2hQT6RtJqt2pgs6W1Fc3EFq4pGBAAkyT0VPLwJsKvg=
github.com/corazawaf/coraza-wasilibs v0.0.0-20230203072127-1efe825d0089/go.mod h1:J6mAYvwpBb16W9l2e/H6NFwK0OICzn3pWW56B4Lbz64=
github.com/corazawaf/coraza/v3 v3.0.0-20230214110518-a823d91882bb h1:Pie9QYrJC+hKHrJlvQjgrVzpUCyzcP9jRYjTZQIIlG4=
github.com/corazawaf/coraza/v3 v3.0.0-20230214110518-a823d91882bb/go.mod h1:dXFswKzaDVm4SsHAyvi12A4yLfg2bVx/myCBkyGALGU=
github.com/corazawaf/libinjection-go v0.1.2 h1:oeiV9pc5rvJ+2oqOqXEAMJousPpGiup6f7Y3nZj5GoM=
Expand Down
49 changes: 0 additions & 49 deletions internal/operators/from_file.go

This file was deleted.

12 changes: 5 additions & 7 deletions internal/operators/operators.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
package operators

import (
"github.com/corazawaf/coraza/v3/operators"
wasilibs "github.com/corazawaf/coraza-wasilibs"
)

func Register() {

operators.Register("detectSQLi", newDetectSQLi)
operators.Register("detectXSS", newDetectXSS)
operators.Register("rx", newRX)
operators.Register("pm", newPM)
operators.Register("pmFromFile", newPMFromFile)
wasilibs.RegisterRX()
wasilibs.RegisterPM()
wasilibs.RegisterSQLi()
wasilibs.RegisterXSS()
}
65 changes: 0 additions & 65 deletions internal/operators/pm.go

This file was deleted.

47 changes: 0 additions & 47 deletions internal/operators/pm_from_file.go

This file was deleted.

46 changes: 0 additions & 46 deletions internal/operators/rx.go

This file was deleted.

28 changes: 0 additions & 28 deletions internal/operators/sqli.go

This file was deleted.

23 changes: 0 additions & 23 deletions internal/operators/xss.go

This file was deleted.

0 comments on commit 454447a

Please sign in to comment.