-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added an event for default rule "Detect crypto miners using the Stratum protocol" #173
Added an event for default rule "Detect crypto miners using the Stratum protocol" #173
Conversation
…m protocol Signed-off-by: GLVS Kiriti <glvskiriti2003369@gmail.com>
Signed-off-by: GLVS Kiriti <glvskiriti2003369@gmail.com>
@FedeDP What is your feedback on this approach? 👀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love this!
/approve
// minersoftware -o stratum+tcp://example.com:3333 -u username -p password | ||
// However, for testing purposes, we're using 'ls' as a placeholder. | ||
cmd := exec.Command("ls", "-o stratum+tcp", "-u user", "-p pass") | ||
cmd.Run() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, can we return cmd.Run
instead of throwing its return error away?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@FedeDP cmd := exec.Command("ls", "-o stratum+tcp", "-u user", "-p pass")
cmd.Run() always throws an error because this command fails every time.
If we return error then test wont pass due to error even still the rule triggers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Irrespective of whether ls command fails or not the rule gets triggered. So there is no need to return the error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh i see, you are right! Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's return the Run
error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
LGTM label has been added. Git tree hash: cc42c71b6599b05933b0c355e9ace63cdc8bd25f
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: FedeDP, GLVSKiriti The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area events
What this PR does / why we need it:
Added an event for default rule "Detect crypto miners using the Stratum protocol" as mentioned here
Which issue(s) this PR fixes:
Fixes #172
Special notes for your reviewer: