mirror of
https://github.com/awslabs/iam-policy-autopilot.git
synced 2026-04-26 00:15:57 +03:00
[GH-ISSUE #95] Support for JavaScript/TypeScript Wildcard Imports in AWS SDK Extraction #72
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/iam-policy-autopilot#72
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @adpaco-aws on GitHub (Jan 9, 2026).
Original GitHub issue: https://github.com/awslabs/iam-policy-autopilot/issues/95
Is your feature request related to a problem? Please describe.
I'm unable to generate policies for JavaScript/TypeScript codebases that use wildcard import syntax like
import * as S3 from '@aws-sdk/client-s3'. The current extractor only detects AWS SDK operations when using explicit named imports or destructuring imports, but many codebases use namespace imports for better code organization. This results in incomplete IAM policy generation because waiter calls, command instantiations, and paginator usage are not detected when accessed through a namespace (e.g.,S3.waitUntilBucketExists(),new S3.CreateBucketCommand()).Describe the solution you'd like
I'd like the JavaScript/TypeScript extractor to support wildcard import patterns and detect AWS SDK operations accessed through namespaces. Specifically:
import * as NameSpace from '@aws-sdk/client-service'patternsNameSpace.waitUntilBucketExists(config, params)(waiters)new NameSpace.CreateBucketCommand(params)(commands)NameSpace.paginateListObjects(config, params)(paginators)Additional context
Current Working Pattern:
Requested Pattern: