Skip to content

Commit

Permalink
🐛 ensure we use the connection asset so we do not lose info from conn…
Browse files Browse the repository at this point in the history
…ect call (#2458)
  • Loading branch information
vjeffrey authored Nov 6, 2023
1 parent 01c33cf commit cabb9fb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions explorer/scan/local_scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ func (s *LocalScanner) distributeJob(job *Job, ctx context.Context, upstream *up
log.Error().Err(err).Msg("unable to connect to asset")
continue
}
asset = runtime.Provider.Connection.Asset // to ensure we get all the information the connect call gave us

// for all discovered assets, we apply mondoo-specific labels and annotations that come from the root asset
for _, a := range runtime.Provider.Connection.GetInventory().GetSpec().GetAssets() {
Expand Down Expand Up @@ -272,6 +273,7 @@ func (s *LocalScanner) distributeJob(job *Job, ctx context.Context, upstream *up
Asset: candidate.asset,
Upstream: upstream,
})
candidate.asset = runtime.Provider.Connection.Asset // to ensure we get all the information the connect call gave us

if err != nil {
log.Error().Err(err).Str("asset", candidate.asset.Name).Msg("unable to connect to asset")
Expand Down

0 comments on commit cabb9fb

Please sign in to comment.