Skip to content

Commit

Permalink
v1 beta release
Browse files Browse the repository at this point in the history
  • Loading branch information
jptosso committed Jul 29, 2021
1 parent 1e797df commit 6ce53c5
Show file tree
Hide file tree
Showing 90 changed files with 131 additions and 119 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ Make sure ``CGO_ENABLED=1`` env is set before compiling and all dependencies are
package main
import(
"fmt"
engine"github.com/jptosso/coraza-waf/v1"
"github.com/jptosso/coraza-waf/v1/seclang"
engine"github.com/jptosso/coraza-waf"
"github.com/jptosso/coraza-waf/seclang"
)

func main() {
Expand Down Expand Up @@ -89,8 +89,8 @@ Using the standard net/http library:
```go
package main
import(
engine"github.com/jptosso/coraza-waf/v1"
"github.com/jptosso/coraza-waf/v1/seclang"
engine"github.com/jptosso/coraza-waf"
"github.com/jptosso/coraza-waf/seclang"
"net/http"
)

Expand Down
2 changes: 1 addition & 1 deletion actions/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package actions

import (
engine "github.com/jptosso/coraza-waf/v1"
engine "github.com/jptosso/coraza-waf"
)

func ActionsMap() map[string]engine.Action {
Expand Down
2 changes: 1 addition & 1 deletion actions/allow.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package actions
import (
"fmt"

engine "github.com/jptosso/coraza-waf/v1"
engine "github.com/jptosso/coraza-waf"
)

//0 nothing, 1 phase, 2 request
Expand Down
2 changes: 1 addition & 1 deletion actions/append.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package actions

import engine "github.com/jptosso/coraza-waf/v1"
import engine "github.com/jptosso/coraza-waf"

type Append struct {
Data string
Expand Down
2 changes: 1 addition & 1 deletion actions/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package actions

import (
engine "github.com/jptosso/coraza-waf/v1"
engine "github.com/jptosso/coraza-waf"
)

type Block struct{}
Expand Down
2 changes: 1 addition & 1 deletion actions/capture.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package actions

import engine "github.com/jptosso/coraza-waf/v1"
import engine "github.com/jptosso/coraza-waf"

type Capture struct{}

Expand Down
2 changes: 1 addition & 1 deletion actions/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package actions

import engine "github.com/jptosso/coraza-waf/v1"
import engine "github.com/jptosso/coraza-waf"

type Chain struct{}

Expand Down
4 changes: 2 additions & 2 deletions actions/ctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"strconv"
"strings"

engine "github.com/jptosso/coraza-waf/v1"
"github.com/jptosso/coraza-waf/v1/utils"
engine "github.com/jptosso/coraza-waf"
"github.com/jptosso/coraza-waf/utils"
)

type Ctl struct {
Expand Down
2 changes: 1 addition & 1 deletion actions/ctl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package actions
import (
"testing"

engine "github.com/jptosso/coraza-waf/v1"
engine "github.com/jptosso/coraza-waf"
)

func TestCtl(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion actions/deny.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package actions

import (
engine "github.com/jptosso/coraza-waf/v1"
engine "github.com/jptosso/coraza-waf"
)

type Deny struct{}
Expand Down
2 changes: 1 addition & 1 deletion actions/drop.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package actions

import (
engine "github.com/jptosso/coraza-waf/v1"
engine "github.com/jptosso/coraza-waf"
)

type Drop struct{}
Expand Down
4 changes: 2 additions & 2 deletions actions/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package actions
import (
"fmt"

engine "github.com/jptosso/coraza-waf/v1"
"github.com/jptosso/coraza-waf/v1/utils"
engine "github.com/jptosso/coraza-waf"
"github.com/jptosso/coraza-waf/utils"
)

type Exec struct {
Expand Down
4 changes: 2 additions & 2 deletions actions/expirevar.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"strconv"
"strings"

engine "github.com/jptosso/coraza-waf/v1"
_ "github.com/jptosso/coraza-waf/v1/utils"
engine "github.com/jptosso/coraza-waf"
_ "github.com/jptosso/coraza-waf/utils"
)

type Expirevar struct {
Expand Down
2 changes: 1 addition & 1 deletion actions/id.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"fmt"
"strconv"

engine "github.com/jptosso/coraza-waf/v1"
engine "github.com/jptosso/coraza-waf"
)

type Id struct {
Expand Down
2 changes: 1 addition & 1 deletion actions/initcol.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package actions
import (
"strings"

engine "github.com/jptosso/coraza-waf/v1"
engine "github.com/jptosso/coraza-waf"
)

// Initializes a persistent collection and add the data to the standard collections engine.
Expand Down
2 changes: 1 addition & 1 deletion actions/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package actions

import engine "github.com/jptosso/coraza-waf/v1"
import engine "github.com/jptosso/coraza-waf"

type Log struct {
}
Expand Down
2 changes: 1 addition & 1 deletion actions/logdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package actions

import engine "github.com/jptosso/coraza-waf/v1"
import engine "github.com/jptosso/coraza-waf"

type Logdata struct {
data string
Expand Down
2 changes: 1 addition & 1 deletion actions/maturity.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package actions

import engine "github.com/jptosso/coraza-waf/v1"
import engine "github.com/jptosso/coraza-waf"

type Maturity struct {
}
Expand Down
4 changes: 2 additions & 2 deletions actions/msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
package actions

import (
engine "github.com/jptosso/coraza-waf/v1"
"github.com/jptosso/coraza-waf/v1/utils"
engine "github.com/jptosso/coraza-waf"
"github.com/jptosso/coraza-waf/utils"
)

type Msg struct {
Expand Down
2 changes: 1 addition & 1 deletion actions/multimatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package actions

import engine "github.com/jptosso/coraza-waf/v1"
import engine "github.com/jptosso/coraza-waf"

type MultiMatch struct {
}
Expand Down
2 changes: 1 addition & 1 deletion actions/noauditlog.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package actions

import engine "github.com/jptosso/coraza-waf/v1"
import engine "github.com/jptosso/coraza-waf"

type NoAuditlog struct {
}
Expand Down
2 changes: 1 addition & 1 deletion actions/nolog.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package actions

import engine "github.com/jptosso/coraza-waf/v1"
import engine "github.com/jptosso/coraza-waf"

type Nolog struct {
}
Expand Down
2 changes: 1 addition & 1 deletion actions/pass.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package actions

import (
engine "github.com/jptosso/coraza-waf/v1"
engine "github.com/jptosso/coraza-waf"
)

type Pass struct {
Expand Down
2 changes: 1 addition & 1 deletion actions/phase.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"fmt"
"strconv"

engine "github.com/jptosso/coraza-waf/v1"
engine "github.com/jptosso/coraza-waf"
)

type Phase struct{}
Expand Down
2 changes: 1 addition & 1 deletion actions/rev.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package actions

import engine "github.com/jptosso/coraza-waf/v1"
import engine "github.com/jptosso/coraza-waf"

type Rev struct {
}
Expand Down
2 changes: 1 addition & 1 deletion actions/setvar.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"strconv"
"strings"

engine "github.com/jptosso/coraza-waf/v1"
engine "github.com/jptosso/coraza-waf"
)

type Setvar struct {
Expand Down
2 changes: 1 addition & 1 deletion actions/severity.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package actions

import engine "github.com/jptosso/coraza-waf/v1"
import engine "github.com/jptosso/coraza-waf"

type Severity struct {
}
Expand Down
2 changes: 1 addition & 1 deletion actions/skip.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"fmt"
"strconv"

engine "github.com/jptosso/coraza-waf/v1"
engine "github.com/jptosso/coraza-waf"
)

//NOT IMPLEMENTED
Expand Down
2 changes: 1 addition & 1 deletion actions/skipafter.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package actions
import (
"strings"

engine "github.com/jptosso/coraza-waf/v1"
engine "github.com/jptosso/coraza-waf"
)

type SkipAfter struct {
Expand Down
2 changes: 1 addition & 1 deletion actions/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"fmt"
"strconv"

engine "github.com/jptosso/coraza-waf/v1"
engine "github.com/jptosso/coraza-waf"
)

var HTTP_STATUSES = []int{100, 101, 102, 103, 200,
Expand Down
4 changes: 2 additions & 2 deletions actions/t.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package actions
import (
"fmt"

engine "github.com/jptosso/coraza-waf/v1"
"github.com/jptosso/coraza-waf/v1/transformations"
engine "github.com/jptosso/coraza-waf"
"github.com/jptosso/coraza-waf/transformations"
)

type T struct{}
Expand Down
2 changes: 1 addition & 1 deletion actions/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package actions

import engine "github.com/jptosso/coraza-waf/v1"
import engine "github.com/jptosso/coraza-waf"

type Tag struct {
}
Expand Down
2 changes: 1 addition & 1 deletion actions/ver.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package actions

import engine "github.com/jptosso/coraza-waf/v1"
import engine "github.com/jptosso/coraza-waf"

type Ver struct {
}
Expand Down
4 changes: 2 additions & 2 deletions collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package engine
import (
"strconv"

"github.com/jptosso/coraza-waf/v1/utils"
regex "github.com/jptosso/coraza-waf/v1/utils/regex"
"github.com/jptosso/coraza-waf/utils"
regex "github.com/jptosso/coraza-waf/utils/regex"
)

type Collection struct {
Expand Down
5 changes: 4 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
module github.com/jptosso/coraza-waf/v1
module github.com/jptosso/coraza-waf

go 1.16

require (
github.com/antchfx/xmlquery v1.3.6
github.com/antchfx/xpath v1.2.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/jptosso/aho-corasick v1.0.4
github.com/oschwald/geoip2-golang v1.5.0
github.com/pcktdmp/cef v0.2.0
github.com/sirupsen/logrus v1.8.1
golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985 // indirect
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect
golang.org/x/text v0.3.6 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
Expand Down
9 changes: 9 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@ github.com/antchfx/xmlquery v1.3.6 h1:kaEVzH1mNo/2AJZrhZjAaAUTy2Nn2zxGfYYU8jWfXO
github.com/antchfx/xmlquery v1.3.6/go.mod h1:64w0Xesg2sTaawIdNqMB+7qaW/bSqkQm+ssPaCMWNnc=
github.com/antchfx/xpath v1.1.10 h1:cJ0pOvEdN/WvYXxvRrzQH9x5QWKpzHacYO8qzCcDYAg=
github.com/antchfx/xpath v1.1.10/go.mod h1:Yee4kTMuNiPYJ7nSNorELQMr1J33uOpXDMByNYhvtNk=
github.com/antchfx/xpath v1.2.0 h1:mbwv7co+x0RwgeGAOHdrKy89GvHaGvxxBtPK0uF9Zr8=
github.com/antchfx/xpath v1.2.0/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY=
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/jptosso/aho-corasick v1.0.3-alt h1:L6TdaRBmM5l42qX2RYjOXqDz0vyJ7oq1P+XqWDxYEbU=
github.com/jptosso/aho-corasick v1.0.3-alt/go.mod h1:19XbVeqib8ycMrxne6qDMvovk19OGPTvyRz75T58wxQ=
github.com/jptosso/aho-corasick v1.0.4 h1:4zLohlv0YrkXNLhNdRA0eTanzd1z8YFnDfZYg0fTm9g=
Expand Down Expand Up @@ -38,13 +42,18 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc h1:zK/HqS5bZxDptfPJNq8v7vJfXtkU7r9TLIoSr1bXaP4=
golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985 h1:4CSI6oo7cOjJKajidEljs9h+uP0rRZBPPPhcCbj5mw8=
golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191224085550-c709ea063b76/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
Expand Down
2 changes: 1 addition & 1 deletion operators/begins_with.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package operators
import (
"strings"

engine "github.com/jptosso/coraza-waf/v1"
engine "github.com/jptosso/coraza-waf"
)

type BeginsWith struct {
Expand Down
Loading

0 comments on commit 6ce53c5

Please sign in to comment.