-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat(setup-sentry): Add toggle to setup sentry gha #104459
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
base: master
Are you sure you want to change the base?
Conversation
| if [ "${{ inputs.toggle }}" != "" ]; then | ||
| echo "Toggling off ${{ inputs.toggle }}" | ||
| devservices toggle ${{ inputs.toggle }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Unquoted shell variable allows command injection
The ${{ inputs.toggle }} value is directly interpolated into the shell command without quotes on line 132. If the toggle input contains special shell characters or malicious content (e.g., snuba; malicious-command), it could lead to command injection. While the input is quoted in the condition check on line 130, it's unquoted when passed to devservices toggle. Using an environment variable (like WORKDIR is handled) and quoting it would be safer.
| required: false | ||
| default: 'default' | ||
| toggle: | ||
| description: 'Dependency to toggle off ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be dependency to toggle to local to be explicit?
and then devservices toggle foo local
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, it should
This allows us to easily ensure devservices does not bring up container for service in CI. Will be useful for snuba