Skip to content

Commit cc175ab

Browse files
committed
refactor: FTRS-313 Refactor GitHub workflows to enhance SonarQube security
1 parent a006153 commit cc175ab

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

.github/workflows/deploy-application-infrastructure.yaml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Deploy application infrastructure workflow
22

3-
permissions:
4-
id-token: write
5-
contents: read
3+
permissions: {}
64
on:
75
workflow_call:
86
inputs:
@@ -57,27 +55,30 @@ on:
5755
required: false
5856
default: "dev,test,int"
5957
type: string
58+
secrets:
59+
ACCOUNT_ID:
60+
description: "AWS account ID for credentials"
61+
required: true
62+
MGMT_ACCOUNT_ID:
63+
description: "Management AWS account ID for credentials"
64+
required: true
6065
outputs:
6166
plan_result:
6267
description: "The Terraform plan output"
6368
value: ${{ jobs.plan-application-infrastructure.outputs.plan_result }}
6469
deploy_status:
6570
description: "The status of the deployment"
6671
value: ${{ jobs.deploy_summary.outputs.deploy_status }}
67-
secrets:
68-
ACCOUNT_ID:
69-
description: "AWS account ID for credentials"
70-
required: true
71-
MGMT_ACCOUNT_ID:
72-
description: "Management AWS account ID for credentials"
73-
required: true
7472

7573
jobs:
7674
plan-application-infrastructure:
7775
name: "Plan application infrastructure deployment to ${{ inputs.environment }} "
7876
concurrency:
7977
group: "${{ inputs.environment }}-${{ inputs.ref || inputs.workspace}}"
8078
cancel-in-progress: false
79+
permissions:
80+
contents: read
81+
id-token: write
8182
uses: ./.github/workflows/deploy-infrastructure.yaml
8283
with:
8384
environment: ${{ inputs.environment }}
@@ -119,6 +120,9 @@ jobs:
119120
needs:
120121
- plan-application-infrastructure
121122
- manual-approval-application-infra
123+
permissions:
124+
contents: read
125+
id-token: write
122126
uses: ./.github/workflows/deploy-infrastructure.yaml
123127
with:
124128
environment: ${{ inputs.environment }}

0 commit comments

Comments
 (0)