Skip to content

Commit

Permalink
chore: 🚀 to coreruleset organization (#86)
Browse files Browse the repository at this point in the history
Signed-off-by: Felipe Zipitria <[email protected]>
  • Loading branch information
fzipi authored Oct 4, 2022
1 parent 536b896 commit 6301a58
Show file tree
Hide file tree
Showing 29 changed files with 76 additions and 64 deletions.
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ repos:
hooks:
- id: go-fmt
- id: go-vet
- id: go-lint
- id: go-imports
- id: go-cyclo
args: [-over=15]
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Go-FTW - Framework for Testing WAFs in Go!

[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![Go Report Card](https://goreportcard.com/badge/github.com/fzipi/go-ftw)](https://goreportcard.com/report/github.com/fzipi/go-ftw)
[![Go Doc](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](http://godoc.org/github.com/fzipi/go-ftw)
[![PkgGoDev](https://pkg.go.dev/badge/github.com/fzipi/go-ftw)](https://pkg.go.dev/github.com/fzipi/go-ftw)
[![Release](https://img.shields.io/github/v/release/fzipi/go-ftw.svg?style=flat-square)](https://github.com/fzipi/go-ftw/releases/latest)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/fzipi/go-ftw.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/fzipi/go-ftw/alerts/)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=fzipi_go-ftw&metric=coverage)](https://sonarcloud.io/dashboard?id=fzipi_go-ftw)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=fzipi_go-ftw&metric=alert_status)](https://sonarcloud.io/dashboard?id=fzipi_go-ftw)
[![Go Report Card](https://goreportcard.com/badge/github.com/coreruleset/go-ftw)](https://goreportcard.com/report/github.com/coreruleset/go-ftw)
[![Go Doc](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](http://godoc.org/github.com/coreruleset/go-ftw)
[![PkgGoDev](https://pkg.go.dev/badge/github.com/coreruleset/go-ftw)](https://pkg.go.dev/github.com/coreruleset/go-ftw)
[![Release](https://img.shields.io/github/v/release/coreruleset/go-ftw.svg?style=flat-square)](https://github.com/coreruleset/go-ftw/releases/latest)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/coreruleset/go-ftw.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/coreruleset/go-ftw/alerts/)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=coreruleset_go-ftw&metric=coverage)](https://sonarcloud.io/dashboard?id=coreruleset_go-ftw)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=coreruleset_go-ftw&metric=alert_status)](https://sonarcloud.io/dashboard?id=coreruleset_go-ftw)


This software should be compatible with the [Python version](https://pypi.org/project/ftw/).
Expand All @@ -25,11 +25,11 @@ My goals are:

## Install

Go to the [releases](https://github.com/fzipi/go-ftw/releases) page and get the one that matches your OS.
Go to the [releases](https://github.com/coreruleset/go-ftw/releases) page and get the one that matches your OS.

If you have Go installed and configured to run Go binaries from your shell you can also run
```bash
go install github.com/fzipi/go-ftw@latest
go install github.com/coreruleset/go-ftw@latest
```

## Example Usage
Expand Down Expand Up @@ -251,4 +251,4 @@ You can configure the name of the HTTP header by setting the `logmarkerheadernam
option in the configuration to a custom value (the value is case insensitive).

## License
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Ffzipi%2Fgo-ftw.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Ffzipi%2Fgo-ftw?ref=badge_large)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fcoreruleset%2Fgo-ftw.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fcoreruleset%2Fgo-ftw?ref=badge_large)
6 changes: 3 additions & 3 deletions check/base.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package check

import (
"github.com/fzipi/go-ftw/config"
"github.com/fzipi/go-ftw/test"
"github.com/fzipi/go-ftw/waflog"
"github.com/coreruleset/go-ftw/config"
"github.com/coreruleset/go-ftw/test"
"github.com/coreruleset/go-ftw/waflog"
)

// FTWCheck is the base struct for checking test results
Expand Down
4 changes: 2 additions & 2 deletions check/base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"sort"
"testing"

"github.com/fzipi/go-ftw/config"
"github.com/fzipi/go-ftw/test"
"github.com/coreruleset/go-ftw/config"
"github.com/coreruleset/go-ftw/test"
)

var yamlApacheConfig = `---
Expand Down
2 changes: 1 addition & 1 deletion check/error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"errors"
"testing"

"github.com/fzipi/go-ftw/config"
"github.com/coreruleset/go-ftw/config"
)

var expectedOKTests = []struct {
Expand Down
4 changes: 2 additions & 2 deletions check/logs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"os"
"testing"

"github.com/fzipi/go-ftw/config"
"github.com/fzipi/go-ftw/utils"
"github.com/coreruleset/go-ftw/config"
"github.com/coreruleset/go-ftw/utils"
)

var logText = `[Tue Jan 05 02:21:09.637165 2021] [:error] [pid 76:tid 139683434571520] [client 172.23.0.1:58998] [client 172.23.0.1] ModSecurity: Warning. Pattern match "\\\\b(?:keep-alive|close),\\\\s?(?:keep-alive|close)\\\\b" at REQUEST_HEADERS:Connection. [file "/etc/modsecurity.d/owasp-crs/rules/REQUEST-920-PROTOCOL-ENFORCEMENT.conf"] [line "339"] [id "920210"] [msg "Multiple/Conflicting Connection Header Data Found"] [data "close,close"] [severity "WARNING"] [ver "OWASP_CRS/3.3.0"] [tag "application-multi"] [tag "language-multi"] [tag "platform-multi"] [tag "attack-protocol"] [tag "paranoia-level/1"] [tag "OWASP_CRS"] [tag "capec/1000/210/272"] [hostname "localhost"] [uri "/"] [unique_id "X-PNFSe1VwjCgYRI9FsbHgAAAIY"]
Expand Down
2 changes: 1 addition & 1 deletion check/response_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package check
import (
"testing"

"github.com/fzipi/go-ftw/config"
"github.com/coreruleset/go-ftw/config"
)

var expectedResponseOKTests = []struct {
Expand Down
2 changes: 1 addition & 1 deletion check/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package check
import (
"testing"

"github.com/fzipi/go-ftw/config"
"github.com/coreruleset/go-ftw/config"
)

var statusOKTests = []struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"

"github.com/fzipi/go-ftw/test"
"github.com/coreruleset/go-ftw/test"
)

// checkCmd represents the check command
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/rs/zerolog"
"github.com/spf13/cobra"

"github.com/fzipi/go-ftw/config"
"github.com/coreruleset/go-ftw/config"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"

"github.com/fzipi/go-ftw/runner"
"github.com/fzipi/go-ftw/test"
"github.com/coreruleset/go-ftw/runner"
"github.com/coreruleset/go-ftw/test"
)

// cleanCmd represents the clean command
Expand Down
2 changes: 1 addition & 1 deletion config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"testing"

"github.com/fzipi/go-ftw/utils"
"github.com/coreruleset/go-ftw/utils"
)

var yamlConfig = `---
Expand Down
2 changes: 1 addition & 1 deletion config/types.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package config

import "github.com/fzipi/go-ftw/test"
import "github.com/coreruleset/go-ftw/test"

// RunMode represents the mode of the test run
type RunMode string
Expand Down
2 changes: 1 addition & 1 deletion ftwhttp/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/rs/zerolog/log"

"github.com/fzipi/go-ftw/utils"
"github.com/coreruleset/go-ftw/utils"
)

// ToString converts the request line to string for sending it in the wire
Expand Down
33 changes: 23 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,25 +1,38 @@
module github.com/fzipi/go-ftw
module github.com/coreruleset/go-ftw

go 1.16
go 1.18

require (
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Masterminds/sprig v2.22.0+incompatible
github.com/fatih/color v1.11.0 // indirect
github.com/goccy/go-yaml v1.8.9
github.com/google/uuid v1.2.0
github.com/huandu/xstrings v1.3.2 // indirect
github.com/icza/backscanner v0.0.0-20200205093934-2120fccb01f7
github.com/imdario/mergo v0.3.12 // indirect
github.com/knadh/koanf v1.0.0
github.com/kyokomi/emoji v2.2.4+incompatible
github.com/pelletier/go-toml v1.9.1 // indirect
github.com/rs/zerolog v1.22.0
github.com/spf13/cobra v1.1.3
github.com/stretchr/testify v1.5.1 // indirect
github.com/yargevad/filepathx v1.0.0
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a // indirect
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110
)

require (
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/fatih/color v1.11.0 // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/huandu/xstrings v1.3.2 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/mattn/go-colorable v0.1.8 // indirect
github.com/mattn/go-isatty v0.0.12 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/mapstructure v1.4.1 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/pelletier/go-toml v1.9.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/testify v1.5.1 // indirect
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a // indirect
golang.org/x/sys v0.0.0-20210514084401-e8d321eab015 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"

"github.com/fzipi/go-ftw/cmd"
"github.com/coreruleset/go-ftw/cmd"
)

// nolint: gochecknoglobals
Expand Down
12 changes: 6 additions & 6 deletions runner/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import (
"github.com/kyokomi/emoji"
"github.com/rs/zerolog/log"

"github.com/fzipi/go-ftw/check"
"github.com/fzipi/go-ftw/config"
"github.com/fzipi/go-ftw/ftwhttp"
"github.com/fzipi/go-ftw/test"
"github.com/fzipi/go-ftw/utils"
"github.com/fzipi/go-ftw/waflog"
"github.com/coreruleset/go-ftw/check"
"github.com/coreruleset/go-ftw/config"
"github.com/coreruleset/go-ftw/ftwhttp"
"github.com/coreruleset/go-ftw/test"
"github.com/coreruleset/go-ftw/utils"
"github.com/coreruleset/go-ftw/waflog"
)

// Run runs your tests with the specified Config. Returns error if some test failed
Expand Down
8 changes: 4 additions & 4 deletions runner/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (

"github.com/rs/zerolog/log"

"github.com/fzipi/go-ftw/check"
"github.com/fzipi/go-ftw/config"
"github.com/fzipi/go-ftw/ftwhttp"
"github.com/fzipi/go-ftw/test"
"github.com/coreruleset/go-ftw/check"
"github.com/coreruleset/go-ftw/config"
"github.com/coreruleset/go-ftw/ftwhttp"
"github.com/coreruleset/go-ftw/test"
)

var yamlConfig = `
Expand Down
6 changes: 3 additions & 3 deletions runner/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"regexp"
"time"

"github.com/fzipi/go-ftw/config"
"github.com/fzipi/go-ftw/ftwhttp"
"github.com/fzipi/go-ftw/waflog"
"github.com/coreruleset/go-ftw/config"
"github.com/coreruleset/go-ftw/ftwhttp"
"github.com/coreruleset/go-ftw/waflog"
)

// Config provides configuration for the test runner.
Expand Down
4 changes: 2 additions & 2 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sonar.projectKey=fzipi_go-ftw
sonar.organization=fzipi
sonar.projectKey=coreruleset_go-ftw
sonar.organization=coreruleset

# This is the name and version displayed in the SonarCloud UI.
sonar.projectName=go-ftw
Expand Down
2 changes: 1 addition & 1 deletion test/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package test
import (
"encoding/base64"

"github.com/fzipi/go-ftw/utils"
"github.com/coreruleset/go-ftw/utils"
)

// GetMethod returns the proper semantic when the field is empty
Expand Down
2 changes: 1 addition & 1 deletion test/defaults_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"testing"

"github.com/fzipi/go-ftw/ftwhttp"
"github.com/coreruleset/go-ftw/ftwhttp"
)

func getTestInputDefaults() *Input {
Expand Down
2 changes: 1 addition & 1 deletion test/errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package test
import (
"testing"

"github.com/fzipi/go-ftw/utils"
"github.com/coreruleset/go-ftw/utils"
)

var errorsTest = `---
Expand Down
2 changes: 1 addition & 1 deletion test/files_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"regexp"
"testing"

"github.com/fzipi/go-ftw/utils"
"github.com/coreruleset/go-ftw/utils"
)

var yamlTest = `
Expand Down
2 changes: 1 addition & 1 deletion test/types.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package test

import "github.com/fzipi/go-ftw/ftwhttp"
import "github.com/coreruleset/go-ftw/ftwhttp"

// Input represents the input request in a stage
// The fields `Version`, `Method` and `URI` we want to explicitly now when they are set to ""
Expand Down
2 changes: 1 addition & 1 deletion waflog/read.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/icza/backscanner"
"github.com/rs/zerolog/log"

"github.com/fzipi/go-ftw/config"
"github.com/coreruleset/go-ftw/config"
)

// Contains looks in logfile for regex
Expand Down
4 changes: 2 additions & 2 deletions waflog/read_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strings"
"testing"

"github.com/fzipi/go-ftw/config"
"github.com/fzipi/go-ftw/utils"
"github.com/coreruleset/go-ftw/config"
"github.com/coreruleset/go-ftw/utils"
)

func TestReadCheckLogForMarkerNoMarkerAtEnd(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion waflog/waflog.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/rs/zerolog/log"

"github.com/fzipi/go-ftw/config"
"github.com/coreruleset/go-ftw/config"
)

// NewFTWLogLines is the base struct for reading the log file
Expand Down
2 changes: 1 addition & 1 deletion waflog/waflog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package waflog
import (
"testing"

"github.com/fzipi/go-ftw/config"
"github.com/coreruleset/go-ftw/config"
)

func TestNewFTWLogLines(t *testing.T) {
Expand Down

0 comments on commit 6301a58

Please sign in to comment.