Add a new datasource that: - Receives HTTP requests from remediation components - Apply rules on them to determine whether they are malicious or not - Rules can be evaluated in-band (the remediation component will block the request directly) or out-band (the RC will let the request through, but crowdsec can still process the rule matches with scenarios) The PR also adds support for 2 new hub items: - appsec-configs: Configure the Application Security Engine (which rules to load, in which phase) - appsec-rules: a rule that is added in the Application Security Engine (can use either our own format, or seclang) --------- Co-authored-by: alteredCoder <kevin@crowdsec.net> Co-authored-by: Sebastien Blot <sebastien@crowdsec.net> Co-authored-by: mmetc <92726601+mmetc@users.noreply.github.com> Co-authored-by: Marco Mariani <marco@crowdsec.net>
41 lines
1.2 KiB
Go
41 lines
1.2 KiB
Go
package main
|
|
|
|
import (
|
|
"github.com/crowdsecurity/crowdsec/pkg/cwhub"
|
|
)
|
|
|
|
func NewParserCLI() *itemCLI {
|
|
return &itemCLI{
|
|
name: cwhub.PARSERS,
|
|
singular: "parser",
|
|
oneOrMore: "parser(s)",
|
|
help: cliHelp{
|
|
example: `cscli parsers list -a
|
|
cscli parsers install crowdsecurity/caddy-logs crowdsecurity/sshd-logs
|
|
cscli parsers inspect crowdsecurity/caddy-logs crowdsecurity/sshd-logs
|
|
cscli parsers upgrade crowdsecurity/caddy-logs crowdsecurity/sshd-logs
|
|
cscli parsers remove crowdsecurity/caddy-logs crowdsecurity/sshd-logs
|
|
`,
|
|
},
|
|
installHelp: cliHelp{
|
|
example: `cscli parsers install crowdsecurity/caddy-logs crowdsecurity/sshd-logs`,
|
|
},
|
|
removeHelp: cliHelp{
|
|
example: `cscli parsers remove crowdsecurity/caddy-logs crowdsecurity/sshd-logs`,
|
|
},
|
|
upgradeHelp: cliHelp{
|
|
example: `cscli parsers upgrade crowdsecurity/caddy-logs crowdsecurity/sshd-logs`,
|
|
},
|
|
inspectHelp: cliHelp{
|
|
example: `cscli parsers inspect crowdsecurity/httpd-logs crowdsecurity/sshd-logs`,
|
|
},
|
|
listHelp: cliHelp{
|
|
example: `cscli parsers list
|
|
cscli parsers list -a
|
|
cscli parsers list crowdsecurity/caddy-logs crowdsecurity/sshd-logs
|
|
|
|
List only enabled parsers unless "-a" or names are specified.`,
|
|
},
|
|
}
|
|
}
|