Skip to content

Option to override credential path #472

@wyardley

Description

@wyardley

TL;DR

It doesn't appear there's a way to override the credential path outside of the workspace? This has the effect of including the credentials if a Docker build is done and there's a top level COPY . with gha-credentials* not in .dockerignore.

Obviously there are a couple of easy fixes (adding to .dockerignore, not using COPY .), but this is messy at best, even if the credentials leaked would likely not be usable for long.

auth/src/main.ts

Lines 150 to 153 in 71f9864

// This has the unintended side-effect of leaking credentials over time,
// because GITHUB_WORKSPACE is not automatically cleaned up on self-hosted
// runners. To mitigate this issue, this action defines a post step to
// remove any created credentials.

I see some of the notes about why this is so, but would it be possible to make the behavior more configurable, either to allow a user specified path, or to have some option that would create the credentials outside of the workspace, like in a temporary directory?

Detailed design

No response

Additional information

I think I could probably set create_credentials_file to false for now -- I don't need it, and had thought the default was false, but I may need it in the future for another step in my build anyway.

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