Skip to content

Commit

Permalink
add nftables allowedCommand and exec table (#1570)
Browse files Browse the repository at this point in the history
  • Loading branch information
zackattack01 authored Jan 31, 2024
1 parent 7e626b8 commit 91e7a9a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ee/allowedcmd/cmd_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ func NixEnv(ctx context.Context, arg ...string) (*exec.Cmd, error) {
return validatedCommand(ctx, "/nix/var/nix/profiles/default/bin/nix-env", arg...)
}

func Nftables(ctx context.Context, arg ...string) (*exec.Cmd, error) {
return validatedCommand(ctx, "/usr/sbin/nft", arg...)
}

func Nmcli(ctx context.Context, arg ...string) (*exec.Cmd, error) {
return validatedCommand(ctx, "/usr/bin/nmcli", arg...)
}
Expand Down
1 change: 1 addition & 0 deletions pkg/osquery/table/platform_tables_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ func platformSpecificTables(logger log.Logger, currentOsquerydBinaryPath string)
dataflattentable.NewExecAndParseTable(logger, "kolide_pacman_upgradeable", pacman_upgradeable.Parser, allowedcmd.Pacman, []string{"-Qu"}, dataflattentable.WithIncludeStderr()),
dataflattentable.NewExecAndParseTable(logger, "kolide_rpm_version_info", rpm.Parser, allowedcmd.Rpm, []string{"-qai"}, dataflattentable.WithIncludeStderr()),
dataflattentable.NewExecAndParseTable(logger, "kolide_carbonblack_repcli_status", repcli.Parser, allowedcmd.Repcli, []string{"status"}, dataflattentable.WithIncludeStderr()),
dataflattentable.TablePluginExec(logger, "kolide_nftables", dataflattentable.JsonType, allowedcmd.Nftables, []string{"-jat", "list", "ruleset"}), // -j (json) -a (show object handles) -t (terse, omit set contents)
zfs.ZfsPropertiesPlugin(logger),
zfs.ZpoolPropertiesPlugin(logger),
}
Expand Down

0 comments on commit 91e7a9a

Please sign in to comment.