-
Notifications
You must be signed in to change notification settings - Fork 562
Open
Labels
Description
Describe the feature
It would be nice if role-session-name input is sanitized and passed to STS API.
Use Case
When I set a repository name or actor to role-session-name, STS API returns the error: Member must satisfy regular expression pattern: [\w+=,.@-]*. For example,
- uses: aws-actions/configure-aws-credentials@v6
with:
aws-region: us-east-2
role-to-assume: arn:aws:iam::987654321000:role/my-second-role
role-session-name: GitHubActions--${github.repository}--${github.actor}I need to sanitize it using some script like:
- run: echo "value=GitHubActions--${GITHUB_REPOSITORY}--${GITHUB_ACTOR}" | sed -E 's/[^a-zA-Z0-9+=,.@-]/_/g' >> "$GITHUB_OUTPUT"Proposed Solution
I think the role session name can be sanitized before sending a request:
configure-aws-credentials/src/assumeRole.ts
Line 145 in 6e631f0
| RoleSessionName: roleSessionName, |
Other Information
No response
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
Reactions are currently unavailable