chore: the resolve and findProcess behaviors of Logic and SubRules follow the order and needs of the internal rules

This commit is contained in:
wwqgtxx
2025-06-10 20:11:50 +08:00
parent 01f8f2db2f
commit ae7967f662
29 changed files with 121 additions and 231 deletions

View File

@@ -30,7 +30,10 @@ func (ps *Process) RuleType() C.RuleType {
return C.ProcessPath
}
func (ps *Process) Match(metadata *C.Metadata) (bool, string) {
func (ps *Process) Match(metadata *C.Metadata, helper C.RuleMatchHelper) (bool, string) {
if helper.FindProcess != nil {
helper.FindProcess()
}
if ps.nameOnly {
if ps.regexp != nil {
match, _ := ps.regexp.MatchString(metadata.Process)
@@ -54,10 +57,6 @@ func (ps *Process) Payload() string {
return ps.process
}
func (ps *Process) ShouldFindProcess() bool {
return true
}
func NewProcess(process string, adapter string, nameOnly bool, regex bool) (*Process, error) {
var r *regexp2.Regexp
var err error