Skip to content

Commit

Permalink
Merge pull request #393 from armosec/reg-gar
Browse files Browse the repository at this point in the history
* remove idle status * add gar key field
  • Loading branch information
refaelm92 authored Nov 24, 2024
2 parents 3f33755 + 20a0e23 commit 9264225
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion armotypes/registrymethods.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func (azure *AzureImageRegistry) GetDisplayName() string {
}

func (google *GoogleImageRegistry) MaskSecret() {

google.Key = nil
}

func (google *GoogleImageRegistry) ExtractSecret() interface{} {
Expand All @@ -162,6 +162,9 @@ func (google *GoogleImageRegistry) Validate() error {
if google.RegistryURI == "" {
return errors.New("registryURI is empty")
}
if len(google.Key) == 0 {
return errors.New("json key is empty")
}
return nil
}

Expand Down
4 changes: 2 additions & 2 deletions armotypes/registrytypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ const (
Error RegistryManageStatus = "Error"

// Scan statuses
Idle RegistryScanStatus = "Idle"
Failed RegistryScanStatus = "Failed"
InProgress RegistryScanStatus = "In progress"
Completed RegistryScanStatus = "Completed"
Expand Down Expand Up @@ -128,7 +127,8 @@ type AWSImageRegistry struct {

type GoogleImageRegistry struct {
BaseContainerImageRegistry `json:",inline"`
RegistryURI string `json:"registryURI"`
RegistryURI string `json:"registryURI"`
Key map[string]interface{} `json:"key,omitempty"`
}

type NexusImageRegistry struct {
Expand Down

0 comments on commit 9264225

Please sign in to comment.