microsoft / microsoft/AzureTRE
Checks for required variables/secrets don't catch empty GitHub secrets
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 235
- Forks
- 192
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 13
Description
The checks for required variables in deploy_tre_reusable.yml only check for '', however GitHub passes empty secret values as the string 'null' which results in errors deploying the TRE (it tries to use a TRE_ID of 'null', which causes an error because it tries to set a tag value of 'null', which Azure does not allow). Adding a GitHub secret named TRE_ID but not setting any value triggers the error.
Changing the checks to the following format correctly detects missing secret values:
if [[ "${{ secrets.AAD_TENANT_ID }}" == '' || "${{ secrets.AAD_TENANT_ID }}" == 'null' ]]; then
echo "Missing secret: AAD_TENANT_ID" && exit 1
fi
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in deploy_tre_reusable.yml and inspect the required variable and secret checks, especially the validation for TRE_ID and AAD_TENANT_ID. Confirm how empty GitHub secrets are represented, then update the checks consistently and verify that unset secrets are rejected before deployment rather than passed to Azure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, shell
- Domain
- ci-cd, devops
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100