Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ linters:
files:
- '!**/x-pack/**/*.go'
deny:
- pkg: github.com/elastic/beats/v7/x-pack
- pkg: github.com/elastic/beats/v9/x-pack
desc: Apache 2.0 licensed code cannot depend on Elastic licensed code (x-pack/).
main:
list-mode: lax
Expand Down
2 changes: 1 addition & 1 deletion auditbeat/ab/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package ab

import "github.com/elastic/beats/v7/metricbeat/mb"
import "github.com/elastic/beats/v9/metricbeat/mb"

// Registry is the singleton Register instance where all ModuleFactory's and
// MetricSetFactory's should be registered.
Expand Down
20 changes: 10 additions & 10 deletions auditbeat/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ import (

"github.com/elastic/elastic-agent-libs/mapstr"

"github.com/elastic/beats/v7/auditbeat/ab"
"github.com/elastic/beats/v7/auditbeat/core"
"github.com/elastic/beats/v7/libbeat/cmd"
"github.com/elastic/beats/v7/libbeat/cmd/instance"
"github.com/elastic/beats/v7/libbeat/ecs"
"github.com/elastic/beats/v7/libbeat/processors"
"github.com/elastic/beats/v7/libbeat/publisher/processing"
"github.com/elastic/beats/v7/metricbeat/beater"
"github.com/elastic/beats/v7/metricbeat/mb/module"
"github.com/elastic/beats/v9/auditbeat/ab"
"github.com/elastic/beats/v9/auditbeat/core"
"github.com/elastic/beats/v9/libbeat/cmd"
"github.com/elastic/beats/v9/libbeat/cmd/instance"
"github.com/elastic/beats/v9/libbeat/ecs"
"github.com/elastic/beats/v9/libbeat/processors"
"github.com/elastic/beats/v9/libbeat/publisher/processing"
"github.com/elastic/beats/v9/metricbeat/beater"
"github.com/elastic/beats/v9/metricbeat/mb/module"

// Register required includes
_ "github.com/elastic/beats/v7/auditbeat/include"
_ "github.com/elastic/beats/v9/auditbeat/include"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion auditbeat/core/eventmod.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package core

import (
"github.com/elastic/beats/v7/metricbeat/mb"
"github.com/elastic/beats/v9/metricbeat/mb"
"github.com/elastic/elastic-agent-libs/mapstr"
)

Expand Down
2 changes: 1 addition & 1 deletion auditbeat/helper/hasher/hasher.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"github.com/dustin/go-humanize"
"golang.org/x/time/rate"

"github.com/elastic/beats/v7/libbeat/common/file"
"github.com/elastic/beats/v9/libbeat/common/file"
)

// HashType identifies a cryptographic algorithm.
Expand Down
2 changes: 1 addition & 1 deletion auditbeat/include/fields.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions auditbeat/include/list.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions auditbeat/magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@ import (
"github.com/magefile/mage/mg"
"go.uber.org/multierr"

auditbeat "github.com/elastic/beats/v7/auditbeat/scripts/mage"
devtools "github.com/elastic/beats/v7/dev-tools/mage"
"github.com/elastic/beats/v7/dev-tools/mage/target/build"
auditbeat "github.com/elastic/beats/v9/auditbeat/scripts/mage"
devtools "github.com/elastic/beats/v9/dev-tools/mage"
"github.com/elastic/beats/v9/dev-tools/mage/target/build"

//mage:import
"github.com/elastic/beats/v7/dev-tools/mage/target/common"
"github.com/elastic/beats/v9/dev-tools/mage/target/common"
//mage:import
"github.com/elastic/beats/v7/dev-tools/mage/target/unittest"
"github.com/elastic/beats/v9/dev-tools/mage/target/unittest"
//mage:import
"github.com/elastic/beats/v7/dev-tools/mage/target/integtest"
"github.com/elastic/beats/v9/dev-tools/mage/target/integtest"
//mage:import
_ "github.com/elastic/beats/v7/dev-tools/mage/target/integtest/docker"
_ "github.com/elastic/beats/v9/dev-tools/mage/target/integtest/docker"
//mage:import
_ "github.com/elastic/beats/v7/dev-tools/mage/target/test"
_ "github.com/elastic/beats/v9/dev-tools/mage/target/test"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion auditbeat/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"os"
_ "time/tzdata" // for timezone handling

"github.com/elastic/beats/v7/auditbeat/cmd"
"github.com/elastic/beats/v9/auditbeat/cmd"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions auditbeat/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"flag"
"testing"

"github.com/elastic/beats/v7/auditbeat/cmd"
"github.com/elastic/beats/v7/libbeat/tests/system/template"
"github.com/elastic/beats/v9/auditbeat/cmd"
"github.com/elastic/beats/v9/libbeat/tests/system/template"
)

