Fix slice initialization error (#3293)

This commit is contained in:
tiaoxizhan 2024-09-13 21:14:51 +08:00 committed by GitHub
parent dc9c9a30b3
commit 07dc95dd58
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -252,7 +252,7 @@ func AnalyzePermissions(cfg *config.Config, key string) (*SecretInfo, error) {
}
func convertScopeToAnalyzerPermissions(scopes []string) []analyzers.Permission {
permissions := make([]analyzers.Permission, len(scopes))
permissions := make([]analyzers.Permission, 0, len(scopes))
for _, scope := range scopes {
permissions = append(permissions, analyzers.Permission{Value: scope})
}