Skip to content

Commit

Permalink
🐛 ensure we use the credential token for gitlab scan (#1793)
Browse files Browse the repository at this point in the history
  • Loading branch information
vjeffrey authored Sep 20, 2023
1 parent cc3ce67 commit 65bc812
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions motor/discovery/gitlab/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ func (r *Resolver) Resolve(ctx context.Context, root *asset.Asset, pCfg *provide
if err != nil {
return nil, err
}
if len(root.Connections) > 0 && root.Connections[0].Credentials != nil && len(root.Connections[0].Credentials) > 0 {
gitlabToken, err := credsResolver.GetCredential(root.Connections[0].Credentials[0])
if err == nil && gitlabToken != nil {
pCfg.Credentials = []*vault.Credential{gitlabToken}
}
}

defaultName := root.Name
list := []*asset.Asset{}
Expand Down

0 comments on commit 65bc812

Please sign in to comment.