Skip to content

Commit 1a84bae

Browse files
Copilotdscho
andcommitted
fixup! Add --ref-format option to scalar clone (#829)
release-winget: use WINGET_CREATE_GITHUB_TOKEN environment variable According to the winget-create documentation, for CI/CD scenarios it is recommended to use the WINGET_CREATE_GITHUB_TOKEN environment variable to pass the token to wingetcreate.exe rather than the -t command-line flag. The concern is that command-line arguments might be logged in process listings, whereas environment variables are more secure as they are not typically exposed in such listings. This change: - Retrieves the token from Azure Key Vault directly into the WINGET_CREATE_GITHUB_TOKEN environment variable using `az keyvault secret show` instead of downloading to a file - Removes the -t flag from the wingetcreate.exe submit command - Removes the need for the token.txt file Co-authored-by: dscho <[email protected]>
1 parent 528a3af commit 1a84bae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/release-winget.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
"$($asset_arm64_url)|arm64|machine" `
7373
"$($asset_arm64_url)|arm64|user"
7474
75-
# Download the token from Azure Key Vault and set the environment variable
75+
# Download the token from Azure Key Vault and mask it in the logs
7676
$env:WINGET_CREATE_GITHUB_TOKEN = az keyvault secret show --name ${{ secrets.WINGET_TOKEN_SECRET_NAME }} --vault-name ${{ secrets.AZURE_VAULT }} --query "value" -o tsv
7777
Write-Host -NoNewLine "::add-mask::$env:WINGET_CREATE_GITHUB_TOKEN"
7878

0 commit comments

Comments
 (0)