Skip to content

Commit e3c9e02

Browse files
fix possible command injection (#27)
1 parent 565ffd1 commit e3c9e02

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

action.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ runs:
143143
144144
if [ -z "${{ inputs.project-id }}" ]
145145
then
146-
atlas cluster create ${{ inputs.create-cluster-name }} ${CLUSTER_CONFIG}
146+
atlas cluster create "${{ inputs.create-cluster-name }}" ${CLUSTER_CONFIG}
147147
else
148-
atlas cluster create ${{ inputs.create-cluster-name }} --projectId ${{ inputs.project-id }} ${CLUSTER_CONFIG}
148+
atlas cluster create "${{ inputs.create-cluster-name }}" --projectId "${{ inputs.project-id }}" ${CLUSTER_CONFIG}
149149
fi
150150

151151
- name: Delete Cluster
@@ -154,8 +154,8 @@ runs:
154154
env:
155155
ATLAS_GITHUB_ACTION: "true"
156156
run: |
157-
atlas cluster delete ${{ inputs.delete-cluster-name }} --force --projectId ${{ inputs.delete-project-id }}
158-
if ! atlas cluster watch ${{ inputs.delete-cluster-name }} --projectId ${{ inputs.delete-project-id }} >/dev/null 2>&1; then
157+
atlas cluster delete "${{ inputs.delete-cluster-name }}" --force --projectId "${{ inputs.delete-project-id }}"
158+
if ! atlas cluster watch "${{ inputs.delete-cluster-name }}" --projectId "${{ inputs.delete-project-id }}" >/dev/null 2>&1; then
159159
echo "Atlas Cluster '${{ inputs.delete-cluster-name }}' is deleted"
160160
exit 0
161161
fi
@@ -166,7 +166,7 @@ runs:
166166
env:
167167
ATLAS_GITHUB_ACTION: "true"
168168
run: |
169-
atlas project delete ${{ inputs.delete-project-id }} --force
169+
atlas project delete "${{ inputs.delete-project-id }}" --force
170170
171171
- name: Setup
172172
if: ${{ inputs.run-setup == 'true' && inputs.username && inputs.password }}

0 commit comments

Comments
 (0)