Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support disable/enable commands #36

Open
dcsobral opened this issue Nov 16, 2020 · 5 comments
Open

Support disable/enable commands #36

dcsobral opened this issue Nov 16, 2020 · 5 comments

Comments

@dcsobral
Copy link

The example from github blog is:

        # disable command workflow processing
        echo "::stop-commands::`echo -n ${{ github.token }} | sha256sum | head -c 64`"

        # log untrusted output
        echo "untrusted output"

        # enable workflow command processing
        echo "::`echo -n ${{ github.token }} | sha256sum | head -c 64`::"

The disable/enable is constant, so they could be provided as actions. Better yet, though, would be a withUntrusted or withCommandsDisabled workflow step that takes other workflow steps as input, and runs then with commands disabled as above.

@djspiewak
Copy link
Collaborator

I haven't looked too closely at stop-commands; what's the use-case for this beyond demonstrating security vulnerabilities?

@dcsobral
Copy link
Author

dcsobral commented Nov 16, 2020 via email

@djspiewak
Copy link
Collaborator

Is that common enough to merit having its own semantic action rather than just using WorkflowStep.Run(List("echo ::stop-commands::"))?

@dcsobral
Copy link
Author

dcsobral commented Nov 16, 2020 via email

@djspiewak
Copy link
Collaborator

Ahhhh, I see. I would accept a PR for that. Probably something like commandsDisabled(List[WorkflowStep]): List[WorkflowStep] combinator as you suggested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants