Skip to content

Commit

Permalink
feat(cmd): add keys validation (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
tzurielweisberg authored Jun 2, 2022
1 parent 52f442c commit 4ca9b1f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/buildClient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ func Get(scanPath string, c *cli.Context) (Client, error) {
return nil, fmt.Errorf("could not find the AQUA_SECRET environment variable")
}

if aquaKey == "" || aquaSecret == "" {
return nil, fmt.Errorf("could not continue with empty value for AQUA_KEY or AQUA_SECRET environment variables")
}

log.Logger.Debugf("Logging in to CSPM")
jwtToken, err := obtainJWT(aquaKey, aquaSecret, cspmURL)
if err != nil {
Expand Down

0 comments on commit 4ca9b1f

Please sign in to comment.