-
Notifications
You must be signed in to change notification settings - Fork 486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: sanitize AWS session tags #20
fix: sanitize AWS session tags #20
Conversation
@clareliguori Thanks for the review! I've also added another change to sanitise another tag value also. |
Do you think |
One thing that worries me here, though I'm not sure if there's a good answer, is collisions. Back to my original desire to let this provide a useful way to limit what can assume a particular role, there are potentially a lot of values that will sanitize to the same thing. On the other hand, the repo owner controls all of these values, so they can keep them clean if they want to. Maybe just add something to the readme warning of this? |
I've updated the readme with full(?) documentation about assuming a role. Hopefully it's clarifying. |
Other than the points @clareliguori raised, this LGTM. :) |
@clareliguori Well spotted, thanks. Updated :) |
Closes #18
Ensure that alls tags applied to the AWS role session are valid.
For
GITHUB_ACTOR
,[
and]
must be removed.For
GITHUB_WORKFLOW
I've inverted the tag value requirement regex,[\p{L}\p{Z}\p{N}_.:/=+\-@]+
, and replaced any characters that don't conform. I've also truncated the value as it has a maximum of 256 chars.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.