From 80faef8327d38b46adaa00d55f833c233ca5911a Mon Sep 17 00:00:00 2001 From: Sarah Gillespie <73313222+gillespi314@users.noreply.github.com> Date: Fri, 19 Jul 2024 14:35:10 -0500 Subject: [PATCH] Set `source = 'apps'` when creating software titles for vpp apps (#20622) Issue #20229 --- server/datastore/mysql/vpp.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/server/datastore/mysql/vpp.go b/server/datastore/mysql/vpp.go index 8c08b0c3f3..6c0d6bd6a6 100644 --- a/server/datastore/mysql/vpp.go +++ b/server/datastore/mysql/vpp.go @@ -235,11 +235,10 @@ VALUES } func (ds *Datastore) getOrInsertSoftwareTitleForVPPApp(ctx context.Context, tx sqlx.ExtContext, app *fleet.VPPApp) (uint, error) { - // NOTE: it was decided to leave the source empty for VPP apps for now, TBD + // NOTE: it was decided to populate "apps" as the source for VPP apps for now, TBD // if this needs to change to better map to how software titles are reported - // back by osquery. Since I think this will likely not stay empty, I'm using - // a variable for the source. - const source = "" + // back by osquery. Since it may change, we're using a variable for the source. + const source = "apps" selectStmt := `SELECT id FROM software_titles WHERE name = ? AND source = ? AND browser = ''` selectArgs := []any{app.Name, source}