mirror of
https://github.com/safedep/vet.git
synced 2025-12-10 00:22:08 -06:00
chore: Add error msg when Insights v2 is used without API key
This commit is contained in:
parent
0d698b7b21
commit
652b465893
9
scan.go
9
scan.go
@ -195,6 +195,8 @@ func startScan() {
|
||||
|
||||
if auth.CommunityMode() {
|
||||
ui.PrintSuccess("Running in Community Mode")
|
||||
} else {
|
||||
ui.PrintSuccess("Running in Cloud (authenticated) Mode")
|
||||
}
|
||||
|
||||
failOnError("scan", internalStartScan())
|
||||
@ -429,6 +431,13 @@ func internalStartScan() error {
|
||||
if enrich {
|
||||
var enricher scanner.PackageMetaEnricher
|
||||
if enrichUsingInsightsV2 {
|
||||
// We will enforce auth for Insights v2 during the experimental period.
|
||||
// Once we have an understanding on the usage and capacity, we will open
|
||||
// up for community usage.
|
||||
if auth.CommunityMode() {
|
||||
return fmt.Errorf("Insights v2 requires an API key. For more details: https://docs.safedep.io/cloud/quickstart/")
|
||||
}
|
||||
|
||||
client, err := auth.InsightsV2ClientConnection("vet-insights-v2")
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user