Skip to content

Tune Command#8

Merged
srueg merged 14 commits into
masterfrom
tune-command
Mar 19, 2020
Merged

Tune Command#8
srueg merged 14 commits into
masterfrom
tune-command

Conversation

@srueg

@srueg srueg commented Mar 5, 2020

Copy link
Copy Markdown
Contributor

Implement a tune command which generates ModSecurity rule exclusions, based on a unique ID.
The unique ID is queried for in Elasticsearch and exclusions are generated for all found ModSecurity alerts.

@srueg srueg force-pushed the tune-command branch 5 times, most recently from f03cc4b to dfafe09 Compare March 9, 2020 16:51
Simon Rüegg added 4 commits March 10, 2020 08:42
Signed-off-by: Simon Rüegg <simon.ruegg@vshn.ch>
According to the default setup of cobra.

Signed-off-by: Simon Rüegg <simon.ruegg@vshn.ch>
Signed-off-by: Simon Rüegg <simon.ruegg@vshn.ch>
Signed-off-by: Simon Rüegg <simon.ruegg@vshn.ch>
@srueg srueg force-pushed the tune-command branch 4 times, most recently from ba00d7c to 97bf3a4 Compare March 11, 2020 09:37
Comment thread .github/workflows/build.yml Outdated
srueg added 2 commits March 13, 2020 15:00
To query Elasticsearch by unique-id.
Generate exclusion rules based on unique IDs.
@srueg srueg marked this pull request as ready for review March 13, 2020 14:01
Comment thread pkg/model/helpers.go Outdated
Comment thread pkg/forwarder/port.go Outdated
Comment thread pkg/elasticsearch/search.go Outdated
Comment thread pkg/elasticsearch/search.go Outdated
Comment thread pkg/tuner/tuner_test.go Outdated
srueg added 3 commits March 16, 2020 15:24
As stated by the go wiki [1].

[1] https://github.com/golang/go/wiki/CodeReviewComments#error-strings

Signed-off-by: Simon Rüegg <simon@rueggs.ch>
By introducing a type alias for the used map.

Signed-off-by: Simon Rüegg <simon@rueggs.ch>
@srueg srueg requested a review from ccremer March 16, 2020 14:59
As stated in [1] "when in doubt, use a pointer receiver".

[1] https://github.com/golang/go/wiki/CodeReviewComments#receiver-type

Signed-off-by: Simon Rüegg <simon@rueggs.ch>
Comment thread pkg/elasticsearch/search.go Outdated
Comment thread pkg/elasticsearch/search.go Outdated
Comment thread pkg/rules/rules_test.go
Comment thread pkg/tuner/tuner.go Outdated
@srueg srueg requested a review from ccremer March 18, 2020 08:34

@ccremer ccremer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one last thing, then it's LGTM

Comment thread pkg/tuner/tuner.go Outdated
Comment thread README.adoc Outdated
srueg and others added 3 commits March 18, 2020 15:13
Various improvements.

Signed-off-by: Simon Rüegg <simon@rueggs.ch>
To improve the readability of the tests.

Signed-off-by: Simon Rüegg <simon@rueggs.ch>
Move the setup up of the Elasticsearch client to a method.

Signed-off-by: Simon Rüegg <simon.ruegg@vshn.ch>
@srueg srueg requested a review from ccremer March 18, 2020 14:14
@srueg srueg merged commit 9a73176 into master Mar 19, 2020
@srueg srueg deleted the tune-command branch March 19, 2020 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants