Skip to content

Commit

Permalink
Merge pull request #426 from armosec/cloudjira
Browse files Browse the repository at this point in the history
rename cloud account GUID attribute and update validation error messages
  • Loading branch information
kooomix authored Jan 6, 2025
2 parents bf310d0 + 70f95b4 commit 296087b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion identifiers/designators.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ const (

// CSPM related attributes
const (
AttributeCloudAccountGUID = "accountGUID"
AttributeCloudAccountGUID = "cloudAccountGUID"
AttributeCloudAccountID = "accountID"
AttributeCloudAccountName = "accountName"
AttributeFramework = "framework"
Expand Down
8 changes: 4 additions & 4 deletions notifications/integrationref.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ func (e *EntityIdentifiers) Validate() error {
return fmt.Errorf("security risk id, category and name are required for %s", e.Type)
}
case EntityTypeCloudResource:
if e.Name == "" || e.ResourceHash == "" || e.ResourceID == "" || e.CloudAccountGUID == "" {
return fmt.Errorf("name, resource hash, resource id and cloud account guid are required for %s", e.Type)
if e.ResourceHash == "" || e.ResourceID == "" || e.CloudAccountGUID == "" {
return fmt.Errorf("resource hash, resource id and cloud account guid are required for %s", e.Type)
}
case EntityTypeCloudRule:
if e.RuleHash == "" || e.CloudControlHash == "" || e.Severity == "" {
Expand Down Expand Up @@ -290,11 +290,11 @@ func (e *EntityIdentifiers) ToMap() map[string]string {
}

if e.RuleHash != "" {
entityMap["ruleHash"] = e.RuleHash
entityMap[identifiers.AttributeCloudRuleHash] = e.RuleHash
}

if e.CloudAccountGUID != "" {
entityMap["cloudAccountGUID"] = e.CloudAccountGUID
entityMap[identifiers.AttributeCloudAccountGUID] = e.CloudAccountGUID
}

return entityMap
Expand Down

0 comments on commit 296087b

Please sign in to comment.