Skip to content

Runner corrupts secrets containing backslashes #2089

@redlizard

Description

@redlizard

As of version 2.296.0, if the actions runner creates a docker container to execute an action which receives github secrets as environment variables, any backslash characters in the secret values get doubled. This results in the docker container receiving an incorrect value of the secret.

Commit 01fd044 escapes all command line arguments to docker commands by replacing double-quote and backslash character with an escape sequence, which includes github secrets. This would work on unix, but the action runner dotnet framework uses the windows-native escape scheme, in which \\ is not an escape sequence in most conditions. Thus, escaped backslashes in secret values are not interpreted correctly when starting a docker process using the resulting command line arguments.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions