Skip to content

Commit c25f203

Browse files
committed
ci: guard Sonar secrets on trusted PRs only
1 parent d3eac53 commit c25f203

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/sonarcloud.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
3939
- name: Azure login (OIDC)
4040
if: ${{ github.event_name != 'pull_request' || (github.event.pull_request.head.repo.fork == false && contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.pull_request.author_association)) }}
41-
uses: azure/login@v2
41+
uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5
4242
with:
4343
client-id: ${{ vars.AZURE_CLIENT_ID }}
4444
tenant-id: ${{ vars.AZURE_TENANT_ID }}
@@ -49,6 +49,7 @@ jobs:
4949
id: sonar_token
5050
shell: bash
5151
run: |
52+
set -euo pipefail
5253
SONAR_TOKEN="$(az keyvault secret show \
5354
--vault-name "${{ vars.AZURE_KEYVAULT_NAME }}" \
5455
--name "sonar-cloud-token" \

0 commit comments

Comments
 (0)