var systemTest *bool
Expand Down
8 changes: 4 additions & 4 deletions auditbeat/module/auditd/audit_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ import (
"syscall"
"time"

"github.com/elastic/beats/v7/auditbeat/ab"
"github.com/elastic/beats/v7/libbeat/common"
"github.com/elastic/beats/v7/metricbeat/mb"
"github.com/elastic/beats/v7/metricbeat/mb/parse"
"github.com/elastic/beats/v9/auditbeat/ab"
"github.com/elastic/beats/v9/libbeat/common"
"github.com/elastic/beats/v9/metricbeat/mb"
"github.com/elastic/beats/v9/metricbeat/mb/parse"
"github.com/elastic/elastic-agent-libs/logp"
"github.com/elastic/elastic-agent-libs/mapstr"
"github.com/elastic/elastic-agent-libs/monitoring"
Expand Down
16 changes: 8 additions & 8 deletions auditbeat/module/auditd/audit_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ import (

"github.com/prometheus/procfs"

"github.com/elastic/beats/v7/auditbeat/ab"
"github.com/elastic/beats/v7/auditbeat/core"
"github.com/elastic/beats/v7/libbeat/mapping"
"github.com/elastic/beats/v7/metricbeat/mb"
mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing"
"github.com/elastic/beats/v9/auditbeat/ab"
"github.com/elastic/beats/v9/auditbeat/core"
"github.com/elastic/beats/v9/libbeat/mapping"
"github.com/elastic/beats/v9/metricbeat/mb"
mbtest "github.com/elastic/beats/v9/metricbeat/mb/testing"
"github.com/elastic/elastic-agent-libs/mapstr"
"github.com/elastic/go-libaudit/v2"
"github.com/elastic/go-libaudit/v2/auparse"
Expand Down Expand Up @@ -86,7 +86,7 @@ func TestSetPID(t *testing.T) {
clientMock: NewMock().
returnSendValue(1).
returnReceiveError(syscall.ENOBUFS). // first recv fails
returnReceiveError(syscall.EAGAIN). // second is eagain, indicating it would block
returnReceiveError(syscall.EAGAIN). // second is eagain, indicating it would block
// now we retry the send
returnSendValue(1).
returnReceiveAckWithSeq(1),
Expand All @@ -109,7 +109,7 @@ func TestSetPID(t *testing.T) {
clientMock: NewMock().
returnSendValue(1).
returnReceiveError(syscall.ENOBUFS). // first recv fails
returnReceiveError(syscall.EAGAIN). // second is eagain from the drain loop, indicating it would block
returnReceiveError(syscall.EAGAIN). // second is eagain from the drain loop, indicating it would block
// now we retry the send with error again
returnSendValue(2).
returnReceiveError(syscall.ENOBUFS).
Expand All @@ -135,7 +135,7 @@ func TestSetPID(t *testing.T) {
clientMock: NewMock().
returnSendValue(1).
returnReceiveError(syscall.ENOBUFS). // first recv fails
returnReceiveError(syscall.EBADFD), // non-recoverable error
returnReceiveError(syscall.EBADFD), // non-recoverable error

controlMock: NewMock().returnACK().returnStatus(),
expectedError: true,
Expand Down
6 changes: 3 additions & 3 deletions auditbeat/module/auditd/audit_unsupported.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ package auditd
import (
"fmt"

"github.com/elastic/beats/v7/auditbeat/ab"
"github.com/elastic/beats/v7/metricbeat/mb"
"github.com/elastic/beats/v7/metricbeat/mb/parse"
"github.com/elastic/beats/v9/auditbeat/ab"
"github.com/elastic/beats/v9/metricbeat/mb"
"github.com/elastic/beats/v9/metricbeat/mb/parse"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion auditbeat/module/auditd/fields.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions auditbeat/module/auditd/golden_files_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ import (
"github.com/elastic/go-libaudit/v2"
"github.com/elastic/go-libaudit/v2/aucoalesce"

"github.com/elastic/beats/v7/auditbeat/ab"
"github.com/elastic/beats/v7/metricbeat/mb"
mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing"
"github.com/elastic/beats/v9/auditbeat/ab"
"github.com/elastic/beats/v9/metricbeat/mb"
mbtest "github.com/elastic/beats/v9/metricbeat/mb/testing"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion auditbeat/module/file_integrity/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"math/bits"
"strings"

"github.com/elastic/beats/v7/libbeat/common"
"github.com/elastic/beats/v9/libbeat/common"
)

// Action is a description of the changes described by an event.
Expand Down
2 changes: 1 addition & 1 deletion auditbeat/module/file_integrity/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (

"github.com/dustin/go-humanize"

"github.com/elastic/beats/v7/libbeat/common/match"
"github.com/elastic/beats/v9/libbeat/common/match"
)

// MaxValidFileSizeLimit is the largest possible value for `max_file_size`.
Expand Down
4 changes: 2 additions & 2 deletions auditbeat/module/file_integrity/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ import (
"strings"
"time"

"github.com/elastic/beats/v7/libbeat/common/file"
"github.com/elastic/beats/v7/metricbeat/mb"
"github.com/elastic/beats/v9/libbeat/common/file"
"github.com/elastic/beats/v9/metricbeat/mb"
"github.com/elastic/elastic-agent-libs/mapstr"
)

Expand Down
2 changes: 1 addition & 1 deletion auditbeat/module/file_integrity/event_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"strconv"
"time"

"github.com/elastic/beats/v7/libbeat/ebpf/sys"
"github.com/elastic/beats/v9/libbeat/ebpf/sys"
"github.com/elastic/ebpfevents"
)

Expand Down
2 changes: 1 addition & 1 deletion auditbeat/module/file_integrity/eventreader_ebpf.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"strings"
"time"

"github.com/elastic/beats/v7/libbeat/ebpf"
"github.com/elastic/beats/v9/libbeat/ebpf"
"github.com/elastic/ebpfevents"
"github.com/elastic/elastic-agent-libs/logp"
)
Expand Down
2 changes: 1 addition & 1 deletion auditbeat/module/file_integrity/eventreader_fsnotify.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

"github.com/fsnotify/fsnotify"

"github.com/elastic/beats/v7/auditbeat/module/file_integrity/monitor"
"github.com/elastic/beats/v9/auditbeat/module/file_integrity/monitor"
"github.com/elastic/elastic-agent-libs/logp"
)

Expand Down
6 changes: 3 additions & 3 deletions auditbeat/module/file_integrity/eventreader_kprobes.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import (
"path/filepath"
"time"

"github.com/elastic/beats/v7/auditbeat/module/file_integrity/kprobes"
"github.com/elastic/beats/v7/libbeat/beat"
"github.com/elastic/beats/v7/libbeat/processors/add_process_metadata"
"github.com/elastic/beats/v9/auditbeat/module/file_integrity/kprobes"
"github.com/elastic/beats/v9/libbeat/beat"
"github.com/elastic/beats/v9/libbeat/processors/add_process_metadata"

"golang.org/x/sys/unix"

Expand Down
14 changes: 7 additions & 7 deletions auditbeat/module/file_integrity/exeobjparser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"strconv"
"testing"

"github.com/elastic/beats/v7/testing/testutils"
"github.com/elastic/beats/v9/testing/testutils"
"github.com/elastic/elastic-agent-libs/mapstr"
)

Expand Down Expand Up @@ -273,8 +273,8 @@ var want = map[string]mapstr.M{
"imports_names_entropy": 4.2079021689106195,
"imports_names_var_entropy": 0.0014785066641319837,
"go_imports": []string{
"github.com/elastic/beats/v7/auditbeat/module/file_integrity/testdata/b.Used",
"github.com/elastic/beats/v7/auditbeat/module/file_integrity/testdata/b.hash",
"github.com/elastic/beats/v9/auditbeat/module/file_integrity/testdata/b.Used",
"github.com/elastic/beats/v9/auditbeat/module/file_integrity/testdata/b.hash",
},
},
},
Expand Down Expand Up @@ -311,8 +311,8 @@ var want = map[string]mapstr.M{
"import_hash": "d41d8cd98f00b204e9800998ecf8427e",
"go_import_hash": "10bddcb4cee42080f76c88d9ff964491",
"go_imports": []string{
"github.com/elastic/beats/v7/auditbeat/module/file_integrity/testdata/b.Used",
"github.com/elastic/beats/v7/auditbeat/module/file_integrity/testdata/b.hash",
"github.com/elastic/beats/v9/auditbeat/module/file_integrity/testdata/b.Used",
"github.com/elastic/beats/v9/auditbeat/module/file_integrity/testdata/b.hash",
},
},
},
Expand Down Expand Up @@ -387,8 +387,8 @@ var want = map[string]mapstr.M{
"_write",
},
"go_imports": []string{
"github.com/elastic/beats/v7/auditbeat/module/file_integrity/testdata/b.Used",
"github.com/elastic/beats/v7/auditbeat/module/file_integrity/testdata/b.hash",
"github.com/elastic/beats/v9/auditbeat/module/file_integrity/testdata/b.Used",
"github.com/elastic/beats/v9/auditbeat/module/file_integrity/testdata/b.hash",
},
"sections": []objSection{
{Name: strPtr("__text"), Size: uint64Ptr(0x8be36), Entropy: float64Ptr(6.16), VarEntropy: float64Ptr(0.0001)},
Expand Down
2 changes: 1 addition & 1 deletion auditbeat/module/file_integrity/fields.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion auditbeat/module/file_integrity/fileinfo_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"time"
"unsafe"

"github.com/elastic/beats/v7/libbeat/common/file"
"github.com/elastic/beats/v9/libbeat/common/file"
)

// NewMetadata returns a new Metadata object. If an error is returned it is
Expand Down
2 changes: 1 addition & 1 deletion auditbeat/module/file_integrity/flatbuffers.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

flatbuffers "github.com/google/flatbuffers/go"

"github.com/elastic/beats/v7/auditbeat/module/file_integrity/schema"
"github.com/elastic/beats/v9/auditbeat/module/file_integrity/schema"
)

// Requires the Google flatbuffer compiler and Elastic go-licenser.
Expand Down
2 changes: 1 addition & 1 deletion auditbeat/module/file_integrity/kprobes/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ package kprobes
import (
"sync"

"github.com/elastic/beats/v7/auditbeat/tracing"
"github.com/elastic/beats/v9/auditbeat/tracing"
)

var probeEventPool = sync.Pool{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"context"
"testing"

"github.com/elastic/beats/v7/auditbeat/tracing"
"github.com/elastic/beats/v9/auditbeat/tracing"

"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion auditbeat/module/file_integrity/kprobes/monitor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"testing"
"time"

"github.com/elastic/beats/v7/auditbeat/tracing"
"github.com/elastic/beats/v9/auditbeat/tracing"

"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion auditbeat/module/file_integrity/kprobes/perf_channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ package kprobes
import (
"time"

"github.com/elastic/beats/v7/auditbeat/tracing"
"github.com/elastic/beats/v9/auditbeat/tracing"
)

type perfChannel interface {
Expand Down
Loading
Loading