Skip to content

Commit b062415

Browse files
committed
Sonarcloud recommendations
1 parent b9a48fd commit b062415

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/deploy-backend.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ jobs:
4747
runs-on: ubuntu-latest
4848
environment:
4949
name: ${{ inputs.environment }}
50+
env: # Sonarcloud - do not allow direct usage of untrusted data
51+
APIGEE_ENVIRONMENT: ${{ inputs.apigee_environment }}
52+
BACKEND_ENVIRONMENT: ${{ inputs.environment }}
53+
BACKEND_SUB_ENVIRONMENT: ${{ inputs.sub_environment }}
5054
permissions:
5155
id-token: write
5256
contents: read
@@ -70,17 +74,21 @@ jobs:
7074

7175
- name: Terraform Init
7276
working-directory: ${{ vars.TERRAFORM_DIR_PATH }}
73-
run: make init apigee_environment=${{ inputs.apigee_environment }} environment=${{ inputs.environment }} sub_environment=${{ inputs.sub_environment }}
77+
run: make init apigee_environment=$APIGEE_ENVIRONMENT environment=$BACKEND_ENVIRONMENT sub_environment=$BACKEND_SUB_ENVIRONMENT
7478

7579
- name: Terraform Plan
7680
working-directory: ${{ vars.TERRAFORM_DIR_PATH }}
77-
run: make plan apigee_environment=${{ inputs.apigee_environment }} environment=${{ inputs.environment }} sub_environment=${{ inputs.sub_environment }}
81+
run: make plan apigee_environment=$APIGEE_ENVIRONMENT environment=$BACKEND_ENVIRONMENT sub_environment=$BACKEND_SUB_ENVIRONMENT
7882

7983
terraform-apply:
8084
needs: terraform-plan
8185
runs-on: ubuntu-latest
8286
environment:
8387
name: ${{ inputs.environment }}
88+
env: # Sonarcloud - do not allow direct usage of untrusted data
89+
APIGEE_ENVIRONMENT: ${{ inputs.apigee_environment }}
90+
BACKEND_ENVIRONMENT: ${{ inputs.environment }}
91+
BACKEND_SUB_ENVIRONMENT: ${{ inputs.sub_environment }}
8492
permissions:
8593
id-token: write
8694
contents: read
@@ -100,12 +108,12 @@ jobs:
100108

101109
- name: Terraform Init
102110
working-directory: ${{ vars.TERRAFORM_DIR_PATH }}
103-
run: make init apigee_environment=${{ inputs.apigee_environment }} environment=${{ inputs.environment }} sub_environment=${{ inputs.sub_environment }}
111+
run: make init apigee_environment=$APIGEE_ENVIRONMENT environment=$BACKEND_ENVIRONMENT sub_environment=$BACKEND_SUB_ENVIRONMENT
104112

105113
- name: Terraform Apply
106114
working-directory: ${{ vars.TERRAFORM_DIR_PATH }}
107115
run: |
108-
make apply apigee_environment=${{ inputs.apigee_environment }} environment=${{ inputs.environment }} sub_environment=${{ inputs.sub_environment }}
116+
make apply apigee_environment=$APIGEE_ENVIRONMENT environment=$BACKEND_ENVIRONMENT sub_environment=$BACKEND_SUB_ENVIRONMENT
109117
echo "ID_SYNC_QUEUE_ARN=$(make -s output name=id_sync_queue_arn)" >> $GITHUB_ENV
110118
111119
- name: Install poetry

0 commit comments

Comments
 (0)