Skip to content

Arg parsing: strip quotes from arguments only if the argument begins and ends with quotes #400

Description

@brcrista

Describe the enhancement
We saw an issue where a secret appeared to be leaked in a run's logs. What actually happened was that the secret contained a " in the middle. The " was stripped out, and then the secret value minus the quote was "leaked."

Here's the line from the offending action.

Code Snippet
Repro per @ericsciple:

$ npm install @actions/exec .
$ node -e 'var exec = require("@actions/exec"); exec.exec(`bash -c echo foo="hi"`);'
[command]/bin/bash -c echo foo=hi

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