-
Notifications
You must be signed in to change notification settings - Fork 102
/
table.go
51 lines (45 loc) · 1.88 KB
/
table.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package table
import (
"github.com/kolide/launcher/pkg/launcher"
"github.com/kolide/launcher/pkg/osquery/tables/dataflattentable"
"github.com/boltdb/bolt"
"github.com/go-kit/kit/log"
osquery "github.com/kolide/osquery-go"
"github.com/kolide/osquery-go/plugin/table"
)
// LauncherTables returns launcher-specific tables
func LauncherTables(db *bolt.DB, opts *launcher.Options) []osquery.OsqueryPlugin {
return []osquery.OsqueryPlugin{
LauncherConfigTable(db),
LauncherIdentifierTable(db),
TargetMembershipTable(db),
LauncherAutoupdateConfigTable(opts),
}
}
// PlatformTables returns all tables for the launcher build platform.
func PlatformTables(client *osquery.ExtensionManagerClient, logger log.Logger, currentOsquerydBinaryPath string) []*table.Plugin {
// Common tables to all platforms
tables := []*table.Plugin{
BestPractices(client),
ChromeLoginDataEmails(client, logger),
ChromeUserProfiles(client, logger),
EmailAddresses(client, logger),
KeyInfo(client, logger),
LauncherInfoTable(),
OnePasswordAccounts(client, logger),
SlackConfig(client, logger),
SshKeys(client, logger),
dataflattentable.TablePlugin(client, logger, dataflattentable.JsonType),
dataflattentable.TablePlugin(client, logger, dataflattentable.XmlType),
dataflattentable.TablePlugin(client, logger, dataflattentable.IniType),
dataflattentable.TablePluginExec(client, logger,
"kolide_zerotier_info", dataflattentable.JsonType, zerotierCli("info")),
dataflattentable.TablePluginExec(client, logger,
"kolide_zerotier_networks", dataflattentable.JsonType, zerotierCli("listnetworks")),
dataflattentable.TablePluginExec(client, logger,
"kolide_zerotier_peers", dataflattentable.JsonType, zerotierCli("listpeers")),
}
// add in the platform specific ones (as denoted by build tags)
tables = append(tables, platformTables(client, logger, currentOsquerydBinaryPath)...)
return tables
}