Skip to content

Commit

Permalink
fix gob type declaration (#753)
Browse files Browse the repository at this point in the history
  • Loading branch information
itaysk committed Jun 10, 2021
1 parent 09ef628 commit 5cc1e8c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tracee-ebpf/tracee/printer.go
Expand Up @@ -250,6 +250,8 @@ type gobEventPrinter struct {

func (p *gobEventPrinter) Init() error {
p.outEnc = gob.NewEncoder(p.out)
gob.Register(external.Event{})
gob.Register(external.SlimCred{})
p.errEnc = gob.NewEncoder(p.err)
return nil
}
Expand Down
3 changes: 2 additions & 1 deletion tracee-rules/go.mod
Expand Up @@ -6,7 +6,8 @@ require (
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Masterminds/sprig v2.22.0+incompatible
github.com/aquasecurity/tracee/tracee-ebpf v0.0.0-20210518164823-94530727cde4
github.com/aquasecurity/tracee/libbpfgo v0.0.0-20210404051213-c1d1dd1313cb // indirect
github.com/aquasecurity/tracee/tracee-ebpf v0.0.0-20210608194928-9312e26ed9ac
github.com/huandu/xstrings v1.3.2 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
Expand Down
5 changes: 5 additions & 0 deletions tracee-rules/go.sum
Expand Up @@ -21,9 +21,12 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
github.com/aquasecurity/libbpfgo v0.1.0/go.mod h1:/+clceXE103FaXvVTIY2HAkQjxNtkra4DRWvZYr2SKw=
github.com/aquasecurity/tracee/libbpfgo v0.0.0-20210404051213-c1d1dd1313cb/go.mod h1:PgXimFYUSx0PfQFRIyl770Jowy6O3r7iJOr39dt1bss=
github.com/aquasecurity/tracee/tracee-ebpf v0.0.0-20210518164823-94530727cde4 h1:9kHmnhI6oVnbPPqVLAcxwZcaG6qLTKEUlSuTJ1nCwVI=
github.com/aquasecurity/tracee/tracee-ebpf v0.0.0-20210518164823-94530727cde4/go.mod h1:lTKQTL2pcTIiww9i6YcFYdyfpFwYiI+Fui2mbKuqK5Y=
github.com/aquasecurity/tracee/tracee-ebpf v0.0.0-20210608194928-9312e26ed9ac h1:y5FryKCdwS+RJDCXT5eM41kzfdgu40hWzdvuM8CTm2Y=
github.com/aquasecurity/tracee/tracee-ebpf v0.0.0-20210608194928-9312e26ed9ac/go.mod h1:boZOhSKvYyWMXP6AIw82iU6xWo2d8JIOarZRpa2BuyY=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
Expand Down Expand Up @@ -292,6 +295,7 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY=
Expand Down Expand Up @@ -388,6 +392,7 @@ golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
Expand Down
2 changes: 2 additions & 0 deletions tracee-rules/input.go
Expand Up @@ -45,6 +45,8 @@ func setupTraceeInputSource(opts *traceeInputOptions) (chan types.Event, error)

func setupTraceeGobInputSource(opts *traceeInputOptions) (chan types.Event, error) {
dec := gob.NewDecoder(opts.inputFile)
gob.Register(tracee.Event{})
gob.Register(tracee.SlimCred{})
res := make(chan types.Event)
go func() {
for {
Expand Down

0 comments on commit 5cc1e8c

Please sign in to comment.