Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Commit

Permalink
🔨 Matching status from CVE template matchers
Browse files Browse the repository at this point in the history
  • Loading branch information
dwisiswant0 committed Nov 26, 2020
1 parent 35d899a commit 9ce5a22
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion pkg/teler/teler.go
Expand Up @@ -17,7 +17,7 @@ import (

// Analyze logs from threat resources
func Analyze(options *common.Options, logs *gonx.Entry) (bool, map[string]string) {
var match bool
var match, status bool
log := make(map[string]string)
rsc := resource.Get()

Expand Down Expand Up @@ -102,6 +102,18 @@ func Analyze(options *common.Options, logs *gonx.Entry) (bool, map[string]string
// continue
// }

for _, m := range r.GetArray("matchers") {
for _, s := range m.GetArray("status") {
if log["status"] == s.String() {
status = true
}
}
}

if !status {
continue
}

for _, p := range r.GetArray("path") {
diff, err := url.ParseRequestURI(
strings.TrimPrefix(
Expand Down

0 comments on commit 9ce5a22

Please sign in to comment.