kneemaa / github-action-rotate-aws-secrets

Github Action to rotate AWS Access Keys stored in a repositories secrets
MIT License
37 stars 19 forks source link

Support for Secrets in GitHub Environments #7

Closed TrashManTrashCans closed 3 years ago

TrashManTrashCans commented 3 years ago

When trying to rotate credentials stored in the new GitHub Environments, the action can read the secrets out of the Environment and do the necessary actions on the AWS side but when writing values it writes into the Repository secrets.

kneemaa commented 3 years ago

@TrashManTrashCans have you double checked that the User with the PAT token has Admin permissions to the repository it wants to update?

TrashManTrashCans commented 3 years ago

@kneemaa Yes, the PAT token has admin permissions. I think the issue is that the code here is hard coded to write to the root of the GitHub secrets for the repo, like line 134 here. The secrets Environment feature sort of acts as a DIR within the root secrets repo and I think would require some sort of logic for the rotation action to work with it.