Skip to content

Commit

Permalink
Part 1 of building tables, easier tables, not tested
Browse files Browse the repository at this point in the history
  • Loading branch information
RachelElysia committed Oct 19, 2023
1 parent c38be69 commit e2710ec
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 3 deletions.
4 changes: 3 additions & 1 deletion orbit/pkg/table/extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"time"

"github.com/fleetdm/fleet/v4/orbit/pkg/table/sntp_request"
"github.com/kolide/launcher/pkg/osquery/tables/zfs"
"github.com/macadmins/osquery-extension/tables/chromeuserprofiles"
"github.com/macadmins/osquery-extension/tables/fileline"
"github.com/macadmins/osquery-extension/tables/puppet"
Expand Down Expand Up @@ -133,7 +134,8 @@ func OrbitDefaultTables() []osquery.OsqueryPlugin {
table.NewPlugin("sntp_request", sntp_request.Columns(), sntp_request.GenerateFunc),

// Kolide extensions.

zfs.ZfsPropertiesPlugin(serverClient, kolideLogger), // table name is "kolide_zfs"
zfs.ZpoolPropertiesPlugin(serverClient, kolideLogger), // table name is "kolide_zfs"
}
return plugins
}
Expand Down
4 changes: 4 additions & 0 deletions orbit/pkg/table/extension_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/fleetdm/fleet/v4/orbit/pkg/table/software_update"
"github.com/fleetdm/fleet/v4/orbit/pkg/table/sudo_info"
"github.com/fleetdm/fleet/v4/orbit/pkg/table/user_login_settings"
"github.com/kolide/launcher/pkg/osquery/tables/systemprofiler"
"github.com/macadmins/osquery-extension/tables/filevaultusers"
"github.com/macadmins/osquery-extension/tables/macos_profiles"
"github.com/macadmins/osquery-extension/tables/macosrsr"
Expand Down Expand Up @@ -59,5 +60,8 @@ func PlatformTables() []osquery.OsqueryPlugin {
// osquery version 5.5.0 and up ships a unified_log table in core
// we are renaming the one from the macadmins extension to avoid collision
table.NewPlugin("macadmins_unified_log", unifiedlog.UnifiedLogColumns(), unifiedlog.UnifiedLogGenerate),

// Kolide tables
systemprofiler.TablePlugin(serverClient, kolideLogger), // table name is "kolide_systemprofiler"
}
}
17 changes: 17 additions & 0 deletions orbit/pkg/table/extension_linux.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//go:build windows

package table

import (
"github.com/kolide/launcher/pkg/osquery/tables/xconf"
"github.com/kolide/launcher/pkg/osquery/tables/xrdb"
"github.com/osquery/osquery-go"
)

func PlatformTables() []osquery.OsqueryPlugin {
return []osquery.OsqueryPlugin{
// Kolide tables
xconf.TablePlugin(serverClient, kolideLogger), // table name is "kolide_xconf"
xrdb.TablePlugin(serverClient, kolideLogger), // table name is "kolide_xrdb"
}
}
12 changes: 10 additions & 2 deletions orbit/pkg/table/extension_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
package table

import (
"github.com/fleetdm/fleet/v4/orbit/pkg/table/cis_audit"
"github.com/fleetdm/fleet/v4/orbit/pkg/table/mdm"
cisaudit "github.com/fleetdm/fleet/v4/orbit/pkg/table/cis_audit"
mdmbridge "github.com/fleetdm/fleet/v4/orbit/pkg/table/mdm"
"github.com/kolide/launcher/pkg/osquery/tables/wifi_networks"
"github.com/kolide/launcher/pkg/osquery/tables/windowsupdatetable"
"github.com/kolide/launcher/pkg/osquery/tables/wmitable"
"github.com/osquery/osquery-go"
"github.com/osquery/osquery-go/plugin/table"
)
Expand All @@ -14,5 +17,10 @@ func PlatformTables() []osquery.OsqueryPlugin {
// Fleet tables
table.NewPlugin("mdm_bridge", mdmbridge.Columns(), mdmbridge.Generate),
table.NewPlugin("cis_audit", cisaudit.Columns(), cisaudit.Generate),

// Kolide tables
wifi_networks.TablePlugin(serverClient, kolideLogger), // table name is "kolide_wifi_networks"
windowsupdatetable.TablePlugin(serverClient, kolideLogger), // table name is "kolide_windowsupdatetable" // TODO, more complicated
wmitable.TablePlugin(serverClient, kolideLogger), // table name is "kolide_wmitable"
}
}

0 comments on commit e2710ec

Please sign in to comment.