When create_credentials_file=true is passed, the credentials file is created inside the GitHub Actions runner's WORKSPACE directory.
As noted in the code (reference), this design choice allows the exported credentials to be automatically accessible to Docker-based actions without additional user configuration.
However, this default behavior introduces a potential risk:
Many workflows, particularly those generating assets use glob-based copy commands (e.g., cp -r *, etc.) - If users are not careful, this can inadvertently include the credential file in the build context or artifacts, potentially exposing sensitive information in pull requests, releases, etc.
We could consider one of the following alternatives:
- Change the default export location to a less risky directory outside of WORKSPACE. Secondly, provide guidance for the convenience this provides, aforementioned.
- Require an explicit path for create_credentials_file, rather than defaulting to the working directory.