Add fleetd SOFA user agent (#19359)

This commit is contained in:
Tim Lee
2024-06-06 12:24:43 -06:00
committed by GitHub
parent 6d633427d8
commit dcc2cdac4b
4 changed files with 7 additions and 5 deletions
+1
View File
@@ -0,0 +1 @@
HTTP calls from the SOFA macOS tables now identified by a 'fleetd' user agent
+3 -2
View File
@@ -4,6 +4,7 @@ package table
import (
"context"
"github.com/fleetdm/fleet/v4/orbit/pkg/table/authdb"
"github.com/fleetdm/fleet/v4/orbit/pkg/table/csrutil_info"
"github.com/fleetdm/fleet/v4/orbit/pkg/table/dataflattentable"
@@ -70,13 +71,13 @@ func PlatformTables(opts PluginOpts) []osquery.OsqueryPlugin {
table.NewPlugin(
"sofa_security_release_info", sofa.SofaSecurityReleaseInfoColumns(),
func(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
return sofa.SofaSecurityReleaseInfoGenerate(ctx, queryContext, opts.Socket)
return sofa.SofaSecurityReleaseInfoGenerate(ctx, queryContext, opts.Socket, sofa.WithUserAgent("fleetd"))
},
),
table.NewPlugin(
"sofa_unpatched_cves", sofa.SofaUnpatchedCVEsColumns(),
func(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
return sofa.SofaUnpatchedCVEsGenerate(ctx, queryContext, opts.Socket)
return sofa.SofaUnpatchedCVEsGenerate(ctx, queryContext, opts.Socket, sofa.WithUserAgent("fleetd"))
},
),