File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ func Analyze(cfg Config) {
64
64
65
65
engineOutput := make (chan * detect.Finding )
66
66
engineInput := make (chan protocol.Event )
67
+ fromFile := make (chan protocol.Event )
67
68
68
69
source := engine.EventSources {Tracee : engineInput }
69
70
sigEngine , err := engine .NewEngine (engineConfig , source , engineOutput )
@@ -87,7 +88,7 @@ func Analyze(cfg Config) {
87
88
}
88
89
89
90
// producer
90
- go produce (fileReadCtx , stop , cfg .Source , engineInput )
91
+ go produce (fileReadCtx , stop , cfg .Source , fromFile )
91
92
92
93
cfg .Printer .Preamble ()
93
94
defer cfg .Printer .Close ()
@@ -112,6 +113,11 @@ drain:
112
113
defer close (engineInput )
113
114
for {
114
115
select {
116
+ case event , ok := <- fromFile :
117
+ if ! ok {
118
+ return
119
+ }
120
+ engineInput <- event
115
121
case finding , ok := <- engineOutput :
116
122
if ! ok {
117
123
return
You can’t perform that action at this time.
0 commit comments