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

Escape commands passed to run and execute #37

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

stnguyen90
Copy link

Each element in commands should be treated as a single argument so we should escape it as an argument to prevent anything from breakint out to execute anything else.

@stnguyen90 stnguyen90 force-pushed the fix-command-escaping branch 5 times, most recently from fa29780 to db2bdc3 Compare March 12, 2024 22:21
@stnguyen90 stnguyen90 marked this pull request as draft March 22, 2024 17:44
@stnguyen90
Copy link
Author

Need to fix tests.

@stnguyen90
Copy link
Author

The tests are probably failing because the 3rd command is being escaped:

$containerId1 = static::getOrchestration()->run(
'containerstack/alpine-stress', // https://github.com/containerstack/alpine-stress
'UsageStats1',
[
'sh',
'-c',
'apk update && apk add screen && tail -f /dev/null',
],

@stnguyen90 stnguyen90 force-pushed the fix-command-escaping branch 13 times, most recently from a6b4bc9 to aeb9b9a Compare May 10, 2024 23:39
Each element in commands should be treated as a single argument so
we should escape it as an argument to prevent anything from
breakint out to execute anything else.
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