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

Block unexpected workflow commands #5

Merged
merged 1 commit into from
Oct 10, 2021
Merged

Conversation

rcowsill
Copy link
Contributor

Currently the environment and event payload are printed while workflow command processing is active. If the printed text contains workflow commands these will be handled by the runner.

That can happen if, for example, someone copies workflow log output into an issue comment:

CI is failing with `##[error]Process completed with exit code 1`...

This PR prevents that by switching off command processing while printing.

Copy link
Owner

@hmarr hmarr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thanks for the contribution. I just have one quick question before merging.

index.js Outdated Show resolved Hide resolved
Don't process workflow commands when logging potentially untrusted text
@hmarr hmarr merged commit 1201a20 into hmarr:v2 Oct 10, 2021
@hmarr
Copy link
Owner

hmarr commented Oct 10, 2021

Thanks @rcowsill 🙌

Released as v2.0.1 (and also merged into the v2 branch so using hmarr/debug-action@v2 should pull this change in).

@rcowsill rcowsill deleted the feat/stop-commands branch October 10, 2021 20:06
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

Successfully merging this pull request may close these issues.

2 participants