Skip to content

Side-effect of leaking credentials w/ create_credentials_file in downstream glob-based copy steps #497

@svij-sc

Description

@svij-sc

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions