Skip to content

Commit 8a4ea98

Browse files
committed
PolicyHasValidAWSPrincipals: Reduce visibility.
1 parent 00a0362 commit 8a4ea98

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

internal/service/iam/exports.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ package iam
77
var (
88
ResourceRole = resourceRole
99

10-
DeleteServiceLinkedRole = deleteServiceLinkedRole
11-
FindRoleByName = findRoleByName
10+
DeleteServiceLinkedRole = deleteServiceLinkedRole
11+
FindRoleByName = findRoleByName
12+
PolicyHasValidAWSPrincipals = policyHasValidAWSPrincipals
1213
)
1314

1415
type (

internal/service/iam/policy_model.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,11 @@ func policyDecodeConfigStringList(lI []any) any {
249249
return ret
250250
}
251251

252-
// PolicyHasValidAWSPrincipals validates that the Principals in an IAM Policy are valid
252+
// policyHasValidAWSPrincipals validates that the Principals in an IAM Policy are valid
253253
// Assumes that non-"AWS" Principals are valid
254254
// The value can be a single string or a slice of strings
255255
// Valid strings are either an ARN or an AWS account ID
256-
func PolicyHasValidAWSPrincipals(policy string) (bool, error) { // nosemgrep:ci.aws-in-func-name
256+
func policyHasValidAWSPrincipals(policy string) (bool, error) { // nosemgrep:ci.aws-in-func-name
257257
var policyData any
258258
err := json.Unmarshal([]byte(policy), &policyData)
259259
if err != nil {

0 commit comments

Comments
 (0)