Skip to content

Commit

Permalink
Handle wildcards in scopes
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanratcliffe committed Dec 6, 2024
1 parent 35f4357 commit 75fac02
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions adapters/iam.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,14 @@ func LinksFromPolicy(document *policy.Policy) []*sdp.LinkedItemQuery {
// accepts ARNs
scope := sdp.WILDCARD
if arn.AccountID != "aws" {
// If we have an account and region, then use those
scope = adapterhelpers.FormatScope(arn.AccountID, arn.Region)
if arn.AccountID != "*" && arn.Region != "*" {
// If we have an account and region, then use those
scope = adapterhelpers.FormatScope(arn.AccountID, arn.Region)
} else {
// If we have wildcards then we need to search all
// accounts and regions
scope = "*"
}
}

// It would be good here if we had a way to definitely know what
Expand Down

0 comments on commit 75fac02

Please sign in to comment.