Skip to content

Commit 1019e79

Browse files
Fixed pipeline security vulnerabilities
1 parent d8496df commit 1019e79

16 files changed

Lines changed: 670 additions & 147 deletions

.github/workflows/azure-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: actions/checkout@v5
1818
# Step 2: Validate the Azure template using microsoft/template-validation-action
1919
- name: Validate Azure Template
20-
uses: microsoft/template-validation-action@Latest
20+
uses: microsoft/template-validation-action@bae4895d0a8abd4f0d5aad68ae8647b3027f4c91
2121
with:
2222
validateAzd: true
2323
useDevContainer: false

.github/workflows/build-docker-images.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Build Docker and Optional Push
2-
2+
permissions:
3+
contents: read
4+
actions: read
35
on:
46
push:
57
branches:

.github/workflows/deploy-linux.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
name: Deploy-Test-Cleanup (v2) Linux
2+
permissions:
3+
contents: read
4+
actions: read
25
on:
36
workflow_run:
47
workflows: ["Build Docker and Optional Push"]

.github/workflows/deploy-orchestrator.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Deployment orchestrator
22

3+
permissions:
4+
contents: read
5+
actions: read
6+
37
on:
48
workflow_call:
59
inputs:

.github/workflows/deploy-windows.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
name: Deploy-Test-Cleanup (v2) Windows
2+
permissions:
3+
contents: read
4+
actions: read
25
on:
36
workflow_dispatch:
47
inputs:

.github/workflows/deploy.yml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Deploy-Test-Cleanup Pipeline
22

3+
permissions:
4+
contents: read
5+
actions: read
36
on:
47
workflow_run:
58
workflows: ["Build Docker and Optional Push"]
@@ -27,23 +30,19 @@ jobs:
2730
- name: Checkout Code
2831
uses: actions/checkout@v5
2932

30-
- name: Setup Azure CLI
31-
run: |
32-
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
33-
az --version # Verify installation
34-
3533
- name: Login to Azure
3634
run: |
3735
az login --service-principal -u ${{ secrets.AZURE_CLIENT_ID }} -p ${{ secrets.AZURE_CLIENT_SECRET }} --tenant ${{ secrets.AZURE_TENANT_ID }}
3836
3937
- name: Run Quota Check
4038
id: quota-check
39+
env:
40+
AZURE_CLIENT_ID=${{ secrets.AZURE_CLIENT_ID }}
41+
AZURE_TENANT_ID=${{ secrets.AZURE_TENANT_ID }}
42+
AZURE_CLIENT_SECRET=${{ secrets.AZURE_CLIENT_SECRET }}
43+
AZURE_SUBSCRIPTION_ID=${{ secrets.AZURE_SUBSCRIPTION_ID }}
44+
AZURE_REGIONS=${{ vars.AZURE_REGIONS }}
4145
run: |
42-
export AZURE_CLIENT_ID=${{ secrets.AZURE_CLIENT_ID }}
43-
export AZURE_TENANT_ID=${{ secrets.AZURE_TENANT_ID }}
44-
export AZURE_CLIENT_SECRET=${{ secrets.AZURE_CLIENT_SECRET }}
45-
export AZURE_SUBSCRIPTION_ID="${{ secrets.AZURE_SUBSCRIPTION_ID }}"
46-
export AZURE_REGIONS="${{ vars.AZURE_REGIONS }}"
4746
chmod +x scripts/checkquota.sh
4847
if ! scripts/checkquota.sh; then
4948
# If quota check fails due to insufficient quota, set the flag
@@ -185,10 +184,6 @@ jobs:
185184
env:
186185
RESOURCE_GROUP_NAME: ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
187186
steps:
188-
- name: Setup Azure CLI
189-
run: |
190-
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
191-
az --version # Verify installation
192187

193188
- name: Login to Azure
194189
run: |

.github/workflows/job-cleanup-deployment.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
name: Cleanup Deployment Job
2+
3+
permissions:
4+
contents: read
5+
actions: read
26
on:
37
workflow_call:
48
inputs:
@@ -52,13 +56,6 @@ jobs:
5256
ENV_NAME: ${{ inputs.ENV_NAME }}
5357
IMAGE_TAG: ${{ inputs.IMAGE_TAG }}
5458
steps:
55-
- name: Setup Azure CLI
56-
shell: bash
57-
run: |
58-
if [[ "${{ runner.os }}" == "Linux" ]]; then
59-
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
60-
fi
61-
az --version
6259

6360
- name: Login to Azure
6461
shell: bash

0 commit comments

Comments
 (0)